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:
Kurt Johnson 2019-02-07 11:02:10 -05:00
parent 80391d4e2a
commit 739a6362bf

View File

@ -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,