toro icon indicating copy to clipboard operation
toro copied to clipboard

Restarting video and reference to exoplayer

Open android4canada opened this issue 5 years ago • 3 comments

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

android4canada avatar Mar 08 '19 05:03 android4canada

@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.

eneim avatar Mar 08 '19 05:03 eneim

@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?

android4canada avatar Mar 08 '19 14:03 android4canada

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

eneim avatar Mar 09 '19 09:03 eneim