Sound not playing on Safari & iOS 6+

Discussion and feedback on Construct 2

Post » Mon Sep 09, 2013 2:51 am

I have created a very basic sound test project where you click on a large sprite and it plays a sound. The sound plays fine when you load the project and click on the sprite in Chrome but not in Safari or on iOS 6+. I have used the Touch object to capture the click on the sprite and trigger the play sound action. I have tried both preloading and not preloading the sound with no change.

Here is a link to the full exported project on Dropbox:
https://dl.dropboxusercontent.com/u/8856086/PianoTestWeb/index.html

The audio file alone is downloadable and playable in Mac Safari and iOS 6+:
https://dl.dropboxusercontent.com/u/8856086/PianoTestWeb/media/A.m4a

The .capx file is here:
https://dl.dropboxusercontent.com/u/8856086/PianoTestWeb/1Key.capx

What am I doing wrong?ctceismc2013-09-09 02:59:43
B
7
S
3
Posts: 23
Reputation: 925

Post » Mon Sep 09, 2013 5:52 am

You should mention which compiler you use in case of iOS
B
18
S
6
G
1
Posts: 783
Reputation: 4,187

Post » Mon Sep 09, 2013 11:48 am

Works fine on an iPad 3 running iOS 6 here.
Scirra Founder
B
387
S
230
G
87
Posts: 24,249
Reputation: 192,240

Post » Mon Sep 09, 2013 2:20 pm

hmm...
I just cleared the cache on the iPhone 5 and reloaded. Everything seems to play as it should. Sorry for the distraction. It's the little things that get you ;-)ctceismc2013-09-09 14:25:03
B
7
S
3
Posts: 23
Reputation: 925

Post » Mon Sep 09, 2013 3:25 pm

I spoke too soon. I exported another copy to dropbox and now it doesn't work in Safari anymore. This is really strange. Is Dropbox doing something strange or is something else going on? Is sound so inconsistent on Safari. Sound seems to work in Chrome even when it doesn't work in Safari.
B
7
S
3
Posts: 23
Reputation: 925

Post » Mon Sep 09, 2013 4:07 pm

Ok - I made a few mods making the sound playable by either clicking/touching on a sprite or Text object. Just to check that clicks/touches are being received I made the sprite rotate 90 degrees on every click/touch as well. The sound also plays once after layout is loaded initially.

Now Mac Safari crashes while trying to load the file. Earlier it would not play the sound but did not crash. Once it locked up my iPhone 5 and I had to force power off and restart. Works fine on Chrome.

Dropbox URL: https://dl.dropboxusercontent.com/u/8856086/PianoTestWeb/index.html

Capx: https://dl.dropboxusercontent.com/u/8856086/PianoTestWeb/G.capx

Is there some trick I am missing?ctceismc2013-09-09 17:22:48
B
7
S
3
Posts: 23
Reputation: 925

Post » Fri Nov 08, 2013 8:39 am

I have huge problems with sounds on ios (all devices, all versions) which is our main target as a platform. I have had too much issues with cocoon so that is not an option.

My issues are:

* Not all sounds are playing, only some, but this seems to be somewhat random
* When the page is reloaded, and the files are probably cached, no sounds are working

Unfortunately there seems to be little to no help here and I'm soon at my deadline so I will have an unsatisfied customer. I won't blame anybody and I understand that the problem is complex, but since ios is such a popular os, I would hope for more discussions on how to find workarounds rather than just hints to contact apple and get them to fix safari. It's like talking to a brick wall.

I am constantly looking at options and my team has spent a few weeks only to try to solve this specific issue with no luck.

One thing is for sure, if this is not solved, I won't get more jobs using this technique and I will have to switch to something that works.

I will try to summarize our research when I have the time and maybe we can work something out together.
B
7
S
1
Posts: 22
Reputation: 526

Post » Fri Nov 15, 2013 7:28 pm

@jeansson, any luck with this? I have a publisher that is purchasing one of my games and they are experiencing the same issues with sound on their iOS devices. I might try going back to LowLatencyAudio and seeing if it helps. https://www.scirra.com/tutorials/283/phonegap-low-latency-audio Even though I am not using phonegap, it might solve the issue.ArcadEd2013-11-15 19:28:59
B
100
S
32
G
11
Posts: 1,552
Reputation: 21,612

Post » Sat Nov 16, 2013 8:49 am

If it works fine on local machine but crashes on remote version, would it be the problem of sound file preload? I've encountered similar problem and solved after removing all preload functions.
Providence University, lecturer.

Tatung University, lecturer.



Consultant per question: USD$15 / time

Consultant by month: USD$300 / month

Customized project: USD$2500 / capx
B
76
S
16
G
4
Posts: 195
Reputation: 7,606

Post » Sat Nov 16, 2013 10:43 am

@ArcadEd : most html5 games currently feature no sound. It seems like iOS and android at least, the support is pretty bad at the time.
We just tried it on an html5 game we just finished with my teammate, and we do have the cache problem on ios, and the sound not looping on android.
B
77
S
22
G
4
Posts: 311
Reputation: 12,634

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 10 guests