OptionalcausedBy?: ParticipantThe Participant instance of the participant whose joining triggered the codec change.
The new codec that the room switched to after the change.
The media type for which the codec changed.
The codec that was in use before the change.
The codec that the newly joined participant did not support, which triggered the switch.
Whether the frame was sent on the reliable channel.
Timestamp (in milliseconds since epoch) when the message was sent.
ask_join permission.allow_join permission.Call this function to allow the participant to join the room.
Call this function to deny the participant’s request.
Display name of the participant requesting to join.
Unique ID of the participant requesting to join the room.
join() request is responded to with an allow or deny decision.This event is emitted to:
allow_join permission.ID of the participant who requested to join the room.
The final decision for the join request.
Possible values:
"allowed" – The participant was allowed to join."denied" – The participant was denied entry.Numeric error code representing the type of error.
Human-readable description of the error.
Live HLS without playback support
Live HLS with playback support
Possible values:
HLS_STARTING - Hls is in starting phase and hasn't started yet.HLS_STARTED- Hls has started successfully will return playbackHlsUrl and livestreamUrl.HLS_PLAYABLE - Hls has started and the playbackHlsUrl and livestreamUrl is now playable.HLS_STOPPING - Hls is in stopping phase and hasn't stopped yet.HLS_STOPPED- Hls has stopped successfully.Possible values:
LIVESTREAM_STARTING - Livestream is in starting phase and hasn't started yet.LIVESTREAM_STARTED - Livestream has started successfully.LIVESTREAM_STOPPING - Livestream is in stopping phase and hasn't stopped yet.LIVESTREAM_STOPPED - Livestream has stopped successfully.Description of the error.
ID of the room where the error occurred.
Call this function to accept the media relay request.
Display name of the participant requesting the media relay.
ID of the participant who initiated the media relay request.
Call this function to reject the media relay request.
ID of the room from which the media relay request originated.
ID of the participant who decided the decision.
Decision taken for the request.
ID of the participant who responded to the media relay request.
ID of the room where the media relay has started.
Reason why the media relay stopped.
ID of the room where the media relay stopped.
B when any other participant A requests to enable mic of participant B.B will be enabled.Call this function to accept the request and enable your microphone.
ID of the participant who requested to enable your microphone.
Call this function to reject the request.
The Participant instance representing the newly joined participant.
reason object is provided that describes why the participant left.Possible reason codes:
| Reason | Code | Description |
|---|---|---|
| WEBSOCKET_DISCONNECTED | 1001 | Socket disconnected |
| REMOVE_PEER | 1002 | Participant was removed from the room |
| REMOVE_PEER_VIEWER_MODE_CHANGED | 1003 | Participant removed because viewer mode was changed |
| REMOVE_PEER_MEDIA_RELAY_STOP | 1004 | Participant removed because media relay was stopped |
| SWITCH_ROOM | 1005 | Participant switched to a different room |
| ROOM_CLOSE | 1006 | The room has been closed |
| UNKNOWN | 1007 | Participant disconnected due to an unknown reason |
| REMOVE_ALL | 1008 | Remove All from the room |
| MEETING_END_API | 1009 | Room Ended. |
| REMOVE_PEER_API | 1010 | Participant removed from the room |
| DUPLICATE_PARTICIPANT | 1011 | Leaving room, since this participantId joined from another device. |
| MANUAL_LEAVE_CALLED | 1101 | Participant manually called the leave() method to exit the room |
| WEBSOCKET_CONNECTION_ATTEMPTS_EXHAUSTED | 1102 | Room left after multiple failed websocket connection attempts. |
| JOIN_ROOM_FAILED | 1103 | Room left due to an error while joining the room. |
| SWITCH_ROOM_FAILED | 1104 | Room left due to an error while switching rooms. |
The Participant instance who left the room.
An object describing the reason and corresponding code.
The new mode of the participant. Possible values are defined in Mode.
ID of the participant whose mode has changed.
Indicates which media type was paused:
"audio" – Audio streams"video" – Video streams"share" – Screen-share video streamsID of the participant whose pin state changed.
ID of the participant who performed the pin or unpin action.
Current pin state (true if pinned, false if unpinned).
null.ID of the participant currently presenting, or null if no one is presenting.
This callback is triggered when a quality limitation is detected or resolved during the room.
Triggered when a quality limitation is detected or resolved during the room.
Indicates whether the limitation is currently active or resolved.
Time (in milliseconds since epoch) when the event occurred.
Specifies the type of limitation.
The current recording state:
RECORDING_STARTING - Recording is in starting phase and hasn't started yet.RECORDING_STARTED - Recording has started successfully.RECORDING_STOPPING - Recording is in stopping phase and hasn't stopped yet.RECORDING_STOPPED - Recording has stopped successfully.Indicates which media type was resumed:
"audio" – Audio streams"video" – Video streams"share" – Screen-share video streamsreason object is also provided that explains why the participant left the room.The table below lists the possible reason codes:
| Reason | Code | Description |
|---|---|---|
| WEBSOCKET_DISCONNECTED | 1001 | Socket disconnected |
| REMOVE_PEER | 1002 | Participant was removed from the room |
| REMOVE_PEER_VIEWER_MODE_CHANGED | 1003 | Participant removed due to viewer mode change |
| REMOVE_PEER_MEDIA_RELAY_STOP | 1004 | Participant removed because media relay was stopped |
| SWITCH_ROOM | 1005 | Participant switched to another room |
| ROOM_CLOSE | 1006 | The room was closed |
| UNKNOWN | 1007 | Participant disconnected due to an unknown reason |
| REMOVE_ALL | 1008 | All participants were removed |
| MEETING_END_API | 1009 | Room ended programmatically |
| REMOVE_PEER_API | 1010 | Participant removed via API |
| DUPLICATE_PARTICIPANT | 1011 | Participant joined from another device |
| MANUAL_LEAVE_CALLED | 1101 | Participant manually left the room |
| WEBSOCKET_CONNECTION_ATTEMPTS_EXHAUSTED | 1102 | WebSocket connection retries exhausted |
| JOIN_ROOM_FAILED | 1103 | Failed to join the room |
| SWITCH_ROOM_FAILED | 1104 | Failed to switch rooms |
Object containing the reason and corresponding code.
The current room state. Possible values:
CONNECTINGCONNECTEDRECONNECTINGDISCONNECTEDFAILEDnull is returned.ID of the currently active speaker, or null if no one is speaking.
B when any other participant A requests to enable webcam of participant B.B will be enabled.Call this function to accept the request and enable your webcam.
ID of the participant who requested to enable your webcam.
Call this function to reject the request.
A React component that subscribes to context changes and stays updated with the room instance, participants, and streams.
It requires a function as child, which receives the current context value and returns a React node.
Example