Package io.rong.calllib

## Class RongCallEngine

- All Implemented Interfaces:

      public class RongCallEngine

- - ### Nested Class Summary

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

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `public final static int` | `ERROR_INIT_VIDEO` |
    `public final static int` | `ERROR_JOIN_ROOM` |
    `public final static int` | `ERROR_ENGINE` |
    `public final static int` | `ERROR_KICKED` |
    `public final static int` | `ERROR_SERVICE_NOT_OPENED` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `RongCallEngine()` |

  - ### Enum Constant Summary

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

  - ### Method Summary

    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `create(Context context, String vendorKey, ICallEngineListener listener)` |
    `void` | `destroy()` |
    `View` | `setupLocalVideo()` |
    `View` | `setupRemoteVideo(String streamId)` |
    `int` | `enableVideo()` |
    `int` | `disableVideo()` |
    `int` | `startPreview(StartCameraCallback startCameraCallback)` |
    `int` | `stopPreview()` |
    `int` | `joinChannel(String key, String channelName, String optionalInfo, String mediaId, Role role, boolean openCamera, boolean openMic, int roomType, String srcLanguage)` |
    `int` | `leaveChannel(int val)` |
    `int` | `setChannelProfile(int profile)` |
    `int` | `startEchoTest()` |
    `int` | `stopEchoTest()` |
    `int` | `muteLocalAudioStream(boolean muted)` |
    `int` | `muteAllRemoteAudioStreams(boolean muted)` |
    `int` | `muteRemoteAudioStream(String mediaId, boolean muted)` |
    `int` | `setEnableSpeakerphone(boolean enabled)` |
    `int` | `startAudioRecording(String filePath)` |
    `String` | `getCallId()` |
    `int` | `rate(String callId, int rating, String description)` |
    `int` | `complain(String callId, String description)` |
    `void` | `monitorHeadsetEvent(boolean monitor)` |
    `void` | `monitorBluetoothHeadsetEvent(boolean monitor)` |
    `void` | `monitorConnectionEvent(boolean monitor)` |
    `boolean` | `isSpeakerphoneEnabled()` |
    `int` | `setSpeakerphoneVolume(int volume)` |
    `int` | `enableAudioVolumeIndication(int interval, int smooth)` |
    `int` | `setLocalRenderMode(int mode)` |
    `int` | `setRemoteRenderMode(String mediaId, int mode)` |
    `void` | `switchView(String mediaId1, String mediaId2)` |
    `int` | `switchCamera()` |
    `int` | `requestNormalUser()` |
    `int` | `requestWhiteBoard()` |
    `int` | `muteLocalVideoStream(boolean muted)` |
    `int` | `muteAllRemoteVideoStreams(boolean muted)` |
    `int` | `muteRemoteVideoStream(String mediaId, boolean muted)` |
    `int` | `setLogFile(String filePath)` |
    `int` | `setEnableBeauty(Boolean enable)` |
    `int` | `setLogFilter(int filter)` |
    `int` | `startServerRecording(String key)` |
    `int` | `stopServerRecording(String key)` |
    `int` | `getServerRecordingStatus()` |
    `void` | `setUserType(int type)` | 接收rongCallManager传递的本地用户的身份，以判断是否发布资源
    `void` | `answerDegradeNormalUserToObserver(String hostId)` |
    `int` | `answerUpgradeObserverToNormalUser(String userID, boolean isAccept)` |
    `int` | `answerHostControlUserDevice(String userID, int dType, boolean isOpen, boolean isAccept)` |
    `void` | `onAudioReceivedLevel(HashMap<String, String> audioLevel)` |
    `void` | `onAudioInputLevel(String audioLevel)` |
    `void` | `onConnectionStats(StatusReport report)` |
    `void` | `publishMediaResource(int mediaType, IMediaResourceListener iMediaResourceListener)` |
    `void` | `unPublishMediaResource(IMediaResourceListener iMediaResourceListener)` |
    `void` | `startCapture()` |
    `void` | `switchCamera(int cameraId, boolean mirror, CameraSwitchCallBack callBack)` |
    `void` | `startPreview(int cameraId, boolean mirror, StartCameraCallback callback)` |
    `void` | `setLocalAudioPCMBufferListener(IRCRTCAudioDataListener listener)` |
    `void` | `publishCustomVideoStream(String tag, PublishCallBack callBack)` |
    `void` | `unpublishCustomVideoStream(RCRTCOutputStream outputStream, IRCRTCResultCallback callBack)` |
    `void` | `setCameraOrientation(int cameraDisplayOrientation, int frameOrientation)` |
    `void` | `setRTCConfig(Builder builder)` |
    `void` | `setVideoConfig(Builder builder, boolean isTextureRender)` |
    `void` | `setAudioConfig(Builder builder)` |
    `void` | `joinRoomAndPublishResource(String channelName)` |
    `void` | `setMultiPlatformRemoteVideoView(String userId, String tag, View videoView)` |
    `void` | `setMultiPlatformLocalVideoView(String tag, View videoView)` |
    `void` | `enableMultiPlatformMode()` |
    `List<RCRTCRemoteUser>` | `getRemoteUsers()` |
    `void` | `enableCustomEncryption(boolean encryptAudio, boolean encryptVideo)` |
    `void` | `startSubtitle(Boolean start, IRCRTCResultCallback callback)` |
    `void` | `receiveSubtitle(boolean receive)` |
    `void` | `startTranslation(String destLang, IRCRTCResultCallback callback)` |
    `void` | `stopTranslation(IRCRTCResultCallback callback)` |
    `void` | `onReceiveASRContent(RCRTCASRContent realTimeSubtitle)` |
    `void` | `onReceiveStartASR()` |
    `void` | `onReceiveStopASR()` |
    `void` | `onReceiveRealtimeTranslationContent(RCRTCRealtimeTranslationContent content)` |
    `void` | `setVideoFrameListener(ICallEngineVideoFrameListener iVideoFrameListener)` |
    `void` | `setAudioOnly(boolean isAudioOnly)` |
    `void` | `setJoinType(RCRTCJoinType joinType)` |
    `void` | `setSubtitleListener(IRongCallASRListener listener)` |

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

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

