apache / apache/cordova-plugin-media
(ios) Audio doesn't play on iOS 13.3.1
- Dominant language
- JavaScript
- Stars
- 391
- Forks
- 762
- PR merge metrics
- No merged PRs in 30d
Description
# Bug Report
## Problem
I can't play the audio from ios, on android it works perfectly but on ios it shows me the following error
`Error! {"message":"Cannot use audio file from resource 'https://my_server.com/audio.mp3\n'","code":1}`
## Code that I have implemented
```
this.file = this.media.create(url);
// to listen to plugin events:
this.file.onStatusUpdate.subscribe(status => {
if(status == 2){
this.dismissLoading();
}
}); // fires when this.file status changes
this.file.onSuccess.subscribe(() => {
console.log('Action is successful');
this.validateAudio();
});
this.file.onError.subscribe(error => {
console.log('Error!', JSON.stringify(error));
this.dismissLoading();
});
```
## Environment, Platform, Device
iOs 13.3.1
### Version information
cordova-plugin-media 5.0.3 "Media"
Ionic:
Ionic CLI : 5.4.16 (/usr/local/lib/node_modules/ionic)
Ionic Framework : @ionic/angular 4.8.1
@angular-devkit/build-angular : 0.801.3
@angular-devkit/schematics : 8.1.3
@angular/cli : 8.1.3
@ionic/angular-toolkit : 2.0.0
Cordova:
Cordova CLI : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : android 8.1.0, ios 5.1.1
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.1.3, (and 11 other plugins)
Utility:
cordova-res (update available: 0.11.0) : 0.9.0
native-run : 0.3.0
System:
ios-deploy : 1.10.0
ios-sim : 8.0.2
NodeJS : v12.13.0 (/usr/local/bin/node)
npm : 6.12.0
OS : macOS Catalina
Xcode : Xcode 11.3.1 Build version 11C504
Contributor guide
Research direction
Start by reproducing remote audio playback on iOS 13.3.1 with cordova-plugin-media 5.0.3, using the create(url) call and the reported error as the observation point. Done means the same remote audio plays successfully on iOS without the resource error while Android behavior remains working.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, javascript
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100