-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Labels
Description
Let's say I have this:
var i = 0;
setInterval(function(){
omx.play('video' + (i++));
}, 1000)
Videos are longer than 1 second. Let's say for this example that they are 5 seconds long.
The player will (A): plays right away
- Second 0: nothing happens;
- Second 1: omx plays video0;
- Second 2: omx plays video1;
The player will (B): queue incoming videos
- Second 0: nothing happens;
- Second 1: omx plays video0;
- Second 2: omx still plays video0 until ends;
- Second 5: omx plays video1;
The player will (C): doesn't queue incoming videos
- Second 0: nothing happens;
- Second 1: omx plays video0;
- Second 2: omx still plays video0 until ends;
- Second 5: nothing happens
Seems that it works like in case C.
So to make it work the code should be:
var i = 0;
setInterval(function(){
omx.stop();
omx.play('video' + (i++));
}, 1000)
Or I have to wait for the stop event to fire before starting again?
I can't test the app, so knowing the behaviour would help me to design the app properly without seeing what happens.
Reactions are currently unavailable