How to activate full screen flag in vimeo, youtube video in iframe

南楼画角 提交于 2019-12-07 19:17:52

问题


I have an iframe which contains vimeo video How I can activate full screen flag in that video

Here is the HTML of iframe which contains video.

<iframe width="500" height="281" frameborder="0" src="https://player.vimeo.com/video/155984146?color=ececec&amp;title=0&amp;byline=0&amp;portrait=0;"></iframe>

回答1:


Just Use

 allowfullscreen="allowfullscreen" mozallowfullscreen="mozallowfullscreen" msallowfullscreen="msallowfullscreen" oallowfullscreen="oallowfullscreen" webkitallowfullscreen="webkitallowfullscreen"

under your iframe tag then it will becom like this

<iframe width="500" height="281" src="https://player.vimeo.com/video/155984146" allowfullscreen="allowfullscreen" mozallowfullscreen="mozallowfullscreen" msallowfullscreen="msallowfullscreen" oallowfullscreen="oallowfullscreen" webkitallowfullscreen="webkitallowfullscreen"> </iframe>



回答2:


Hi you have to allow full screen on your iframe.

just add webkitallowfullscreen mozallowfullscreen allowfullscreen to your iframe

<iframe width="500" height="281" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen src="https://player.vimeo.com/video/155984146?color=ececec&amp;title=0&amp;byline=0&amp;portrait=0;"></iframe>


来源:https://stackoverflow.com/questions/35718776/how-to-activate-full-screen-flag-in-vimeo-youtube-video-in-iframe

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!