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: 
btpoole
Channel Surfer

Stream Timeout


if m.progress < 100 'Video is currently buffering
checkprogress=m.progress
while true
msg=(15000,m.port)
If checkprogress=m.progress 'If after 15 seconds no change exit while-reset screen to menu
exit while
else
list.Push({
Color: "#80000000"
TargetRect: m.layout.right
})

list.Push({
url: "pkg:/images/tvpattern1.jpg"
TargetRect: m.layout.right
'TargetRect: {x:325, y:1200, w: 210, h: 420}
})
list.Push({
'Text: "Loading..." + m.progress.tostr() + "%"
Text: m.progress.tostr() + "%"
TargetRect: m.layout.right
})

else 'Video is currently playing
if m.paused
list.Push({
Color: "#80000000"
TargetRect: m.layout.right
CompositionMode: "Source"
})
list.Push({
Text: "Paused"
TargetRect: m.layout.right
})
else 'not paused
list.Push({
Color: "#00000000"
TargetRect: m.layout.right
CompositionMode: "Source"
})
end if
end if
end while
if m.paint = PaintFullscreenCanvas
m.setup = SetupFramedCanvas
m.paint = PaintFramedCanvas
rect = m.layout.right
end if
m.setup()
m.player.SetDestinationRect(rect)

endif

m.canvas.SetLayer(1, list) 'PLAYER
0 Kudos