Update RCTVideo.swift

Prevents a crash in my case: https://github.com/react-native-video/react-native-video/issues/2723#issuecomment-1336130120
This commit is contained in:
happyfloat 2022-12-07 12:16:03 +01:00 committed by GitHub
parent 50705336ba
commit fffe9731c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -652,7 +652,7 @@ class RCTVideo: UIView, RCTVideoPlayerViewControllerDelegate, RCTPlayerObserverH
if _controls {
let viewController:UIViewController! = self.reactViewController()
viewController.addChild(_playerViewController)
viewController?.addChild(_playerViewController)
self.addSubview(_playerViewController.view)
}