[
https://issues.apache.org/jira/browse/CB-11026?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15298391#comment-15298391
]
Aja Walker edited comment on CB-11026 at 5/24/16 4:16 PM:
--
I'm seeing this error in a slightly different scenario, but I think it is
related.
I am using cordova-plugin-media in tandem with cordova-plugin-background-mode.
I am only playing one sound at a time with the media plugin, but when in
background mode (during which time the background-mode plugin is playing a
silent audio clip to keep the app running in the background) if I play an audio
clip via the media plugin I see this error after the clip has finished.
Also, after this happens, the app subsequently stops running in background mode
and pauses. I assume this is because finishing and releasing after playing the
audio clip is somehow also killing the background-mode plugin's silent audio
playback and thus it is no longer to maintain running in the background.
This is happening in iOS 9.3.
I can confirm that commenting out the setActive:NO line mentioned above causes
the error to disappear and also causes background-mode to continue operating
normally.
was (Author: aja_ciscor):
I'm seeing this error in a slightly different scenario, but I think it is
related.
I am using the Cordova media plugin in tandem with the background-mode plugin.
I am only playing one sound at a time with the media plugin, but when in
background mode (during which time the background-mode plugin is playing a
silent sound to keep the app running in the background) if I play an audio clip
I see this error after the clip has finished.
Also, after this happens, the app subsequently stops running in background mode
and pauses. I assume this is because finishing and releasing after playing the
audio clip is somehow also killing the background-mode plugin's silent audio
playback and thus it is no longer to maintain running in the background.
This is happening in iOS 9.3.
I can confirm that commenting out the setActive:NO line mentioned above causes
the error to disappear and also causes background-mode to continue operating
normally.
> iOS 9.3: media.release() kills all running audio files
> --
>
> Key: CB-11026
> URL: https://issues.apache.org/jira/browse/CB-11026
> Project: Apache Cordova
> Issue Type: Bug
> Components: Plugin Media
> Environment: I could only test it on iOS 9.3
>Reporter: Kramer
> Labels: ios, ios9, media, release, triaged
>
> I got two media objects
> var media1 = new Media("file1.mp3");
> var media2 = new Media("file2.mp3");
> When I call the media2.release() method while media1 is playing, then an
> error will popup in XCode and media1 is stopping imediatelly.
> The error message is:
> {quote}
> AVAudioSession.mm:692: -[AVAudioSession setActive:withOptions:error:]:
> Deactivating an audio session that has running I/O. All I/O should be stopped
> or paused prior to deactivating the audio session.
> {quote}
> When I comment the line
> {quote}
> [self.avSession setActive:NO error:nil];
> {quote}
> in the release method of the CDVSound.m file then the error disappears and
> media1 is continuing playing after I invoked media2.release().
> Tested on v2.2.0 and v1.0.1 of the cordova-plugin-media plugin.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org