Skip to content

Instantly share code, notes, and snippets.

@ktoraskartwilio
Created March 1, 2017 18:56
Show Gist options
  • Save ktoraskartwilio/e1910ed1ced9f0290db9693a36119cf5 to your computer and use it in GitHub Desktop.
Save ktoraskartwilio/e1910ed1ced9f0290db9693a36119cf5 to your computer and use it in GitHub Desktop.
Twilio Programmable Video - Setting Video Constraints on Android
LocalMedia localMedia = LocalMedia.create(context);
VideoConstraints videoConstraints = new VideoConstraints.Builder()
.minVideoDimensions(new VideoDimensions(320, 180))
.maxVideoDimensions(new VideoDimensions(640, 360))
.minFps(5)
.maxFps(15)
.build();
CameraCapturer cameraCapturer = new CameraCapturer(this, CameraCapturer.CameraSource.FRONT_CAMERA);
cameraVideoTrack = localMedia.addVideoTrack(true, cameraCapturer, videoConstraints);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment