iOS app crashes on call to presentFullScreenPlayer #2808
This commit is contained in:
parent
7631bd82a1
commit
504ec387bf
@ -635,14 +635,16 @@ 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 {
|
||||||
self._playerViewController?.showsPlaybackControls = true
|
viewController.present(playerViewController, animated:true, completion:{
|
||||||
self._fullscreenPlayerPresented = fullscreen
|
self._playerViewController?.showsPlaybackControls = true
|
||||||
self._playerViewController?.autorotate = self._fullscreenAutorotate
|
self._fullscreenPlayerPresented = fullscreen
|
||||||
|
self._playerViewController?.autorotate = self._fullscreenAutorotate
|
||||||
|
|
||||||
self.onVideoFullscreenPlayerDidPresent?(["target": self.reactTag])
|
self.onVideoFullscreenPlayerDidPresent?(["target": self.reactTag])
|
||||||
|
|
||||||
})
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else if !fullscreen && _fullscreenPlayerPresented, let _playerViewController = _playerViewController {
|
} else if !fullscreen && _fullscreenPlayerPresented, let _playerViewController = _playerViewController {
|
||||||
self.videoPlayerViewControllerWillDismiss(playerViewController: _playerViewController)
|
self.videoPlayerViewControllerWillDismiss(playerViewController: _playerViewController)
|
||||||
|
Loading…
Reference in New Issue
Block a user