How to play Play mp3 with Ionic Media Plugin


#1

Hello all, Can anyone show how to play remote mp3 file with ionic media plugin.Here is my sample code
`audio() {

const onStatusUpdate = (status) => console.log(status);
const onSuccess = () => console.log(‘Action is successful.’);
const onError = (error) => console.error(error.message);

const file: MediaObject = this.media.create(‘http://download.quranicaudio.com/quran/abdullaah_basfar/002.mp3’, onStatusUpdate, onSuccess, onError);

// play the file
file.play();

// pause the file
file.pause();
}
`
but i keep getting co.play is not a function

Thanks in advance