Merge pull request #1469 from KurtMakesWeb/bugfix/android-disablefocus-audio
Bugfix/android disablefocus audio
This commit is contained in:
		@@ -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)
 | 
			
		||||
 
 | 
			
		||||
@@ -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
 | 
			
		||||
 
 | 
			
		||||
@@ -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,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user