Closed aizawak closed 9 years ago
Sure. Easiest way, depending on your use case, would be to construct a new jsmpeg()
for each new video, but don't use autoplay (and maybe hack jsmpeg to not show the loading anim!?). jsmpeg will load the new video but not render it.
Thank you! I actually ended up hacking jsmpeg a bit more by playing around with the externalLoadCallback function to load as many clips as possible, store them in a queue of arraybuffers, and then shift() to get the next clip as soon as the previous is finished.
I'm currently playing videos successively by using the handy externalFinishedCallback. Do you think it would be possible to send an XMLHttpRequest for every next video before it's turn for decoding? Is there any way to split the decoder from the player?