iOS 视频通话声音设置
2020-01-20 本文已影响0人
哈哈哈努力加油吧
需求:播放音乐通知通话要求(音乐要大声)
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];