Optional
cameraSpecifies the camera ID.
You can get a list of the available cameras by calling [AgoraRTC.getCameras]IAgoraRTC.getCameras.
Optional
encoderThe video encoder configurations.
You can set the video encoder configurations in either of the following ways:
"480p_1"
(resolution: 640 × 480, frame rate: 15 fps, bitrate: 500 Kbps).Optional
facingWhether to user the front camera or the rear camera.
You can use this parameter to choose between the front camera and the rear camera on a mobile device:
"user"
: The front camera."environment"
: The rear camera.Optional
optimization
4.2.0
Sets the video transmission optimization mode.
You can call this method during a video call, a live streaming or screen sharing to dynamically change the optimization mode. For example, during the screen sharing, before you change the shared content from text to video, you can change the optimization mode from "detail"
to "motion"
to ensure smoothness in poor network conditions.
Note: This method supports Chrome only.
The video transmission optimization mode:
"detail"
: Prioritizes video quality."motion"
: Since 4.21.0, the SDK prioritizes video smoothness.
Configurations for the video track from the video captured by a camera. Set these configurations when calling [AgoraRTC.createCameraVideoTrack]IAgoraRTC.createCameraVideoTrack.