You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "arnaud gerbert (JIRA)" <ji...@apache.org> on 2013/02/07 15:41:13 UTC

[jira] [Created] (CB-2396) Media api / iOs sound volume control and audio session handling

arnaud gerbert created CB-2396:
----------------------------------

             Summary: Media api / iOs sound volume control  and audio session handling
                 Key: CB-2396
                 URL: https://issues.apache.org/jira/browse/CB-2396
             Project: Apache Cordova
          Issue Type: Bug
          Components: iOS
    Affects Versions: 2.3.0
         Environment: iOs6 cordova 2.3
            Reporter: arnaud gerbert
            Assignee: Shazron Abdullah
            Priority: Minor


Use case: An application playing sound effect on iOs (ex: click button sounds)

Expected behaviour : The sound played within the application should be changed when the iphone volume down button is pressed.

Constated behaviour : If a sound is playing when the volume button is pressed, the sound of the application is changed.  If no sound is playing when the volume button is pressed, the sound of the application is not changed (instead the ringtone volume is updated). 

Explanation : Each time a sound is stopped, the audio session is stopped ([self.avSession setActive:NO error:nil]). If no sound is playing, iphone volume button is controlling ringtone volume instead of application volume.

Temporary fix: Remove all occurences of [self.avSession setActive:NO error:nil] in CDVSound.m and handle myself a global audio session for the whole application.
Another fix could be to play continually blank sound

Conclusion: I think the media API should add a way to handle the media sessions as a whole

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira