HTML5 video currentTime do not match real playback position in IE10

时间:2016-08-31 18:35:45

标签: javascript html5 internet-explorer video internet-explorer-10

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.

0 个答案:

没有答案