有没有办法使HTML5视频全屏?

前端之家收集整理的这篇文章主要介绍了有没有办法使HTML5视频全屏?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
有没有办法使用HTML5< video>标签

如果这是不可能的,有谁知道这个决定是否有理由?

解决方法

HTML 5没有提供使视频全屏的方法,但是并行 @L_403_0@提供requestFullScreen方法,该方法允许任意元素(包括< video>元素)全屏显示

它有experimental support in a number of browsers

原始答案:

HTML5 spec(写作时:09年6月):

User agents should not provide a
public API to cause videos to be shown
full-screen. A script,combined with a
carefully crafted video file,could
trick the user into thinking a
system-modal dialog had been shown,
and prompt the user for a password.
There is also the danger of “mere”
annoyance,with pages launching
full-screen videos when links are
clicked or pages navigated. Instead,
user-agent specific interface features
may be provided to easily allow the
user to obtain a full-screen playback
mode.

浏览器可以提供用户界面,但不应提供可编程的。

请注意,上述警告已从规范中删除

猜你在找的HTML5相关文章