-
-
Notifications
You must be signed in to change notification settings - Fork 489
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sounds not playing in Google Chrome in exported game #972
Comments
This happens because Chrome has changed its default behavior with autoplay sounds to avoid sounds playing without the user consent in some websites. And that's what the warning says, to create an audio context in Chrome you have to do it after a user gesture (user click, touch, button, etc.). That's how it's done in games uploaded to the TIC-80's official website, for example, you have to click on the cover image in order to play the game. Right now sites in which you can upload your game (like itch.io) add a cover by default, so I'm not sure if adding a default cover on the generated HTML would have an impact on that. What do you think @nesbox ? As a workaround, you can replace your generated HTML file with this one and a cover element should be added as in here. Then the game will only run after you click on the cover. |
I think the idea with cover is great, will try to use your workaround. |
@nesbox, have you started working on this issue? If not, I have some free time right now, I could do it :) |
I'm not started :) pls do it if you have time. |
Google Chrome version: 78.0.3904.108 64bit
TIC-80 version: 0.70.6
Game source code: https://t.co/Awm6oA7gEz?amp=1
Game url loaded on web server: https://gregtechrus.ru/SpaceInvaders/
Reproduce steps:
Error in Google Chrome:
https://imgur.com/UQaslKV
The text was updated successfully, but these errors were encountered: