I'm embedding a youtube video in the HTML with the following code
<iframe width="560" height="315"
src=";modestbranding=0" frameborder="0"
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
I'm trying to hide/disable the context menu inside the video. to avoid copy video link.
I was going through API documentation, still couldn't find result.
How can achieve this?
fiddle link: /
I'm embedding a youtube video in the HTML with the following code
<iframe width="560" height="315"
src="https://www.youtube./embed/7MqMyoxMaW4?controls=0&modestbranding=0" frameborder="0"
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
I'm trying to hide/disable the context menu inside the video. to avoid copy video link.
I was going through API documentation, still couldn't find result.
How can achieve this?
fiddle link: https://jsfiddle/us9rev0b/
Share Improve this question asked Dec 13, 2019 at 9:54 Pandiyan CoolPandiyan Cool 6,5938 gold badges53 silver badges90 bronze badges 3-
This is one type of patch but we can hide it by following pure JavaScript For hide watch later and share button respectively watch later
document.getElementsByClassName("ytp-watch-later-button ytp-button ytp-show-watch-later-title")[0].style.display = 'none'
share buttondocument.getElementsByClassName("ytp-button ytp-share-button ytp-share-button-visible ytp-show-share-title")[0].style.display = 'none'
– Hardik Masalawala Commented Dec 13, 2019 at 10:25 - @HardikMasalawala consider post your ment as an answer. – Mauricio Arias Olave Commented Dec 14, 2019 at 18:29
- please check my answer and accept it if it is matches your desired requirement – Hardik Masalawala Commented Dec 16, 2019 at 5:42
1 Answer
Reset to default 1This is one type of patch but we can hide it by following pure JavaScript
For hide watch later
document.getElementsByClassName("ytp-watch-later-button ytp-button ytp-show-watch-later-title")[0].style.display = 'none'
and For share button
document.getElementsByClassName("ytp-button ytp-share-button ytp-share-button-visible ytp-show-share-title")[0].style.display = 'none'
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745673620a4639551.html
评论列表(0条)