fix(ios): fix fullscreen view controller ANR (#3952)
- ANR occurred setFullscreen(true) when view controller presenting
This commit is contained in:
parent
de6e71966a
commit
7def3ac387
@ -968,7 +968,8 @@ class RCTVideo: UIView, RCTVideoPlayerViewControllerDelegate, RCTPlayerObserverH
|
|||||||
|
|
||||||
@objc
|
@objc
|
||||||
func setFullscreen(_ fullscreen: Bool) {
|
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
|
// Ensure player view controller is not null
|
||||||
// Controls will be displayed even if it is disabled in configuration
|
// Controls will be displayed even if it is disabled in configuration
|
||||||
if _playerViewController == nil {
|
if _playerViewController == nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user