I have an HTML5 video with .mp4 source.
I need to stop that video, after an actor will finish some words.
To find out video's currentTime
accurately I use setInterval
function.
setInterval(function() {
console.log(video.currentTime);
if ( video.currentTime >= 4.3 ) {
video.pause();
}
}, 10);
I clearly calculated that the time position is 4.3 sec. And there is a little time gap before next actor words. The video is paused when I need it in the latest Chrome, Firefox, Opera, Safari and IOS browsers. But in IE10 it is paused earlier than needed and part of last word is cut. But in IE10 Console currentTime is 4.3+.
Video Codec is H.264, Audio Codec is AAC, Framerate is 24.