fix(ios): fix regression when playing source starting with ph:// (#3630)

This commit is contained in:
Olivier Bouillet 2024-03-29 19:47:04 +01:00 committed by GitHub
parent f10511d953
commit 75d370742b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -351,8 +351,6 @@ class RCTVideo: UIView, RCTVideoPlayerViewControllerDelegate, RCTPlayerObserverH
throw NSError(domain: "", code: 0, userInfo: nil) throw NSError(domain: "", code: 0, userInfo: nil)
} }
if let uri = source.uri, uri.starts(with: "ph://") { if let uri = source.uri, uri.starts(with: "ph://") {
self.isSetSourceOngoing = false
self.applyNextSource()
return Promise { return Promise {
RCTVideoUtils.preparePHAsset(uri: uri).then { asset in RCTVideoUtils.preparePHAsset(uri: uri).then { asset in
return self.playerItemPrepareText(asset: asset, assetOptions: nil, uri: source.uri ?? "") return self.playerItemPrepareText(asset: asset, assetOptions: nil, uri: source.uri ?? "")