iOS app crashes on call to presentFullScreenPlayer #2808
This commit is contained in:
parent
7631bd82a1
commit
504ec387bf
@ -635,7 +635,8 @@ class RCTVideo: UIView, RCTVideoPlayerViewControllerDelegate, RCTPlayerObserverH
|
|||||||
|
|
||||||
self.onVideoFullscreenPlayerWillPresent?(["target": reactTag as Any])
|
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._playerViewController?.showsPlaybackControls = true
|
||||||
self._fullscreenPlayerPresented = fullscreen
|
self._fullscreenPlayerPresented = fullscreen
|
||||||
self._playerViewController?.autorotate = self._fullscreenAutorotate
|
self._playerViewController?.autorotate = self._fullscreenAutorotate
|
||||||
@ -644,6 +645,7 @@ class RCTVideo: UIView, RCTVideoPlayerViewControllerDelegate, RCTPlayerObserverH
|
|||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else if !fullscreen && _fullscreenPlayerPresented, let _playerViewController = _playerViewController {
|
} else if !fullscreen && _fullscreenPlayerPresented, let _playerViewController = _playerViewController {
|
||||||
self.videoPlayerViewControllerWillDismiss(playerViewController: _playerViewController)
|
self.videoPlayerViewControllerWillDismiss(playerViewController: _playerViewController)
|
||||||
_presentingViewController?.dismiss(animated: true, completion:{
|
_presentingViewController?.dismiss(animated: true, completion:{
|
||||||
|
Loading…
Reference in New Issue
Block a user