mirror of
https://github.com/mmjee/Piped-Material.git
synced 2024-12-06 19:26:36 +01:00
Update position calculation
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user