From 71c3c5c9403a3057f3791689f1482189b39f5eca Mon Sep 17 00:00:00 2001 From: Cedric Guinoiseau Date: Sun, 9 Jul 2023 20:44:58 +0200 Subject: [PATCH] Revert "fix: issue 2744, call replaceCurrentItem in dispatch thread" This reverts commit 12d7dd6d8b578c3049cbd461882406472af34059. --- ios/Video/RCTVideo.swift | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ios/Video/RCTVideo.swift b/ios/Video/RCTVideo.swift index f33f5859..baeac2bf 100644 --- a/ios/Video/RCTVideo.swift +++ b/ios/Video/RCTVideo.swift @@ -312,10 +312,7 @@ class RCTVideo: UIView, RCTVideoPlayerViewControllerDelegate, RCTPlayerObserverH } self._player = self._player ?? AVPlayer() - // https://github.com/react-native-video/react-native-video/issues/2744#issuecomment-1237459473 - DispatchQueue.global(qos: .default).async { [weak self] in - self?._player?.replaceCurrentItem(with: playerItem) - } + self._player?.replaceCurrentItem(with: playerItem) self._playerObserver.player = self._player self.applyModifiers() self._player?.actionAtItemEnd = .none