Skip to main content
rickg1949
Known Participant
Jan 29, 2018 8:16 PM UTC
Question

Transparent button over video background

Is it possible to overlay buttons over top of the MP4 video component in an HTML5 canvas project?  When I tried they were hidden underneath. Even though on top in timeline.

Trying to create a video player with looping background and when user touches screen anywhere timeline goes to menu.  (the old Encore DVD days, I know )

thanks in advance, rg

This topic is closed to new replies. Start a new post to keep the conversation going.

11 replies

Participant
Feb 1, 2018 5:52 PM UTC

You can put the canvas over the video.

Create a video-under.css file, then link that css file to your project.

  #canvas{

      z-index: 1;

  }

  #ID_OF_VIDEO{

      z-index: 100;

  }

Replace "ID_OF_VIDEO" with the instance name you give the video component on stage.

Good Luck!

Translate
Inspiring
Feb 1, 2018 10:10 PM UTC

it will be fine just

#dom_overlay_container {

     z-index: -1;

}

and transparent canvas background

Translate
Participating Frequently
Oct 18, 2022 1:49 PM UTC

but where exactly do you place this code? can anyone spare more details on this process for a noob!

 

#dom_overlay_container {

     z-index: -1;

}

Translate
Colin Holgate
Inspiring
Jan 29, 2018 8:33 PM UTC

The easiest solution might be to also use an HTML5 component for the button. Then it should stay on top of the video. You might also be able to put the listener on to the video component, and have no button.

Translate