Search code examples
rokubrightscriptscenegraph

How to display closed caption in roku?


I'm working on a Roku Bright script using scene graph that is going to play HLS videos (VOD and live), Press option button and set "caption mode: on" but closed caption still not display. even popup

enter image description here

showing message "no caption availabel" or "no caption or audio selection availabel" Same stream I see the subtitles on track 1 when I play out in VLC player. Bright script code is -

inner = createObject("RoSGNode", "ContentNode")
inner.url = videoUrl
inner.streamformat = "hls"  
inner.StreamBitrates = [1920]
inner.StreamQualities = ["HD"]   
inner.SwitchingStrategy = "full-adaptation"
m.innerVideo.enableUI = false
m.innerVideo.visible = true
m.innerVideo.setFocus(true) 
m.innerVideoTitle.visible = true     
m.innerVideo.retrievingBar.visible = false 
m.innerVideo.enableTrickPlay = false  
m.innerVideo.retrievingTextColor = "#000000" 
m.innerVideo.bufferingTextColor = "#000000"
m.innerVideo.autoPlayAfterSeek = false
m.innerVideo.bufferingBar.visible = false 
m.innerVideo.bufferingBar.opacity = "0" 
m.innerVideoTitle.text = videoTitle
m.innerVideo.content = inner
m.innerVideo.control = "play"

Contents of the stream's m3u8 -

EXTM3U EXT-X-VERSION:3 EXT-X-STREAM-INF:BANDWIDTH=3211072,CODECS="avc1.77.41,mp4a.40.2",RESOLUTION=1280x720 chunklist_b2931072.m3u8 EXT-X-STREAM-INF:BANDWIDTH=1231072,CODECS="avc1.66.32,mp4a.40.2",RESOLUTION=640x360 chunklist_b1131072.m3u8

Please Help us and provide a better example.


Solution

  • You might need to set the subtitle config. Try this

        inner.subtitleConfig = {
            trackName: "eia608/1"
        }