2

After many search I could play mp3 with this code in Phonegap:

if (device.platform == 'Android') {
src = '/android_asset/www/' + src;
}

var mediaRes = new Media(src,
function onSuccess() {
// release the media resource once finished playing
mediaRes.release();
},
function onError(e){
console.log("error playing sound: " + JSON.stringify(e));
});
mediaRes.play();

But I need to play a base64 encoded mp3 not a mp3 file

can anyone help me?

Khoj
  • 91
  • 1
  • 5

0 Answers0