From a18953e701fbc8a52632c6f5420117c3154610ff Mon Sep 17 00:00:00 2001 From: olivier Date: Thu, 14 Sep 2023 22:41:42 +0200 Subject: [PATCH] fix: fix build on xcode 17 beta --- ios/Video/RCTVideo.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ios/Video/RCTVideo.swift b/ios/Video/RCTVideo.swift index 8c4dfacc..fc2c1747 100644 --- a/ios/Video/RCTVideo.swift +++ b/ios/Video/RCTVideo.swift @@ -261,8 +261,7 @@ class RCTVideo: UIView, RCTVideoPlayerViewControllerDelegate, RCTPlayerObserverH // MARK: - Player and source @objc func setSrc(_ source:NSDictionary!) { - DispatchQueue.global(qos: .default).async { [weak self] in - guard let self = self else {return} + let dispatchClosure = { self._source = VideoSource(source) if (self._source?.uri == nil || self._source?.uri == "") { self._player?.replaceCurrentItem(with: nil) @@ -356,6 +355,7 @@ class RCTVideo: UIView, RCTVideoPlayerViewControllerDelegate, RCTPlayerObserverH }.catch{_ in } self._videoLoadStarted = true } + DispatchQueue.global(qos: .default).async(execute: dispatchClosure) } @objc