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

How to read and set the global Captions language selected in Roku settings?

How to read and set the global captions language selected in Roku settings? I wanted to get the list of supported Captions languages from Roku setting to set the video subtitles, is there any way? Also set the language when user changes it.
0 Kudos
7 REPLIES 7
gomad
Roku Guru

Re: How to read and set the global Captions language selected in Roku settings?

anyone??
0 Kudos
RokuKC
Roku Employee
Roku Employee

Re: How to read and set the global Captions language selected in Roku settings?

"gomad" wrote:
How to read and set the global captions language selected in Roku settings? I wanted to get the list of supported Captions languages from Roku setting to set the video subtitles, is there any way? Also set the language when user changes it.

The Roku OS provides this feature to the user to control.  As long as your content meta-data is specified correctly, it should "just work".
https://sdkdocs.roku.com/display/sdkdoc/Closed+Caption+Support#ClosedCaptionSupport-PackagedControlS...
0 Kudos
gomad
Roku Guru

Re: How to read and set the global Captions language selected in Roku settings?

Thanks.
So I am setting the "SubtitleTracks" in the content-meta-data, with the list of subtitle available for a video. The problem is, I have give an option to the user to select the subtitle before he/she goes into a video player screen, so I want the player to take that language as default language, that is not happening, the player lists all the languages but the selected one is System default language.
Say for example, user selects lang GN, and the video has a list of languages SD,FR,GD,MN,GN. The default Roku system language is, say, FR.
Now during setting the content-meta-data using the subtitle tracks, i set GN,SD,FR,GD,MN. the player will list in that order, but will play FR subtitle by default. I am not able to change the default to GN through code, unless the user changes it with * options.

Any help would be appreciated. 

Thanks.
0 Kudos
gomad
Roku Guru

Re: How to read and set the global Captions language selected in Roku settings?

another behaviour: if I switch/change my subtitles very fast, on a slow network, from the video player, the language displayed gets messed up! meaning if i change to 1,2,3,4 and come back to 2 (very fast), 2 will be selected in the options list but 4 will be shown on the player!
0 Kudos
gomad
Roku Guru

Re: How to read and set the global Captions language selected in Roku settings?

the above issues seems to be fixed in 8.1OS.
But something interesting is happening now when using RAF,
after an Ad is played using RAF, when the control comes back to the main player, there is a call made again to fetch the CC url. (as i am setting the CC url to fetch the CCs in the initialisation).the problem is my access to the url expires in 30 mins.
Is there anything I can do to prevent this?
0 Kudos
RokuBen
Community Moderator
Community Moderator

Re: How to read and set the global Captions language selected in Roku settings?

That's because the video is effectively restarting at that point, so the CC engine has to be restarted too.  There was a bug in 8.0 and earlier that would sometimes cause captions to not show after an ad, so this is part of fixing that.
0 Kudos
gomad
Roku Guru

Re: How to read and set the global Captions language selected in Roku settings?

Ok thanks.
How do you suggest we can handle this? Can i only set the video content meta data with subtitle urls?(I have multiple languages url/video)


regards,
GM
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.