Open tanvishah-syn opened 7 years ago
I am not familiar to ios related stuff, but did you check for permissions for example. i don't really know how it works, but you could start there.
@tanuShah Make sure you have the right path in iOS. Take a look at the File plugin which explains the file system layout on the different platforms. It also defines some constants you can use to point to files: https://github.com/apache/cordova-plugin-file#file-system-layouts
i solved this problem ,the reason is that ios expects a URL of the form "cdvfile://path/to/mp3" so i use toInternalURL() ,it worked! this.file.resolveLocalFilesystemUrl(encodeURI(audioFile)).then((entry) => { audio.src = entry.toInternalURL();
});
this link may help : https://forum.ionicframework.com/t/ios-9-cant-play-audio-video-files-that-are-downloaded-to-device/37580
Hello, I am using ionic native audio version 3.2.0 and file transfer plugin. After Downloading file is stored in documentDirectory after this I will try to play mp3 file from local path. This same thing works perfectly on android but it's not working on IOS. Given below is a path:
file:///Users/{{username}}/Library/Developer/CoreSimulator/Devices/B56ADA53-1DE1-41FF-A429-C2DF15E1BF38/data/Containers/Data/Application/F3A028DE-069D-4F7B-855A-682E0FE3E183/Documents/File11.mp3
I am getting an error as [Error] Not allowed to load local resource: file:///Users/abc/Library/Developer/CoreSimulator/Devices/B56ADA53-1DE1-41FF-A429-C2DF15E1BF38/data/Containers/Data/Application/F3A028DE-069D-4F7B-855A-682E0FE3E183/Documents/File11.mp3