Audio is not working when i build an app through phonegap


(Wasura Edirisuriya) #1

I created a small book using hype. I put some audio files (mp3) gor page turning, next button. Then i export it to html files as a folder then created an mobile app. But the audio is not working. Is it the wrong firmat of audio i used? What audio file type will yiu prefer.


(Jonathan Deutsch) #2

If you are creating a widget for exclusively iBooks, you should use m4a. Please see:



(Wasura Edirisuriya) #3

@jonathan Thank you for replying me. Yeah for iBooks it is oky. working perfectly, Only when i build an app using phonegap.


(Jonathan Deutsch) #4

Oh, I’m surprised it is not working as I think PhoneGap is just presenting a webview. It could be a couple things:

  • Does audio play if you have it start from an on mouse click action (it could be that the webview isn’t setup to allow auto playing if that’s what you’re trying to do)
  • I also saw some mentions of audio issues when searching “phonegap audio” in the forums, so you may want to look at that. It seems they may prefer their own audio and disable a web view’s audio for some reason

(Wasura Edirisuriya) #5

@jonathan Yes. i put like that. when you click the button it has to play the audio. mm sure i will look more into it. If i can find an answer i think it will help the others as well who use hype. :slight_smile: Thank you again for your kind instructions.


(Jonathan Deutsch) #6

iOS has some restrictions on playing audio; typically there are settings that can allowed it to be autoplayed if you’re in your own app. However for phonegap I’m not sure how much control there is for this.


(Wasura Edirisuriya) #7

mm i got it. Thank you jonathan. :slight_smile: appreciate your support.:slight_smile:


(Jonathan Deutsch) #8

If you had specific steps to enable it, I’d appreciate if you could post so others can learn if they hit this in the future! Thanks!


(Wasura Edirisuriya) #9

of cours jonathan. Great work.