Merge pull request #3239 from iFeelSmart/fix/compile_xcode_17_beta

fix: fix build on xcode 17 beta
This commit is contained in:
Olivier Bouillet 2023-09-27 22:06:04 +02:00 committed by GitHub
commit 0655e9d273
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -266,8 +266,7 @@ class RCTVideo: UIView, RCTVideoPlayerViewControllerDelegate, RCTPlayerObserverH
// MARK: - Player and source // MARK: - Player and source
@objc @objc
func setSrc(_ source:NSDictionary!) { func setSrc(_ source:NSDictionary!) {
DispatchQueue.global(qos: .default).async { [weak self] in let dispatchClosure = {
guard let self = self else {return}
self._source = VideoSource(source) self._source = VideoSource(source)
if (self._source?.uri == nil || self._source?.uri == "") { if (self._source?.uri == nil || self._source?.uri == "") {
self._player?.replaceCurrentItem(with: nil) self._player?.replaceCurrentItem(with: nil)
@ -361,6 +360,7 @@ class RCTVideo: UIView, RCTVideoPlayerViewControllerDelegate, RCTPlayerObserverH
}.catch{_ in } }.catch{_ in }
self._videoLoadStarted = true self._videoLoadStarted = true
} }
DispatchQueue.global(qos: .default).async(execute: dispatchClosure)
} }
@objc @objc