需求:播放音乐通知通话要求(音乐要大声)
AVAudioSession *audioSession = [AVAudioSession sharedInstance];
[audioSessionsetCategory:AVAudioSessionCategoryPlayback error:nil];
[audioSessionsetActive:YESerror:nil];
接通后切换回通话(要大声)
AVAudioSession *audioSession = [AVAudioSession sharedInstance];
[audioSessionsetCategory:AVAudioSessionCategoryPlayAndRecord error:nil];
[audioSessionsetMode:AVAudioSessionModeVideoChat error:nil];
[audioSessionsetActive:YESerror:nil];
网友评论