Events
We provide a robust event system that allows you to listen for specific events and execute callback functions based on them. Below is a list of events available within the SDK:
Event Name | Description |
---|---|
lobby:joined | triggers when lobby is successfully joined after calling @joinLobby() method |
lobby:failed | triggers when @joinLobby() method fails,reason for failing can be found in @error |
lobby:metadata | triggers when @joinLobby() method succeeds and presents you with the metadata of peers inside the room |
lobby:cam-on | triggers when Camera has successfully loaded after calling @fetchVideoStream() |
lobby:cam-off | triggers when Video Stream has successfully stopped after calling @stopVideoStream() |
lobby:mic-on | triggers when Mic has successfully loaded after calling @fetchAudioStream() |
lobby:mic-off | triggers when Audio Stream has successfully stopped after calling @stopAudioStream() |
room:joined | triggers when room is successfully joined after calling the @joinRoom() method |
room:failed | triggers when @joinRoom() method fails, reason for failing can be found in @error |
room:new-peer | triggers when a new participant joins the room, the @peerIds[] array gets updated when this happens |
room:peer-left | triggers when a participant leaves the room, the @peerIds[] array gets updated when this happens |
room:recording-started | triggers when a recording has started in the room, @inProgress will turn to true |
room:recording-stopped | triggers when a recording has stopped in the room, @inProgress will turn to false |
room:livestream-started | triggers when a livestream has started in the room, @inProgress will turn to true |
room:livestream-stopped | triggers when the livestream has started in the room, @inProgress will turn to false |
App states
The following are the three app states that your app can be in at any given point:
- Idle: The client has not been initialized yet, so no methods can be invoked at this stage.
- initialized: The client has been initialized and is ready for you to invoke the joinLobby() method.
- Lobby: The user has joined the lobby and is ready to join a room or perform other lobby-related actions.
- Room: The user has entered the meeting room and is ready has access to meeting-room controls.