this = {
videoScreen: CreateObject("roPosterScreen")
videoScreenPort: CreateObject("roMessagePort")
videos: video_array
}
this.videoScreen.SetMessagePort(this.videoScreenPort)
this.videoScreen.SetContentList(this.videos)
this.videoScreen.Show()
while(true)
msg = wait(0,this.videoScreenPort)
if (type(msg) = "roPosterScreenEvent")
if (msg.IsListItemSelected())
For index = msg.GetIndex() To this.videos.count()-1 Step +1
PlayVideo(this.videos[index])
End For
...
Function PlayVideo(video as object) as integer
videoScreen = CreateObject("roVideoScreen")
port = CreateObject("roMessagePort")
videoScreen.SetMessagePort( port )
metaData = {
Stream: {
Url: video.Url
}
StreamFormat: "mp4"
}
videoScreen.SetContent( metaData )
videoScreen.show()
while (true)
msg = wait(0, port)
if type(msg) = "roVideoScreenEvent"
if (msg.isScreenClosed())
return -1
else if msg.isFullResult()
print "playback completed"
exit while
end if
endif
end while
End Function
'
' User presses Play All button, then ...
'
facade = CreateObject ("roImageCanvas")
facade.SetLayer (0, {Color: "#FF000000"})
facade.Show ()
'
' Play Videos ...
'
facade.Close()
"belltown" wrote:
You can display a blank facade before playing a sequence of videos, so in-between videos you'll just see blackness instead of the poster screen:
'
' User presses Play All button, then ...
'
facade = CreateObject ("roImageCanvas")
facade.SetLayer (0, {Color: "#FF000000"})
facade.Show ()
'
' Play Videos ...
'
facade.Close()
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!
For support, visit support.roku.com.