Revert "fix: remove pausePlayback when audio focus loss event (#3496)" (#3504)

This reverts commit b1ab0f24a3.

Co-authored-by: olivier <olivier.bouillet@ifeelsmart.com>
This commit is contained in:
Olivier Bouillet 2024-01-29 07:36:13 +01:00 committed by GitHub
parent 2094dbdce6
commit aec7db6390
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -931,6 +931,8 @@ public class ReactExoplayerView extends FrameLayout implements
case AudioManager.AUDIOFOCUS_LOSS: case AudioManager.AUDIOFOCUS_LOSS:
view.hasAudioFocus = false; view.hasAudioFocus = false;
view.eventEmitter.audioFocusChanged(false); view.eventEmitter.audioFocusChanged(false);
// FIXME this pause can cause issue if content doesn't have pause capability (can happen on live channel)
view.pausePlayback();
view.audioManager.abandonAudioFocus(this); view.audioManager.abandonAudioFocus(this);
break; break;
case AudioManager.AUDIOFOCUS_LOSS_TRANSIENT: case AudioManager.AUDIOFOCUS_LOSS_TRANSIENT: