Changes between Version 95 and Version 96 of Getting-Started/iPhone


Ignore:
Timestamp:
Oct 24, 2016 1:18:52 AM (8 years ago)
Author:
ming
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Getting-Started/iPhone

    v95 v96  
    217217 
    218218=== Audio lost or other issues with interruption (by a phone call or an alarm), headset plug/unplug, or Bluetooth input === #interruption 
    219  
    220 For devices running iOS 4.0 or later, you need to enable your application to respond to remote-control events. This allows PJSIP to properly receive and process the above events. You can do this by adding the following code in your application: 
    221 {{{ 
    222 [[UIApplication sharedApplication] beginReceivingRemoteControlEvents]; 
    223 }}} 
    224 For more details, please refer to Apple's doc on [http://developer.apple.com/library/ios/#documentation/EventHandling/Conceptual/EventHandlingiPhoneOS/RemoteControl/RemoteControl.html Remote Control of Multimedia]. 
    225  
    226 It has also been reported that any time an audio interruption happens, audio is lost until the application is killed/restarted, also reported that this occurs only on iOS7. 
     219It has been reported that any time an audio interruption happens, audio is lost until the application is killed/restarted. 
    227220 
    228221Here is the reported working solution: 
    229  - application should be configured to receive interruption events, see also [#interuption problem with interruption]. 
     222 - application should be configured to receive interruption events, see [https://developer.apple.com/reference/avfoundation/avaudiosession Apple's AVAudioSession doc]. 
    230223 - forcefully shutdown the sound device when interruption begins, e.g: using {{{pjsua_set_no_snd_dev())}}} for pjsua, or {{{AudDevManager.setNoDev()}}} for pjsua2 
    231224 - restart the sound device after interruption ends, e.g: using {{{pjsua_set_snd_dev()}}} for pjsua, or {{{AudDevManager.setPlaybackDev()+setCaptureDev()}}} for pjsua2.