2016-11-16 693 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」。和其固定的