You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’d like to play mp3 audio in my ionic capacitor app.
I download file from server and then I want play it.
I used:
@capacitor/filesystem in order to download file
@capacitor-community/native-audio in order to play audio
Download file:
letoption={path: "sample.mp3",url: "https://file-examples.com/storage/fe9f92926365baacd9d565f/2017/11/file_example_MP3_700KB.mp3",directory: Directory.Data,recursive: true}asDownloadFileOptions;try{constresult=awaitFilesystem.downloadFile(option);console.log('Wrote file',result);this.downloadUri=result.path!;//save path into global varalert("OK "+this.downloadUri);}catch(e){console.error('Unable to write file',e);alert("ERROR");}
I’d like to play mp3 audio in my ionic capacitor app.
I download file from server and then I want play it.
I used:
@capacitor/filesystem in order to download file
@capacitor-community/native-audio in order to play audio
Download file:
Play audio
Download is OK but when I play I receve error:
I’m testing on web browser (ionic serve mode). If I use local audio file (stored into assets/sound folder), it works
could you lease help me?
The text was updated successfully, but these errors were encountered: