From 51598a55be023c0f7ff6f082ed1e717f0f86c66a Mon Sep 17 00:00:00 2001 From: Jens Andersson Date: Mon, 10 Jun 2019 18:00:03 +0100 Subject: [PATCH] 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 dcadee85f4..271433b3b8 100644 --- a/ios/Video/RCTVideo.m +++ b/ios/Video/RCTVideo.m @@ -223,6 +223,7 @@ - (void)applicationDidEnterBackground:(NSNotification *)notification 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 @@ - (void)applicationWillEnterForeground:(NSNotification *)notification [self applyModifiers]; if (_playInBackground) { [_playerLayer setPlayer:_player]; + [_playerViewController setPlayer:_player]; } }