set Quality
Asks the server for a different simulcast layer of this participant's camera — drop a thumbnail tile to VideoQuality.LOW to save bandwidth, raise the speaker to VideoQuality.HIGH.
videoQuality starts at VideoQuality.LOW, and the first call always reaches the server, whatever its value. Call setQuality(VideoQuality.HIGH) from onStreamEnabled for a participant you show large.
Does nothing on yourself, and nothing when the value matches the last one sent, so calling it on every layout pass is free. A call that throws stores nothing, so its retry is sent. Screen share has its own setScreenShareQuality.
Code Example:
override fun onStreamEnabled(stream: RTCStream) {
if (stream.kind == MediaType.VIDEO) {
lifecycleScope.launch { participant.setQuality(VideoQuality.HIGH) }
}
}Parameters
the layer to receive.
Throws
code 3068 (ERROR_ACTION_NOT_SUPPORTED) if this device is not receiving their camera, or code 4073 (SET_QUALITY_FAILED) if the server refuses.