Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
viewbix
Level 7

Overlaying video with interactive elements

I am new to Roku development and was wondering if there is a way to overlay interactive elements over the video screen - I wan tot implement an Amazon X-ray like feature over the content in my channel.  I want users to be able to click a link over the video and then bring up additional related content such as photos or related text. Is this doable as an in video experience? If not what would be recommended way of  offering the closest to this experience?

Thanks
0 Kudos
2 REPLIES 2
RokuNB
Roku Employee
Roku Employee

Re: Overlaying video with interactive elements

it's doable. Video is playing in separate plane behind, on top of it is the UI plane, then they can combined by hardware into (hdmi) signal
0 Kudos
norcaljohnny
Level 11

Re: Overlaying video with interactive elements

Just consider the z-index. so if you have the video node and then another node on top of it, you will see it over the video.

Example:
<video id="videoPlayer" />
<button id="someButton" visible="false"/>

 The video is now behind the button video. Of course you can customize it however you wish based on conditional statements for example a custom function.
sub showButton()
if (m.videoPlayer.state = "pause")
  m.someButton.visible = true
  end if
end sub
0 Kudos