如何在youtube iframe上禁用全屏? [英] How to disable full screen on youtube Iframe?
问题描述
我有一个div容器和iframe里面。我指定width = 200和height = 200。
当我点击全屏时,视频变得模糊,质量非常差。所以,我想知道是否可以在youtube iframe上禁用全屏。
I have a div container and Iframe inside. I assigned width=200 and height=200. when I click on full screen, the video becomes blurry with very bad quality. So, I wanted to see if it is possible to disable full screen on youtube iframe.
推荐答案
当你在youtube上播放视频时你可以分享它。它还会显示一个嵌入它的选项。
when you have a video on youtube you can share it. it also displays an option to embed it.
你可能有一个< iframe>< / iframe>
在你的代码中
you probably have a <iframe></iframe>
in your code
我看起来像这样:
<div class="IFR" alt="-">
<iframe width="560" height="315" src="https://www.youtube.com/embed/AdfFnTt2UT0 rel=0&controls=1&showinfo=0" frameborder="0" allow="autoplay; encrypted-media" donotallowfullscreen>
<p>
Your browser does not support Iframes <br>
I suggest that you use Google Chrome or FireFox
</p>
</iframe>
</div>
这里重要的是donotallowfullscreen。
如果您将其设置为allowfullscreen,则可以使用全屏。
the thing that matters here is "donotallowfullscreen". if you set this to "allowfullscreen" you will be able to use fullscreen.
TLDR:在您的YT视频所在的Iframe标记中,添加 donotallowfullscreen最后。及其固定的
TLDR: in the Iframe tag where your YT video is located, add "donotallowfullscreen" at the end. and its fixed
这篇关于如何在youtube iframe上禁用全屏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!