Changes between Version 81 and Version 82 of Getting-Started/iPhone
- Timestamp:
- Jul 31, 2015 8:56:37 AM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Getting-Started/iPhone
v81 v82 191 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 192 193 For example, to enable audio route via bluetooth, application can override audio session category option with {{{AVAudioSessionCategoryOptionAllowBluetooth}}}: 194 {{{ 193 Here could be used as a quick start reference: 194 - [https://developer.apple.com/library/ios/documentation/AVFoundation/Reference/AVAudioSession_ClassReference/#//apple_ref/occ/instm/AVAudioSession/setCategory:withOptions:error: AVAudioSession::setCategory] to enable/disable audio route via bluetooth, application can override audio session category by adding/removing option {{{AVAudioSessionCategoryOptionAllowBluetooth}}}: 195 {{{ 196 /* Enable */ 195 197 [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayAndRecord withOptions:AVAudioSessionCategoryOptionAllowBluetooth error:nil]; 196 }}} 198 ... 199 /* Disable */ 200 [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayAndRecord error:nil]; 201 }}} 202 - [https://developer.apple.com/library/ios/documentation/AVFoundation/Reference/AVAudioSession_ClassReference/#//apple_ref/occ/instp/AVAudioSession/preferredInput AVAudioSession::setPreferredInput] for switching to other audio input route. 203 - [https://developer.apple.com/library/ios/documentation/AVFoundation/Reference/AVAudioSession_ClassReference/#//apple_ref/occ/instm/AVAudioSession/overrideOutputAudioPort:error: AVAudioSession::overrideOutputAudioPort] for toggling on/off built-in loudspeaker. 197 204 198 205 === Audio issue (no audio) (iOS7) ===