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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to