11-02-2023, 08:53 PM
(11-02-2023, 08:24 PM)Nutul Wrote:(11-02-2023, 07:09 PM)Tim Curtis Wrote: I tried some test code and it worked in Chrome on my Mac but not in Safari on my iPhone.
I use that as well for my web-based ePub reader, but remembered that there were sone caveats, and indeed I found this in my code:
Code:/// new WebKit (Chrome, Opera)
[
'webkitRequestFullscreen',
'webkitExitFullscreen',
'webkitFullscreenElement',
'webkitFullscreenEnabled',
'webkitfullscreenchange',
'webkitfullscreenerror'
],
/// old WebKit (Safari 5.1)
[
'webkitRequestFullScreen',
'webkitCancelFullScreen',
'webkitCurrentFullScreenElement',
'webkitCancelFullScreen',
'webkitfullscreenchange',
'webkitfullscreenerror'
],
With particular attention to:
webkitFullscreenElement (Chrome) vs. webkitCurrentFullScreenElement (Safari)
Just my 2c.
I used some of the sample code from the API spec.
https://developer.mozilla.org/en-US/docs...screen_API
The spec mentions that requestFullScreen() doesn't work on iPhone but thats not the issue. The issue is more that the usage scenario seems unlikely because you would only use this if your Home Screen app was broken (how often does that happen?) and instead of easily creating a new one you just used the Browser as-is.