Hello,
I am trying to get subtitles working with the following stream. I am unable to get subtitles to show.
I have used the below stream,
http://playertest.longtailvideo.com/ada ... ylist.m3u8 to test. In VLC, the steam works fine for subtitles. I have also used our own streams which I will be happy to PM if you need to further debug. I just can't get this to work with HLS streaming at all on Roku 3.
Sub Main()
print "Displaying video: "
p = CreateObject("roMessagePort")
video = CreateObject("roVideoScreen")
video.setMessagePort(p)
videoclip = CreateObject("roAssociativeArray")
videoclip.StreamBitrates = [0]
videoclip.StreamUrls = ["http://playertest.longtailvideo.com/adaptive/captions/playlist.m3u8"]
di = CreateObject("roDeviceInfo")
if di.GetDisplayType() = "HDTV" then
videoclip.streamqualities=["HD"]
else
videoclip.streamqualities=["SD"]
end if
subtitle_config = {
TrackName: "eia608/1"
}
videoclip.StreamFormat = "hls"
videoclip.Title = "Title of channel"
videoclip.SubtitleUrl = ""
videoclip.switchingstrategy="full-adaptation"
videoclip.SubTitleConfig = subtitle_config
video.SetContent(videoclip)
video.show()
while true
msg = wait(0, video.GetMessagePort())
if type(msg) = "roVideoScreenEvent"
if msg.isScreenClosed() then 'ScreenClosed event
print "Closing video screen"
return
exit while
else if msg.isPlaybackPosition() then
nowpos = msg.GetIndex()
if nowpos > 10000
end if
if nowpos > 0
if abs(nowpos - lastSavedPos) > statusInterval
lastSavedPos = nowpos
end if
end if
else if msg.isRequestFailed()
print "play failed: "; msg.GetMessage()
else
print "Unknown event: "; msg.GetType(); " msg: "; msg.GetMessage()
endif
end if
end while
end Sub