Simultaneous sounds play on iPad

  • Question
  • Updated 3 years ago
  • Answered
I have a background ambience and some interactive elements that has sounds attached to it. The new sound interrupts a previous one.
How can I work around it?
Photo of Nik Skavinsky

Nik Skavinsky

  • 7 Posts
  • 0 Reply Likes

Posted 3 years ago

  • 1
Photo of Scott

Scott, Official Rep

  • 3807 Posts
  • 246 Reply Likes
Short answer: No - you cannot work around it.

Longer answer: iOS does not allow multiple sounds to be played, unfortunately. You can only play one at a time - and furthermore, you can only start sound in response to a user event like a touch or click (much like how pop-up blockers work.)
Photo of Nik Skavinsky

Nik Skavinsky

  • 7 Posts
  • 0 Reply Likes
Ah hell!!! That crappy all-disabled iOs... Thanks for response. Now I'm even sadder.

What if I make 2 separate html files with sounds, will they play simultaneously?
Photo of Scott

Scott, Official Rep

  • 3807 Posts
  • 246 Reply Likes
Chances are you can't play two sounds at once, regardless of whether they're in the same window or frame.

I think the device limits sound to one at at time within the context of Safari. If you have iPod music playing, it will stop in order to let browser sound play, and so on.
Photo of AndreasA

Andreas

  • 2 Posts
  • 0 Reply Likes
>>Longer answer: iOS does not allow multiple sounds to be played, unfortunately. You can only play one at a time - and furthermore, you can only start sound in response to a user event like a touch or click (much like how pop-up blockers work.)<<

That s not correct. IOS allows multiple sound play, but code in the frontmost safari mobile window or code running in a webView window is limited to one sound playing.To have simultanious soundplay one needs to work work it out on IOS level.
Photo of Nik Skavinsky

Nik Skavinsky

  • 7 Posts
  • 0 Reply Likes
this is quite obvious. But how do I do it in html? )
Photo of AndreasA

Andreas

  • 2 Posts
  • 0 Reply Likes
Oh - simultanious multiple sound does (actually) not play from the audio-tag in html. You need to .pause(), change the .src -Attribute and .play() again to have any change between sounds sounds.
Photo of Scott

Scott, Official Rep

  • 3807 Posts
  • 246 Reply Likes
Your point is correct, though an edge case. You can auto-play within a webView as I understand, but the common use for SM2 is within the native Safari browser on the iPhone - not part of an app, etc.

My understanding is that in all cases under mobile Safari, iOS only allows one Audio() instance to play at a time.
Photo of Nik Skavinsky

Nik Skavinsky

  • 7 Posts
  • 0 Reply Likes
You're right. We incorporated Adobe Edge animations into Adobe InDesign to publish via Adobe DPS. We made music play in DPS and if you click on Edge animation which has a sound attached (using soundmanager) - it stops DPS sound. (((