From 925d950efb4c82d7464a306335dd527658494b11 Mon Sep 17 00:00:00 2001 From: Vladimir Panteleev Date: Sun, 28 Jul 2019 03:07:18 +0000 Subject: [PATCH] assets/scripts.js: Fix playing hash + pre-specified video src --- assets/scripts.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/assets/scripts.js b/assets/scripts.js index 362d45a..d624d34 100644 --- a/assets/scripts.js +++ b/assets/scripts.js @@ -367,7 +367,10 @@ window.onload = function() { var file_selector = document.getElementById("file-selector"); function startPlayback() { file_selector.style.display = 'none'; - playSegment(null); + if (window.location.hash) + playHash(window.location.hash); + else + playSegment(null); video_selector.play(); } if (video_source_selector.getAttribute("src") == '') { @@ -422,9 +425,6 @@ window.onload = function() { window.onhashchange = function() { playHash(window.location.hash); }; - if (window.location.hash) { - playHash(window.location.hash); - } }; function seek(ms) {