From a0bb083064e22cd7363a6321f4973de5442a9c43 Mon Sep 17 00:00:00 2001 From: Jens Andersson Date: Mon, 10 Jun 2019 18:00:03 +0100 Subject: [PATCH 1/2] Remove video layer when entering background correctly, both if using controls or not --- ios/Video/RCTVideo.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ios/Video/RCTVideo.m b/ios/Video/RCTVideo.m index dcadee85..271433b3 100644 --- a/ios/Video/RCTVideo.m +++ b/ios/Video/RCTVideo.m @@ -223,6 +223,7 @@ static int const RCTVideoUnset = -1; if (_playInBackground) { // Needed to play sound in background. See https://developer.apple.com/library/ios/qa/qa1668/_index.html [_playerLayer setPlayer:nil]; + [_playerViewController setPlayer:nil]; } } @@ -231,6 +232,7 @@ static int const RCTVideoUnset = -1; [self applyModifiers]; if (_playInBackground) { [_playerLayer setPlayer:_player]; + [_playerViewController setPlayer:_player]; } } From 0a1557984e8920de49d372415016c8c4f5e46861 Mon Sep 17 00:00:00 2001 From: Jens Andersson Date: Mon, 17 Jun 2019 09:20:13 +0100 Subject: [PATCH 2/2] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a91fd638..3ebcc088 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ### next * 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 * Fix tvOS picture-in-picture compilation regression [#1518](https://github.com/react-native-community/react-native-video/pull/1518)