I have stumbled on what I believe to be a bug in the Roku API surrounding Closed Captioning Support.
According to the
Documentation for Closed Captioning,
Roku supports WebVTT captions if embedded in HLS streams or manifests.
The Video Node's availableSubtitleTracks property uses a language key in the
ISO 639.2B 3 character language code, however webVVT uses BCP 47 language tags which can also be a 2 letter language code as defined by ISO 639.1. Providing a HLS manifest with ISO 639.1 configured embedded Caption Tracks causes the video node's availableAudioTracks property to get mutated when setting Subtitle Track using SubtitleConfig.Uploading my HLS manifest with subtitle tracks, the video's avalilableSubtitleTracks property is'm.video.availableSubtitleTracks
[
{
Description: "Deutsch"
Language: "de"
TrackName: "webvtt/1"
},
{
Description: "English"
Language: "en"
TrackName: "webvtt/2"
},
{
Description: "Espanol"
Language: "es"
TrackName: "webvtt/3"
},
{
Description: "Français"
Language: "fr"
TrackName: "webvtt/4"
}
]
However after I runm.Video.content.SubtitleConfig = {
TrackName:"webvvt/4"
}
availableSubtitleTracks becomes[
{
Description: ""
Language: "eng"
TrackName: "webvtt/4"
}
]
Weirdly, I can still set the language to any of the 4 tracks even after AvailableSubtitleTracks shows only the single value and setting the subtitle track still correctly updates the visible track on the video, but the AvailableSubtitleTrack field will continue to only display the one incorrect value
When I adjust the language properties on the availableSubtitleTracks to ISO 639.2B compliant equivalent, available tracks does not change after setting SubtitleTrack