| | |
| | | /** 6. 设置密钥,如果为用户自定义密钥为具体密钥, 非用户自定密钥可为设备序列号*/ |
| | | param.psk = [[LCApiKit sharedInstance] currentPsk]; |
| | | /** 7. 设置播放密钥,非必传,传了会提升拉流速度 */ |
| | | param.playToken = [[LCApiKit sharedInstance] currentDevicePlayToken];; |
| | | |
| | | param.playToken = [[LCApiKit sharedInstance] currentDevicePlayToken]; |
| | | /** 8. 对讲请求类型,call呼叫,如果不传,默认为talk */ |
| | | param.talkType = @"call";//2021-10-28 新增 |
| | | NSInteger result = [self.talker playTalk:param]; |
| | | if (result != 0) { |
| | | //错误处理 |
| | |
| | | - (void)stopPlaySystemSound{ |
| | | // return; |
| | | NSLog(@"stop PlaySystemSound"); |
| | | stopRingAndVibration(); |
| | | LCStopRingAndVibration(); |
| | | } |
| | | |
| | | //停止响铃和震动,移除回调并处理掉铃声和震动 |
| | | void stopRingAndVibration() { |
| | | void LCStopRingAndVibration() { |
| | | AudioServicesRemoveSystemSoundCompletion(kSystemSoundID_Vibrate); |
| | | // AudioServicesRemoveSystemSoundCompletion(sound); |
| | | AudioServicesDisposeSystemSoundID(kSystemSoundID_Vibrate); |