Q:

Audio won't play in iOS Cordova Phonegap app

I am creating a cross platform Cordova Phonegap soundboard app. Everything works fine on the android version but on the iOS version the sound refuses to play. I use SoundJS and PreloadJS to load and play the audio. I used the Phonegap remote debugging server and found out that iOS recognizes the audio as something called "application/octet stream" (see pictures).
Everything is fine on Android
Android
But I get this on iOS
iOS
I load the audio like this:
var sound3= "sound3";
    createjs.Sound.registerSound("audio/anybody.mp3", sound3);

    $(function(){
    $( "#sound3" ).bind( "tap", tapHandler ) 

    function tapHandler( event ){

        sound3.play();
    }
});

Can somebody help me out?

A:

I had a similar issue on one of my Cordova projects. 
First possible reason: 
This appears because of different browsers(web views) can play just some specific types. You need to have sound in different formats, such as mp3 or ogg and before playing sound you need to detect maintained format. Look at this documentation Audio canPlayType and make checks before playing
Second possible reason : 
File system issues. iOS resources path is not equal to Android resources path and before sound initialization you need to build a platform-specific path to your local resources
And also try to play native browser audio instead of using createjs, like this:
var sound3 = document.createElement('audio');

sound3.src = "audio/anybody.mp3";

function tapHandler( event ){
    sound3.play();
}

$(function(){
  $( "#sound3" ).bind( "tap", tapHandler ) 
});

