fix rctDelegate is nil

This commit is contained in:
john 2022-08-05 09:53:22 +08:00
parent 8ce0c517f6
commit e1987e561a

View File

@ -19,9 +19,12 @@ class RCTVideoPlayerViewController: AVPlayerViewController {
override func viewDidDisappear(_ animated: Bool) {
super.viewDidDisappear(animated)
if rctDelegate != nil {
rctDelegate.videoPlayerViewControllerWillDismiss(playerViewController: self)
rctDelegate.videoPlayerViewControllerDidDismiss(playerViewController: self)
}
}
#if !TARGET_OS_TV