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: 
ChanEpic
Visitor

Help w/Video Player ex. supporting SRT and 608 captions

Hello to the Roku community. I am quite new to the BrightScript language and I am hitting a puzzler of a task. I have a channel the implements the video player example with XML based categories.
I've got the channel working fine and it plays video fine but the project requires supporting Closed Captions. Our categories have live videos served via HLS with embedded 608 captions and we also have archived video with .SRT captions, this app needs to support both and I am STUMPED on how to do that. Fortunately, RokuJoel suggested this pseudocode:

if content_item.status="Live" then
play_video_with_608_subtitles(content_item)
else
content_Item.subtitleURL="http://myserver.com/myvideo.srt"
play_video_with_SRT_subtitles(content_item)
end if

my problem is understanding where to place this code, joel suggested in appvideoscreen.brs which I understand. What I don't know to do is how to grab "content_item.status" and "Content_item.subtitleUrl" and place those values into production code. Do I grab those from Categoryfeed.brs or showfeed.brs? And what if the subtitle Url changes per video? I would appreciate even just a gentle push in the right direction and thanks in advance for any and all help.
0 Kudos