DyteClient
The DyteClient class is the main class of this library.
An object of the DyteClient class can be created using
await initMeeting({ ... })
. Typically, an object of DyteClient
is
named meeting
.
initMeeting(options)
The initMeeting
method can be used to instantiate the DyteClient class.
This returns an instance of DyteClient, which can be used to perform
actions on the meeting.
Param | Description |
---|---|
options | The options object. |
options.authToken | The authorization token received using the API. |
options.apiBase | The base URL of the API. |
options.defaults | The default audio and video settings. |
meeting.participants
The participants
object consists of 4 maps of participants,
waitlisted
, joined
, active
, pinned
. The maps are indexed by
peerId
s, and the values are the corresponding participant objects.
meeting.self
The self
object can be used to manipulate audio and video settings,
and other configurations for the local participant. This exposes methods
to enable and disable media tracks, share the user's screen, etc.
meeting.meta
The room
object stores information about the current meeting, such
as chat messages, polls, room name, etc.
meeting.ai
The ai
object is used to interface with Dyte's AI features.
You can obtain the live meeting transcript and use other meeting AI
features such as summary, and agenda using this object.
meeting.plugins
The plugins
object stores information about the plugins available in
the current meeting. It exposes methods to activate and deactivate them.
meeting.chat
The chat object stores the chat messages that were sent in the meeting. This includes text messages, images, and files.
meeting.polls
The polls object stores the polls that were initiated in the meeting. It exposes methods to create and vote on polls.
meeting.remote
The remote object stores the remote control requests for the meeting. It exposes methods to request, accept and end the remote control.
meeting.connectedMeetings
The connectedMeetings object stores the connected meetings states. It exposes methods to create/read/update/delete methods for connected meetings.
meeting.join()
The join()
method can be used to join the meeting. A roomJoined
event
is emitted on self
when the room is joined successfully.
meeting.leave()
The leave()
method can be used to leave a meeting.
meeting.joinRoom()
Deprecated
The joinRoom()
method can be used to join the meeting. A roomJoined
event
is emitted on self
when the room is joined successfully.
meeting.leaveRoom()
Deprecated
The leaveRoom()
method can be used to leave a meeting.