当前知识库站点已不再维护。请移步新版知识库:https://help.rongcloud.cn/

集成使用 RongRTCLib 如何确定正在占用音频视频通道

如何确认 RongRTCLib 在使用音视频通道。
发布时间: 2022-01-14 17:35

回答:

一、针对集成 IMKit 的用户:

if ( [RCKitUtility isCameraHolding] ) { 
   
      //摄像头被占用  

}if ( [RCKitUtility isAudioHolding] ) { 
   
      //音频通道被占用  
}

二、针对未集成 IMKit 的用户:

if ( [[RCCoreClient sharedCoreClient] isCameraHolding] ) { 
   
      //摄像头被占用  

}if ( [[RCCoreClient sharedCoreClient] isAudioHolding] ) { 
   
      //音频通道被占用  
}