Does anyone know how I can return what frame the video would be on at a certain point ?
so for example the video is playing and I press a js button ive made and it returns the current frame the video is on and prints it on screen .
Does anyone know how I can return what frame the video would be on at a certain point ?
so for example the video is playing and I press a js button ive made and it returns the current frame the video is on and prints it on screen .
There's no way to know the exact frame of the video from the html5 video element, but if you know the frame rate (e.g. 30 fps) up front you could do the calculation.
var frame = Math.floor(myPlayer.currentTime() * frameRate);