From d524d426faee222e2fd239cb54d6a09c23a9ca01 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 17 Jun 2023 16:20:20 +0530 Subject: [PATCH] Update position calculation --- src/components/Player.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Player.vue b/src/components/Player.vue index ebf27f0..cc67a8f 100644 --- a/src/components/Player.vue +++ b/src/components/Player.vue @@ -93,7 +93,7 @@ export default { // load the thumbnail preview when the user moves over the seekbar seekBar.addEventListener('mousemove', e => { this.onTimeBar = true - const position = (this.video.duration * e.clientX) / seekBar.clientWidth + const position = (e.offsetX / e.target.offsetWidth) * this.video.duration this.showSeekbarPreview(position * 1000, e.clientX) }) // hide the preview when the user stops hovering the seekbar