1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2024-12-24 09:00:31 +00:00

Fix audio focus bug

This commit is contained in:
Mauricio Colli 2017-08-02 14:14:45 -03:00 committed by GitHub
parent 16ad13c962
commit f7b322da49

View File

@ -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());
} }