I have 10 video i need to play, once one is done, the next one starts to play.
I\'m using Google\'s ExoPlayer, I use the example in the DEMO @ GitHub. I can play 1 video
Use ConcatenatingMediaSource
to play files in sequence.
For example, for playing 2 media Uris (firstVideoUri
and secondVideoUri
), use this code:
MediaSource firstSource =
new ExtractorMediaSource.Factory(...).createMediaSource(firstVideoUri);
MediaSource secondSource =
new ExtractorMediaSource.Factory(...).createMediaSource(secondVideoUri);
ConcatenatingMediaSource concatenatedSource =
new ConcatenatingMediaSource(firstSourceTwice, secondSource);
And then use concatenatedSource
to play media files sequentially.