3 ms·
The best JS library for fullscreen that I've found is https://github.com/toji/game-shim https://github.com/toji/game-shim It's good because it shims the W3C sp
by cpearce 14y ago
The best JS library for fullscreen that I've found is https://github.com/toji/game-shim https://github.com/toji/game-shim
It's good because it shims the W3C specified fullscreen API; you only have to learn the specified API, you don't have to learn some other API.
- bdougherty 14y agoI actually really like that way of doing it, but I don't think it would work well for what I was trying to do with BigScreen, mainly for the video fallback behavior. When browsers do drop the prefixes, part of the functionality wouldn't exist anymore.
- cpearce 14y agoYour video fallback behaviour seems superfluous. If you want fullscreen on a video, why don't you just request fullscreen on the video rather than its container? Having the fullscreen request shift to the descendent video also breaks the case where you actually have an element containing a video that you want to make fullscreen, for example if you have custom controls for your video element... This is simply impossible with your API.
- bdougherty 14y agoIf you have custom controls, putting that element in full screen will work if the browser you're in (and/or the iframe you're in) supports the newer fullscreen API. It only falls back in the case where that doesn't work (older browser, no allowfullscreen attribute on the iframe) and supports the older API that is just for video tags.