Disable pipController init if pictureInPicture is false
Disable pipController init if pictureInPicture is set to false prevents going to PIP mode on iOS when the app goes to the background.
This commit is contained in:
parent
81ae785090
commit
dad33ef885
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user