Merge pull request #1654 from 24i/feature/fix-when-muted-and-controls

[iOS] fix when controls & muted
This commit is contained in:
Daniel Mariño Ruiz 2019-07-08 12:16:20 +02:00 committed by GitHub
commit 77c9ad3bcf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -1,6 +1,7 @@
## Changelog ## Changelog
### Version 4.4.3 ### Version 4.4.3
* Fix mute/unmute when controls are present (iOS) [#1654](https://github.com/react-native-community/react-native-video/pull/1654)
* Fix Android videos being able to play with background music/audio from other apps. * 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) * 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) * (Android) Update gradle and target SDK [#1629](https://github.com/react-native-community/react-native-video/pull/1629)

View File

@ -957,7 +957,9 @@ static int const RCTVideoUnset = -1;
- (void)applyModifiers - (void)applyModifiers
{ {
if (_muted) { if (_muted) {
[_player setVolume:0]; if (!_controls) {
[_player setVolume:0];
}
[_player setMuted:YES]; [_player setMuted:YES];
} else { } else {
[_player setVolume:_volume]; [_player setVolume:_volume];