I need my next button to be hidden until embedded video is complete | Experience Community
Skip to main content

I need my next button to be hidden until embedded video is complete

  • January 27, 2023
  • 5 replies
  • 182 views

Forum|alt.badge.img+2

I have reviewed all the other post and have tried these but they are not working for me.
I need my video to work for mobile viewers as well. When I use scripting from other post this seems to disable the CSS I have enter for my mobile viewers.
I just need the next button hidden until video ends and allow auto adjust for mobile.
I have also tried the timing question but this does not seem to work with the CSS, once I incorporated the CSS, I no longer get the next button to populate. My end user just get stuck on the first page.

5 replies

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • January 27, 2023

Post your video html and your CSS.


Forum|alt.badge.img+2
  • Author
  • Level 1 ●
  • January 27, 2023

HTML

">https://www.youtube.com/embed/*********">


CCS
.wrap-element {
 position: relative;
 overflow: hidden;
 padding-top: 56.25%;
}
.wrapped-iframe {
 position: absolute;
 top: 0;
 left: 0;
 width: 100%;
 height: 100%;
 border: 0;
}

Thank you very much for any help.


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • January 27, 2023

See the YouTube API reference. You need to set up the YT.Player object then you can check if the video has ended.


Forum|alt.badge.img+2
  • Author
  • Level 1 ●
  • February 1, 2023

Thank you,
I reviewed the YT API reference and I still have something wrong. I have tried many different way between what is on the reference guide and what others have posted with no luck. It's me I am sure, as I an kinda a newbie to scripting.
Here's what I have now. I also removed the JS I had, when I tested it last time it didn't work, so removed it now trying it with just this script.