From 1909b16ec55aa342da516cbf51e8a6d160759d98 Mon Sep 17 00:00:00 2001 From: Scheianu Ionut Date: Sun, 11 May 2025 19:36:32 +0300 Subject: [PATCH] updated app --- app/run_app.sh | 4 ++-- app/static/index.html | 11 ++++++--- app/static/settings.html | 49 ++++++++++++++++++++++++++++++++++++---- 3 files changed, 54 insertions(+), 10 deletions(-) diff --git a/app/run_app.sh b/app/run_app.sh index c1196f9..f4abc04 100644 --- a/app/run_app.sh +++ b/app/run_app.sh @@ -6,9 +6,9 @@ set -e # Activate the virtual environment source venv/bin/activate -# Run the Gunicorn server +# Run the Gunicorn server in the foreground echo "Starting Gunicorn server..." -python3 run_gunicorn.py & +exec python3 run_gunicorn.py & # Wait for 5 seconds to ensure the server is up sleep 5 diff --git a/app/static/index.html b/app/static/index.html index a836514..922dae7 100755 --- a/app/static/index.html +++ b/app/static/index.html @@ -27,9 +27,9 @@ } .playlist-container img, .playlist-container video { - max-width: 100%; - max-height: 100%; - object-fit: contain; /* Ensure content fits within the container */ + width: 100%; /* Make the video fill the width */ + height: 100%; /* Make the video fill the height */ + object-fit: cover; /* Ensure the video scales to cover the container */ } .controls-wrapper { position: fixed; /* Fix the controls at the bottom of the page */ @@ -149,6 +149,11 @@ video.controls = false; playlistContainer.appendChild(video); + // Ensure the video starts playing + video.play().catch(error => { + console.error("Error starting video playback:", error); + }); + // Play the video and move to the next item after it ends video.onended = () => { if (!isPaused) { diff --git a/app/static/settings.html b/app/static/settings.html index 60fe9fc..6d905d3 100755 --- a/app/static/settings.html +++ b/app/static/settings.html @@ -5,11 +5,50 @@ Settings