Merge pull request #2743 from tironiigor/added-missing-ns-error-initialization-params

Added missing NSError initialization params on seek early return
This commit is contained in:
Eran Hammer 2022-07-05 00:56:30 -07:00 committed by GitHub
commit be0497cc09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -5,6 +5,7 @@
- Fix Exoplayer progress not reported when paused [#2664](https://github.com/react-native-video/react-native-video/pull/2664)
- Call playbackRateChange onPlay and onPause [#1493](https://github.com/react-native-video/react-native-video/pull/1493)
- Fix being unable to disable sideloaded texttracks in the AVPlayer [#2679](https://github.com/react-native-video/react-native-video/pull/2679)
- Fixed crash when iOS seek method called reject on the promise [#2743](https://github.com/react-native-video/react-native-video/pull/2743)
### Version 6.0.0-alpha.1

View File

@ -178,7 +178,7 @@ enum RCTPlayerOperations {
return Promise<Bool>(on: .global()) { fulfill, reject in
guard CMTimeCompare(current, cmSeekTime) != 0 else {
reject(NSError())
reject(NSError(domain: "", code: 0, userInfo: nil))
return
}
if !paused { player.pause() }