Merge pull request #1614 from jenshandersson/master
Remove video player when entering background correctly
This commit is contained in:
commit
92f7459e6d
@ -3,6 +3,7 @@
|
|||||||
### next
|
### next
|
||||||
* Replaced RCTBubblingEventBlock events by RCTDirectEventBlock to avoid event name collisions [#1625](https://github.com/react-native-community/react-native-video/pull/1625)
|
* Replaced RCTBubblingEventBlock events by RCTDirectEventBlock to avoid event name collisions [#1625](https://github.com/react-native-community/react-native-video/pull/1625)
|
||||||
* Added `onPlaybackRateChange` to README [#1578](https://github.com/react-native-community/react-native-video/pull/1578)
|
* Added `onPlaybackRateChange` to README [#1578](https://github.com/react-native-community/react-native-video/pull/1578)
|
||||||
|
* Fix background audio stopping on iOS when using `controls` [#1614](https://github.com/react-native-community/react-native-video/pull/1614)
|
||||||
|
|
||||||
### Version 4.4.1
|
### Version 4.4.1
|
||||||
* Fix tvOS picture-in-picture compilation regression [#1518](https://github.com/react-native-community/react-native-video/pull/1518)
|
* Fix tvOS picture-in-picture compilation regression [#1518](https://github.com/react-native-community/react-native-video/pull/1518)
|
||||||
|
@ -223,6 +223,7 @@ static int const RCTVideoUnset = -1;
|
|||||||
if (_playInBackground) {
|
if (_playInBackground) {
|
||||||
// Needed to play sound in background. See https://developer.apple.com/library/ios/qa/qa1668/_index.html
|
// Needed to play sound in background. See https://developer.apple.com/library/ios/qa/qa1668/_index.html
|
||||||
[_playerLayer setPlayer:nil];
|
[_playerLayer setPlayer:nil];
|
||||||
|
[_playerViewController setPlayer:nil];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -231,6 +232,7 @@ static int const RCTVideoUnset = -1;
|
|||||||
[self applyModifiers];
|
[self applyModifiers];
|
||||||
if (_playInBackground) {
|
if (_playInBackground) {
|
||||||
[_playerLayer setPlayer:_player];
|
[_playerLayer setPlayer:_player];
|
||||||
|
[_playerViewController setPlayer:_player];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user