Merge pull request #2645 from tombaranowicz/tombaranowicz-patch-1
Disable pipController init if pictureInPicture is false
This commit is contained in:
commit
2dadf28bb5
@ -907,7 +907,7 @@ static int const RCTVideoUnset = -1;
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)setupPipController {
|
- (void)setupPipController {
|
||||||
if (!_pipController && _playerLayer && [AVPictureInPictureController isPictureInPictureSupported]) {
|
if (!_pipController && _playerLayer && [AVPictureInPictureController isPictureInPictureSupported] && _pictureInPicture) {
|
||||||
// Create new controller passing reference to the AVPlayerLayer
|
// Create new controller passing reference to the AVPlayerLayer
|
||||||
_pipController = [[AVPictureInPictureController alloc] initWithPlayerLayer:_playerLayer];
|
_pipController = [[AVPictureInPictureController alloc] initWithPlayerLayer:_playerLayer];
|
||||||
_pipController.delegate = self;
|
_pipController.delegate = self;
|
||||||
|
Loading…
Reference in New Issue
Block a user