fix: ensure tracks are available in sample (#3660)

* fix(ts): onPlaybackRateChangeData was not correctly typed

* fix: ensure tracks are well displayed in the sample
This commit is contained in:
Olivier Bouillet
2024-04-07 19:02:39 +02:00
committed by GitHub
parent 453907483d
commit 4c7719a3f5
3 changed files with 27 additions and 55 deletions

View File

@@ -1499,7 +1499,7 @@ class RCTVideo: UIView, RCTVideoPlayerViewControllerDelegate, RCTPlayerObserverH
let audioTracks = await RCTVideoUtils.getAudioTrackInfo(self._player)
let textTracks = await RCTVideoUtils.getTextTrackInfo(self._player)
self.onTextTracks?(["textTracks": textTracks])
self.onTextTracks?(["textTracks": self._textTracks?.compactMap { $0.json } ?? textTracks.compactMap(\.json)])
self.onAudioTracks?(["audioTracks": audioTracks])
}
}