Embedded YouTube videos in native HTML5 mode and full screen
I know about the issues of HTML5 video and full screen in general. However, this is about embedded YouTube videos and using the YouTube default iframe embed code.
The context is me trying to answer my own question about seamless and sandbox for YouTube videos more in depth. Work has begun at a test page
(Note that form elements do not work at all so far.)
The thing is that currently I am not able to get any video to play in full screen, if I am signed in to the HTML trial. Attributes are therefore pointless.
Does anyone have up to date knowledge about YouTube's plans to provide full screen and if browser would allow it because of security restrictions or have a work around for the issue today?
I do not wish to enable full screen by default. The user must initiate it by him-/herself.
Using an alternative video player is currently not an option, since the purpose is to test YouTube's default code.
Add this to the end of your iframe src:
allowfullscreen
This should be your code:
<iframe width="500" height="500" src="https://www.youtube.com/embed/0U8VA-0SF5E" frameborder="0" allowfullscreen></iframe>
链接地址: http://www.djcxy.com/p/44758.html