This documentation is for reference only. We are no longer onboarding new customers to Programmable Video. Existing customers can continue to use the product until December 5, 2026.
We recommend migrating your application to the API provided by our preferred video partner, Zoom. We've prepared this migration guide to assist you in minimizing any service disruption.
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.
_20// Create camera capturer_20CameraCapturer cameraCapturer = new CameraCapturer(context, _20 CameraCapturer.CameraSource.FRONT_CAMERA);_20_20// Setup video constraints_20VideoConstraints videoConstraints = new VideoConstraints.Builder()_20 .aspectRatio(VideoConstraints.ASPECT_RATIO_16_9)_20 .minVideoDimensions(VideoDimensions.CIF_VIDEO_DIMENSIONS)_20 .maxVideoDimensions(VideoDimensions.HD_720P_VIDEO_DIMENSIONS)_20 .minFps(5)_20 .maxFps(24)_20 .build();_20_20// Add a video track with constraints_20LocalVideoTrack localVideoTrack = LocalVideoTrack.create(context, true, cameraCapturer, videoConstraints);_20_20// If the constraints are not satisfied a null track will be returned_20if (localVideoTrack == null) {_20 Log.e(TAG, "Unable to satisfy constraints);_20}