I am programming an interactive video (kind of game) where the user make actions on a side panel and actions happens in the video.
For a part, the video is waiting for user action on the panel, so it has to loop until the action has been launch by the user.
So at 15 seconds, I get back to 11 seconds as long as the user has not made the action, video is designed to be a perfect loop.
My loop is working, but the problem is thats it's not seamless. At 15 seconds, it stops for like a second, and then starts back at 11 seconds. Is there a way to make it work seamless?
I am using VideoJS. Here is my code:
var video_decor = _V_("video_decor");
video_decor.addEvent("timeupdate", function(){
var whereYouAt = video_decor.currentTime();
console.log(whereYouAt);
if(whereYouAt > 15){
video_decor.currentTime(11);
}
});