Detect pause/resume in ExoPlayer

后端 未结 7 2094
予麋鹿
予麋鹿 2021-02-06 23:02

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

7条回答
  •  北荒
    北荒 (楼主)
    2021-02-06 23:50

    You can use this function:

    public boolean isPlaying() {
        return exoPlayer.getPlaybackState() == Player.STATE_READY && exoPlayer.getPlayWhenReady();
    }
    

提交回复
热议问题