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: 
cesare77
Visitor

Adding custom on screen buttons over video

I am new to developing to Roku. I have a video streaming application and I would like to add a button as part of the canvas frame over the video. Is there a way to do this? I don't want a popup message button.
0 Kudos
4 REPLIES 4
RokuJoel
Binge Watcher

Re: Adding custom on screen buttons over video

You would use roVideoPlayer in conjunction with roImageCanvas. An example using roVideoPlayer is the customvideoplayer sample in the SDK.

Essentially, roVideoPlayer would be on one screen "layer", say layer 0, and your overlays would be on another, such as layer 1.

- Joel
0 Kudos
cesare77
Visitor

Re: Adding custom on screen buttons over video

Thanks. That helped, I was able to add the buttons.

On the roImageCanvas is there a way to change the layout of the buttons? I saw in the developer guide that on some screen components you can change the layout (put the buttons on the left for example). I also would like to have the highlight bar not so long.
0 Kudos
YungBlood
Streaming Star

Re: Adding custom on screen buttons over video

You can draw anything you want anywhere you want with a roImageCanvas. So you can make your own custom buttons. The games on the first version of Games 4 Roku were all programmed with roImageCanvas, including the custom menus. So just have 2 images per button, one selected, and the other not selected. And just choose which one to draw. And add the code to respond to the remote buttons so that as you use the arrow buttons, the appropriate buttons on screen change.
YungBlood

Bringing more fun to Roku!
0 Kudos
cesare77
Visitor

Re: Adding custom on screen buttons over video

So do you mean you dont need to use the button core components, but create a custom button just by drawing images? How do I tie the selection functionally to make the artwork selectable?

If I used the addButton it automatically adds those buttons to the default location.
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.