Home > hls.js > Hls > setSubtitleOption
Hls.setSubtitleOption() method
Find and select the best matching subtitle track, making a level switch when a Group change is necessary. Updates hls.config.subtitlePreference
. Returns the selected track, or null when no matching track is found.
Signature:
setSubtitleOption(subtitleOption: MediaPlaylist | SubtitleSelectionOption | undefined): MediaPlaylist | null;
Parameters
Parameter |
Type |
Description |
---|---|---|
subtitleOption |
MediaPlaylist | SubtitleSelectionOption | undefined |
MediaPlaylist | null