print "Displaying video: "
p = CreateObject("roMessagePort")
video = CreateObject("roVideoScreen")
videoclip = CreateObject("roAssociativeArray")
videoclip.StreamBitrates = 
videoclip.StreamUrls = ["http://myserver.com/mylivestream.m3u8"]
di = CreateObject("roDeviceInfo")
if di.GetDisplayType() = "HDTV" then
videoclip.StreamFormat = "hls"
videoclip.Title = "my awesome live stream"
videoclip.SubtitleUrl = ""
lastSavedPos = 0
statusInterval = 10
msg = wait(0, video.GetMessagePort())
if type(msg) = "roVideoScreenEvent"
if msg.isScreenClosed() then 'ScreenClosed event
print "Closing video screen"
else if msg.isPlaybackPosition() then
nowpos = msg.GetIndex()
if nowpos > 10000
if nowpos > 0
if abs(nowpos - lastSavedPos) > statusInterval
lastSavedPos = nowpos
else if msg.isRequestFailed()
print "play failed: "; msg.GetMessage()
print "Unknown event: "; msg.GetType(); " msg: "; msg.GetMessage()
"videodev" wrote:"TheEndless" wrote:
Make sure you are setting the SwitchingStrategy value. A bug was introduced a few firmwares ago that would prevent HLS from switching to a higher bitrate if the SwitchingStrategy wasn't set. I don't know if that bug was ever fixed, but it's best to always set that value.
Thank you. It worked. I am using SwitchingStrategy as "full-adaptation".
Another question - As I mentioned above, I am using HLS streams from Wowza server, which has 6 variants from 150k to 3600k. I read in the documentation that, the dots/HD symbol is not displayed, if the stream is HLS. Is there any way to display HD if any of the variant is of HD quality?
I am using "0" as StreamBitrates in XML.
Any other suggestions for quick switching/buffering/scrubbling?
If item.StreamFormat="" 'set default streamFormat to mp4 if doesn't exist in xml
"RokuJoel" wrote:Do watch out for typos though!<SwitchingStrategh>full-adaptation</SwitchingStrategy>
if you add a tag to your XML:<SwitchingStrategh>full-adaptation</SwitchingStrategy>
and a line to your xml parser in ShowFeed.brs (assuming your channel is based on videoplayer example):item.SwitchingStrategy=validstr(curshow.switchingStrategy.gettext())
probably should put that after the item.StreamFormat= line
to my XML file
and the code