Customize Audio/Video - Prebuilt
We now have the option to customize the audio, video and screen sharing. This feature is used to pass resolution, optimization mode for associated audio, video, and screen sharing configuration.
Three different configurations will be covered in this guide.
Custom Video Config
This feature can be used to add custom video resolution, optimization mode (whether you want to focus on motion, text or detail of the video).
Custom Video Attributes
-
videoConfig.resolution
- You can setresolution
value toh360p_w640p
,h540p_w960p
,h720p_w1280p
, orh1080p_w1920p
, by default the resolution is set toh360p_w640p
. If you want to know more values of resolution then checkout this Prebuilt SDK Referenece. -
videoConfig.optimizationMode
- You can focus on optimization by providing specific mode of the video (i.e. text, motion, etc.) to theoptimizationMode
, by default is set tomotion
. -
videoConfig.multiStream
- If it is true, multiple resolution layers are send in single video stream. If it is false, then only single resolution layer is send in video stream, by default is set to true.
- For meetings with fewer than or equal to four participants, setting
multiStream:false
is regarded as best practice. - This parameter is only available from v0.3.29.
const config = {
// ...
videoConfig: {
resolution: "h720p_w1280p", //h360p_w640p, h540p_w960p, h1080p_w1920p
optimizationMode: "motion", // text , detail
multiStream: true,
},
// ...
};
How it works ?
- The network icon of the user video tile, as seen below, will display the video resolution configuration that you have specified.
Custom Audio Config
This feature can be used to set the quality of audio and send it to other participants.
Custom Audio Attributes
audioConfig.quality
- You can setquality
value tospeech_low_quality
,speech_standard
orhigh_quality
, by default quality is set tospeech_standard
. If you want to know more values of quality then checkout this Prebuilt SDK Referenece.
const config = {
// ...
audioConfig: {
quality: "speech_standard", //speech_low_quality , high_quality
},
// ...
};
Custom Screen Share Config
This feature can be used to add custom screen sharing resolution, optimization mode (whether you want to focus on motion, text or detail of the video) and send it to other participants.
Custom Screen Share Attributes
-
screenShareConfig.resolution
- You can setresolution
value toh360p_30fps
,h720p_5fps
orh1080p_15fps
of screen shared video , by default resolution is set toh720p_15fps
. If you want to know more values of resolution then checkout this Prebuilt SDK Referenece. -
screenShareConfig.optimizationMode
- You can focus on optimization by providing specific mode of the video (i.e. text, motion, etc.) to theoptimizationMode
, by default is set tomotion
.
const config = {
// ...
screenShareConfig: {
resolution: "h720p_15fps", // h360p_30fps , h720p_5fps, h1080p_15fps
optimizationMode: "text", // motion , detail
},
// ...
};
Got a Question? Ask us on discord