apache / apache/cordova-plugin-media
Play multiple sound on iOS
- Dominant language
- JavaScript
- Stars
- 391
- Forks
- 762
- PR merge metrics
- No merged PRs in 30d
Description
# Bug Report
## Problem
### What is expected to happen?
When a song is playing, clicking on a song in another page must launch a second song (and keep the first playing)
### What does actually happen?
When a song is playing, clicking on a song in another page stop the first song
## Information
### Command or Code
```javascript
play(url) {
if (this.ambianceFile) {
this.ambianceFile.stop();
this.ambianceFile.release();
}
this.ambianceFile = this.media.create(url);
this.ambianceFile.play();
}
```
and in another file :
```javascript
play(url) {
if (this.song) {
this.song.stop();
this.song.release();
}
this.song = this.media.create(url);
this.song.play();
}
```
### Environment, Platform, Device
Android : work fine
iOS : doesn't work
### Version information
"@angular/common": "~8.1.2",
"@angular/compiler": "~8.1.2",
"@angular/core": "~8.1.2",
"@angular/fire": "^5.2.3",
"@angular/forms": "~8.1.2",
"@angular/platform-browser": "~8.1.2",
"@angular/platform-browser-dynamic": "~8.1.2",
"@angular/router": "~8.1.2",
"@fortawesome/angular-fontawesome": "^0.3.0",
"@fortawesome/fontawesome-svg-core": "^1.2.26",
"@fortawesome/free-solid-svg-icons": "^5.12.0",
"@ionic-native/app-rate": "^5.19.1",
"@ionic-native/background-mode": "^5.22.0",
"@ionic-native/core": "^5.19.1",
"@ionic-native/firebase-analytics": "^5.19.1",
"@ionic-native/in-app-browser": "^5.19.1",
"@ionic-native/in-app-purchase-2": "^5.19.1",
"@ionic-native/insomnia": "^5.19.1",
"@ionic-native/local-notifications": "^5.19.1",
"@ionic-native/media": "^5.19.1",
"@ionic-native/native-audio": "^5.19.1",
"@ionic-native/navigation-bar": "^5.19.1",
"@ionic-native/network": "^5.19.1",
"@ionic-native/social-sharing": "^5.19.1",
"@ionic-native/splash-screen": "^5.19.1",
"@ionic-native/status-bar": "^5.19.1",
"@ionic-native/vibration": "^5.19.1",
"@ionic/angular": "^4.11.7",
"@types/jquery": "^3.3.31",
"cc.fovea.cordova.purchase": "^8.1.1",
"cordova-android": "8.1.0",
"cordova-browser": "^6.0.0",
"cordova-ios": "^5.1.1",
"cordova-plugin-androidx": "^1.0.2",
"cordova-plugin-androidx-adapter": "^1.1.0",
"cordova-plugin-apprate": "^1.5.0",
"cordova-plugin-background-mode": "^0.7.3",
"cordova-plugin-badge": "^0.8.8",
"cordova-plugin-device": "2.0.2",
"cordova-plugin-dialogs": "^2.0.2",
"cordova-plugin-file": "^6.0.2",
"cordova-plugin-inappbrowser": "^3.1.0",
"cordova-plugin-insomnia": "^4.3.0",
"cordova-plugin-local-notification": "^0.9.0-beta.2",
"cordova-plugin-media": "^5.0.3",
"cordova-plugin-nativeaudio": "^3.0.9",
"cordova-plugin-nativestorage": "^2.3.2",
"cordova-plugin-navigationbar": "^1.0.31",
"cordova-plugin-network-information": "^2.0.2",
"cordova-plugin-purchase": "^9.0.1",
"cordova-plugin-splashscreen": "5.0.2",
"cordova-plugin-statusbar": "2.4.2",
"cordova-plugin-vibration": "^3.1.1",
"cordova-plugin-whitelist": "1.3.3",
"cordova-plugin-x-socialsharing": "^5.6.3",
"cordova-support-android-plugin": "^1.0.1",
"cordova-support-google-services": "^1.3.2",
"core-js": "^2.6.11",
"es6-promise-plugin": "^4.2.2",
"firebase": "^6.6.2",
"ionic-audio": "^3.2.2",
"jquery": "^3.4.1",
"moment": "^2.24.0",
"rxjs": "^6.5.4",
"tslib": "^1.9.0",
"zone.js": "~0.9.1"
## Checklist
- [x] I searched for existing GitHub issues
- [x] I updated all Cordova tooling to most recent version
- [x] I included all the necessary information above
Contributor guide
Research direction
Start by reproducing the issue on iOS with the two shown play(url) methods and trace how media.create(), stop(), release(), and play() behave in the plugin. Compare the iOS and Android implementations; done means independently starting the second sound while the first continues, with a regression test or reproduction check if the repository provides one.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, javascript
- Domain
- audio-video-rtc, mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100