Fix audio focus bug
This commit is contained in:
parent
16ad13c962
commit
f7b322da49
1 changed files with 1 additions and 1 deletions
|
@ -519,7 +519,7 @@ public abstract class BasePlayer implements ExoPlayer.EventListener, AudioManage
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isPlaying()) audioManager.requestAudioFocus(this, AudioManager.STREAM_MUSIC, AudioManager.AUDIOFOCUS_GAIN);
|
if (!isPlaying()) audioManager.requestAudioFocus(this, AudioManager.STREAM_MUSIC, AudioManager.AUDIOFOCUS_GAIN);
|
||||||
else audioManager.abandonAudioFocus(null);
|
else audioManager.abandonAudioFocus(this);
|
||||||
|
|
||||||
simpleExoPlayer.setPlayWhenReady(!isPlaying());
|
simpleExoPlayer.setPlayWhenReady(!isPlaying());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue