PositivePeak
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2010
02:29 PM
Looping Video
Hi all-
Pardon my newness, but is there a simple script that will launch a video from the first click (no categories - right into video) and loop it over and over until the user hits the back key? I would be willing to pay someone for a simple brs file.
Thanks- I hope all is having a great weekend.
Dave
Pardon my newness, but is there a simple script that will launch a video from the first click (no categories - right into video) and loop it over and over until the user hits the back key? I would be willing to pay someone for a simple brs file.
Thanks- I hope all is having a great weekend.
Dave
6 REPLIES 6

TheEndless
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2010
02:35 PM
Re: Looping Video
The simplevideoplayer example in the SDK does pretty much exactly that.
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)
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
PositivePeak
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2010
02:36 PM
Re: Looping Video
Awesome - thanks for that. Is there an easy way to make it full screen?

TheEndless
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2010
02:53 PM
Re: Looping Video
The simplevideoplayer should be full screen. Are you sure you're looking at it and not the customvideoplayer example?
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)
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
PositivePeak
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2010
09:21 PM
Re: Looping Video
You are right - I was looking at the custom vid example. Thank you. This example looks more toward our needs, however, when you launch this channel- it first goes to a 'play' poster... then, after instructed to play, it will fire off a video. After the video it returns to the poster. My question for you is, how can I get it to restart the same video when it finishes playing and also get it to play as soon as you enter the channel?

TheEndless
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2010
09:34 PM
Re: Looping Video
Here you go... give this a try. All you should need to do is change the videoContent information to match yours:
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... 😉
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)
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
PositivePeak
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2010
10:26 PM
Re: Looping Video
You are awesome! Works great!!!!! Thank you!