fix(ios): ensure we don't disable tracks when not necessary (causes black screen) (#4130)

This commit is contained in:
Olivier Bouillet
2024-09-02 19:08:27 +02:00
committed by GitHub
parent fbe570d62f
commit 89df9d69ff
2 changed files with 9 additions and 1 deletions

View File

@@ -613,6 +613,10 @@ class RCTVideo: UIView, RCTVideoPlayerViewControllerDelegate, RCTPlayerObserverH
textTracks: self._textTracks
)
if validTextTracks.isEmpty {
DebugLog("Strange state, not valid textTrack")
}
if validTextTracks.count != self._textTracks.count {
self.setTextTracks(validTextTracks)
}