Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
idunno
Visitor

Roscreen Video Problem

I am just now becoming acquainted with the roScreen component and its interfaces. I am trying to make a channel where there is a video playing on the left side of the screen and a menu on the right side were you can select different feeds. However, I have a problem where after using the roscreen clear function to set the background color, the video appears behind the background, where it can be heard, but not seen. What can I do to fix this?
0 Kudos
3 REPLIES 3
MSGreg
Visitor

Re: Roscreen Video Problem

Don't use Clear(), use DrawRect() and specify the coordinates avoiding the video section of the screen.
0 Kudos
TheEndless
Channel Surfer

Re: Roscreen Video Problem

You can definitely use Clear(). Just make sure you call SetAlphaEnable(True) on the screen, and that you're passing in a 0 alpha value on the color you're Clear()'ing with.

screen = CreateObject("roScreen", True)
.
.
.
' Enable alpha on the screen
screen.SetAlphaEnable(True)
' Clear the screen, so the video can be seen behind
screen.Clear(&H00000000) ' &H00000000 = 0 = fully transparent black
' Draw your other screen elements
.
.
.
screen.SwapBuffers()

Also, make sure you've called SetDestinationRect() on your roVideoPlayer object to specify where the video should be displayed.
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)
0 Kudos
RokuJoel
Binge Watcher

Re: Roscreen Video Problem

Also, if you want a solid background with the Video appearing "on top" of the background, I would suggest, in Photoshop, create a transparent layer, past your solid background to a layer on top, cut out a hole the size of the video, and save as a transparent .PNG.

- Joel
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.