fix(ios): fix fullscreen view controller ANR (#3952)

- ANR occurred setFullscreen(true) when view controller presenting
This commit is contained in:
YangJH 2024-07-04 19:46:42 +09:00 committed by GitHub
parent de6e71966a
commit 7def3ac387
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 {