mirror of
https://github.com/zoriya/react-native-video.git
synced 2026-08-16 02:56:22 +00:00
fix(ios): fix fullscreen view controller ANR (#3952)
- ANR occurred setFullscreen(true) when view controller presenting
This commit is contained in:
@@ -968,7 +968,8 @@ class RCTVideo: UIView, RCTVideoPlayerViewControllerDelegate, RCTPlayerObserverH
|
||||
|
||||
@objc
|
||||
func setFullscreen(_ fullscreen: Bool) {
|
||||
if fullscreen && !_fullscreenPlayerPresented && _player != nil {
|
||||
var alreadyFullscreenPresented = _presentingViewController?.presentedViewController != nil
|
||||
if fullscreen && !_fullscreenPlayerPresented && _player != nil && !alreadyFullscreenPresented {
|
||||
// Ensure player view controller is not null
|
||||
// Controls will be displayed even if it is disabled in configuration
|
||||
if _playerViewController == nil {
|
||||
|
||||
Reference in New Issue
Block a user