jseigle85
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2011
04:49 PM
RoVideoScreen is not working
Can someone tell me why the rovideoscreen is not working. I have a manifest, source which has the main.brs file inside it, and images
This is the only thing I have in the source/main.brr file
Can someone tell me what needs to be added "the code needed" to make this play
And if I use the "roVideoPlayer" will the coding be the same or will it change
This is the only thing I have in the source/main.brr file
Sub Main()
screen = CreateObject("roVideoScreen")
screen.SetContent({
Title: "My Video"
StreamFormat: "hls"
Stream: { URL: "http://ec2-184-72-239-149.compute-1.amazonaws.com:1935/demos/smil:bigbuckbunnyiphone.smil/playlist.m3u8"}
})
screen.Show()
End Sub
Can someone tell me what needs to be added "the code needed" to make this play
And if I use the "roVideoPlayer" will the coding be the same or will it change
5 REPLIES 5


Roku Employee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2011
05:26 PM
Re: RoVideoScreen is not working
Because you don't have an event loop, your channel is exiting before the video can be played. You need to add an event loop after screen.Show(). Check out some of the sample channels to see how an event loop works.
jseigle85
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2011
05:36 PM
Re: RoVideoScreen is not working
Do you have to use the eventloop for every application that use roVideoScreen and roVideoPlayer.
Also other than the BrightScript Reference is there a manual that have all of the coding for each component.
Can you provide me with a example of how to add an eventloop to this code. I am not understanding how it works in the example.
Also other than the BrightScript Reference is there a manual that have all of the coding for each component.
Can you provide me with a example of how to add an eventloop to this code. I am not understanding how it works in the example.


Roku Employee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2011
05:50 PM
Re: RoVideoScreen is not working
The Component Reference in the SDK documents all the available components.
Event loops are how your channel catches and reacts to events generated by the user and by the components within your channel, so yes, they are a very important part of any channel. A very minimal event loop might look like this:
Event loops are how your channel catches and reacts to events generated by the user and by the components within your channel, so yes, they are a very important part of any channel. A very minimal event loop might look like this:
while true
msg = Wait(0, port) ' where port is a roMessagePort
if type(msg) = "roVideoScreenEvent"
if msg.isScreenClosed()
exit while
end if
end if
end while
jseigle85
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2011
08:11 PM
Re: RoVideoScreen is not working
Thank you the code works great, but I have one more problem with it. After the stream has stop playing it exit out to the Roku Menu. Is there a way I can make it go back to a loading status or do I have to use roVideoPlayer for that
stratcat96
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2011
08:41 PM
Re: RoVideoScreen is not working
"jseigle85" wrote:
Thank you the code works great, but I have one more problem with it. After the stream has stop playing it exit out to the Roku Menu. Is there a way I can make it go back to a loading status or do I have to use roVideoPlayer for that
Try putting in a springboard that when the channel is clicked on goes straight to that with the option then to play the stream and display the videoscreen. When you back out of the stream or it finishes, it returns to the springboard with the ability to restart. That actually is the structure of the simple video player example. It's jumping back to the main menu because there's no object to fall back on after the videoscreen is exited