Your Digital Media Has Never Looked So Good

 
jaxim
Topic Author
Posts: 17
Joined: Mon Sep 26, 2016 6:25 am

How to enable closed captioning w/ Video node

Tue Oct 10, 2017 6:04 am

What is the the BrightScript code to enable subtitles if I am using a video node as my video player? I've attempted to enable the player by setting globalCaptionMode to "On"; however the subtitles do not appear.

Also, what formats of closed captioning are supported? Is it only SMPTE-TT, EIA-608, WebVTT as it is indicated on the following documentation URL? The same documentation page makes reference that SRT is available on legacy Roku platforms. However, does this mean that the SRT format not available on all Roku devices?
https://sdkdocs.roku.com/display/sdkdoc/Closed+Caption+Support
 
jaxim
Topic Author
Posts: 17
Joined: Mon Sep 26, 2016 6:25 am

Re: How to enable closed captioning w/ Video node

Tue Oct 10, 2017 9:10 am

Below seems to be the care minimum code to enable the closed captioning. I tested a track with a SRT file and it worked, so it appears Roku also supports SRT files.

videoContent = createObject("RoSGNode", "ContentNode")
videoContent.SubtitleConfig = {
                                    ShowSubtitle: 1,
                                    TrackName: "URL2ClosedCaptioningFile"
                              }
m.video.content = videoContent
m.video.globalCaptionMode = "On"

The additional question I have is that I noticed in some apps, when I click the options button, a closed captioning menu appears. Is this a menu that the app developer created or is this a Roku-made menu that the developer can enable?

Who is online

Users browsing this forum: No registered users and 3 guests