im.zego.zegoexpress.callback.IZegoEventHandler
Declared in
callback/IZegoEventHandler.java
Public-Func Lists
Public-Func Docs
onDebugError
public void onDebugError (int errorCode, String funcName, String info)
Debug error message callback.
| Parameters | |
|---|---|
| errorCode | Error code, please refer to the common error code document [] for details |
| funcName | Function name |
| info | Detailed error information |
onRoomStateUpdate
public void onRoomStateUpdate (String roomID, ZegoRoomState state, int errorCode, JSONObject extendedData)
Room status change callback.
| Parameters | |
|---|---|
| roomID | Room ID, a string of up to 128 bytes in length. |
| state | Changed room state |
| errorCode | Error code, please refer to the for details |
| extendedData | Extended Information with state updates. As the standby, only an empty json table is currently returned |
onRoomUserUpdate
public void onRoomUserUpdate (String roomID, ZegoUpdateType updateType, ArrayList< ZegoUser > userList)
Notification callback for other users in the room to increase or decrease.
| Parameters | |
|---|---|
| roomID | Room ID where the user is logged in, a string of up to 128 bytes in length. |
| updateType | Update type (add/delete) |
| userList | List of users changed in the current room |
onRoomOnlineUserCountUpdate
public void onRoomOnlineUserCountUpdate (String roomID, int count)
Notification callback of the number of online users in the room.
| Parameters | |
|---|---|
| roomID | Room ID where the user is logged in, a string of up to 128 bytes in length. |
| count | Count of online users |
onRoomStreamUpdate
public void onRoomStreamUpdate (String roomID, ZegoUpdateType updateType, ArrayList< ZegoStream > streamList)
Notification of increase or decrease of streams published by other users in the same room.
| Parameters | |
|---|---|
| roomID | Room ID where the user is logged in, a string of up to 128 bytes in length. |
| updateType | Update type (add/delete) |
| streamList | Updated stream list |
onRoomStreamExtraInfoUpdate
public void onRoomStreamExtraInfoUpdate (String roomID, ArrayList< ZegoStream > streamList)
Stream extra information update notification.
| Parameters | |
|---|---|
| roomID | Room ID where the user is logged in, a string of up to 128 bytes in length. |
| streamList | List of streams that the extra info was updated. |
onPublisherStateUpdate
public void onPublisherStateUpdate (String streamID, ZegoPublisherState state, int errorCode, JSONObject extendedData)
Publish stream state callback.
| Parameters | |
|---|---|
| streamID | Stream ID |
| state | Status of publishing stream |
| errorCode | The error code corresponding to the status change of the publish stream. Please refer to the common error code documentation [] for details. |
| extendedData | Extended information with state updates. |
onPublisherQualityUpdate
public void onPublisherQualityUpdate (String streamID, ZegoPublishStreamQuality quality)
Publish stream quality callback.
| Parameters | |
|---|---|
| streamID | Stream ID |
| quality | Published stream quality, including audio and video frame rate, bit rate, resolution, RTT, etc. |
onPublisherCapturedAudioFirstFrame
public void onPublisherCapturedAudioFirstFrame ()
First frame callback notification for local audio captured.
onPublisherCapturedVideoFirstFrame
public void onPublisherCapturedVideoFirstFrame (ZegoPublishChannel channel)
First frame callback notification for local video captured.
| Parameters | |
|---|---|
| channel | Publishing stream channel.If you only publish one audio and video stream, you can ignore this parameter. |
onPublisherVideoSizeChanged
public void onPublisherVideoSizeChanged (int width, int height, ZegoPublishChannel channel)
Video captured size change callback notification.
| Parameters | |
|---|---|
| width | Video capture resolution width |
| height | Video capture resolution width |
| channel | Publishing stream channel.If you only publish one audio and video stream, you can ignore this parameter. |
onPublisherRelayCDNStateUpdate
public void onPublisherRelayCDNStateUpdate (String streamID, ArrayList< ZegoStreamRelayCDNInfo > infoList)
Add/Remove CDN address status callback.
| Parameters | |
|---|---|
| streamID | Stream ID |
| infoList | List of information that the current CDN is relaying |
onPlayerStateUpdate
public void onPlayerStateUpdate (String streamID, ZegoPlayerState state, int errorCode, JSONObject extendedData)
Play stream state callback.
| Parameters | |
|---|---|
| streamID | stream ID |
| state | Current play state |
| errorCode | The error code corresponding to the status change of the playing stream. Please refer to the common error code documentation [] for details. |
| extendedData | Extended Information with state updates. As the standby, only an empty json table is currently returned |
onPlayerQualityUpdate
public void onPlayerQualityUpdate (String streamID, ZegoPlayStreamQuality quality)
Play stream quality callback.
| Parameters | |
|---|---|
| streamID | Stream ID |
| quality | Playing stream quality, including audio and video frame rate, bit rate, resolution, RTT, etc. |
onPlayerMediaEvent
public void onPlayerMediaEvent (String streamID, ZegoPlayerMediaEvent event)
Play media event callback.
| Parameters | |
|---|---|
| streamID | Stream ID |
| event | Play media event callback |
onPlayerRecvAudioFirstFrame
public void onPlayerRecvAudioFirstFrame (String streamID)
First frame callback notification for remote audio received.
| Parameters | |
|---|---|
| streamID | Stream ID |
onPlayerRecvVideoFirstFrame
public void onPlayerRecvVideoFirstFrame (String streamID)
First frame callback notification for remote video received.
| Parameters | |
|---|---|
| streamID | Stream ID |
onPlayerRenderVideoFirstFrame
public void onPlayerRenderVideoFirstFrame (String streamID)
First video frame is rendered.
| Parameters | |
|---|---|
| streamID | Stream ID |
onPlayerVideoSizeChanged
public void onPlayerVideoSizeChanged (String streamID, int width, int height)
playing stream resolution change callback
| Parameters | |
|---|---|
| streamID | Stream ID |
| width | The width of the video |
| height | The height of the video |
onPlayerRecvSEI
public void onPlayerRecvSEI (String streamID, byte[] data)
Receive SEI.
| Parameters | |
|---|---|
| streamID | Stream ID |
| data | SEI content |
onMixerRelayCDNStateUpdate
public void onMixerRelayCDNStateUpdate (String taskID, ArrayList< ZegoStreamRelayCDNInfo > infoList)
Mixed stream relay CDN status update notification.
| Parameters | |
|---|---|
| taskID | Mix stream task ID |
| infoList | List of information that the current CDN is being mixed |
onMixerSoundLevelUpdate
public void onMixerSoundLevelUpdate (HashMap< Integer, Float > soundLevels)
Callback when the soundLevel of every stream in the mix stream updated.
| Parameters | |
|---|---|
| soundLevels | Sound level hash map, key is the soundLevelID of every single stream in this mixer stream, value is the sound level value of that single stream, value ranging from 0.0 to 100.0 |
onCapturedSoundLevelUpdate
public void onCapturedSoundLevelUpdate (float soundLevel)
Captured sound level update callback.
| Parameters | |
|---|---|
| soundLevel | Locally captured sound level value, ranging from 0.0 to 100.0 |
onRemoteSoundLevelUpdate
public void onRemoteSoundLevelUpdate (HashMap< String, Float > soundLevels)
Remote sound level update callback.
| Parameters | |
|---|---|
| soundLevels | Remote sound level hash map, key is the streamID, value is the sound level value of the corresponding streamID, value ranging from 0.0 to 100.0 |
onCapturedAudioSpectrumUpdate
public void onCapturedAudioSpectrumUpdate (float[] audioSpectrum)
Captured audio spectrum update callback.
| Parameters | |
|---|---|
| audioSpectrum | Locally captured audio spectrum value list. Spectrum value range is [0-2^30] |
onRemoteAudioSpectrumUpdate
public void onRemoteAudioSpectrumUpdate (HashMap< String, float[]> audioSpectrums)
Remote audio spectrum update callback.
| Parameters | |
|---|---|
| audioSpectrums | Remote audio spectrum hash map, key is the streamID, value is the audio spectrum list of the corresponding streamID. Spectrum value range is [0-2^30] |
onDeviceError
public void onDeviceError (int errorCode, String deviceName)
Device exception notification.
| Parameters | |
|---|---|
| errorCode | The error code corresponding to the status change of the playing stream. Please refer to the common error code documentation [] for details |
| deviceName | device name |
onRemoteCameraStateUpdate
public void onRemoteCameraStateUpdate (String streamID, ZegoRemoteDeviceState state)
Remote camera device status notification.
| Parameters | |
|---|---|
| streamID | Stream ID |
| state | Remote camera status |
onRemoteMicStateUpdate
public void onRemoteMicStateUpdate (String streamID, ZegoRemoteDeviceState state)
Remote microphone device status notification.
| Parameters | |
|---|---|
| streamID | Stream ID |
| state | Remote microphone status |
onIMRecvBroadcastMessage
public void onIMRecvBroadcastMessage (String roomID, ArrayList< ZegoBroadcastMessageInfo > messageList)
Receive room broadcast message notification.
| Parameters | |
|---|---|
| roomID | Room ID |
| messageList | list of received messages. |
onIMRecvBarrageMessage
public void onIMRecvBarrageMessage (String roomID, ArrayList< ZegoBarrageMessageInfo > messageList)
Receive room barrage message notification.
| Parameters | |
|---|---|
| roomID | Room ID |
| messageList | list of received messages. |
onIMRecvCustomCommand
public void onIMRecvCustomCommand (String roomID, ZegoUser fromUser, String command)
Receive room custom command notification.
| Parameters | |
|---|---|
| roomID | Room ID |
| fromUser | Sender of the command |
| command | Command content received |