0

I want to use ExoPlayer 2 in my app to play video in recyclerview when I click on videoview or SimpleExoPlayerView video should play and if I clcik again it should be pause Now the problem is I'm unable to find Player.Controler class in ExoPlayer2 so I can play and pause the video or any other way if you can guide me please that how I can implement controller to play & pause the video....
I have used this link also but didn't get some thing cool

Uzair
  • 1
  • 1
  • 3

1 Answers1

0

You can use : player.setPlayWhenReady(true) to play the source when it's ready or you can pause with : player.setPlayWhenReady(false); I suggest you read this guide carefully : https://google.github.io/ExoPlayer/guide.html

magiccus
  • 74
  • 7
  • Well my friend I have searched so far and haven't find anything which can play my video like instagram r is there any player if you can recommend me which can play a video like insta gram or any library – Uzair Aug 03 '17 at 20:50