差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

两侧同时换到之前的修订记录 前一修订版
后一修订版
前一修订版
后一修订版 两侧同时换到之后的修订记录
cs:300visitoraccess:iossdkapi [2019/07/18 10:52]
dujiepeng
cs:300visitoraccess:iossdkapi [2019/07/23 05:54]
dujiepeng
行 444: 行 444:
 ===== 实时音视频 ===== ===== 实时音视频 =====
  
-==== 实时通话相关 ​====+==== 基本设置 ​====
  
 <​code>​ <​code>​
行 454: 行 454:
 options.previewView = <#​(HCallLocalView*)#>;​ //​本地预览View options.previewView = <#​(HCallLocalView*)#>;​ //​本地预览View
 [[HDClient sharedClient].callManager setCallOptions:​options];​ [[HDClient sharedClient].callManager setCallOptions:​options];​
- //​注册实时通话回调+</​code>​ 
 + 
 +==== 监听呼入通话 ==== 
 + 
 +<​code>​ 
 +//​注册实时通话回调
  ​[[HDClient sharedClient].callManager addDelegate:<#​(id<​HDCallManagerDelegate>​)#>​ delegateQueue:​nil];​ //​queue默认为main  ​[[HDClient sharedClient].callManager addDelegate:<#​(id<​HDCallManagerDelegate>​)#>​ delegateQueue:​nil];​ //​queue默认为main
  //​移除实时通话回调  //​移除实时通话回调
行 474: 行 479:
 - (void)onNotice:​(HMediaNoticeCode)code arg1:​(NSString *)arg1 arg2:​(NSString *)arg2 arg3:​(id)arg3;​ - (void)onNotice:​(HMediaNoticeCode)code arg1:​(NSString *)arg1 arg2:​(NSString *)arg2 arg3:​(id)arg3;​
  
-//受视频请求+</code> 
 + 
 +==== 听通话 ==== 
 +<​code>​
 [[HDClient sharedClient].callManager acceptCallCompletion:​^(id obj, HDError *error) { [[HDClient sharedClient].callManager acceptCallCompletion:​^(id obj, HDError *error) {
         if (error == nil) { //​接受成功         if (error == nil) { //​接受成功
         }         }
 }]; }];
-//拒绝视频请求+</code> 
 + 
 +==== 拒绝接听 ==== 
 +<​code>​
 [[HDClient sharedClient].callManager endCall]; [[HDClient sharedClient].callManager endCall];
-//挂断视频请求+</code> 
 + 
 +==== 挂断通话 ==== 
 +<​code>​
 [[HDClient sharedClient].callManager endCall]; [[HDClient sharedClient].callManager endCall];
-//​切换镜头 +</code> 
-[[HDClient sharedClient].callManager switchCameraPosition:​YES];​ //​默认前置摄像头(YES)+ 
 +  
 +==== 暂停和恢复语音或视频数据传输 ==== 
 + 
 +<​code>​
 //​关闭麦克风 //​关闭麦克风
 [[HDClient sharedClient].callManager pauseVoice];​ [[HDClient sharedClient].callManager pauseVoice];​
行 494: 行 512:
 [[HDClient sharedClient].callManager resumeVideo];​ [[HDClient sharedClient].callManager resumeVideo];​
  
-//订阅成员视频+</code> 
 + 
 +==== 切换摄像头 ==== 
 +<​code>​ 
 +//​切换镜头 
 +[[HDClient sharedClient].callManager switchCameraPosition:​YES];​ //​默认前置摄像头(YES) 
 +</​code>​ 
 + 
 +==== 视频通话订阅对方的流和显示图像 ==== 
 + 
 +<​code>​ 
 +// topView 用于显示的view
 [[HDClient sharedClient].callManager subscribeStreamId:​streamId view:​topView completion:​^(id obj, HDError *error) { [[HDClient sharedClient].callManager subscribeStreamId:​streamId view:​topView completion:​^(id obj, HDError *error) {
     if (error == nil) {     if (error == nil) {
行 500: 行 529:
     }     }
 }]; }];
-//取消订阅+</code> 
 + 
 +==== 取消订阅 ​==== 
 +<​code>​
 [[HDClient sharedClient].callManager unSubscribeStreamId:​streamId completion:​^(id obj, HDError *error) { [[HDClient sharedClient].callManager unSubscribeStreamId:​streamId completion:​^(id obj, HDError *error) {
     if (error == nil) {     if (error == nil) {
行 508: 行 540:
 </​code>​ </​code>​
  
 +==== 取消视频邀请 ====
 +<​code>​
 +[[HDClient sharedClient].callManager asyncCancelVideoInviteWithImId:<#​im服务号#>​ completion:​^(HDError *error) {
 +        ​
 +    }];
 +</​code>​
 ===== 高级功能 ===== ===== 高级功能 =====
  
行 514: 行 552:
 首先,初始化时,需要调用''​option.visitorWaitCount = YES;''​打开待接入访客排队人数功能。 完成以下设置,之后实现HDChatManagerDelegate中的''​visitorWaitCount''​方法。 首先,初始化时,需要调用''​option.visitorWaitCount = YES;''​打开待接入访客排队人数功能。 完成以下设置,之后实现HDChatManagerDelegate中的''​visitorWaitCount''​方法。
  
-1、在sdk初始化时开始设置+1、在sdk初始化时开始设置
 <​code>​ <​code>​
 HDOptions *option = [[HDOptions alloc] init]; HDOptions *option = [[HDOptions alloc] init];