ExoPlayer - play 10 files one after another

后端 未结 5 1430
天命终不由人
天命终不由人 2021-02-03 12:30

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

5条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-03 13:34

    You can reuse the ExoPlayer up until the point that you call release(), and then it should no longer be used.

    To change the media that it is currently playing, you essentially need to perform the following steps:

    // ...enable autoplay...
    player.stop();
    player.seekTo(0L);
    player.prepare(renderers);
    

    Creating the renderers is a little bit more involved, but that's the flow you should follow and the player should be able to play back to back videos.

提交回复
热议问题