Fix so background audio from other apps can play when disableFocus is true. requestAudioFocus was being run regardless of there being a src, so I made it so that only gets requested when a src exists.
This commit is contained in:
parent
80391d4e2a
commit
739a6362bf
@ -366,7 +366,7 @@ class ReactExoplayerView extends FrameLayout implements
|
||||
}
|
||||
|
||||
private boolean requestAudioFocus() {
|
||||
if (disableFocus) {
|
||||
if (disableFocus || srcUri == null) {
|
||||
return true;
|
||||
}
|
||||
int result = audioManager.requestAudioFocus(this,
|
||||
|
Loading…
Reference in New Issue
Block a user