sindresorhus / screenfull

Simple wrapper for cross-browser usage of the JavaScript Fullscreen API
https://sindresorhus.com/screenfull
MIT License
7.06k stars 698 forks source link

Avoid API fullscreen requests when already in native fullscreen mode #57

Closed oranginalab closed 10 years ago

oranginalab commented 10 years ago

Is there any cross-browser safe way to determine wether we are in ''native'' fullscreen mode (ie: user has entered browser fullscreen mode (F11, CMD + SHIFT + F)) ?

If so, it would be nice to prevent screenfull.request() to actually perform an unnecessary API call and displaying the consequent notice to inform we have (re) entered fullscreen mode.

sindresorhus commented 10 years ago

Not that I'm aware of. At least in Chrome the "native" fullscreen is also different from the programmatic fullscreen, where the former shows the tabs. So you would still want to enter the programmatic fullscreen even if the user is already in the former one.