apache / apache/cordova-plugin-media

i can't play audio

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

Description

# Bug Report
no sound
## Problem
when i tried play an audio i can't
### What is expected to happen?
play an audio in a loop
for example my fil is located y www/sounds
musica = new Media("sounds/my_file.mp3", alert("succes!"), function(err) { alert("error "+err); }, function (status) { if (status === Media.MEDIA_STOPPED) musica.play({playAudioWhenScreenIsLocked: false});});

### What does actually happen?
i don't know. when i execute succes an error function succes is executed but i can listen the music.

## Information

ios 17.2 macos 14.1 and xcode 15.
using cordova 12.0.0 and node v 20 with ios platform v 7.0.0
using cordova-plugin-media v 7.0.0
i tested in my iPhone se 3rd generation with ios 16.6 and i have the same iswe

### Command or Code

musica = new Media("sounds/my_file.mp3", alert("succes!"), function(err) { alert("error "+err); }, function (status) { if (status === Media.MEDIA_STOPPED) musica.play({playAudioWhenScreenIsLocked: false});});

### Environment, Platform, Device

ios 17.2
note i tested in ios 16.6 fisical device and i have the same iswe

### Version information

cordova 12.0.0
cordova-media-plugin 7.0
xcode 15
macos 14.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 from the Media constructor call shown in the issue and reproduce the audio failure on the reported iOS, Cordova, Xcode, and cordova-plugin-media versions. Check the supplied sounds/my_file.mp3 path and callback behavior first. Done means the file plays audibly on an iPhone and repeats after Media.MEDIA_STOPPED without triggering the error callback.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.