Fullscreen API #405

Closed
wants to merge 5 commits into from

10 participants

@brianblakely

Adds fullscreen test, does not increment version number. Tested in Chrome 15, Safari 5.1, Firefox 7 (Yes, Yes, No).

@ryanseddon
Modernizr member

Can you move this out of the core and into a feature-detect folder as a plugin, also webkit right now has two methods one for videos and one for all other elements have a read here.

Basically requestFullScreen is for non video elements and enterFullScreen is for video. I'd want to cover all the bases including the change from FullScreen to Fullscreen.

@brianblakely

I had forgotten about enterFullScreen. I think I'll stick that in a separate "video-fullscreen" plugin alongside a fullscreen one because I bet it will become vestigial pretty soon, if it isn't already. Cool?

@KuraFire
Modernizr member

@brianblakely @ryanseddon @paulirish If Fullscreen has two features, regular and video, maybe we should treat it more like the Video API test? A boolean object: true if both are supported, false if neither, "maybe" if only one of the two, and the properties as:

fullscreen.default
fullscreen.video

Is that a clean solution?

@hsablonniere

I agree on this approach.

@hsablonniere

Can be useful once you've detected that it's supported : http://johndyer.name/native-fullscreen-javascript-api-plus-jquery-plugin

@ryanseddon
Modernizr member

Yep that's the same idea i was going to suggest.

@helgri

there's already a pull request for this from me on nov 4th

helgri@3318395
#392 (commits)

@paulirish
Modernizr member

i just pulled in helgri's PR for fullscreen. it matches this one functionally but was set up as a plugin.
3f3bbf1...e8aa372

on the two checks that faruk suggested.. ryan, is the support of these two methods different? also yeah i expect them to merge into the same method. that just seems sillyyyy.. does the spec give an indication?

@paulirish paulirish Merge pull request #406 from donnut/master
Nokia E52 failed on an undefined style variable
2746f43
@brianblakely

Why are some features tested in core and some as plugins? That's kind of confusing.

The spec does not acknowledge enterFullScreen. I'm surprised Chrome 15's implementation of requestFullScreen works with any element but video.

@ryanseddon
Modernizr member

Based on the spec requestFullscreen() will be the API call and webkits enterFullScreen() should disappear, assuming the spec doesn't change.

Also the current fullscreen plugin detects for the cancelFullScreen() method which is being replaced by exitFullscreen() so that detect will false negative whenever a browser comes along and follows the spec.

@helgri

mozilla has also chosen cancelFullScreen like webkit; contrary to spec...

I suggest to keep the current code. it's small and working. if browsers will change their implementation I can update the code.

@brianblakely

Probably better to check for both before browsers change or add to their implementations. If, say, Opera should implement the spec verbatim tomorrow, then the plugin will report a false negative.

@ryanseddon
Modernizr member

That is a very likely possibility that Opera would follow the spec as both an Opera employee and Mozilla employee are co-authoring the spec. For now I would probably check for cancel and exit methods.

@helgri

I guess Opera won't implement it, when it's still a draft. (same with flexbox)

what about testing the pseudo-class :fullscreen? same for all browsers…

@jensbambauer

There is an issue in Firefox 9. The test returns true, because the the fullscreen api is implemented. But they turned it off, so you actually can call the fullscreen functions, but they don´t do anything. It appears Firefox Team is turning the feature on in Firefox 10.

@helgri

If the feature is disabled but the API is still available this seems to be just wrong in firefox…

is any part of the api available?

@rainboxx

Please see my comment on the gist for issues with FF9: https://gist.github.com/1336232#gistcomment-75712

@helgri

I made an update on my gist https://gist.github.com/1336232

@haeric

Now that the fullscreen-test looks pretty good (#739, e1367ce), this PR is pretty outdated and could probably just be closed? :)

@stucox
Modernizr member

Yep, thanks for the nudge.

@stucox stucox closed this Mar 26, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment