set Webcam Quality
Caps the quality of the camera stream the local participant is sending.
Applies to the stream already on air. VideoQuality.HIGH sends every layer, VideoQuality.MEDIUM stops the largest one and VideoQuality.LOW sends only the smallest, so remote participants receive at most that quality. A camera sending a single layer (multiStream off, or a non-VP8 VideoCodec) is unaffected. The cap stays in force after the camera is disabled and enabled again.
When the room was created with dynaCast on, the stream may also drop lower while no remote participant is watching the larger layers, but never goes above this cap.
Requires a joined room. Called before joining or while reconnecting, it reports code 3035 (ERROR_ACTION_PERFORMED_BEFORE_ROOM_JOINED) or 3065 (ERROR_ROOM_RECONNECTING) to RoomEventListener.onError and returns without throwing.
Code Example:
lifecycleScope.launch {
try {
room.setWebcamQuality(VideoQuality.LOW)
} catch (e: VideoSDKException) {
showError(e.message)
}
}Parameters
the highest layer to send.
See also
Throws
code 3062 (ERROR_WEBCAM_NOT_ENABLED) if the camera is not enabled, or code 3063 (ERROR_SET_WEBCAM_QUALITY_FAILED) if the cap could not be applied