1

I want to hide/disable the pause/play button of a YouTube video. I don't have access to the CSS file. I tried the answer mentioned at this link of stackOverflow. But it is not working. Can anyone help?

Here is what I tried,

<div style = "
 background: #FFFF00;
">

<iframe 
    src="https://www.youtube.com/embed/cElhIDdGz7M?start=0&amp;end=120&amp;autoplay=1&amp;controls=0&amp;disablekb=1&amp;rel=0" 
    allow="accelerometer; 
    autoplay; 
    encrypted-media; 
    gyroscope; 
    picture-in-picture" 
    allowfullscreen="" 
    width="560" 
    height="315" 
    frameborder="0"
></iframe>

</div>
johannchopin
  • 13,720
  • 10
  • 55
  • 101
Haroon Lone
  • 2,837
  • 5
  • 29
  • 65

1 Answers1

2

I disabled it here: https://codepen.io/polinq/pen/mdyWmMm

iframe{
 pointer-events: none; /* Disable any user interaction at all */
}

Is that what you are looking for?

paula
  • 264
  • 1
  • 12