Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

I'm trying to use a 'deviceorientation' event handler and running into iFrame problems, I think.

A topic by KECG created Apr 05, 2021 Views: 347 Replies: 5
Viewing posts 1 to 4
(+1)

Hi,

I'm in the process of building a small webapp-game, mostly in an effort to test out an input library I've built. I finally got around to adding phone inputs and encountered a problem. The same incredibly simple event handler for 'deviceorientation' works in a localhost of my project and not in the itch iframe.

I've given this issue the old google, but it brings up mostly irrelevant results. One thing I found suggests that for Chrome 66+ there need to be iframe permissions for 'gyroscope' and 'accelerometer,' within the 'allow' attribute, to skip around the CORS restrictions. (https://github.com/immersive-web/cardboard-vr-display#iframes for a description of the problem in another context) These appear not to be allowed in a 'view source' of the game-page hosted on your site.

I can easily believe I'm wrong about this. Just throwing spaghetti here :). I in no way expect you guys to do any work on my behalf, but if you could confirm this is my problem, I'd appreciate it.

Thanks for your consideration,

K.

Deleted 3 years ago
Admin(+1)

Generally we do not recommend hosting your game elsewhere and adding a link to it. It means that we can’t guarantee that you actually have something that can be loaded uploaded, and we can’t help debug issues for potential buyers or players. By default, we actually unlist “empty” pages from our search and browse pages.

https://itch.io/docs/creators/getting-indexed#why-isn-and-rsquot-my-project-showing-up

(1 edit)

Edit: This was in response to apparently mistaken advise :)

Hey, thanks for your reply, Force Viking. Totally. Sounds like a good fallback, and nice to know there's an option for hosting offsite, if it is in fact a CORS issue.

Admin(+2)

I’ve updated the list of allow properties on iframes for html5 games. Give it another shot and see if it made a difference.

Super neat. Thanks!

Works like a charm! I am absolutely overwhelmed that you would go to that trouble for a rando. 

Thank you so much :)

This topic has been auto-archived and can no longer be posted in because there haven't been any posts in a while.