RTCClientEvent carries the channel control events of one channel. The first listener must be passed through RTCEngine.join(..., clientEvent, ...); after the join succeeds, you can replace or unbind it with RTCChannel.setRtcClientEvent(...).
If you only care about a few events, extend RTCClientSimpleEvent, which provides empty implementations.
Join results
onJoinSucceed(channel, uid, whiteBoard)
channel is the channel ID, uid is the current user ID, and whiteBoard is the nullable whiteboard URL or info. Treat this callback as the signal that the join actually succeeded.
onJoinFailed(channel, statusCode)
channel has a value when the channel ID can be parsed from the token, otherwise it’s null; for statusCode, see Error codes.
User events
onUserUpdate(channel, uid)
onMeMembershipChanged(channel, isMember)
isMember = true means you were promoted to a full member, and false means you were demoted to audience; read your initial role at join time with isAudience() on the corresponding channel.
onRemoteUserJoin(channel, uid)
onRemoteUserLeave(channel, userInfo, leaveReason)
userInfo is the last snapshot of the leaving user’s info.
onRemoteUserUpdate(channel, uid)
Track and channel events
onStreamTrackAdd(uid, channel, trackId, trackDesc)
RTCChannel of the same channel to get and subscribe to the remote track.
onStreamTrackUpdate(uid, channel, trackId, trackDesc)
onStreamTrackRemove(uid, channel, trackInfo)
TrackInfo fields, see Types.
onChannelUpdate(channel, props)
props may be null.
onCustomMessage(channel, uid, sid, name, action, content)
channel is the channel the message belongs to; the other parameters are, in order, the sender’s user ID, session ID, name, action identifier, and message content.
Connection events
onDisconnected(channel, leaveReason, statusCode, message)
join(...) again for this channel; other channels aren’t affected.
onReconnected(channel)
onReconnecting(channel)
RTCClientEvent.onError(...) has been removed. Engine-blocking operations and global errors are all reported by RTCEngineEvent.onError(...).
:::