Set Participant Video Quality - Android
This feature allows participants to set other participants' video quality during the meeting.
info
setQuality() picks one of the simulcast layers that a participant's webcam publishes, so it only has an effect when that participant publishes with multiStream on. In the Android SDK, multiStream is on by default. A webcam sent with a codec other than VP8 publishes a single layer.
To know more about simulcast visit here
Set Quality
setQualitymethod will acceptlow,medorhighas string parameter. Any other value throwsIllegalArgumentException.- It is a
suspendfunction, so call it from a coroutine.
private fun setQuality() {
lifecycleScope.launch {
// copy the participants: the map changes as participants join and leave
for (participant in meeting.participants.values.toList()) {
try {
participant.setQuality("low")
//or
participant.setQuality("med")
//or
participant.setQuality("high")
} catch (e: VideoSDKException) {
Log.e("VideoSDK", "setQuality failed: ${e.code} ${e.name}")
}
}
}
}
Got a Question? Ask us on discord

