I have used exoplayer for playing audio from local files in a MediaBrowserServiceCompat
. I read about exoplayer ui and want to use that in my activity. How do I get instance of exoplayer in my activity so that I can call the method playbackcontrolview.setplayer(exoplayer)
to bind it with exoplayer ui?
I have already tried using IBinder
like normal service but it throws error.
I want to bind my exoplayer ui in activity to the exoplayer instance in MediaBrowserServiceCompat
.