Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
SeanGray
Visitor

WebVVT Language Bug

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 run

m.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
0 Kudos
1 REPLY 1
RokuBen
Community Moderator
Community Moderator

Re: WebVVT Language Bug

The code you posted had a typo, setting the track to "webvvt/4" instead of "webvtt/4"... was that in your test code?
0 Kudos