Firstly you have to set your audio category in your app_name-info.plist
Then use the phonegap API media player http://docs.phonegap.com/en/2.7.0/cordova_media_media.md.html#media.play
function playAudio(url) {
// Play the audio file at url
var my_media = new Media(url,
// success callback
function() {
console.log("playAudio():Audio Success");
},
// error callback
function(err) {
console.log("playAudio():Audio Error: "+err);
});
// Play audio
my_media.play({ playAudioWhenScreenIsLocked : true });
Notice the playAudioWhenScreenIsLocked
defaults to true anyways.
Also note in the Simulator the Audio will never work in background, so you will need to test on a device.
Please mark as Answered if this helped ?