I'm developing a interactive HTML5 video with HTML elements over it. I'm using the javascript library popcornjs to jump to specific seconds, make loops in the video and show and hide html elements in some seconds.
It is working fine in desktop browsers but when I try it in android smartphones or tablets there are a delay or offset in the seconds of the video.
For example:
I have a loop between seconds 8 and 12 of the video and it change to 7 and 11 in mobile.
I'm using the function currentTime() of popcornjs. The video format that I'm using is mp4.
What could it be the problem?
EDIT: Analyzing deeply the problem it seems that the function currentTime() works fine, this goes to the correct second but immediately the player goes to a wrong second.
For example:
popcorn.currentTime(8);
popcorn.pause();
In this code, currentTime() goes to second 8 and pause correctly but if I play the video, it immediately go to the second 7.
If I use currentTime() with the second 9, 10, 11 or 12, it still goes to second 7. With the parameter 13 it goes correctly to the second 13.
It seems there is allways a range of seconds which go to the same second using currentTime().