Package io.rong.calllib

## Class RongRTCCallEngineListener

- All Implemented Interfaces:

      public class RongRTCCallEngineListener

- - ### Nested Class Summary

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

  - ### Field Summary

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

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `RongRTCCallEngineListener(Handler handler)` |

  - ### Enum Constant Summary

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

  - ### Method Summary

    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `onJoinChannelSuccess(String channel, String sessionId, int elapsed)` |
    `void` | `onRejoinChannelSuccess(String channel, String mediaId, int elapsed)` |
    `void` | `onWarning(int warn)` |
    `void` | `onError(int err)` |
    `void` | `onApiCallExecuted(String api, int error)` |
    `void` | `onCameraReady()` |
    `void` | `onVideoStopped()` |
    `void` | `onAudioQuality(String mediaId, int quality, short delay, short lost)` |
    `void` | `onLeaveChannel(int val)` |
    `void` | `onRtcStats()` |
    `void` | `onAudioVolumeIndication(int totalVolume)` |
    `void` | `onUserJoined(String mediaId, int userType, int methodIdentification)` |
    `void` | `onRemoteUserPublishStream(String userId, String streamId, String tag)` |
    `void` | `onRemoteUserUnpublishStream(String userId, String streamId, String tag)` |
    `void` | `onUserOffline(String mediaId, int reason)` |
    `void` | `onUserMuteAudio(String mediaId, boolean muted)` |
    `void` | `onUserMuteVideo(String mediaId, boolean muted)` |
    `void` | `onRemoteVideoStat(String mediaId, int delay, int receivedBitrate, int receivedFrameRate)` |
    `void` | `onLocalVideoStat(int sentBitrate, int sentFrameRate)` |
    `void` | `onFirstRemoteVideoFrame(String mediaId, int width, int height, int elapsed)` |
    `void` | `onFirstRemoteAudioFrame(String mediaId)` |
    `void` | `onFirstLocalVideoFrame(int width, int height, int elapsed)` |
    `void` | `onFirstRemoteVideoDecoded(String mediaId, int width, int height, int elapsed)` |
    `void` | `onConnectionLost()` |
    `void` | `onConnectionInterrupted()` |
    `void` | `onMediaEngineEvent(int code)` |
    `void` | `onVendorMessage(String mediaId, Array<byte> data)` |
    `void` | `onRefreshRecordingServiceStatus(int status)` |
    `void` | `onAudioLevelReceive(HashMap<String, String> audioLevel)` |
    `void` | `onAudioLevelSend(String audioLevel)` |
    `void` | `onWhiteBoardURL(String url)` |
    `void` | `onNetworkReceiveLost(String userId, int lossRate)` |
    `void` | `onNetworkSendLost(int lossRate, int delay)` |
    `void` | `onNotifySharingScreen(String userId, boolean isSharing)` |
    `void` | `onNotifyDegradeNormalUserToObserver(String hostId, String userId)` | 自己已在聊天室中, 自己被降级为观察者
    `void` | `onNotifyAnswerDegradeNormalUserToObserver(String s, boolean b)` | 主持人将与会某正常用户降级为观察者
    `void` | `onNotifyAnswerUpgradeObserverToNormalUser(String userId, boolean isAccept)` | public enum CallUserType { NORMAL(1), OBSERVER(2);
    `void` | `sendinInvite()` |
    `void` | `onRemoteUserUnpublishCameraStream(String userId, String streamId, String tag)` |
    `void` | `onNotifyAnswerObserverRequestBecomeNormalUser(String userId, long status)` | 观察者向主持人请求成为正常用户, 主持人做出接受/拒绝之后之后, 给观察者的回调
    `void` | `onNotifyUpgradeObserverToNormalUser(String hostUid, String userId)` | 自己是观察者且已在聊天室中, 主持人邀请自己升级成为正常用户时的通知, 在此回调中需要给出应答,
    `void` | `onNotifyHostControlUserDevice(String userId, String hostId, int dType, boolean isOpen)` | 主持人请求打开某正常用户的麦克风/摄像头

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

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

- - ### Constructor Detail

    - #### RongRTCCallEngineListener

          RongRTCCallEngineListener(Handler handler)

  - ### Method Detail

    - #### onJoinChannelSuccess

           void onJoinChannelSuccess(String channel, String sessionId, int elapsed)

    - #### onRejoinChannelSuccess

           void onRejoinChannelSuccess(String channel, String mediaId, int elapsed)

    - #### onWarning

           void onWarning(int warn)

    - #### onError

           void onError(int err)

    - #### onApiCallExecuted

           void onApiCallExecuted(String api, int error)

    - #### onCameraReady

           void onCameraReady()

    - #### onVideoStopped

           void onVideoStopped()

    - #### onAudioQuality

           void onAudioQuality(String mediaId, int quality, short delay, short lost)

    - #### onLeaveChannel

           void onLeaveChannel(int val)

    - #### onRtcStats

           void onRtcStats()

    - #### onAudioVolumeIndication

           void onAudioVolumeIndication(int totalVolume)

    - #### onUserJoined

           void onUserJoined(String mediaId, int userType, int methodIdentification)

    - #### onRemoteUserPublishStream

           void onRemoteUserPublishStream(String userId, String streamId, String tag)

    - #### onRemoteUserUnpublishStream

           void onRemoteUserUnpublishStream(String userId, String streamId, String tag)

    - #### onUserOffline

           void onUserOffline(String mediaId, int reason)

    - #### onUserMuteAudio

           void onUserMuteAudio(String mediaId, boolean muted)

    - #### onUserMuteVideo

           void onUserMuteVideo(String mediaId, boolean muted)

    - #### onRemoteVideoStat

           void onRemoteVideoStat(String mediaId, int delay, int receivedBitrate, int receivedFrameRate)

    - #### onLocalVideoStat

           void onLocalVideoStat(int sentBitrate, int sentFrameRate)

    - #### onFirstRemoteVideoFrame

           void onFirstRemoteVideoFrame(String mediaId, int width, int height, int elapsed)

    - #### onFirstRemoteAudioFrame

           void onFirstRemoteAudioFrame(String mediaId)

    - #### onFirstLocalVideoFrame

           void onFirstLocalVideoFrame(int width, int height, int elapsed)

    - #### onFirstRemoteVideoDecoded

           void onFirstRemoteVideoDecoded(String mediaId, int width, int height, int elapsed)

    - #### onConnectionLost

           void onConnectionLost()

    - #### onConnectionInterrupted

           void onConnectionInterrupted()

    - #### onMediaEngineEvent

           void onMediaEngineEvent(int code)

    - #### onVendorMessage

           void onVendorMessage(String mediaId, Array<byte> data)

    - #### onRefreshRecordingServiceStatus

           void onRefreshRecordingServiceStatus(int status)

    - #### onAudioLevelReceive

           void onAudioLevelReceive(HashMap<String, String> audioLevel)

    - #### onAudioLevelSend

           void onAudioLevelSend(String audioLevel)

    - #### onWhiteBoardURL

           void onWhiteBoardURL(String url)

    - #### onNetworkReceiveLost

           void onNetworkReceiveLost(String userId, int lossRate)

    - #### onNetworkSendLost

           void onNetworkSendLost(int lossRate, int delay)

    - #### onNotifySharingScreen

           void onNotifySharingScreen(String userId, boolean isSharing)

    - #### onNotifyDegradeNormalUserToObserver

           void onNotifyDegradeNormalUserToObserver(String hostId, String userId)

      自己已在聊天室中, 自己被降级为观察者

      Parameters:
        `hostId` - 主持人的ID
        `userId` - 通知内容，用户不需要关心，只需要在Answer的时候回传即可

    - #### onNotifyAnswerDegradeNormalUserToObserver

           void onNotifyAnswerDegradeNormalUserToObserver(String s, boolean b)

      主持人将与会某正常用户降级为观察者

    - #### onNotifyAnswerUpgradeObserverToNormalUser

           void onNotifyAnswerUpgradeObserverToNormalUser(String userId, boolean isAccept)

      public enum CallUserType { NORMAL(1), OBSERVER(2);

    - #### sendinInvite

           void sendinInvite()

    - #### onRemoteUserUnpublishCameraStream

           void onRemoteUserUnpublishCameraStream(String userId, String streamId, String tag)

    - #### onNotifyAnswerObserverRequestBecomeNormalUser

           void onNotifyAnswerObserverRequestBecomeNormalUser(String userId, long status)

      观察者向主持人请求成为正常用户, 主持人做出接受/拒绝之后之后, 给观察者的回调

      Parameters:
        `userId` - 用户ID
        `status` - 主持人响应的状态

    - #### onNotifyUpgradeObserverToNormalUser

           void onNotifyUpgradeObserverToNormalUser(String hostUid, String userId)

      自己是观察者且已在聊天室中, 主持人邀请自己升级成为正常用户时的通知, 在此回调中需要给出应答,

      Parameters:
        `hostUid` - 主持人的ID
        `userId` - 用户ID

    - #### onNotifyHostControlUserDevice

           void onNotifyHostControlUserDevice(String userId, String hostId, int dType, boolean isOpen)

      主持人请求打开某正常用户的麦克风/摄像头

      Parameters:
        `userId` - 用户ID
        `hostId` - 主持人ID
        `dType` - 设备类型 1摄像头，2麦克风，3摄像头和麦克风
        `isOpen` - 打开/关闭