eneim / toro

Video list auto playback made simple, specially built for RecyclerView
Apache License 2.0
1.42k stars 253 forks source link

Restarting video and reference to exoplayer #425

Open android4canada opened 5 years ago

android4canada commented 5 years ago

Hey man This is more of a question. 1)How can I play the video again after it has been completed? 2)Is there anyway I can get a reference to the Exoplayer? The helper method does not return a reference. If I get a reference then I can do seek(0) and I can add gestures

Thank you

eneim commented 5 years ago

@android4canada (1) You can use the LoopingMediaSource (yeah it is old, I know, thinking about a way to change to repeatMode now). (2) After you setup the helper and your PlayerView, ExoPlayer instance = playerView.getPlayer(). Not so neat, but it works.

android4canada commented 5 years ago

@eneim thank you very much. I will try that. When you say: LoopingMediaSource, you mean to use it as part of my Config setup in the initialize method, right?

eneim commented 5 years ago

@android4canada Yeah it is the MediaSource builder in the Config.