I was trying to compile my Android app with HTML5 that I created using Construct 2. I followed all the steps but the game didn't have sound. I tried to find many ways to solve the problem but I didn't find any solutions. I didn't use HTML5 audio tags or anything similar, and I tried to change the Javascript code to provide access to the audio but I failed. The files are here: HTML5 Game.
Asked
Active
Viewed 320 times
2 Answers
0
Can't actually get at the files but here's a pure JS solution to playing sounds:
var sound = new Audio("audio/sound.wav");
var sound2 = new Audio("audio/othersound.wav");
sound.volume = 12;
sound.play();
Should be pretty self-explanatory. Create an Audio object and call play() to play it.

ArtOfCode
- 5,702
- 5
- 37
- 56
0
When you import your sounds into Construct you have to import all three types (WAV, MP3, OGG). Then Construct will use the correct one for the platform. On Android I have only had the OGG files work on my Construct 2 games.

Jason Short
- 5,205
- 1
- 28
- 45
-
It not solving problem. This is Android, low latency audio issue. For now only "easy" solution is using Crosswalk build, but apk is very big. For example my game apk with Crosswalk is ~25mb download, after installation 50mb on device, where apk build with Cordova is 3.7mb only, but to run sound it need more coding with Cordova. – Dudeist May 07 '14 at 00:48