Describe the bug
For web projects running in the browser and hosted on itch.io, the device orientation permission is always denied on iOS.
Since iOS 13, the permission for using device orientation or device motion must be requested from a user interaction on the web page.
Compare these 2 web pages, both embedded in an iframe and containing the same code:
Although both are placed inside an iframe, in the first example, the device orientation requestability is properly detected and a popup is displayed to enable it.
In the case of itch.io, the permission is not detected and the popup is not displayed. I tried to force the permission request after a user interaction, but the permission is always "denied".
Please note that the iframe code is different on both pages:
Another difference is on the first example, the containing web page and the iframe source are both served from the same domain. This is not the case for itch.io. I don't know if it's related to the issue.
To Reproduce
Steps to reproduce the behavior:
Create a web page with JS content to request the device orientation API after a user interaction. For example, this code will do.
Zip the file and upload it to an itch.io project with Kind of project set to HTML
Check This file will be played in the browser
Save the project
Open the project on iOS
Click on "Run game"
Expected behavior
After a user interaction, the device orientation permission should be granted when requested.
Screenshots
n/a
Smartphone (please complete the following information):
Device: iPhone or iPad
OS: iOS > 13 beta 2
Browser: Safari
Version: 13
Additional context
Add any other context about the problem here.
Describe the bug For web projects running in the browser and hosted on itch.io, the device orientation permission is always denied on iOS.
Since iOS 13, the permission for using device orientation or device motion must be requested from a user interaction on the web page. Compare these 2 web pages, both embedded in an iframe and containing the same code:
Although both are placed inside an iframe, in the first example, the device orientation requestability is properly detected and a popup is displayed to enable it. In the case of itch.io, the permission is not detected and the popup is not displayed. I tried to force the permission request after a user interaction, but the permission is always "denied".
Please note that the iframe code is different on both pages:
<iframe id="exampleIframe" class="example__iframe" width="100%" height="100%" allowfullscreen="yes" scrolling="no" allowvr="yes" src="https://aframe.io/aframe/examples/boilerplate/hello-world/"></iframe>
<iframe id="game_drop" allowfullscreen="true" allowtransparency="true" webkitallowfullscreen="true" mozallowfullscreen="true" msallowfullscreen="true" src="https://html-classic.itch.zone/html/11765067/index.html" scrolling="no" allow="autoplay; fullscreen *; geolocation; microphone; camera; midi; monetization; xr-spatial-tracking; gamepad; gyroscope; accelerometer; xr; cross-origin-isolated; web-share" frameborder="0"></iframe>
Another difference is on the first example, the containing web page and the iframe source are both served from the same domain. This is not the case for itch.io. I don't know if it's related to the issue.
To Reproduce Steps to reproduce the behavior:
Kind of project
set toHTML
This file will be played in the browser
Expected behavior After a user interaction, the device orientation permission should be granted when requested.
Screenshots n/a
Smartphone (please complete the following information):
Additional context Add any other context about the problem here.