I can get a url to an external server to work with the code and play, but I cannot get the code to work with playing audio on IOS locally. It “plays” but there is no audio, I have tried “mp3” and also “m4a”
Some simple code:
let src = "mp3/test.mp3";
let media = new Media(WebAppLocalServer.localFileSystemUrl('cdv'+cordova.file.applicationDirectory+"www/application/app"+src),
(success)=>{console.log("success");console.log(success);media.play();},
(success)=>{console.log("error");console.log(success);},
(success)=>{console.log("status");console.log(success);},
);
media.play();
The code will show a “status” “2” (which means running), but I can’t hear anything!? If I use “file” instead of cdv it says “Cannot use audio file…”
Also media.getDuration()
returns 0