CameraCapturerUtils

object CameraCapturerUtils

Various utils for handling camera capturers.

Types

CameraProvider
Link copied to clipboard
interface CameraProvider

Functions

createCameraCapturer
Link copied to clipboard
fun createCameraCapturer(context: Context, options: LocalVideoTrackOptions): Pair<VideoCapturer, LocalVideoTrackOptions>?
Creates a Camera capturer.
createCameraEnumerator
Link copied to clipboard
fun createCameraEnumerator(context: Context): CameraEnumerator
Obtain a CameraEnumerator based on platform capabilities.
findCamera
Link copied to clipboard
fun CameraEnumerator.findCamera(predicate: (deviceName: String) -> Boolean): String?
Finds the device id of a camera that matches the predicate.
fun CameraEnumerator.findCamera(deviceId: String? = null, position: CameraPosition? = null, fallback: Boolean = true): String?
Finds the device id of first available camera based on the criteria given.
getCameraPosition
Link copied to clipboard
fun CameraEnumerator.getCameraPosition(deviceName: String?): CameraPosition?
Returns the camera position of a camera, or null if neither front or back facing (e.g.
registerCameraProvider
Link copied to clipboard
fun registerCameraProvider(cameraProvider: CameraCapturerUtils.CameraProvider)
Register external camera provider
unregisterCameraProvider
Link copied to clipboard
fun unregisterCameraProvider(cameraProvider: CameraCapturerUtils.CameraProvider)
Unregister external camera provider

Sources

SDK source
Link copied to clipboard