Ionic music app

Can I make ionic 3 music app that plays mp3 files stored locally on the device?

Of course yes.
You can use

3 Likes

Would you please provide example code for it?

1 Like
import { File } from '@ionic-native/file';

constructor(private file: File) { }

...

this.file.checkDir(this.file.dataDirectory, 'mydir').then(_ => console.log('Directory exists')).catch(err => console.log('Directory doesnt exist'));

In above code, what specific path we have to put instead of ‘mydir’?
Explain to me as detailed as possible.

1 Like

Whatever directory/path that you’re trying to access.

As I make and run the app in browser or simulator it will only access the project folder. I want to run it on a real device and want to access local mp3 files stored in the device.

Hi, Music Controls has stopped to work on iOS11 :frowning: