From 67d5aecd977b66c92931f88db63111c729b10c35 Mon Sep 17 00:00:00 2001 From: j Date: Sat, 17 Feb 2024 15:55:41 +0000 Subject: [PATCH] better seek --- app/static/js/VideoPlayer.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/static/js/VideoPlayer.js b/app/static/js/VideoPlayer.js index af219c5..8e095c9 100644 --- a/app/static/js/VideoPlayer.js +++ b/app/static/js/VideoPlayer.js @@ -335,6 +335,9 @@ window.VideoPlayer = function(options) { progress = that.querySelector('.controls .position .progress') that.querySelector('.controls .position').addEventListener("click", event => { var bar = event.target + if (bar && bar.classList.contains('position')) { + bar = bar.querySelector('.bar') + } while (bar && !bar.classList.contains('bar')) { bar = bar.parentElement }