i am using phonegap audio plugin in my phonegap app. I have some audio files stored in www/audio folder.
For android i used "file:///android_asset/www/audio" to read local file.
For IOS i need help.
Thanks
Finally got it, reference:link
To get path i used this function
function getPhoneGapPath() {
var path = window.location.pathname;
path = path.substr( path, path.length - 10 );
return path;
};
For IOS:
var snd = new Media( getPhoneGapPath() + 'test.mp3' );
For Android:prepend 'file://'
var snd = new Media( 'file://' + getPhoneGapPath() + 'test.mp3' );
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With