2016-11-16 11 views
0

私は内部にdivコンテナとIframeを持っています。私はwidth = 200とheight = 200を割り当てました。 フルスクリーンをクリックすると、ビデオが非常に悪い品質でぼやけてしまいます。ですから、iframeでYouTubeのフルスクリーンを無効にすることが可能かどうかを確認したいと思いました。YouTubeのフルスクリーンを無効にする方法iframe?

答えて

0

URLの最後に?controls = 0を使用して問題を解決しました。

1

は、たとえば、プレーヤーのボタンを無効にするallowFullscreenずにiframeタグを使用します。

<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

あなたがビデオを持っているときあなたはそれを共有することができます。それを埋め込むためのオプションも表示されます。

あなたはおそらくあなたのコード内で<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」を追加します。その固定

関連する問題