apache / apache/cordova-plugin-media

Plugin doesn't work well with other Audio streams on iOS and Android

Open
#273 2 comments 2 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
391
Forks
762
PR merge metrics
No merged PRs in 30d

Description

# Bug Report
When you play a sound it doesn't pause and resume other Audio streams.

## Problem

### What is expected to happen?
It should be configurable how the plugin behaves with other Audio streams. Instead the behaviour is hard coded (and destructive).

### What does actually happen?
Other Audio streams get interrupted or sometimes (under iOS) the Media plugin has problems playing.

## Information

I created a small fix which is suitable for our project. Maybe it is of help for someone: https://github.com/vandres/cordova-plugin-media/commit/cd5e033cb342735972baeba76630b91a3233d05b

### Command or Code

Reproduce: Start Spotify on iOS or Android. Play a sound with the Media plugin.

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

Open the contributing guide

Research direction

Start by reproducing the issue with Spotify running on iOS and Android, then inspect the Media plugin behavior and the referenced commit cd5e033cb342735972baeba76630b91a3233d05f. Done means the plugin's interaction with other audio streams is configurable and no longer interrupts or prevents their expected pause and resume behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, ios, java, javascript, objective-c
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.