YouTube iframe embed - full screen

2019-01-31 10:50发布

I have a form that is iframed into a web page. Upon completion of the form, a YouTube video is displayed from using iframe embed.

When I enter full screen mode of the YouTube video, nothing really happens.

Is the fullscreen of the nested iframe constrained by the dimensions of the parent iframe?

标签: html iframe
8条回答
够拽才男人
2楼-- · 2019-01-31 11:51

Adding allowfullscreen="allowfullscreen" and altering the type of YouTube embed fixed my issue.

查看更多
爷、活的狠高调
3楼-- · 2019-01-31 11:56

I had to add allowFullScreen attribute to the "parent" iframe. The case of the attribute does matter. I don't think Firefox or Edge/IE11 has a browser specific allowFullScreen attribute. So it looks something like this:

<iframe allowFullScreen='allowFullScreen' src='http://api.youtube.com/...'/>

查看更多
登录 后发表回答