Forum Discussion

anashish's avatar
anashish
Newbie
8 years ago

WebVTT Roku

Just wondering is there a way of setting a webvtt url as subtitle instead of embed it in the HLS stream?

3 Replies

  • balbant's avatar
    balbant
    Streaming Star
    You can use SubtitleUrl for external caption file.
    follow this code:-
    function setVideo() as void
        videoContent = createObject("RoSGNode", "ContentNode")
        videoContent.url = "http://yt-dash-mse-test.commondatastorage.googleapis.com/media/motion-20120802-manifest.mpd"
        videoContent.title = ""
        videoContent.streamformat = "dash"
        videoContent.SubtitleUrl = "pkg:/ttml/ttml.xml"

        m.video = m.top.findNode("musicvideos")
        m.video.content = videoContent
        m.video.control = "play"
        m.video.setFocus(true)
    end function

     
  • Thanks for the answer.
    Please clarify one more thing can I pass   url in SubtitleUrl?
    videoContent.SubtitleUrl = "http://cpansearch.perl.org/src/MIYAGAWA/Video-Subtitle-SRT-0.01/t/sample.srt"