You just have to replace the Video ID, the start time (in seconds), the end time (in seconds), the height of the player (in pixels) and the width in the DIV tag as per your needs.
You can add ? modestbranding=1 to your url. That will remove the logo. This parameter lets you use a YouTube player that does not show a YouTube logo.
Using YouTube embed's privacy-enhanced mode (youtube-nocookie), it will hide "Watch later" button, but not "Share" button.
<iframe width="854" height="480" src="https://www.youtube-nocookie.com/embed/cPVgwz5aN1o" frameborder="0" allowfullscreen></iframe>
This parameter is deprecated and will be ignored after September 25, 2018.
As an example, this is what you're trying to do:
document.getElementsByTagName('iframe')[0].contentWindow.getElementsByClassName('ytp-watch-later-button')[0].style.display = 'none';
But, short answer, there is no simple way to do this, because YouTube is on a different domain:
'Not possible from client side . A javascript error will be raised "Error: Permission denied to access property "document"" since the Iframe is not part of your domaine...' https://stackoverflow.com/a/30545122/2488877
Though, you might find an answer suitable to your needs if you're tech-savvy in the answers to the question above.
Add this line after link
https://www.youtube.com/embed/c5cHjtspa7M?mode=opaque&rel=0&autohide=1&showinfo=0&wmode=transparent
It will disable the share and watch later option
I don't think it is possible with the iframe method. My reasons for thinking that is:
You could probably achieve something similar by turning showinfo off, and using the other methods to grab the video title.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With