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:
Bryan
2024-01-14 22:31:22 -08:00
committed by GitHub
parent 045f5fa008
commit 8f1bdb7c36
3 changed files with 3 additions and 2 deletions

View File

@@ -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
}