Set Video Quality - Javascript
-
Set Video Quality feature allows participants to set other participant's video quality during the meeting.
-
Participant
class provides thesetQuality()
method to set participant's video quality.
const participant = meeting.participants.get("PARTICIPANT_ID");
const onPressed = () => {
// Set low quality
participant.setQuality("low");
// Set medium quality
participant.setQuality("med");
// Set high quality
participant.setQuality("high");
};
note
If the quality is set to high, but there is not enough network bandwidth available, quality will reduce untill the newtwork quality improves.
Event
video-quality-changed
-
video-quality-changed
is a callback which gets triggered whenever a participant's video quality changes. -
currentQuality
andprevQuality
can have valuesHIGH
|MEDIUM
|LOW
.
Example
participant.on("video-quality-changed", (data) => {
const { currentQuality, prevQuality } = data;
//
});
Got a Question? Ask us on discord