191 | | Since the deprecation of C-interface Audio Session API in iOS 7 SDK, PJSIP now uses AVAudioSession to set audio session category (to PlayAndRecord) and activate/deactivate audio session. Application will need to do its own audio session management to handle input/output route and notifications (interruption, media server reset, etc). Please refer to [https://developer.apple.com/library/IOS/documentation/Audio/Conceptual/AudioSessionProgrammingGuide/Basics/Basics.html#//apple_ref/doc/uid/TP40007875-CH2-SW1 Apple's official doc on Audio Session Programming Guide] and our ticket #1697. |
| 191 | Since the deprecation of C-interface Audio Session API in iOS 7 SDK, PJSIP now uses {{{AVAudioSession}}} to set audio session category (to !PlayAndRecord) and activate/deactivate audio session. Application will need to do its own audio session management to handle input/output route and notifications (interruption, media server reset, etc). Please refer to [https://developer.apple.com/library/ios/documentation/Audio/Conceptual/AudioSessionProgrammingGuide/Introduction/Introduction.html Apple's official doc on Audio Session Programming Guide] and our ticket #1697. |
| 192 | |
| 193 | For example, to enable audio route via bluetooth, application can override audio session category option with {{{AVAudioSessionCategoryOptionAllowBluetooth}}}: |
| 194 | {{{ |
| 195 | [[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayAndRecord withOptions:AVAudioSessionCategoryOptionAllowBluetooth error:nil]; |
| 196 | }}} |