Forum Discussion

gomad's avatar
gomad
Roku Guru
8 years ago

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??

2 Replies

  • RokuKC's avatar
    RokuKC
    Roku Employee
    "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.
  • 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?