Skip to content

Commit

Permalink
Picked changes from PR TheWidlarzGroup#2848
Browse files Browse the repository at this point in the history
  • Loading branch information
tironiigor committed Sep 12, 2022
1 parent 60f0d50 commit acb0f50
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ios/Video/RCTVideo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,11 @@ class RCTVideo: UIView, RCTVideoPlayerViewControllerDelegate, RCTPlayerObserverH
self._playerItem?.preferredPeakBitRate = Double(maxBitRate)
}

self._player = AVPlayer(playerItem: self._playerItem)
self._player = AVPlayer()
DispatchQueue.global(qos: .default).async {
self._player?.replaceCurrentItem(with: playerItem)
}

self._playerObserver.player = self._player
self.applyModifiers()
self._player?.actionAtItemEnd = .none
Expand Down

0 comments on commit acb0f50

Please sign in to comment.