You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by ionut-movila <gi...@git.apache.org> on 2014/10/06 14:55:16 UTC

[GitHub] cordova-plugin-media pull request: Fixed the problem with multiple...

GitHub user ionut-movila opened a pull request:

    https://github.com/apache/cordova-plugin-media/pull/33

    Fixed the problem with multiple sounds not playing at the same time

    The problem is visible on iOS 8 if someone wants to play multiple sounds at the same time. When one sound ends (is released) AVSession (that is a shared instance per app) is set not active, causing other playing sounds to stop playing.
    
    My simple solution was to remove all calls where the shared app. AVSession is inactivated. Should not cause memory leaks since it's a shared instance.
    
    Could be that this AVSession should be released when app is paused.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/ionut-movila/cordova-plugin-media master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-plugin-media/pull/33.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #33
    
----
commit 2bfdba0a8776b55e26eaafd362c130f9a7a81cd2
Author: Ionut Movila <io...@epekebok.no>
Date:   2014-10-06T12:48:43Z

    Fixed the problem with multiple sounds not playing at the same time

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-media pull request: Fixed the problem with multiple...

Posted by joshbuchea <gi...@git.apache.org>.
Github user joshbuchea commented on the pull request:

    https://github.com/apache/cordova-plugin-media/pull/33#issuecomment-74946976
  
    +1


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-media pull request: Fixed the problem with multiple...

Posted by thedarkman123 <gi...@git.apache.org>.
Github user thedarkman123 commented on the pull request:

    https://github.com/apache/cordova-plugin-media/pull/33#issuecomment-108289054
  
    Is there a way to config this for phonegap build? really need to play multiple sounds in my phonegap app


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-media pull request: Fixed the problem with multiple...

Posted by BernsteinA <gi...@git.apache.org>.
Github user BernsteinA commented on the pull request:

    https://github.com/apache/cordova-plugin-media/pull/33#issuecomment-159459013
  
    :p how did I know that was going to be the answer


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-media pull request: Fixed the problem with multiple...

Posted by purplecabbage <gi...@git.apache.org>.
Github user purplecabbage commented on the pull request:

    https://github.com/apache/cordova-plugin-media/pull/33#issuecomment-159457232
  
    Thanks for posting the JIRA @BernsteinA 
    This pull request can't be accepted as is, but I will look into the issue soon.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-media pull request: Fixed the problem with multiple...

Posted by lukasT <gi...@git.apache.org>.
Github user lukasT commented on the pull request:

    https://github.com/apache/cordova-plugin-media/pull/33#issuecomment-70873889
  
    +1


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-media pull request: Fixed the problem with multiple...

Posted by BernsteinA <gi...@git.apache.org>.
Github user BernsteinA commented on the pull request:

    https://github.com/apache/cordova-plugin-media/pull/33#issuecomment-159457841
  
    Thanks. In the meantime could it be listed under iOS Quirks in the readme?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-media pull request: Fixed the problem with multiple...

Posted by BernsteinA <gi...@git.apache.org>.
Github user BernsteinA commented on the pull request:

    https://github.com/apache/cordova-plugin-media/pull/33#issuecomment-159431126
  
    @asfgit looks like you closed the wrong PR by accident


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-media pull request: Fixed the problem with multiple...

Posted by purplecabbage <gi...@git.apache.org>.
Github user purplecabbage commented on the pull request:

    https://github.com/apache/cordova-plugin-media/pull/33#issuecomment-159458313
  
    Sure. Send a pull request! :smiley_cat: 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-media pull request: Fixed the problem with multiple...

Posted by Polooo2 <gi...@git.apache.org>.
Github user Polooo2 commented on the pull request:

    https://github.com/apache/cordova-plugin-media/pull/33#issuecomment-60347881
  
    I have/had the same problem with iOS 8. This fixed it


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-media pull request: Fixed the problem with multiple...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/cordova-plugin-media/pull/33


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-media pull request: Fixed the problem with multiple...

Posted by clelland <gi...@git.apache.org>.
Github user clelland commented on the pull request:

    https://github.com/apache/cordova-plugin-media/pull/33#issuecomment-64910845
  
    Is there a way to make this behaviour configurable? It looks like the original behaviour was deliberate, and there may be people whose apps depend on it.
    
    Or is this just bringing iOS in line with other platforms?
    
    If you can, please file a bug on the JIRA tracker [here](https://issues.apache.org/jira) so we can keep track of this.
    
    Thanks!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-media pull request: Fixed the problem with multiple...

Posted by BernsteinA <gi...@git.apache.org>.
Github user BernsteinA commented on the pull request:

    https://github.com/apache/cordova-plugin-media/pull/33#issuecomment-159456824
  
    Linking to Jira for posterity: https://issues.apache.org/jira/browse/CB-7684


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-media pull request: Fixed the problem with multiple...

Posted by purplecabbage <gi...@git.apache.org>.
Github user purplecabbage commented on the pull request:

    https://github.com/apache/cordova-plugin-media/pull/33#issuecomment-159452179
  
    Thanks @BernsteinA !
    asfgit is not a person ... it's a bot that closes prs based on commit comments.
    This does appear to be an error, although this pull request has issues as well ... commenting out code and committing is never the proper way ...


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-media pull request: Fixed the problem with multiple...

Posted by BernsteinA <gi...@git.apache.org>.
Github user BernsteinA commented on the pull request:

    https://github.com/apache/cordova-plugin-media/pull/33#issuecomment-159453172
  
    @purplecabbage can you reopen this?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-media pull request: Fixed the problem with multiple...

Posted by batman11111 <gi...@git.apache.org>.
Github user batman11111 commented on the pull request:

    https://github.com/apache/cordova-plugin-media/pull/33#issuecomment-93054522
  
    How can I use this fix with phonegap build?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-media issue #33: Fixed the problem with multiple sounds not p...

Posted by tbrebant <gi...@git.apache.org>.
Github user tbrebant commented on the issue:

    https://github.com/apache/cordova-plugin-media/pull/33
  
    _(same comment as on Jira's CB-7684 ticket)_
    
    We arrived to the same conclusion as Nathan Stryker on Jira and @ionut-movila in this PR.
    
    The problem for us is not only that when a media is finished it's stopping the others, but also that `.release()` is killing all sounds running even if they were played by another plugin (or by WebView's default webaudio system), triggering a descriptive:
    ```
    AVAudioSession.mm:646: -[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.
    ```
    We found that `AVAudioSession` is a singleton for the whole app (cf. https://developer.apple.com/library/ios/documentation/AVFoundation/Reference/AVAudioSession_ClassReference/).
    
    Apple says:
    
    > Most apps never need to deactivate their audio session explicitly. Important exceptions include VoIP (Voice over Internet Protocol) apps, turn-by-turn navigation apps, and, in some cases, recording apps.
    
    (cf. https://developer.apple.com/library/ios/documentation/Audio/Conceptual/AudioSessionProgrammingGuide/ConfiguringanAudioSession/ConfiguringanAudioSession.html)
    
    In our project we don't use the recording capacities. We removed all `avSession setActive:NO` (as in this PR) and it's is working pretty well.
    
    Additionally it may be worth to update the comment:
    ```
    returns whether or not audioSession is available - creates it if necessary
    ```
    to something like:
    ```
    // returns whether or not audioSession is available - retrieve the instance (app singleton) if necessary.
    ```
    
    If I am sending a PR, would anyone be able to test the recording feature?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org