1. #1
    Sencha User
    Join Date
    Aug 2011
    Posts
    36
    Answers
    4
    Vote Rating
    2
    bjudson is on a distinguished road

      0  

    Default Answered: Ext.Audio in iOS with ringer off

    Answered: Ext.Audio in iOS with ringer off


    Does anyone know about playing audio with Ext.Audio in iOS with the ringer off? In some native apps (e.g. the standard Music app), turning the ringer off doesn't affect audio playback. In other apps, it does silence audio.

    I'm working on an app (Phonegap + Sencha Touch) that plays audio only when the user taps a "Play" button (not with the standard player, which is hidden), so I would like it to work regardless of whether the ringer is on. If that's not possible, I'd like to prompt the user to change the ringer setting.

    Is there a difference between native and web apps in this regard?

  2. on Stack Overflow:

    Starting with iOS 6, you MUST set the audio session category to 'playback' before creating the UIWebView. This is all you have to do. It is not necessary to make the session active.
    This should be used for html video as well, because if you don't configure the session, your video will be muted when the ringer switch is off.


    http://stackoverflow.com/questions/1...ers-background

    I think I'll need to deal with this on the PhoneGap end.

    EDIT: for those trying to do this with PhoneGap, this is what worked for me:

    http://stackoverflow.com/questions/1...onegap-project

    Basically, just make a small modification to the MainControllerView.m and your project plist.



  3. #2
    Sencha User
    Join Date
    Aug 2011
    Posts
    36
    Answers
    4
    Vote Rating
    2
    bjudson is on a distinguished road

      0  

    Default Found the answer

    Found the answer


    on Stack Overflow:

    Starting with iOS 6, you MUST set the audio session category to 'playback' before creating the UIWebView. This is all you have to do. It is not necessary to make the session active.
    This should be used for html video as well, because if you don't configure the session, your video will be muted when the ringer switch is off.


    http://stackoverflow.com/questions/1...ers-background

    I think I'll need to deal with this on the PhoneGap end.

    EDIT: for those trying to do this with PhoneGap, this is what worked for me:

    http://stackoverflow.com/questions/1...onegap-project

    Basically, just make a small modification to the MainControllerView.m and your project plist.


    Last edited by bjudson; 24 Jan 2013 at 10:41 AM. Reason: add phonegap solution link