iOS app crashes on call to presentFullScreenPlayer #2808

This commit is contained in:
Nikita Likhachev 2022-12-22 13:07:06 +07:00
parent 7631bd82a1
commit 504ec387bf

View File

@ -635,7 +635,8 @@ class RCTVideo: UIView, RCTVideoPlayerViewControllerDelegate, RCTPlayerObserverH
self.onVideoFullscreenPlayerWillPresent?(["target": reactTag as Any])
viewController.present(viewController, animated:true, completion:{
if let playerViewController = _playerViewController {
viewController.present(playerViewController, animated:true, completion:{
self._playerViewController?.showsPlaybackControls = true
self._fullscreenPlayerPresented = fullscreen
self._playerViewController?.autorotate = self._fullscreenAutorotate
@ -644,6 +645,7 @@ class RCTVideo: UIView, RCTVideoPlayerViewControllerDelegate, RCTPlayerObserverH
})
}
}
} else if !fullscreen && _fullscreenPlayerPresented, let _playerViewController = _playerViewController {
self.videoPlayerViewControllerWillDismiss(playerViewController: _playerViewController)
_presentingViewController?.dismiss(animated: true, completion:{