ZEGO::EXPRESS::IZegoEventHandler

Declared in ZegoExpressEventHandler.h

Includes

Public-Func Lists

Public-Func Docs

onDebugError

public void onDebugError (int, const std::string &, const std::string &)

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 (const std::string &, ZegoRoomState, int, const std::string &)

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 (const std::string &, ZegoUpdateType, const std::vector< ZegoUser > &)

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 (const std::string &, int)

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 (const std::string &, ZegoUpdateType, const std::vector< ZegoStream > &)

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 (const std::string &, const std::vector< ZegoStream > &)

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 (const std::string &, ZegoPublisherState, int, const std::string &)

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 (const std::string &, const ZegoPublishStreamQuality &)

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)

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, int, ZegoPublishChannel)

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 (const std::string &, const std::vector< ZegoStreamRelayCDNInfo > &)

Add/Remove CDN address status callback.

Parameters
streamID Stream ID
infoList List of information that the current CDN is relaying

onPlayerStateUpdate

public void onPlayerStateUpdate (const std::string &, ZegoPlayerState, int, const std::string &)

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 (const std::string &, const ZegoPlayStreamQuality &)

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 (const std::string &, ZegoPlayerMediaEvent)

Play media event callback.

Parameters
streamID Stream ID
event Play media event callback

onPlayerRecvAudioFirstFrame

public void onPlayerRecvAudioFirstFrame (const std::string &)

First frame callback notification for remote audio received.

Parameters
streamID Stream ID

onPlayerRecvVideoFirstFrame

public void onPlayerRecvVideoFirstFrame (const std::string &)

First frame callback notification for remote video received.

Parameters
streamID Stream ID

onPlayerRenderVideoFirstFrame

public void onPlayerRenderVideoFirstFrame (const std::string &)

First video frame is rendered.

Parameters
streamID Stream ID

onPlayerVideoSizeChanged

public void onPlayerVideoSizeChanged (const std::string &, int, int)

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 (const std::string &, const unsigned char *, unsigned int)

Receive SEI.

Parameters
streamID Stream ID
data SEI content
dataLength SEI content length.

onMixerRelayCDNStateUpdate

public void onMixerRelayCDNStateUpdate (const std::string &, const std::vector< ZegoStreamRelayCDNInfo > &)

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 (const std::map< unsigned int, float > &)

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

onAudioDeviceStateChanged

public void onAudioDeviceStateChanged (ZegoUpdateType, ZegoAudioDeviceType, const ZegoDeviceInfo &)

Audio device status change.

Parameters
updateType Update type (add/delete)
deviceType Audio device type
deviceInfo Audio device information

onVideoDeviceStateChanged

public void onVideoDeviceStateChanged (ZegoUpdateType, const ZegoDeviceInfo &)

Audio device status change.

Parameters
updateType Update type (add/delete)
deviceInfo Audio device information

onCapturedSoundLevelUpdate

public void onCapturedSoundLevelUpdate (float)

Captured sound level update callback.

Parameters
soundLevel Locally captured sound level value, ranging from 0.0 to 100.0

onRemoteSoundLevelUpdate

public void onRemoteSoundLevelUpdate (const std::map< std::string, float > &)

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 (const ZegoAudioSpectrum &)

Captured audio spectrum update callback.

Parameters
audioSpectrum Locally captured audio spectrum value list. Spectrum value range is [0-2^30]

onRemoteAudioSpectrumUpdate

public void onRemoteAudioSpectrumUpdate (const std::map< std::string, ZegoAudioSpectrum > &)

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, const std::string &)

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 (const std::string &, ZegoRemoteDeviceState)

Remote camera device status notification.

Parameters
streamID Stream ID
state Remote camera status

onRemoteMicStateUpdate

public void onRemoteMicStateUpdate (const std::string &, ZegoRemoteDeviceState)

Remote microphone device status notification.

Parameters
streamID Stream ID
state Remote microphone status

onIMRecvBroadcastMessage

public void onIMRecvBroadcastMessage (const std::string &, std::vector< ZegoBroadcastMessageInfo >)

Receive room broadcast message notification.

Parameters
roomID Room ID
messageList list of received messages.

onIMRecvBarrageMessage

public void onIMRecvBarrageMessage (const std::string &, std::vector< ZegoBarrageMessageInfo >)

Receive room barrage message notification.

Parameters
roomID Room ID
messageList list of received messages.

onIMRecvCustomCommand

public void onIMRecvCustomCommand (const std::string &, ZegoUser, const std::string &)

Receive room custom command notification.

Parameters
roomID Room ID
fromUser Sender of the command
command Command content received