Package io.rong.calllib

## Interface ICallEngine

- All Implemented Interfaces:

      public interface ICallEngine

  Created by mamingyang on 18/4/20.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---

  - ### Enum Constant Summary

    Enum Constants
    Enum Constant | Description
    --- | ---

  - ### Method Summary

    Modifier and Type | Method | Description
    --- | --- | ---
    `abstract void` | `create(Context context, String vendorKey, ICallEngineListener engineListener)` |
    `abstract void` | `destroy()` |
    `abstract SurfaceView` | `setupLocalVideo()` |
    `abstract SurfaceView` | `setupRemoteVideo(String streamId)` |
    `abstract int` | `enableVideo()` |
    `abstract int` | `disableVideo()` |
    `abstract int` | `startPreview(StartCameraCallback startCameraCallback)` |
    `abstract int` | `stopPreview()` |
    `abstract int` | `joinChannel(String key, String channelName, String optionalInfo, String mediaId, Role role, boolean openCamera, boolean openMic, int roomType, String srcLanguage)` |
    `abstract int` | `leaveChannel(int val)` |
    `abstract int` | `setChannelProfile(int profile)` |
    `abstract int` | `startEchoTest()` |
    `abstract int` | `stopEchoTest()` |
    `abstract int` | `muteLocalAudioStream(boolean muted)` |
    `abstract int` | `muteAllRemoteAudioStreams(boolean muted)` |
    `abstract int` | `muteRemoteAudioStream(String mediaId, boolean muted)` |
    `abstract int` | `setEnableSpeakerphone(boolean enabled)` |
    `abstract int` | `startAudioRecording(String filePath)` |
    `abstract String` | `getCallId()` |
    `abstract int` | `rate(String callId, int rating, String description)` |
    `abstract int` | `complain(String callId, String description)` |
    `abstract void` | `monitorHeadsetEvent(boolean monitor)` |
    `abstract void` | `monitorBluetoothHeadsetEvent(boolean monitor)` |
    `abstract void` | `monitorConnectionEvent(boolean monitor)` |
    `abstract boolean` | `isSpeakerphoneEnabled()` |
    `abstract int` | `setSpeakerphoneVolume(int volume)` |
    `abstract int` | `enableAudioVolumeIndication(int interval, int smooth)` |
    `abstract int` | `setLocalRenderMode(int mode)` |
    `abstract int` | `setRemoteRenderMode(String mediaId, int mode)` |
    `abstract void` | `switchView(String mediaId1, String mediaId2)` |
    `abstract int` | `switchCamera()` |
    `abstract int` | `requestNormalUser()` |
    `abstract int` | `requestWhiteBoard()` |
    `abstract int` | `muteLocalVideoStream(boolean muted)` |
    `abstract int` | `muteAllRemoteVideoStreams(boolean muted)` |
    `abstract int` | `muteRemoteVideoStream(String mediaId, boolean muted)` |
    `abstract int` | `setLogFile(String filePath)` |
    `abstract int` | `setEnableBeauty(Boolean enable)` |
    `abstract int` | `setLogFilter(int filter)` |
    `abstract int` | `startServerRecording(String key)` |
    `abstract int` | `stopServerRecording(String key)` |
    `abstract int` | `getServerRecordingStatus()` |
    `abstract void` | `setUserType(int type)` |
    `abstract void` | `answerDegradeNormalUserToObserver(String hostId)` |
    `abstract int` | `answerUpgradeObserverToNormalUser(String userID, boolean isAccept)` |
    `abstract int` | `answerHostControlUserDevice(String userID, int dType, boolean isOpen, boolean isAccept)` | 麦克风/摄像头被主持人打开时, 被打开人的应答调用
    `abstract void` | `setVideoFrameListener(ICallEngineVideoFrameListener iVideoFrameListener)` |
    `abstract void` | `setAudioOnly(boolean isAudioOnly)` | 设置是否仅音频通话，默认false
    `abstract void` | `publishMediaResource(int mediaType, IMediaResourceListener iMediaResourceListener)` |
    `abstract void` | `unPublishMediaResource(IMediaResourceListener iMediaResourceListener)` |
    `abstract void` | `startCapture()` |
    `abstract void` | `switchCamera(int cameraId, boolean mirror, CameraSwitchCallBack callBack)` | 按照指定cameraid切换摄像头
    `abstract void` | `startPreview(int cameraId, boolean mirror, StartCameraCallback callback)` |
    `abstract void` | `setLocalAudioPCMBufferListener(IRCRTCAudioDataListener iCallEngineAudioPCMBufferListener)` |
    `abstract void` | `unpublishCustomVideoStream(RCRTCOutputStream outputStream, IRCRTCResultCallback callBack)` |
    `abstract void` | `publishCustomVideoStream(String tag, PublishCallBack callBack)` |
    `abstract void` | `setCameraOrientation(int cameraDisplayOrientation, int frameOrientation)` | 设置Camera DisplayOrientation和FrameOrientation im连接成功之后，startCall之前 设置有效
    `abstract void` | `setRTCConfig(Builder builder)` | RTC初始化相关配置
    `abstract void` | `setVideoConfig(Builder builder)` | 视频分辨率、码率相关配置
    `abstract void` | `setAudioConfig(Builder builder)` | 音频相关配置
    `abstract void` | `joinRoomAndPublishResource(String channelName)` |
    `abstract void` | `setJoinType(RCRTCJoinType joinType)` | 设置多端在线时的呼叫策略
    `abstract void` | `setMultiPlatformRemoteVideoView(String userId, String tag, RCRTCBaseView videoView)` | 设置远端视频流的预览视图
    `abstract void` | `setMultiPlatformLocalVideoView(String tag, RCRTCBaseView videoView)` | 设置远端视频流的预览视图
    `abstract void` | `enableMultiPlatformMode()` | 开启多平台模式
    `abstract List<RCRTCRemoteUser>` | `getRemoteUsers()` | 返回当前房间远端用户列表
    `abstract void` | `enableCustomEncryption(boolean encryptAudio, boolean encryptVideo)` |
    `abstract void` | `receiveSubtitle(boolean receive)` |
    `abstract void` | `startSubtitle(Boolean start, IRCRTCResultCallback callback)` |
    `abstract void` | `setSubtitleListener(IRongASRListener listener)` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

  - ### Method Detail

    - #### create

           abstract void create(Context context, String vendorKey, ICallEngineListener engineListener)

    - #### destroy

           abstract void destroy()

    - #### setupLocalVideo

           abstract SurfaceView setupLocalVideo()

    - #### setupRemoteVideo

           abstract SurfaceView setupRemoteVideo(String streamId)

    - #### enableVideo

           abstract int enableVideo()

    - #### disableVideo

           abstract int disableVideo()

    - #### startPreview

           abstract int startPreview(StartCameraCallback startCameraCallback)

    - #### stopPreview

           abstract int stopPreview()

    - #### joinChannel

           abstract int joinChannel(String key, String channelName, String optionalInfo, String mediaId, Role role, boolean openCamera, boolean openMic, int roomType, String srcLanguage)

    - #### leaveChannel

           abstract int leaveChannel(int val)

    - #### setChannelProfile

           abstract int setChannelProfile(int profile)

    - #### startEchoTest

           abstract int startEchoTest()

    - #### stopEchoTest

           abstract int stopEchoTest()

    - #### muteLocalAudioStream

           abstract int muteLocalAudioStream(boolean muted)

    - #### muteAllRemoteAudioStreams

           abstract int muteAllRemoteAudioStreams(boolean muted)

    - #### muteRemoteAudioStream

           abstract int muteRemoteAudioStream(String mediaId, boolean muted)

    - #### setEnableSpeakerphone

           abstract int setEnableSpeakerphone(boolean enabled)

    - #### startAudioRecording

           abstract int startAudioRecording(String filePath)

    - #### getCallId

           abstract String getCallId()

    - #### rate

           abstract int rate(String callId, int rating, String description)

    - #### complain

           abstract int complain(String callId, String description)

    - #### monitorHeadsetEvent

           abstract void monitorHeadsetEvent(boolean monitor)

    - #### monitorBluetoothHeadsetEvent

           abstract void monitorBluetoothHeadsetEvent(boolean monitor)

    - #### monitorConnectionEvent

           abstract void monitorConnectionEvent(boolean monitor)

    - #### isSpeakerphoneEnabled

           abstract boolean isSpeakerphoneEnabled()

    - #### setSpeakerphoneVolume

           abstract int setSpeakerphoneVolume(int volume)

    - #### enableAudioVolumeIndication

           abstract int enableAudioVolumeIndication(int interval, int smooth)

    - #### setLocalRenderMode

           abstract int setLocalRenderMode(int mode)

    - #### setRemoteRenderMode

           abstract int setRemoteRenderMode(String mediaId, int mode)

    - #### switchView

           abstract void switchView(String mediaId1, String mediaId2)

    - #### switchCamera

           abstract int switchCamera()

    - #### requestNormalUser

           abstract int requestNormalUser()

    - #### requestWhiteBoard

           abstract int requestWhiteBoard()

    - #### muteLocalVideoStream

           abstract int muteLocalVideoStream(boolean muted)

    - #### muteAllRemoteVideoStreams

           abstract int muteAllRemoteVideoStreams(boolean muted)

    - #### muteRemoteVideoStream

           abstract int muteRemoteVideoStream(String mediaId, boolean muted)

    - #### setLogFile

           abstract int setLogFile(String filePath)

    - #### setEnableBeauty

           abstract int setEnableBeauty(Boolean enable)

    - #### setLogFilter

           abstract int setLogFilter(int filter)

    - #### startServerRecording

           abstract int startServerRecording(String key)

    - #### stopServerRecording

           abstract int stopServerRecording(String key)

    - #### getServerRecordingStatus

           abstract int getServerRecordingStatus()

    - #### setUserType

           abstract void setUserType(int type)

    - #### answerDegradeNormalUserToObserver

           abstract void answerDegradeNormalUserToObserver(String hostId)

    - #### answerUpgradeObserverToNormalUser

           abstract int answerUpgradeObserverToNormalUser(String userID, boolean isAccept)

    - #### answerHostControlUserDevice

           abstract int answerHostControlUserDevice(String userID, int dType, boolean isOpen, boolean isAccept)

      麦克风/摄像头被主持人打开时, 被打开人的应答调用

      Parameters:
        `userID` - 用户标识唯一ID
        `dType` - 设备类型
        `isOpen` - 打开/关闭
        `isAccept` - 是否接受
      Returns:

        0:成功 1:参数错误 2:状态错误

    - #### setVideoFrameListener

           abstract void setVideoFrameListener(ICallEngineVideoFrameListener iVideoFrameListener)

    - #### setAudioOnly

           abstract void setAudioOnly(boolean isAudioOnly)

      设置是否仅音频通话，默认false

    - #### publishMediaResource

           abstract void publishMediaResource(int mediaType, IMediaResourceListener iMediaResourceListener)

      Parameters:
        `mediaType` - 1:仅音频通话 ,2:音频+视频

    - #### unPublishMediaResource

           abstract void unPublishMediaResource(IMediaResourceListener iMediaResourceListener)

    - #### startCapture

           abstract void startCapture()

    - #### switchCamera

           abstract void switchCamera(int cameraId, boolean mirror, CameraSwitchCallBack callBack)

      按照指定cameraid切换摄像头

    - #### startPreview

           abstract void startPreview(int cameraId, boolean mirror, StartCameraCallback callback)

    - #### setLocalAudioPCMBufferListener

           abstract void setLocalAudioPCMBufferListener(IRCRTCAudioDataListener iCallEngineAudioPCMBufferListener)

    - #### unpublishCustomVideoStream

           abstract void unpublishCustomVideoStream(RCRTCOutputStream outputStream, IRCRTCResultCallback callBack)

    - #### publishCustomVideoStream

           abstract void publishCustomVideoStream(String tag, PublishCallBack callBack)

    - #### setCameraOrientation

           abstract void setCameraOrientation(int cameraDisplayOrientation, int frameOrientation)

      设置Camera DisplayOrientation和FrameOrientation im连接成功之后，startCall之前 设置有效

      Parameters:
        `cameraDisplayOrientation` - 默认:0
        `frameOrientation` - 编码使用到的角度，默认:-1,设置为-1时将跟随系统角度

    - #### setRTCConfig

           abstract void setRTCConfig(Builder builder)

      RTC初始化相关配置

    - #### setVideoConfig

           abstract void setVideoConfig(Builder builder)

      视频分辨率、码率相关配置

    - #### setAudioConfig

           abstract void setAudioConfig(Builder builder)

      音频相关配置

    - #### joinRoomAndPublishResource

           abstract void joinRoomAndPublishResource(String channelName)

    - #### setJoinType

           abstract void setJoinType(RCRTCJoinType joinType)

      设置多端在线时的呼叫策略

    - #### setMultiPlatformRemoteVideoView

           abstract void setMultiPlatformRemoteVideoView(String userId, String tag, RCRTCBaseView videoView)

      设置远端视频流的预览视图

    - #### setMultiPlatformLocalVideoView

           abstract void setMultiPlatformLocalVideoView(String tag, RCRTCBaseView videoView)

      设置远端视频流的预览视图

    - #### enableMultiPlatformMode

           abstract void enableMultiPlatformMode()

      开启多平台模式

    - #### getRemoteUsers

           abstract List<RCRTCRemoteUser> getRemoteUsers()

      返回当前房间远端用户列表

    - #### enableCustomEncryption

           abstract void enableCustomEncryption(boolean encryptAudio, boolean encryptVideo)

    - #### receiveSubtitle

           abstract void receiveSubtitle(boolean receive)

    - #### startSubtitle

           abstract void startSubtitle(Boolean start, IRCRTCResultCallback callback)

    - #### setSubtitleListener

           abstract void setSubtitleListener(IRongASRListener listener)