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: 
gomad
Roku Guru

Subtitle getting reset after ads play back?

while playing video on a Video node, when the user switches the subtitle using the * key, how can i capture that change?

Interesting behaviour: I am using RAF to play ads, once the ads are played the subtitle resets! 
steps: start video -> press * and change the subtitle (say from eng to spanish)-> let the video continue and -> mid rolls are played -> returned to player and then observed that the subtitles has reset to English!

this is how i am setting up my player initially:
            Subtitle_TracksArray.push({"TrackName":url1,"Description":name})
            Subtitle_TracksArray.push({"TrackName":url2,"Description":name})
            ContentNode_object.SubtitleTracks = Subtitle_TracksArray

where url is the url of the .srt file

any idea why this is getting reset after ads playback??
0 Kudos
2 REPLIES 2
RokuKC
Roku Employee
Roku Employee

Re: Subtitle getting reset after ads play back?

"gomad" wrote:
... 
steps: start video -> press * and change the subtitle (say from eng to spanish)-> let the video continue and -> mid rolls are played -> returned to player and then observed that the subtitles has reset to English!

this is how i am setting up my player initially:
            Subtitle_TracksArray.push({"TrackName":url1,"Description":name})
            Subtitle_TracksArray.push({"TrackName":url2,"Description":name})
            ContentNode_object.SubtitleTracks = Subtitle_TracksArray
...


I don't have any help to offer regarding RAF aspect, which may well be a bug, but I wonder if you might want to set the Language attribute for each if your tracks, if you have that information. If the second track has Language:"spa" to indicate Spanish, for example, if the user selects that it should make Spanish the default closed caption language. On subsequent playback that track would be selected automatically.
0 Kudos
gomad
Roku Guru

Re: Subtitle getting reset after ads play back?

Thanks for the info, had to set the 3 digit language codes to make it persist!

So is there any other way to set the global language captions settings from the app, as we can set ON/OFF/Replay?
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.