Merge pull request #1469 from KurtMakesWeb/bugfix/android-disablefocus-audio

Bugfix/android disablefocus audio
This commit is contained in:
Daniel Mariño Ruiz 2019-07-06 09:16:36 +02:00 committed by GitHub
commit be3c8b64cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 1 deletions

View File

@ -1,6 +1,7 @@
## Changelog
### Version 4.4.3
* Fix Android videos being able to play with background music/audio from other apps.
* Fixed memory leak on iOS when using `controls` [#1647](https://github.com/react-native-community/react-native-video/pull/1647)
* (Android) Update gradle and target SDK [#1629](https://github.com/react-native-community/react-native-video/pull/1629)
* Fix iOS stressed mount/unmount crash [#1646](https://github.com/react-native-community/react-native-video/pull/1646)

View File

@ -372,6 +372,13 @@ For Android MediaPlayer, you will need to build your own controls or use a packa
Platforms: Android ExoPlayer, iOS, react-native-dom
#### disableFocus
Determines whether video audio should override background music/audio in Android devices.
* ** false (default)** - Override background audio/music
* **true** - Let background audio/music from other apps play
Platforms: Android Exoplayer
#### filter
Add video filter
* **FilterType.NONE (default)** - No Filter

View File

@ -449,7 +449,7 @@ class ReactExoplayerView extends FrameLayout implements
}
private boolean requestAudioFocus() {
if (disableFocus) {
if (disableFocus || srcUri == null) {
return true;
}
int result = audioManager.requestAudioFocus(this,