From 8778546577d8e87df7f1317436d9e75202a69fd0 Mon Sep 17 00:00:00 2001 From: Simon Date: Mon, 5 Feb 2024 21:55:05 +0100 Subject: [PATCH] remove autoplay, disable video progress less than 10s --- tubearchivist/static/script.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tubearchivist/static/script.js b/tubearchivist/static/script.js index 84aad94..b1e6ad1 100644 --- a/tubearchivist/static/script.js +++ b/tubearchivist/static/script.js @@ -451,7 +451,7 @@ function createPlayer(button) { } let videoName = videoData.data.title; - let videoTag = createVideoTag(videoData, videoProgress); + let videoTag = createVideoTag(videoData, videoProgress, true); let playlist = ''; let videoPlaylists = videoData.data.playlist; // Array of playlists the video is in @@ -529,7 +529,7 @@ function insertVideoTag(videoData, videoProgress) { } // Generates a video tag with subtitles when passed videoData and videoProgress. -function createVideoTag(videoData, videoProgress) { +function createVideoTag(videoData, videoProgress, autoplay = false) { let videoId = videoData.data.youtube_id; let videoUrl = videoData.data.media_url; let videoThumbUrl = videoData.data.vid_thumb_url; @@ -546,7 +546,9 @@ function createVideoTag(videoData, videoProgress) { } let videoTag = ` -