Skip to content

Commit

Permalink
Changes from TheWidlarzGroup#1669
Browse files Browse the repository at this point in the history
  • Loading branch information
adamivancza committed May 14, 2020
1 parent 91384d8 commit bd8ad56
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion ios/Video/RCTVideo.m
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,27 @@ - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(N

[self.reactViewController.view setFrame:[UIScreen mainScreen].bounds];
[self.reactViewController.view setNeedsLayout];
} else NSLog(@"not fullscreen");
if (!_fullscreenPlayerPresented && _controls) {
_fullscreenPlayerPresented = YES;
if(self.onVideoFullscreenPlayerWillPresent) {
self.onVideoFullscreenPlayerWillPresent(@{@"target": self.reactTag});
}
if(self.onVideoFullscreenPlayerDidPresent) {
self.onVideoFullscreenPlayerDidPresent(@{@"target": self.reactTag});
}
}
} else {
NSLog(@"not fullscreen");
if (_fullscreenPlayerPresented && _controls) {
_fullscreenPlayerPresented = NO;
if(self.onVideoFullscreenPlayerWillDismiss) {
self.onVideoFullscreenPlayerWillDismiss(@{@"target": self.reactTag});
}
if(self.onVideoFullscreenPlayerDidDismiss) {
self.onVideoFullscreenPlayerDidDismiss(@{@"target": self.reactTag});
}
}
}
}

return;
Expand Down

0 comments on commit bd8ad56

Please sign in to comment.