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.
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Difference between HLS live streaming on Roku 1 vs Roku 2?


We recently launched 4 Roku channels that are live streaming only (on-demand coming soon).

We were notified of a thread in the general Roku forums where two viewers with Roku 1 were reporting problems (continuous buffering issues).

Unfortunately, we are unable to get our hands on a Roku 1 at the moment and I am curious if anyone with HLS live stream experience may know of any differneces there may be between Roku 1 and Roku 2 for delivering live streams.

We've been monitoring the channels extensivley since we've launched and have not seen any of the issues reported on our Roku 2. We also haven't rcvd any reports from Roku 2 owners regarding problems with the channels.

Anyone with a Roku 1 and a Roku 2 care to test?

Also, as we are new to Roku development, I'm posting our source code below so that if there's antything wrong, maybe someone will see it. We just modified the simple player example from Roku.

Our channels:

The thread I referred to:

Thanks for any help!
Steve Nichols
Destination Network/TripSmarter.Com

' ********************************************************************
' ** Sample PlayVideo App
' ** Copyright (c) 2009 Roku Inc. All Rights Reserved.
' ********************************************************************

Sub Main()

'display a fake screen while the real one initializes. this screen
'has to live for the duration of the whole app to prevent flashing
'back to the roku home screen.
screenFacade = CreateObject("roPosterScreen")


'exit the app gently so that the screen doesn't flash to black
End Sub

'** displayVideo()

Function displayVideo()
print "Displaying video: "
p = CreateObject("roMessagePort")
video = CreateObject("roVideoScreen")

'bitrates = [0] ' 0 = no dots, adaptive bitrate
'bitrates = [348] ' <500 Kbps = 1 dot
'bitrates = [664] ' <800 Kbps = 2 dots
'bitrates = [996] ' <1.1Mbps = 3 dots
'bitrates = [2048] ' >=1.1Mbps = 4 dots
bitrates = [0]

urls = ["http://URL_REMOVED"]
qualities = ["SD"]
streamformat = "hls"
title = "Beach TV - Panama City Beach"
srt = ""

videoclip = CreateObject("roAssociativeArray")
videoclip.StreamBitrates = bitrates
videoclip.StreamUrls = urls
videoclip.StreamQualities = qualities
videoclip.StreamFormat = streamformat
videoclip.Title = title
print "srt = ";srt
if srt <> invalid and srt <> "" then
videoclip.SubtitleUrl = srt
end if


lastSavedPos = 0
statusInterval = 10 'position must change by more than this number of seconds before saving

while true
msg = wait(0, video.GetMessagePort())
if type(msg) = "roVideoScreenEvent"
if msg.isScreenClosed() then 'ScreenClosed event
print "Closing video screen"
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()
print "Unknown event: "; msg.GetType(); " msg: "; msg.GetMessage()
end if
end while
End Function

0 Kudos