W3C home > Mailing lists > Public > public-html-ig-zh@w3.org > August 2011

Re: fullscreen mode ȫ

From: John Hax <johnhax@gmail.com>
Date: Sat, 6 Aug 2011 02:16:39 +0800
Message-ID: <CAEeYXHUHS2qna3f_yq9i9+T6Lr+h0R=6uZQ-Oc2pVrcNEmdy8g@mail.gmail.com>
To: Zi Bin Cheah <zibin@opera.com>
Cc: (wrong string) ML HTMLdȤСM <public-html-ig-zh@w3.org>
APIá

˳㷢һҵfullscreenļݽűwindow.fullScreenԺfullscreenchange¼

if (!('fullScreen' in window)) Object.defineProperty(window, 'fullScreen', {
get: function() {
return (screen.width == window.outerWidth && screen.height ==
window.outerHeight)
}
})
var _fullScreen = window.fullScreen
if (!('onfullscreenchange' in window)) window.addEventListener('resize',
function() {
var f = window.fullScreen
if (f != _fullScreen) {
_fullScreen = f
fireSimpleEvent('fullscreenchange', document, {bubbles:true})
}
}, false)

function fireSimpleEvent(type, target, option) {
if (!target) target = document
if (!option) option = {}
var evt = document.createEvent('Event')
evt.initEvent(type, !!option.bubbles, !!option.cancelable)
return target.dispatchEvent(evt)
}

fullscreenӦʵԼݽslidesHTML5ģȫʱslides״̬Ӽ
http://hax.github.com/2011/es5_safety/ Chrome/FFаF11ԿЧ


2011/8/5 Zi Bin Cheah <zibin@opera.com>

> ȫHTML5 appsչӦǺҪģ**appsûȫûа취ﵽnativeЧ**
> ȷhtml5ϷǸҳĸоһgame
>
> MozillaFullscreen API1ݣwebkitҲʹ2ݡ
>
> ȷvideoȫ
>
> <video src="pelican.webm" autoplay
>       onclick="event.target.**requestFullScreen()"
>       onended="document.**cancelFullScreen()">
> </video>
>
> ȫǷӦõõû²ܽУ**explicit permissionҲȫ⡣
>
>
> 1https://wiki.mozilla.org/**Gecko:FullScreenAPI<https://wiki.mozilla.org/Gecko:FullScreenAPI>
> 2http://lists.whatwg.org/**htdig.cgi/whatwg-whatwg.org/**
> 2011-May/031538.html<http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2011-May/031538.html>
>
>
>
>
Received on Friday, 5 August 2011 18:17:06 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:43:49 UTC