EVENT | Description |
Error event | |
Kicked out of room event | |
Current user is kicked offline | |
userSig expiration event | |
Room owner terminates the room event | |
Room name change event | |
Seat mode change event | |
All members' microphone permissions change event | |
All members' message sending status change event | |
Room maximum seat count change event | |
Remote user enters room event | |
Remote user leaves room event | |
User role change event | |
User video status change event | |
User audio status change event | |
User message sending status event | |
User volume change event | |
User network quality change event | |
Seats list change event | |
User is kicked off the seat event | |
Request received event | |
Request processed event | |
Request cancellation event | |
Device change event | |
Screen sharing stopped event | |
Screen sharing disabled for all users in the room event |
const roomEngine = new TUIRoomEngine();roomEngine.on(TUIRoomEvents.onError, (error) => {console.log('TUIRoomError error', error);})
Parameter | Type | Description |
code | number | Error code |
message | string | Error message |
const roomEngine = new TUIRoomEngine();roomEngine.on(TUIRoomEvents.onKickedOutOfRoom, ({ roomId, reason, message }) => {console.log('roomEngine.onKickedOutOfRoom', roomId, message);});
Parameter | Type | Description |
roomId | string | Room ID |
reason | Reason to kick user out | |
message | string | Message |
const roomEngine = new TUIRoomEngine();roomEngine.on(TUIRoomEvents.onKickedOffLine, ({ message }) => {console.log('roomEngine.onKickedOffLine', message);});
Parameter | Type | Description |
roomId | string | Room ID |
message | string | User enter room on other device |
const roomEngine = new TUIRoomEngine();roomEngine.on(TUIRoomEvents.onUserSigExpired, () => {console.log('roomEngine.onUserSigExpired');});
const roomEngine = new TUIRoomEngine();roomEngine.on(TUIRoomEvents.onRoomDismissed, ({ roomId }) => {console.log('roomEngine.onRoomDismissed', roomId);});
Parameter | Type | Description |
roomId | string | Room ID |
const roomEngine = new TUIRoomEngine();roomEngine.on(TUIRoomEvents.onRoomNameChanged, ({ roomId, roomName }) => {console.log('roomEngine.onRoomNameChanged', roomId, roomName);});
Parameter | Type | Description |
roomId | string | Room ID |
roomName | string | Room name |
const roomEngine = new TUIRoomEngine();roomEngine.on(TUIRoomEvents.onRoomSeatModeChanged, ({ roomId, seatMode }) => {console.log('roomEngine.onRoomSeatModeChanged', roomId, seatMode);});
Parameter | Type | Description |
roomId | string | Room ID |
seatMode | Room microphone seat mode |
const roomEngine = new TUIRoomEngine();roomEngine.on(TUIRoomEvents.onAllUserCameraDisableChanged, ({ isDisable }) => {console.log('roomEngine.onAllUserCameraDisableChanged', isDisable);});
Parameter | Type | Description |
isDisable | boolean | Whether to allow user open camera |
const roomEngine = new TUIRoomEngine();roomEngine.on(TUIRoomEvents.onAllUserMicrophoneDisableChanged, ({ isDisable }) => {console.log('roomEngine.onAllUserMicrophoneDisableChanged', isDisable);});
Parameter | Type | Description |
isDisable | boolean | Whether to allow user open microphone |
const roomEngine = new TUIRoomEngine();roomEngine.on(TUIRoomEvents.onSendMessageForAllUserDisableChanged, ({ isDisable }) => {console.log('roomEngine.onSendMessageForAllUserDisableChanged', isDisable);});
Parameter | Type | Description |
isDisable | boolean | Whether to allow user sending message |
const roomEngine = new TUIRoomEngine();roomEngine.on(TUIRoomEvents.onRoomMaxSeatCountChanged, ({ maxSeatNumber }) => {console.log('roomEngine.onRoomMaxSeatCountChanged', maxSeatNumber);});
Parameter | Type | Description |
maxSeatNumber | number | Maximum seats number |
const roomEngine = new TUIRoomEngine();roomEngine.on(TUIRoomEvents.onRemoteUserEnterRoom, ({ roomId, userInfo }) => {console.log('roomEngine.onRemoteUserEnterRoom', roomId, userInfo);});
Parameter | Type | Description |
roomId | string | Room ID |
userInfo | Remote user information |
const roomEngine = new TUIRoomEngine();roomEngine.on(TUIRoomEvents.onRemoteUserLeaveRoom, ({ roomId, userInfo }) => {console.log('roomEngine.onRemoteUserLeaveRoom', roomId, userInfo);});
Parameter | Type | Description |
roomId | string | Room ID |
userInfo | Remote user information |
const roomEngine = new TUIRoomEngine();roomEngine.on(TUIRoomEvents.onUserRoleChanged, ({ userId, userRole }) => {console.log('roomEngine.onUserRoleChanged', userId, userRole);});
Parameter | Type | Description |
userId | string | User ID |
userRole | New user role value |
const roomEngine = new TUIRoomEngine();roomEngine.on(TUIRoomEvents.onUserVideoStateChanged, ({ userId, streamType, hasVideo, reason }) => {console.log('roomEngine.onUserVideoStateChanged', userId, streamType, hasVideo, reason);});
Parameter | Type | Description |
userId | string | User ID |
streamType | User video stream type | |
hasVideo | boolean | Whether the video stream exists or not |
reason | Change reason, self-operation or room owner/administrator operation |
const roomEngine = new TUIRoomEngine();roomEngine.on(TUIRoomEvents.onUserAudioStateChanged, ({ userId, hasAudio, reason }) => {console.log('roomEngine.onUserAudioStateChanged', userId, hasAudio, reason);});
Parameter | Type | Description |
userId | string | User ID |
hasVideo | boolean | Whether the audio stream exists or not |
reason | Change reason, self-operation or room owner/administrator operation |
const roomEngine = new TUIRoomEngine();roomEngine.on(TUIRoomEvents.onSendMessageForAllUserDisableChanged, ({ isDisable }) => {console.log('roomEngine.onSendMessageForAllUserDisableChanged', isDisable);});
Parameter | Type | Description |
isDisable | boolean | Whether to all user sending message |
const roomEngine = new TUIRoomEngine();roomEngine.on(TUIRoomEvents.onUserVoiceVolumeChanged, ({ userVolumeList }) => {userVolumeList.forEach(userVolume => {console.log('roomEngine.onUserVoiceVolumeChanged', userVolume.userId, userVolume.volume);})});
Parameter | Type | Description |
userVolumes | The volume of all users in the room, including userId and volume information. The volume range is 1 to 100. |
const roomEngine = new TUIRoomEngine();roomEngine.on(TUIRoomEvents.onUserNetworkQualityChanged, ({ userNetworkList }) => {userNetworkList.forEach(userNetwork => {console.log('roomEngine.onUserNetworkQualityChanged', userNetwork.userId, userNetwork.quality, userNetwork.upLoss, userNetwork.downLoss, userNetwork.delay);})});
Parameter | Type | Description |
networkMap | The network quality information of all users in the room |
const roomEngine = new TUIRoomEngine();roomEngine.on(TUIRoomEvents.onSeatControlEnabled, ({ enabled, maxSeatNumber }) => {console.log('roomEngine.onSeatControlEnabled', enabled, maxSeatNumber);});
Parameter | Type | Description |
enabled | boolean | Whether to enabled |
maxSeatNumber | number | Maximum seats number |
const roomEngine = new TUIRoomEngine();roomEngine.on(TUIRoomEvents.onSeatListChanged, ({ seatList, seatedList, leftList }) => {console.log('roomEngine.onSeatListChanged',seatList, seatedList, leftList);});
Parameter | Type | Description |
seatList | Seats list | |
seatedList | Seats taken by users | |
leftList | Seats released by users |
const roomEngine = new TUIRoomEngine();roomEngine.on(TUIRoomEvents.onKickedOffSeat, ({ userId }) => {console.log('roomEngine.onKickedOffSeat', userId);});
Parameter | Type | Description |
userId | String | User ID |
const roomEngine = new TUIRoomEngine();roomEngine.on(TUIRoomEvents.onRequestReceived, ({ request }) => {console.log('roomEngine.onRequestReceived', request);});
Parameter | Type | Description |
request | Request information |
const roomEngine = new TUIRoomEngine();roomEngine.on(TUIRoomEvents.onRequestProcessed, ({ request }) => {console.log('roomEngine.onRequestProcessed', request);});
Parameter | Type | Description |
request | Request information |
const roomEngine = new TUIRoomEngine();roomEngine.on(TUIRoomEvents.onRequestCancelled, ({ requestId, userId }) => {console.log('roomEngine.onRequestCancelled', requestId, userId);});
Parameter | Type | Description |
requestId | string | Request ID |
userId | string | User ID who cancelled the request |
const roomEngine = new TUIRoomEngine();roomEngine.on(TUIRoomEvents.onDeviceChange, ({ deviceId, type, state }) => {console.log('roomEngine.onDeviceChange', deviceId, type, state);});
Parameter | Type | Description |
deviceId | string | Device ID |
type | Device type | |
state | Device status |
const roomEngine = new TUIRoomEngine();roomEngine.on(TUIRoomEvents.onUserScreenCaptureStopped, () => {console.log('roomEngine.onUserScreenCaptureStopped', deviceId, type, state);});
const roomEngine = new TUIRoomEngine();roomEngine.on(TUIRoomEvents.onScreenShareForAllUserDisableChanged, ({ isDisable }) => {console.log('roomEngine.onScreenShareForAllUserDisableChanged', isDisable);});
Was this page helpful?