cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt McGinnis (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-7214) iOS media play does not work in background
Date Mon, 11 Aug 2014 17:04:12 GMT

    [ https://issues.apache.org/jira/browse/CB-7214?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14092984#comment-14092984
] 

Matt McGinnis commented on CB-7214:
-----------------------------------

I believe the {playAudioWhenScreenIsLocked : true} option for the Media plugin is deprecated.

Is there any update for this issue?  I cannot publish my app on iOS or Android until playing
audio in the background works.

Thanks

> iOS media play does not work in background
> ------------------------------------------
>
>                 Key: CB-7214
>                 URL: https://issues.apache.org/jira/browse/CB-7214
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS, Plugin Media
>    Affects Versions: 3.5.0
>         Environment: iPhone 4, iOS 7.1.2, xCode 5.1
>            Reporter: David Peacock
>
> It does not look like mediaObj.play() works on iOS in the background.  Additionally I
tried with mediaObj.play({playAudioWhenScreenIsLocked : true}); but this did not change the
behavior.  Running mediaObj.play() with the application in the foreground works as expected.
 I also have Background Modes 'Audio and AirPlay' enabled (note I tested notifications beep/vibrate
in the background with success).
> Tracking the issue, it looks like the error occurs in CDVSound.m in function prepareToPlay
on the line:
> bError = ![audioFile.player prepareToPlay];
> This sets error to YES.  This is before the check of whether the audio should play when
the screen is locked.  On the console I receive the error:
> Play sound failed!
> code: 4
> message:



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message