Is possible automatic fullscreen with html5?

2019-04-26 21:19发布

I'm based on Using the Fullscreen API in web browsers (http://hacks.mozilla.org/2012/01/using-the-fullscreen-api-in-web-browsers ) for fullscreen , but only works with a click event or with console firebug, not with submit event or mouseover or similar for made automatic. Is possible automatic fullscreen with html5 without click event or similar ?

Edit: I understand the security and accessibility reasons if not possible, but in some environments this can be hopeful.

2条回答
成全新的幸福
2楼-- · 2019-04-26 21:55

No, it's not possible - for security reasons accessing full screen requires the user's "permission", and so is tied to browser input events.

查看更多
beautiful°
3楼-- · 2019-04-26 21:56

No, that is not possible. The requestFullScreen() must be triggered by a direct user action (like a click) for security considerations. It's just the same as with popups.

Read https://wiki.mozilla.org/Security/Reviews/Firefox10/CodeEditor/FullScreenAPI and maybe https://wiki.mozilla.org/Gecko:FullScreenAPI for reference.

查看更多
登录 后发表回答