Skip to main content
Participating Frequently
August 1, 2011
Question

Trouble playing sound on iOS

  • August 1, 2011
  • 1 reply
  • 1264 views

I've got an app that uses the usual Sound and SoundChannel classes to load an mp3 and play it. It works fine in the mobile emulator and it works fine on Android devices. But I cannot get any sound on an iPad.

I can confirm that the mp3 loaded, by listening for that event. I tried a local mp3 and loading one from the web, with no difference.

What am I overlooking?

Many thanks -

This topic has been closed for replies.

1 reply

Pahup
Adobe Employee
Adobe Employee
August 1, 2011

Hi Jack,

Could you please paste the snippet of your code.

-Thanks

Pahup

Participating Frequently
August 1, 2011

The basic code is this:

            _sound = new Sound();
             _sound.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
            _sound.addEventListener(Event.COMPLETE, onLoadComplete);
            _sound.load(new URLRequest(songToPlay));
            _sc = _sound.play();

Known Participant
August 1, 2011

I didn't think the ipad could load any external files. I know it blocked my external swfs.. I'm not sure though, but that's why I load sounds from

my library. I make everything self contained.