Skip to content

Commit

Permalink
fix(ios): fix notification controls enabled by default (#3861)
Browse files Browse the repository at this point in the history
  • Loading branch information
KrzysztofMoch authored May 31, 2024
1 parent 8ad1047 commit 5c6dfb2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ios/Video/RCTVideo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 5c6dfb2

Please sign in to comment.