ReferenceText tracks
useTextTracks
Hook that returns the text tracks a filter or track definition matches, from the media or the app
Import
useTextTracks returns the tracks in textTrackList that a filter or track definition matches, and re-renders when they change. Tracks from the media and from the app are listed alike; each track’s source says which. It returns an empty list when the player has no text track feature.
A filter picks tracks by kind, label, or language, or with a function. Each given field must match, and a list of kinds matches any kind in it. Without a filter, it returns every track. Keep a function filter’s identity across renders.