Skip to content

Commit

Permalink
fix(ios): fix fullscreen view controller ANR (#3952)
Browse files Browse the repository at this point in the history
- ANR occurred setFullscreen(true) when view controller presenting
  • Loading branch information
YangJonghun authored Jul 4, 2024
1 parent de6e719 commit 7def3ac
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ios/Video/RCTVideo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 7def3ac

Please sign in to comment.