Camera Capture
startCameraCapture
Starts video capture.
public abstract int startCameraCapture(Constants.VideoSourceType sourceType, CameraCapturerConfiguration config);
You can call this method and specify the sourceType to start capturing video from one or more cameras.
Note: On Android devices, if the device has multiple cameras or supports external cameras, you can capture video from up to 4 cameras.
Parameters
- sourceType
- The type of video source. See VideoSourceType.
Note: On Android devices, if the device has multiple cameras or supports external cameras, you can capture video from up to 4 cameras.
- config
- Video capture configuration. See CameraCapturerConfiguration.
Return Values
- 0: Success.
- < 0: Failure.
stopCameraCapture
Stops camera capture.
public abstract int stopCameraCapture(Constants.VideoSourceType sourceType);
You can call stopCameraCapture and set the sourceType parameter to stop video capture from the specified camera.
Note: If you are using local video composition, calling this method may interrupt the composition.
Parameters
- sourceType
- The type of video source. See VideoSourceType.
Return Values
- 0: Success.
- < 0: Failure.