Hi i want to build a android webview app that plays a sound when the user solve the puzzel. For some reason i cant get the phonegap media api to work.
here the code :
function CheckFinished(){
if(v1==1 && v2==1 && v3==1 && v4==1 && v5==1 && v==1){
//alert('Done');
playAudio();
v=parseInt(0);}}
function playAudio() {
var myMedia = null;
myMedia = new Media("/res/win.mp3",
function(){
if (myMedia) {
myMedia.stop();
myMedia.release();
}
},
function(error){
console.log(error.message);
}
);
myMedia.play();}