Is it possible to remove only the “watch later” and “share” buttons using the iframe YouTube player

How can I remove the clock later and share buttons using iframe iframe embed player. Use the following code to embed video clips.

<iframe width="854" height="480" src="https://www.youtube.com/embed/cPVgwz5aN1o" frameborder="0" allowfullscreen></iframe>

Using showinfo = 0 removes the full title, which also contains the title of the video.

Can I remove only the Watch Later and Share buttons from the header?

+8
source share
9 answers

Add this line after the link

https://www.youtube.com/embed/c5cHjtspa7M?mode=opaque&amp;rel=0&amp;autohide=1&amp;showinfo=0&amp;wmode=transparent

He will disable this option and will watch later.

+7
source

25 2018 .

showinfo = 0 it's not support anymore

+7

YouTube (youtube-nocookie), " ", "".

<iframe width="854" height="480" src="https://www.youtube-nocookie.com/embed/cPVgwz5aN1o" frameborder="0" allowfullscreen></iframe>
+5

, , :

document.getElementsByTagName('iframe')[0].contentWindow.getElementsByClassName('ytp-watch-later-button')[0].style.display = 'none';

, , , YouTube :

' . JavaScript: ": ", Iframe ... "fooobar.com/questions/35962/...

, , , .

+4

, iframe. :

  • ,
  • , , (2012) , .

, - , showinfo , .

+4

ShowInfo

. 25 2018 .

: 0 1.

0 , , , .

, 1, .

https://developers.google.com/youtube/player_parameters

+1

. .

CSS .

.ytp-watch-later-button{
    display : none !important;
}
0

- , overflow hidden. CodePen .

CSS:

.videoWrapper {
  overflow: hidden;
}
@media (min-width: 1500px) {
  .videoWrapper {
    margin-top: -135px;
  }
}
@media (min-width: 1200px) {
  .videoWrapper {
    margin-top: -75px;
  }
}

HTML:

<div class="videoWrapper">
  <iframe width="100% src="https://www.youtube.com/embed/cPVgwz5aN1o" frameborder="0" allowfullscreen></iframe>
</div>

, , . YouTube.

, 1200 . , .

0

Source: https://habr.com/ru/post/1613380/


All Articles