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
|
- (void)setFullscreen:(BOOL)fullscreen
|
||||||
{
|
{
|
||||||
if( fullscreen )
|
if( fullscreen && !_fullscreenPlayerPresented )
|
||||||
{
|
{
|
||||||
// Ensure player view controller is not null
|
// Ensure player view controller is not null
|
||||||
if( !_playerViewController )
|
if( !_playerViewController )
|
||||||
@ -468,7 +468,7 @@ static NSString *const playbackBufferEmptyKeyPath = @"playbackBufferEmpty";
|
|||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else if ( !fullscreen && _fullscreenPlayerPresented )
|
||||||
{
|
{
|
||||||
[self videoPlayerViewControllerWillDismiss:_playerViewController];
|
[self videoPlayerViewControllerWillDismiss:_playerViewController];
|
||||||
[_presentingViewController dismissViewControllerAnimated:true completion:^{
|
[_presentingViewController dismissViewControllerAnimated:true completion:^{
|
||||||
|
Loading…
Reference in New Issue
Block a user