Answer the question
In order to leave comments, you need to log in
How to rewind custom html5 js video?
I am making a video player with js.
Did everything except rewind. I can not figure out how to rewind the video at all. There is an idea when mousemove on the < progress > element to find the distance (cursor coordinates) from the beginning of < progress > to the cursor itself and when clicking, change the cuurentTime of the video to this value. But I can't figure out how to find these coordinates starting from the element . e.pageX works from the beginning of the document or not?
var mouseX = Math.floor(e.pageX - progressBar.offsetLeft);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question