You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since iOS and Android does not allow to use the sensor data per default the orientation controller does not. I assume that the code should be enhanced by something like this;
DeviceOrientationEvent.requestPermission()
.then(response => {
if (response == 'granted') {
window.addEventListener('deviceorientation', (e) => {
// do something with e
})
}
})
.catch(console.error)
The text was updated successfully, but these errors were encountered:
This won't work for happyfuntimes unfortunately. Pretty much device orientation is dead for hft
It's not just that you need permission it's also that your page has to be served via https or you get an error
Call to requestPermission() failed, reason: Browsing context is not secure.
Serving https is not something hft can do. It requires a domain per game running and getting a certificate for that domain and keeping it up to date. In other words to use it the user (the person running the game not the game developer) would need to register a domain like at godaddy or namecheap or some other place and then some how let hft update the ip address for that domain to point to their home machine (or where ever they are running the game) and get a cert from like letsencrypt, and keep both of those up to date (certs expire every 3 months and ip addresses change)
I looked into it back when I first made hft and it turned out the only solution would require $$$$$$$$
Since iOS and Android does not allow to use the sensor data per default the orientation controller does not. I assume that the code should be enhanced by something like this;
DeviceOrientationEvent.requestPermission()
.then(response => {
if (response == 'granted') {
window.addEventListener('deviceorientation', (e) => {
// do something with e
})
}
})
.catch(console.error)
The text was updated successfully, but these errors were encountered: