# RongCallClient

public class RongCallClient

切换指定id的摄像头 该接口配合startCall使用

## Constructors

RongCallClient
Link copied to clipboard
public void RongCallClient(String appKey, Context context, IHandler stub)

## Functions

acceptCall
Link copied to clipboard
public void acceptCall(String callId)
接听通话接听通话
public void acceptCall(String callId, int cameraId, boolean mirror, StartCameraCallback callback)
打开指定摄像头方式接听通话打开指定摄像头方式接听通话
addParticipants
Link copied to clipboard
public void addParticipants(String callId, ArrayList<String> userIds, ArrayList<String> observerUserIds)
邀请用户加入当前通话（仅限讨论组和群组）邀请用户加入当前通话
canCallContinued
Link copied to clipboard
public boolean canCallContinued(String callId)
changeCallMediaType
Link copied to clipboard
public void changeCallMediaType(RongCallCommon.CallMediaType mediaType)
视频通话转音频通话视频通话转音频通话
enableCustomEncryption
Link copied to clipboard
public void enableCustomEncryption(boolean encryptAudio, boolean encryptVideo)
开启自定义加密。该方法必须在 startCall 和 acceptCall 之前调用
enableMultiPlatformMode
Link copied to clipboard
public static void enableMultiPlatformMode()
开启跨平台模式。目前主要是创建渲染视图的流程会有变化
getCallSession
Link copied to clipboard
public RongCallSession getCallSession()
获取当前通话实体，通话实体中维护着当前通话的所有信息获取当前通话实体，通话实体中维护着当前通话的所有信息
getContext
Link copied to clipboard
public Context getContext()
getInstance
Link copied to clipboard
public static RongCallClient getInstance()
getVersion
Link copied to clipboard
public static String getVersion()
hangUpCall
Link copied to clipboard
public void hangUpCall()
public void hangUpCall(String callId)
挂断通话挂断通话
isLocalAudioEnabled
Link copied to clipboard
public boolean isLocalAudioEnabled()
本地音频是否开启 本地音频是否开启
isLocalVideoEnabled
Link copied to clipboard
public boolean isLocalVideoEnabled()
本地视频是否开启 本地视频是否开启
isSpeakerphoneEnabled
Link copied to clipboard
public boolean isSpeakerphoneEnabled()
扬声器是否开启 扬声器是否开启
isVoIPEnabled
Link copied to clipboard
public boolean isVoIPEnabled(Context context)
检查音视频引擎是否可用检查音视频引擎是否可用
onPermissionDenied
Link copied to clipboard
public void onPermissionDenied()
拒绝授予权限android 6.0以上的版本适用，用户拒绝授权之后回调此接口通知CallLib(IRongReceivedCallListener#onCheckPermission(RongCallSession))， audio call需要获取Manifest.permission.
onPermissionGranted
Link copied to clipboard
public void onPermissionGranted()
授予权限android 6.
publishCustomVideoStream
Link copied to clipboard
public void publishCustomVideoStream(String tag, PublishCallBack callBack)
发布自定义音视频流发布自定义音视频流 ,该方法必须在通话过程中设置有效，如：IRongCallListener#onCallConnected(RongCallSession, SurfaceView) 回调中
publishMediaResource
Link copied to clipboard
public void publishMediaResource(RongCallCommon.CallMediaType callMediaType)
观察者发布资源 仅为观察者身份时发布资源
queryJoinedRoom
Link copied to clipboard
public void queryJoinedRoom(IRCRTCResultDataCallback<RCRTCJoinedRoomInfo[]> callBack)
查询本用户是否在其他设备进行音视频通话或调用joinRoom 成功
registerAudioFrameListener
Link copied to clipboard
public void registerAudioFrameListener(IRCRTCAudioDataListener listener)
本地音频流上报监听用于处理通话中的音频数据。请在connect成功之后设置
registerVideoFrameListener
Link copied to clipboard
public void registerVideoFrameListener(IVideoFrameListener listener)
注册本地视频流上报监听用于处理视频通话中的视频数据。请在connect成功之后设置, 回调返回数据类型通过在接听或拨打前的参数设置控制，如下：

            RCRTCConfig.Builder config=RCRTCConfig.Builder.create().enableEncoderTexture(true);
            RongCallClient.getInstance().setRTCConfig(config);

Content copied to clipboard
resetAVStatus
Link copied to clipboard
public void resetAVStatus()
setASRListener
Link copied to clipboard
public void setASRListener(IRongCallASRListener listener)
设置语音失败监听回调
setAudioConfig
Link copied to clipboard
public void setAudioConfig(Builder builder)
音频相关配置
setCallSignalSender
Link copied to clipboard
public static void setCallSignalSender(IRongCallSignalSender signalSender)
setCameraFrameOrientation
Link copied to clipboard
public void setCameraFrameOrientation(int cameraOrientation, int frameOrientation)
设置相机采集角度和编码使用到的角度
setCheckPermission
Link copied to clipboard
public static void setCheckPermission(boolean check)
是否需要检查权限
setEnableASR
Link copied to clipboard
public void setEnableASR(boolean enable)
接收语音识别
setEnableLocalAudio
Link copied to clipboard
public void setEnableLocalAudio(boolean enabled)
设置是否打开本地音频设置是否打开本地音频
setEnableLocalVideo
Link copied to clipboard
public void setEnableLocalVideo(boolean enabled)
设置是否打开本地摄像头设置是否打开本地摄像头
setEnableSpeakerphone
Link copied to clipboard
public void setEnableSpeakerphone(boolean enabled)
设置是否打开免提设置是否打开扬声器，在 IRongCallListener#onCallConnected(RongCallSession, SurfaceView) 之后调用有效
setJoinType
Link copied to clipboard
public void setJoinType(RCRTCJoinType joinType)
setMissedCallListener
Link copied to clipboard
public static void setMissedCallListener(RongCallMissedListener listener)
setMultiPlatformVideoView
Link copied to clipboard
public int setMultiPlatformVideoView(String userId, String tag, RCRTCBaseView videoView)
设置跨平台使用的渲染视图。调用此接口前需要先调用
setPreconnectEnabled
Link copied to clipboard
public static void setPreconnectEnabled(boolean enabled)
是否打开http 预热开关，打开 true 不打开 false 默认 true
setPushConfig
Link copied to clipboard
public static void setPushConfig(MessagePushConfig startCallPushConfig, MessagePushConfig hangupPushConfig)
自定义通话推送标题和内容等 pushConfig 自定义音视频通话的推送配置 开发者在调用startCall发起通话前设置
setReceivedCallListener
Link copied to clipboard
public static void setReceivedCallListener(IRongReceivedCallListener listener)
设置通话来电监听设置通话来电监听
setRTCConfig
Link copied to clipboard
public void setRTCConfig(Builder builder)
设置音视频配置 必须在 RongCallClient#startCall 和 RongCallClient#acceptCall(String) 之前调用
setSrcLanguageCode
Link copied to clipboard
public void setSrcLanguageCode(String srcLanguageCode)
设置语音识别源语言代码
setVideoConfig
Link copied to clipboard
public void setVideoConfig(Builder builder)
视频分辨率、码率相关配置
setVoIPCallListener
Link copied to clipboard
public void setVoIPCallListener(IRongCallListener callListener)
设置通话状态回调设置通话状态回调
startASR
Link copied to clipboard
public void startASR(IRCRTCResultCallback callback)
开启语音识别功能
startCall
Link copied to clipboard
public String startCall(ConversationType conversationType, String targetId, List<String> userIds, List<String> observerUserIds, RongCallCommon.CallMediaType mediaType, String extra)
发起通话发起通话
public String startCall(int cameraId, boolean mirror, ConversationType conversationType, String targetId, List<String> userIds, List<String> observerUserIds, RongCallCommon.CallMediaType mediaType, String extra, StartCameraCallback callback)
打开指定摄像头方式发起通话打开指定摄像头方式发起通话
startCapture
Link copied to clipboard
public void startCapture()
仅打开本地摄像头在通话建立(IRongCallListener#onCallConnected)之后打开摄像头，对端不会收到 IRongCallListener#onRemoteCameraDisabled 通知
startCrossCall
Link copied to clipboard
public String startCrossCall(ConversationType conversationType, String targetId, List<String> userIds, List<String> observerUserIds, RongCallCommon.CallMediaType mediaType, String extra)
发起跨应用通话发起通话
startIncomingPreview
Link copied to clipboard
public void startIncomingPreview(StartIncomingPreviewCallback callback)
stopASR
Link copied to clipboard
public void stopASR(IRCRTCResultCallback callback)
关闭语音识别功能
switchCamera
Link copied to clipboard
public void switchCamera()
前后摄像头切换，适用于通过SDK打开默认摄像头的场景在通话建立(IRongCallListener#onCallConnected)之后切换前后置摄像头，该方法适用于通过SDK打开默认摄像头的场景，配合 RongCallClient#startCall(Conversation.ConversationType, String, List, List, RongCallCommon.
public void switchCamera(int cameraId, boolean mirror, CameraSwitchCallBack callBack)
切换指定 id 摄像头 在通话建立(IRongCallListener#onCallConnected)之后切换指定 ID 的摄像头，该方法适用于通过 SDK 打开指定摄像头的场景，配合 RongCallClient#startCall(int, boolean, Conversation.ConversationType, String, List, List, RongCallCommon.
unInit
Link copied to clipboard
public void unInit()
隐藏方法，当 ipc 进程崩溃时，需要注销该实例并释放内存
unpublishCustomVideoStream
Link copied to clipboard
public void unpublishCustomVideoStream(RCRTCOutputStream outputStream, IRCRTCResultCallback callBack)
取消发布自定义音视频流取消发布自定义音视频流
unregisterVideoFrameObserver
Link copied to clipboard
public void unregisterVideoFrameObserver()
取消注册 本地音频流上报监听在不使用本地视频流时取消注册