🤑 Indie game store🙌 Free games😂 Fun games😨 Horror games
👷 Game development🎨 Assets📚 Comics
🎉 Sales🎁 Bundles

No audio in HTML test Chrome on Android

A topic by VAUDIO created 7 days ago Views: 127 Replies: 4
Viewing posts 1 to 2
(Edited 9 times)

Hello,

Bug: Google Chrome on Android won't play sound.
Project: a simple button, which plays a sound when clicked.
Software: Adobe Animate CC 2017 16.5.0.100
Framework: HTML5 Canvas
Publish settings:


itch.io project settings:

Tested on:
 


Notes:
- Only happens in Google Chrome (60.0.3112.116) on Android (5.1 and 7.0). The project automatically plays in fullscreen, but even when testing in desktop mode, the sound still won't play.
- Firefox on Android doesn't have any issues, and plays just fine (in both mobile and desktop mode).
- On the iPad it first plays correctly, but after several clicks (fast or slow), the sound cuts off and it's not clickable anymore.
When testing out the exact same project on a personal server in Chrome on Android, the sound plays correctly.
- I've tried all different publish (in Animate) and embed (in itch) settings, with no luck.
- I've contacted itch.io via e-mail (14 sept '17), but haven't heard back yet.
- It could be a specific Google Chrome/Android problem, which itch can't control. But I figured I report it anyway.

Conclusion:
I suspect the error occurs  in itch.io on Google Chrome on Android, because the page gets run inside a project shell or something like that.

Admin (Edited 1 time)

Hello,

Thanks for the report. We do not manipulate the code you upload at all, we load it as-is in an iframe.

I loaded the page up with my Android 7 device with browser console debugger and this is the warning I saw when I tried to play a sound: 

An AudioContext in a cross origin iframe must be created or resumed from a user gesture to enable audio output.

Here's a ticket I found on the issue: https://github.com/photonstorm/phaser/issues/2913

(Edited 1 time)

Hello,

Thank you for your reply and information. I figured it was on the browsers' end. I've tried implementing the code provided in the ticket you attached, but with no luck (I'm no programmer by the way, so could be doing it wrong). I guess for now we just have to live with it. Hopefully a fix or solution will be introduced shortly.

Edit: but then, it is because of the iframe on the itch.io framework? Because the test on the personal server does work in Chrome on Android. Is it then possible for me to present the game differently on itch, bypassing the iframe?

Admin

We don't support showing the game outside of an iframe. You could code something to get around this by having a landing index.html page that opens a new tab in the browser with the actual game. From what I can see in the ticket, the audio issue is related to how the game engine is loading.

Hello,

I will look into opening it in a new tab. This thread could be closed, it's clear now that the audio 'block' occurs specifically in an iframe in Chrome on Android, and is not because of the itch platform.

Thank you so much again for your help.