Reputation: 471
How can one tell if a browser supports FullScreen API in JavaScript?
From my understanding, the latest Safari allows it on iPads and not iPhone.
I am wondering how I can detect if the device supports it so I can conditionally show or hide a fullscreen button.
(Ideally in Angular using TypeScript)
Upvotes: 0
Views: 762
Reputation: 12960
The fullscreenEnabled property tells you whether or not it is possible to engage full-screen mode. This is false if full-screen mode is not available for any reason (such as the "fullscreen" feature not being allowed, or full-screen mode not being supported).
Upvotes: 2