Ionic music app


#1

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


#2

Of course yes.
You can use


#3

Would you please provide example code for it?


#4
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.


#5

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


#6

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.


#7

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