Fullscreen-API-Polyfill
Fullscreen-API-Polyfill copied to clipboard
Support for iOS webkit
I see no support for webkitEnterFullscreen and friends; in particular webkitDisplayingFullscreen requires a different approach to polyfill, because its a property of an element, not of the document.
Yes, I don't think it should be supported in this polyfill ; I intend to stick to the specification.
webkitEnterFullscreen is used only on <video> elements (correct me if I'm wrong) ; webkit is also implementing the specification using a prefix (which this polyfill might hopefully ease).
There is still the case of iOS which allows webkitEnterFullscreen but not the specification.
I think the better is to manually check for webkitEnterFullscreen on <video> elements when necessary.
Yes, I was actually looking for a polyfill that handled the latter case - webkitEnterFullscreen and not the specs. Older ipads still have it. So I thought I'd drop a note here to let people know its not here.
I've tried to shim it myself now, mimicing the events (which it doesnt have at all) based on resize events. I keep track of fullscreenElement myself.
It seems every iOS have webkitEnterFullscreen and not the standard specification.
For the events, it seems (not sure if the link will work properly, check the "Full-Screen Event and Properties" section) you will have to use the proprietary webkitbeginfullscreen and webkitendfullscreen.
Now I'm not sure if the polyfill should play nice and support this API too.
PS .. thanks for the links. fyi webkitbeginfullscreen and webkitendfullscreen trigger on the video element, and don't seem to propagate to the body. but its better than resize :-)