2016-11-16 688 views

回答

0

我使用?controls = 0在我的网址的末尾,它解决了问题。

1

使用iframe标记,而不将allowFullScreen禁用播放机上的按钮,例如:

<iframe src="https://www.youtube.com/embed/12345"></iframe> 

要允许全屏只需添加的allowFullScreen:

<iframe allowfullscreen="0" src="https://www.youtube.com/embed/@(item.VideoUrl)"></iframe> 
+0

除了防止iframe上的全屏,您可以禁用YouTube视频播放器内的全屏图标。为此,请添加参数'fs = 0':'https://www.youtube.com/embed/12345?fs = 0' – ecoe

0
"I used ?controls=0 at the end of my url and it resolved the issue." 

Your answer doesn't solve the problem, you can toggle full screen also double clicking the video. 
I tried allowfullscreen="0", doesn't work too. 

PS 
The same is for ?showinfo=0. Also doesn't work. 
?showinfo=0 works only if you change link: 
    https://www.youtube.com/embed/Di2KMatiGAM?controls=0&showinfo=0 
to:`enter code here` 
    https://www.youtube-nocookie.com/embed/Di2KMatiGAM?controls=0&showinfo=0 
0

当你有一个视频在youtube上,你可以分享它。它也显示一个选项来嵌入它。

你可能有一个<iframe></iframe>在你的代码

矿看起来像这样:

<div class="IFR" alt="-"> 
    <iframe width="560" height="315" src="https://www.youtube.com/embed/AdfFnTt2UT0 rel=0&amp;controls=1&amp;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”,您将能够使用全屏。

TLDR:在您的YT视频所在的Iframe标签中,在末尾添加“donotallowfullscreen”。和其固定的