From 03cba605ea335c81713ca91de505fc30925203c7 Mon Sep 17 00:00:00 2001 From: lrusso Date: Wed, 30 Aug 2023 22:22:31 -0300 Subject: [PATCH] preventing the iOS pip to be closed automatically when sending to the background --- ios/Video/RCTVideo.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/Video/RCTVideo.swift b/ios/Video/RCTVideo.swift index 9a3073d8..fcad3189 100644 --- a/ios/Video/RCTVideo.swift +++ b/ios/Video/RCTVideo.swift @@ -186,7 +186,7 @@ class RCTVideo: UIView, RCTVideoPlayerViewControllerDelegate, RCTPlayerObserverH } @objc func applicationDidEnterBackground(notification:NSNotification!) { - if _playInBackground { + if !_playInBackground { // Needed to play sound in background. See https://developer.apple.com/library/ios/qa/qa1668/_index.html _playerLayer?.player = nil _playerViewController?.player = nil