mirror of
https://github.com/zoriya/react-native-video.git
synced 2025-12-06 07:16:12 +00:00
Merge pull request #2645 from tombaranowicz/tombaranowicz-patch-1
Disable pipController init if pictureInPicture is false
This commit is contained in:
@@ -907,7 +907,7 @@ static int const RCTVideoUnset = -1;
|
||||
}
|
||||
|
||||
- (void)setupPipController {
|
||||
if (!_pipController && _playerLayer && [AVPictureInPictureController isPictureInPictureSupported]) {
|
||||
if (!_pipController && _playerLayer && [AVPictureInPictureController isPictureInPictureSupported] && _pictureInPicture) {
|
||||
// Create new controller passing reference to the AVPlayerLayer
|
||||
_pipController = [[AVPictureInPictureController alloc] initWithPlayerLayer:_playerLayer];
|
||||
_pipController.delegate = self;
|
||||
|
||||
Reference in New Issue
Block a user