apache / apache/cordova-plugin-media

Need to wait couple of minutes before playing sound again

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

Description

# Bug Report

## Problem
Playing sound is working. Playing this sound again after some couple of seconds - not working and the sound is not getting played. Actually I don't how much time exactly is needed in order to play the sound on the second time, but its something like 3 minutes or so.

### What is expected to happen?
It should be able to play sounds one by another without any issue.

### What does actually happen?
Need to wait couple of minutes in order to play the second sound (even with different files).

## Information
iOS only. On Android I don't know what is the path of the files therefore I use something else to play media in Android.

### Command or Code
```
var path = "static/audio/notifications/order.mp3"
let media = new Media(path)
media.play({playAudioWhenScreenIsLocked: true})
media.setVolume('1.0')
```

### Environment, Platform, Device
iOS - any version.

### Version information
cordova -v 8.1.2 (cordova-lib@8.1.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

Open the contributing guide

Research direction

Start by reproducing the issue on iOS with the shown Media(path), media.play({playAudioWhenScreenIsLocked: true}), and setVolume('1.0') sequence, testing consecutive plays and different files. Trace the iOS media playback entry point and identify why a second sound is delayed; done means sounds play one after another without a multi-minute wait.

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
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.