preventing the iOS pip to be closed automatically when sending to the background

This commit is contained in:
lrusso 2023-08-30 22:22:31 -03:00
parent 7c8244bd07
commit 03cba605ea

View File

@ -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