Externally loaded text tracks not loading properly (#3461)
* fix text tracks * keep map * use where * update change log * fix build error
This commit is contained in:
parent
045f5fa008
commit
8f1bdb7c36
@ -86,6 +86,7 @@
|
||||
|
||||
## Next
|
||||
- Android, iOS: add onVolumeChange event #3322
|
||||
- iOS: Externally loaded text tracks not loading properly [#3461](https://github.com/react-native-video/react-native-video/pull/3461)
|
||||
|
||||
### Version 6.0.0-alpha.9
|
||||
- All: add built-in typescript support [#3266](https://github.com/react-native-video/react-native-video/pull/3266)
|
||||
|
@ -18,7 +18,7 @@ enum RCTPlayerOperations {
|
||||
|
||||
// The first few tracks will be audio & video track
|
||||
var firstTextIndex = 0
|
||||
for i in 0 ..< trackCount where (player?.currentItem?.tracks[i].assetTrack?.hasMediaCharacteristic(.legible)) != nil {
|
||||
for i in 0 ..< trackCount where player?.currentItem?.tracks[i].assetTrack?.hasMediaCharacteristic(.legible) ?? false {
|
||||
firstTextIndex = i
|
||||
break
|
||||
}
|
||||
|
@ -1206,7 +1206,7 @@ class RCTVideo: UIView, RCTVideoPlayerViewControllerDelegate, RCTPlayerObserverH
|
||||
"orientation": orientation,
|
||||
],
|
||||
"audioTracks": audioTracks,
|
||||
"textTracks": textTracks.map(\.json),
|
||||
"textTracks": self._textTracks?.compactMap { $0.json } ?? textTracks.map(\.json),
|
||||
"target": self.reactTag as Any])
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user