Your Digital Media Has Never Looked So Good

 
jseigle85
Topic Author
Posts: 32
Joined: Tue Apr 26, 2011 8:02 pm

RoVideoScreen is not working

Sat May 14, 2011 4:49 pm

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
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
 
User avatar
RokuChris
Posts: 1166
Joined: Mon Aug 30, 2010 1:45 pm

Re: RoVideoScreen is not working

Sat May 14, 2011 5:26 pm

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
Topic Author
Posts: 32
Joined: Tue Apr 26, 2011 8:02 pm

Re: RoVideoScreen is not working

Sat May 14, 2011 5:36 pm

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.
 
User avatar
RokuChris
Posts: 1166
Joined: Mon Aug 30, 2010 1:45 pm

Re: RoVideoScreen is not working

Sat May 14, 2011 5:50 pm

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:

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
Topic Author
Posts: 32
Joined: Tue Apr 26, 2011 8:02 pm

Re: RoVideoScreen is not working

Sat May 14, 2011 8:11 pm

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
** Valued Community Member **
Posts: 3432
Joined: Sat Nov 06, 2010 7:22 pm
Location: Ice Planet Hoth
Contact:

Re: RoVideoScreen is not working

Sat May 14, 2011 8:41 pm

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

Who is online

Users browsing this forum: No registered users and 3 guests