fix(ios): fix notification controls enabled by default (#3861)

This commit is contained in:
Krzysztof Moch 2024-05-31 08:57:17 +02:00 committed by GitHub
parent 8ad1047dc5
commit 5c6dfb26c5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -459,8 +459,10 @@ class RCTVideo: UIView, RCTVideoPlayerViewControllerDelegate, RCTPlayerObserverH
_player = AVPlayer()
_player!.replaceCurrentItem(with: playerItem)
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)