-
Notifications
You must be signed in to change notification settings - Fork 6
Description
There seems to be a bug in Firefox on iOS where requesting full screen issues an error (or console.log in the case of the FullScreenPlugin):
mozilla-mobile/firefox-ios#30540
Unfortunately there is currently (from what I've found) no great way to consistently detect this browser, and relying on feature detection reports that the full screen API is supported.
Here's a solution or workaround I considered:
Would it be possible to add a class name on the iFrame element when the element is (or is supposed to be) in full screen? (similar to the current '--fullScreen' toggle on the buttons) This way, CSS styles could be attached to render the item in a "fill browser window" way that simulates full screen, even when the API fails.
From looking at the plugin, you would likely need to keep a record of the toggle apart from document.fullscreenElement, but otherwise it would just be a matter of adding this.iFrame.classList.toggle('fullScreen') or something when changed.