Merge pull request #2961 from wood1986/bug/kvo-crash3

fix: fix wrong merge conflict due to the kvo compliance crash when rapidly switching source
This commit is contained in:
Olivier Bouillet 2022-12-17 23:23:42 +01:00 committed by GitHub
commit e869b440a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -306,6 +306,13 @@ class RCTVideo: UIView, RCTVideoPlayerViewControllerDelegate, RCTPlayerObserverH
self.setAutomaticallyWaitsToMinimizeStalling(self._automaticallyWaitsToMinimizeStalling) self.setAutomaticallyWaitsToMinimizeStalling(self._automaticallyWaitsToMinimizeStalling)
} }
if self._adTagUrl != nil {
// Set up your content playhead and contentComplete callback.
self._contentPlayhead = IMAAVPlayerContentPlayhead(avPlayer: self._player!)
self._imaAdsManager.setUpAdsLoader()
}
//Perform on next run loop, otherwise onVideoLoadStart is nil //Perform on next run loop, otherwise onVideoLoadStart is nil
self.onVideoLoadStart?([ self.onVideoLoadStart?([
"src": [ "src": [