I searched two days for this question in github but i can't find true answer . i want example for detecting pause / resume
in ExoPlayer > 2.x
.
any one can give me an example ? i checked onPlayerStateChanged
and problem not solved .
onPlayerStateChanged : STATE_BUFFERING
onPlayerStateChanged : STATE_READY
i just got this log from onPlayerStateChanged
and this is not called in all times !
You need to check
playWhenReady
with a Player.EventListener. The Playback states of ExoPlayer are independent from the player being paused or not:To play/pause the player ExoPlayer provides
The sequence of playback states with ExoPlayer with a media file which never stalls to rebuffer is once in each of the four states and does not express play/paused:
Each time the player needs to buffer it goes:
Setting playWhenReady does not affect the state.
All together your media is actually playing when
It plays when ready. :)