- - ### Constructor Detail

    - #### RongCallEngine

          RongCallEngine()

  - ### Method Detail

    - #### create

           void create(Context context, String vendorKey, ICallEngineListener listener)

    - #### destroy

           void destroy()

    - #### setupLocalVideo

           View setupLocalVideo()

    - #### setupRemoteVideo

           View setupRemoteVideo(String streamId)

    - #### enableVideo

           int enableVideo()

    - #### disableVideo

           int disableVideo()

    - #### startPreview

           int startPreview(StartCameraCallback startCameraCallback)

    - #### stopPreview

           int stopPreview()

    - #### joinChannel

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

    - #### leaveChannel

           int leaveChannel(int val)

    - #### setChannelProfile

           int setChannelProfile(int profile)

    - #### startEchoTest

           int startEchoTest()

    - #### stopEchoTest

           int stopEchoTest()

    - #### muteLocalAudioStream

           int muteLocalAudioStream(boolean muted)

    - #### muteAllRemoteAudioStreams

           int muteAllRemoteAudioStreams(boolean muted)

    - #### muteRemoteAudioStream

           int muteRemoteAudioStream(String mediaId, boolean muted)

    - #### setEnableSpeakerphone

           int setEnableSpeakerphone(boolean enabled)

    - #### startAudioRecording

           int startAudioRecording(String filePath)

    - #### getCallId

           String getCallId()

    - #### rate

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

    - #### complain

           int complain(String callId, String description)

    - #### monitorHeadsetEvent

           void monitorHeadsetEvent(boolean monitor)

    - #### monitorBluetoothHeadsetEvent

           void monitorBluetoothHeadsetEvent(boolean monitor)

    - #### monitorConnectionEvent

           void monitorConnectionEvent(boolean monitor)

    - #### isSpeakerphoneEnabled

           boolean isSpeakerphoneEnabled()

    - #### setSpeakerphoneVolume

           int setSpeakerphoneVolume(int volume)

    - #### enableAudioVolumeIndication

           int enableAudioVolumeIndication(int interval, int smooth)

    - #### setLocalRenderMode

           int setLocalRenderMode(int mode)

    - #### setRemoteRenderMode

           int setRemoteRenderMode(String mediaId, int mode)

    - #### switchView

           void switchView(String mediaId1, String mediaId2)

    - #### switchCamera

           int switchCamera()

    - #### requestNormalUser

           int requestNormalUser()

    - #### requestWhiteBoard

           int requestWhiteBoard()

    - #### muteLocalVideoStream

           int muteLocalVideoStream(boolean muted)

    - #### muteAllRemoteVideoStreams

           int muteAllRemoteVideoStreams(boolean muted)

    - #### muteRemoteVideoStream

           int muteRemoteVideoStream(String mediaId, boolean muted)

    - #### setLogFile

           int setLogFile(String filePath)

    - #### setEnableBeauty

           int setEnableBeauty(Boolean enable)

    - #### setLogFilter

           int setLogFilter(int filter)

    - #### startServerRecording

           int startServerRecording(String key)

    - #### stopServerRecording

           int stopServerRecording(String key)

    - #### getServerRecordingStatus

           int getServerRecordingStatus()

    - #### setUserType

           void setUserType(int type)

      接收rongCallManager传递的本地用户的身份，以判断是否发布资源

      Parameters:
        `type` - 1:正常 2：观察者

    - #### answerDegradeNormalUserToObserver

           void answerDegradeNormalUserToObserver(String hostId)

    - #### answerUpgradeObserverToNormalUser

           int answerUpgradeObserverToNormalUser(String userID, boolean isAccept)

    - #### answerHostControlUserDevice

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

    - #### onAudioReceivedLevel

           void onAudioReceivedLevel(HashMap<String, String> audioLevel)

    - #### onAudioInputLevel

           void onAudioInputLevel(String audioLevel)

    - #### onConnectionStats

           void onConnectionStats(StatusReport report)

    - #### publishMediaResource

           void publishMediaResource(int mediaType, IMediaResourceListener iMediaResourceListener)

    - #### unPublishMediaResource

           void unPublishMediaResource(IMediaResourceListener iMediaResourceListener)

    - #### startCapture

           void startCapture()

    - #### switchCamera

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

    - #### startPreview

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

    - #### setLocalAudioPCMBufferListener

           void setLocalAudioPCMBufferListener(IRCRTCAudioDataListener listener)

    - #### publishCustomVideoStream

           void publishCustomVideoStream(String tag, PublishCallBack callBack)

    - #### unpublishCustomVideoStream

           void unpublishCustomVideoStream(RCRTCOutputStream outputStream, IRCRTCResultCallback callBack)

    - #### setCameraOrientation

           void setCameraOrientation(int cameraDisplayOrientation, int frameOrientation)

    - #### setRTCConfig

           void setRTCConfig(Builder builder)

    - #### setVideoConfig

           void setVideoConfig(Builder builder, boolean isTextureRender)

    - #### setAudioConfig

           void setAudioConfig(Builder builder)

    - #### joinRoomAndPublishResource

           void joinRoomAndPublishResource(String channelName)

    - #### setMultiPlatformRemoteVideoView

           void setMultiPlatformRemoteVideoView(String userId, String tag, View videoView)

    - #### setMultiPlatformLocalVideoView

           void setMultiPlatformLocalVideoView(String tag, View videoView)

    - #### enableMultiPlatformMode

           void enableMultiPlatformMode()

    - #### getRemoteUsers

           List<RCRTCRemoteUser> getRemoteUsers()

    - #### enableCustomEncryption

           void enableCustomEncryption(boolean encryptAudio, boolean encryptVideo)

    - #### startSubtitle

           void startSubtitle(Boolean start, IRCRTCResultCallback callback)

    - #### receiveSubtitle

           void receiveSubtitle(boolean receive)

    - #### startTranslation

           void startTranslation(String destLang, IRCRTCResultCallback callback)

    - #### stopTranslation

           void stopTranslation(IRCRTCResultCallback callback)

    - #### onReceiveASRContent

           void onReceiveASRContent(RCRTCASRContent realTimeSubtitle)

    - #### onReceiveStartASR

           void onReceiveStartASR()

    - #### onReceiveStopASR

           void onReceiveStopASR()

    - #### onReceiveRealtimeTranslationContent

           void onReceiveRealtimeTranslationContent(RCRTCRealtimeTranslationContent content)

    - #### setVideoFrameListener

           void setVideoFrameListener(ICallEngineVideoFrameListener iVideoFrameListener)

    - #### setAudioOnly

           void setAudioOnly(boolean isAudioOnly)

    - #### setJoinType

           void setJoinType(RCRTCJoinType joinType)

    - #### setSubtitleListener

           void setSubtitleListener(IRongCallASRListener listener)