Fix possibility of trying to open multiple fullscreen video players
This commit is contained in:
parent
4120a2a3b2
commit
d304bfecbe
@ -436,7 +436,7 @@ static NSString *const playbackBufferEmptyKeyPath = @"playbackBufferEmpty";
|
||||
|
||||
- (void)setFullscreen:(BOOL)fullscreen
|
||||
{
|
||||
if( fullscreen )
|
||||
if( fullscreen && !_fullscreenPlayerPresented )
|
||||
{
|
||||
// Ensure player view controller is not null
|
||||
if( !_playerViewController )
|
||||
@ -468,7 +468,7 @@ static NSString *const playbackBufferEmptyKeyPath = @"playbackBufferEmpty";
|
||||
}];
|
||||
}
|
||||
}
|
||||
else
|
||||
else if ( !fullscreen && _fullscreenPlayerPresented )
|
||||
{
|
||||
[self videoPlayerViewControllerWillDismiss:_playerViewController];
|
||||
[_presentingViewController dismissViewControllerAnimated:true completion:^{
|
||||
|
Loading…
Reference in New Issue
Block a user