Developers

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
idunno
Visitor

Loading screen for roscreen

The customvideoplayer program has a function where when a video is loading it will give the percentage loaded, the PaintFramedCanvas () function.



Sub PaintFramedCanvas()
list = []
if m.progress < 100 'Video is currently buffering
list.Push({
Color: "#80000000"
TargetRect: m.layout.left
})
list.Push({
Text: "Loading..." + m.progress.tostr() + "%"
TargetRect: m.layout.left
})
else 'Video is currently playing
if m.paused
list.Push({
Color: "#80000000"
TargetRect: m.layout.left
CompositionMode: "Source"
})
list.Push({
Text: "Paused"
TargetRect: m.layout.left
})
else 'not paused
list.Push({
Color: "#00000000"
TargetRect: m.layout.left
CompositionMode: "Source"
})
end if
list.Push({
Text: "Current position: " + m.position.tostr() + " seconds"
TargetRect: m.layout.bottom
TextAttrs: { halign: "left", valign: "top", color: m.textcolor }
})
end if
m.canvas.SetLayer(1, list)
End Sub


I would like to know how I could do something similar on a roscreen using drawtext to display the information on screen, or if there is an alternative.
Tags (1)
0 Kudos
1 REPLY 1
RokuJoel
Binge Watcher

Re: Loading screen for roscreen

You absolutely can do it with roScreen and Drawtext. I'll take a look at porting CustomVideoPlayer to roScreen, I don't expect it to be too difficult, if I can do it quickly, I'll post it here for you.

- Joel
Tags (1)
0 Kudos
Community is Being Upgraded!

We’re upgrading Roku Community to bring you a faster, more mobile-friendly experience. You may notice limited functionality or read-only access during this time. Read more here.

Planned Downtime:
Community will be unavailable for up to 24–48 hours during the upgrade window during the week of May 19th and you may notice reduced functionality. In the meantime, for additional assistance, visit our Support Site.

We're sorry for this disruption — we’re excited to share what’s next!