Participant Class
Using Participant Class
The Participant Class
includes methods and events for participants and their associated video & audio streams, data channels and UI customization.
Properties
__properties
id
String
id of participantdisplayName
String
display name of participant
Properties
Methods
__methods
on(Events event, Function handler)
Function
participant event handlerstreams
Map<String, Stream>
Streams of participant i.e. audio stream, video stream and share streamenableWebcam()
Function
Request participant to enable webcam the participantdisableWebcam()
Function
Disable webcam of the participantenableMic()
Function
Request participant to enable mic the participantdisableMic()
Function
Disable mic of the participantsetQuality(<quality>)'low' | 'med' | 'high'
Function
Set video quality of the participantremove()
Function
Remove the participant from meeting session
Methods
Events
__events
streamEnabled
Stream
This event will be emitted when any stream i.e. audio, video or sharescreen, of the participant is enabled.streamDisabled
Stream
This event will be emitted when any stream i.e. audio, video or sharescreen, of the participant is disabled.streamPaused
Stream
This event will be emitted when any stream i.e. audio, video or sharescreen, of the participant is paused.streamResumed
Stream
This event will be emitted when any stream i.e. audio, video or sharescreen, of the participant is resumed.
Events
Example
Play with Participant instance
// get displayName
participant.displayName;
// Set video quality of that participant to low
participant.setQuality("low");
// Adding event listeners in participant
participant.on(Events.streamEnabled, (Stream stream) {
// this stream is enabled
});
participant.on(Events.streamDisabled, (Stream stream) {
// this stream is disabled
});
Got a Question? Ask us on discord