You can customize the video capture by setting video constraints on a local video track. Setting constraints, lets you optimize the video track to network and device conditions. You can set size constraints, frame rate constraints or the aspect ratio constraints of your choice. Note that video constraints are used to resolve the capture format, but the actual video sent to Participant may be downscaled temporally or spatially in response to network and device conditions.
1// Create camera capturer2CameraCapturer cameraCapturer = new CameraCapturer(context,3CameraCapturer.CameraSource.FRONT_CAMERA);45// Setup video constraints6VideoConstraints videoConstraints = new VideoConstraints.Builder()7.aspectRatio(VideoConstraints.ASPECT_RATIO_16_9)8.minVideoDimensions(VideoDimensions.CIF_VIDEO_DIMENSIONS)9.maxVideoDimensions(VideoDimensions.HD_720P_VIDEO_DIMENSIONS)10.minFps(5)11.maxFps(24)12.build();1314// Add a video track with constraints15LocalVideoTrack localVideoTrack = LocalVideoTrack.create(context, true, cameraCapturer, videoConstraints);1617// If the constraints are not satisfied a null track will be returned18if (localVideoTrack == null) {19Log.e(TAG, "Unable to satisfy constraints);20}