From 5c6dfb26c56c2b9165b25a01b9224c489e2fd2a5 Mon Sep 17 00:00:00 2001 From: Krzysztof Moch Date: Fri, 31 May 2024 08:57:17 +0200 Subject: [PATCH] fix(ios): fix notification controls enabled by default (#3861) --- ios/Video/RCTVideo.swift | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ios/Video/RCTVideo.swift b/ios/Video/RCTVideo.swift index cfa3554a..379b19fd 100644 --- a/ios/Video/RCTVideo.swift +++ b/ios/Video/RCTVideo.swift @@ -459,8 +459,10 @@ class RCTVideo: UIView, RCTVideoPlayerViewControllerDelegate, RCTPlayerObserverH _player = AVPlayer() _player!.replaceCurrentItem(with: playerItem) - // We need to register player after we set current item and only for init - NowPlayingInfoCenterManager.shared.registerPlayer(player: _player!) + if _showNotificationControls { + // We need to register player after we set current item and only for init + NowPlayingInfoCenterManager.shared.registerPlayer(player: _player!) + } } else { _player?.replaceCurrentItem(with: playerItem)