Mediaelement.js setCurrentTime incorrectly sets the time in Firefox and when using flash

I use the mediaelement.js component to display only parts of the video.
I put the listener on the timeupdate event , and every time the video plays a segment, I want to skip it, moving on to the next segment using setCurrentTime () . However, the next time the timeupdate event is fired , the time is different from what was set (a few seconds before the set time). this is my code:

var curr = t.media.getCurrentTime();
if (curr < segments[i][0]) {
  console.debug(curr.toFixed(1)+' jumping to '+segments[i][0]+' in segment '+i+'      ['+segments[i][0]+','+segments[i][1]+']');
  t.media.setCurrentTime(segments[i][0]);
  return;
}

when I register the current time after executing the code, it shows that the current time has been correctly updated (for example, to 19), but when the event is fired the next time the current time is incorrect (15.3).
This only happens with firefox, and when it returns to the flash, in chrome it seems like it works.
any ideas?

+3
source share
1 answer

. -, h.264 . Flash H.264, , , - .
, (, ffmpeg -g), .

+3

All Articles