Forum Discussion

cesare77's avatar
cesare77
Visitor
14 years ago

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.

4 Replies

  • 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
  • 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.
  • YungBlood's avatar
    YungBlood
    Streaming Star
    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.
  • 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.