From e17b9f3ec45673dcac97e5b079394e1dfd536692 Mon Sep 17 00:00:00 2001 From: Sebastiaan de Schaetzen Date: Tue, 17 Jun 2025 09:27:49 +0200 Subject: [PATCH] Add play button to video thumbnails and implement video streaming endpoint --- static/index.html | 20 +++++++++ webview.go | 105 ++++++++++++++++++++++++++-------------------- 2 files changed, 79 insertions(+), 46 deletions(-) diff --git a/static/index.html b/static/index.html index 8454bc0..10c0e15 100644 --- a/static/index.html +++ b/static/index.html @@ -58,6 +58,25 @@ opacity: 0.7; z-index: 1; } + + .play-button { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + width: 80px; /* Adjust size as needed */ + height: 80px; /* Adjust size as needed */ + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E"); + background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */ + background-repeat: no-repeat; + background-position: center; + background-size: 50%; /* Adjust icon size within button */ + border-radius: 50%; /* Circular button */ + cursor: pointer; + z-index: 3; /* Ensure it's above the video thumbnails */ + border: 2px solid white; + box-shadow: 0 0 15px rgba(0,0,0,0.7); + }