public interface IZegoRoomCallback
| Modifier and Type | Method and Description |
|---|---|
void |
onDisconnect(int errorCode,
java.lang.String roomID)
Reports disconnection from the server.
|
void |
onKickOut(int reason,
java.lang.String roomID)
Reports that the user was removed from the room.
|
void |
onPlayQualityUpdate(java.lang.String streamID,
int quality,
double videoFPS,
double videoKBPS,
double audioKBPS)
Reports stream playback quality updates.
|
void |
onSoundLevelUpdate(ZegoSoundLevelInfo[] soundLevelList,
int soundLevelCount)
Reports sound level updates for received streams.
|
void |
onStreamUpdate(int type,
ZegoStreamInfo[] listStream,
java.lang.String roomID)
Reports updates to stream information.
|
void |
onTokenWillExpired(java.lang.String roomID,
int remainTimeInSecond)
Reports that the configured token is about to expire.
|
void |
onUpdateOnlineCount(int onlineCount,
java.lang.String roomID)
Reports updates to the online user count.
|
void |
onUserCountUpdate(int onlineCount,
java.lang.String roomID)
Reports real-time updates to the online user count.
|
void |
onUserUpdate(ZegoUserState[] listUser,
int updateType,
java.lang.String roomID)
Reports room member updates.
|
void onDisconnect(int errorCode,
java.lang.String roomID)
errorCode - Result code: 0 indicates success; any other value indicates failure.roomID - Room ID.
Implement recovery actions, such as logging in again or notifying the user, in response to this event.
The SDK retries after losing the server connection and triggers this callback if retries fail. At that point, all SDK connections to the server are disconnected.
void onStreamUpdate(int type,
ZegoStreamInfo[] listStream,
java.lang.String roomID)
type - Update type. See ZegoStreamUpdateType.listStream - Updated stream list.roomID - Room ID.
After login, existing streams are reported as added streams. Subsequent stream additions and removals also trigger this callback.
void onPlayQualityUpdate(java.lang.String streamID,
int quality,
double videoFPS,
double videoKBPS,
double audioKBPS)
streamID - Stream ID.quality - 0, 1, 2, and 3 indicate excellent, good, fair, and poor quality, respectively.videoFPS - Video frame rate.videoKBPS - Video bitrate.audioKBPS - Audio bitrate.void onKickOut(int reason,
java.lang.String roomID)
reason - Reason for removal.roomID - Room ID.void onUserUpdate(ZegoUserState[] listUser, int updateType, java.lang.String roomID)
listUser - List of updated members.updateType - Update type. See ZegoUserUpdateType.roomID - Room ID. After a successful login or reconnection, a full update is reported if other users are present. Subsequent changes are reported as incremental updates.void onUserCountUpdate(int onlineCount,
java.lang.String roomID)
onlineCount - Number of online users.roomID - Room ID.void onUpdateOnlineCount(int onlineCount,
java.lang.String roomID)
onlineCount - Number of online users.roomID - Room ID.void onTokenWillExpired(java.lang.String roomID,
int remainTimeInSecond)
roomID - Room ID.remainTimeInSecond - Remaining validity period, in seconds.void onSoundLevelUpdate(ZegoSoundLevelInfo[] soundLevelList, int soundLevelCount)
soundLevelList - Sound level information for streams in the room, excluding streams published by this user.soundLevelCount - Number of sound level entries.