Update position calculation

This commit is contained in:
root
2023-06-17 16:20:20 +05:30
parent b34a541b72
commit d524d426fa
+1 -1
View File
@@ -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