当前位置: 动力学知识库 > 问答 > 编程问答 >

javascript - Full screen does not work on a Youtube/Viemo embedded video on my site when using chrome

问题描述:

On my website, I embedded a Youtube video with this simple code:

<iframe width="560" height="315" src="//player.vimeo.com/video/72625639?wmode=opaque" class="st_public_video top1" frameborder="0" allowfullscreen=""></iframe>

Site Demo can be seen here at: https://testvillage.letsventure.com/dreamon

When in Chrome and I press the full screen button on that video, the video goes full screen and again restores automatically.

However, when I use Explorer or Firefox, full screen works just fine. So obviously I'm doing something wrong. Any help would be appreciated.

网友答案:

You need to change the allowfullscreen="" to allowfullscreen.

I have not verified this locally. But this property behaves similar to "selected" in the "select/options".

The following is the syntax from Vimeo.

<iframe src="//player.vimeo.com/video/VIDEO_ID" width="WIDTH" height="HEIGHT" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>

Note the tags ebkitallowfullscreen, mozallowfullscreen, allowfullscreen.

分享给朋友:
您可能感兴趣的文章:
随机阅读: