Hello I have a problem when I try to download audio file from my server with iOS .
this is my code
this.fileTransferObject.download(uri,this.file.tempDirectory + fileName,true).then(fileEntry=>{
let fileP=this.file.tempDirectory.replace(/^file:\/\//, '')+fileName;
console.log("###########fileP:",fileP);
this.audio = this.media.create(fileP);
var iOSPlayOptions = {
numberOfLoops: 1,
playAudioWhenScreenIsLocked : true
};
this.audio.play(iOSPlayOptions);
}).catch(error=>{
console.log("###########error:",error);
});
I checked the file with this.file.checkFile , the file exist
I tried with .wav and m4a extension
this is the the value of fileP
Blockquote fileP=“/private/var/mobile/Containers/Data/Application/94010A82-8DC4-4968-88F6-59B6239724AD/tmp/record1922018214958.m4a”
The audio file recoded by codrdova plugin media.
on other hand ,
1- i want to record audio file
2- send the file to server
3- download the audio file on device
4- play the audio file again
I arrived to do 1,2 and 3 correctly but I didn’t do the 4th.
Thank you for your help .