Here you go... give this a try. All you should need to do is change the videoContent information to match yours:
Sub RunUserInterface()
'Draw black canvas to prevent screen flickering between loops
blackCanvas = CreateObject( "roImageCanvas" )
blackCanvas.SetLayer( 0, { Color: "#000000", TargetRect: { x: 0, y: 0, w: 1280, h: 720 } } )
blackCanvas.Show()
' Set up video content
videoContent = {
Title: "My Video",
Stream: { url: "http://url.to.my.video" },
StreamFormat: "mp4"
}
' Create MessagePort for capturing events
msgPort = CreateObject( "roMessagePort" )
StartVideo:
' create video screen and set the message port
video = CreateObject( "roVideoScreen" )
video.SetMessagePort( msgPort)
' Set the content, and show the video
video.SetContent( videoContent )
video.Show()
While True
msg = Wait( 0, video.GetMessagePort() )
If Type( msg ) = "roVideoScreenEvent" Then
If msg.IsFullResult() Then
' Full Result indicates that the video completed,
' So create a new video screen and start again
GoTo StartVideo
Else If msg.IsPartialResult() Then
' A partial result indicates that the video was
' cancelled, probably by pressing up on the remote
' so exit the app
Exit While
End If
End If
End While
End Sub
I got your email, btw, but haven't really had a chance to take a look, yet.
DISCLAIMER: I wrote this in notepad and didn't test it, so there may be a syntax error or two...
😉
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)