CameraManager

class CameraManager(val mediaManager: MediaManagerImpl, val eglBaseContext: EglBase.Context, defaultCameraDirection: CameraDirection = CameraDirection.Front)

The CameraManager class makes it easy to manage the camera for your video call

Samples

Constructors

Link copied to clipboard
constructor(mediaManager: MediaManagerImpl, eglBaseContext: EglBase.Context, defaultCameraDirection: CameraDirection = CameraDirection.Front)

Properties

Link copied to clipboard
val availableResolutions: StateFlow<List<CameraEnumerationAndroid.CaptureFormat>>
Link copied to clipboard
val direction: StateFlow<CameraDirection>
Link copied to clipboard
val eglBaseContext: EglBase.Context
Link copied to clipboard
val isEnabled: StateFlow<Boolean>

Represents whether the camera is enabled

Link copied to clipboard
Link copied to clipboard
val resolution: StateFlow<CameraEnumerationAndroid.CaptureFormat?>
Link copied to clipboard
Link copied to clipboard
val status: StateFlow<DeviceStatus>

Functions

Link copied to clipboard
fun cleanup()
Link copied to clipboard
fun disable(fromUser: Boolean = true)
Link copied to clipboard
fun flip()

Flips the camera

Link copied to clipboard
Link copied to clipboard
fun pause(fromUser: Boolean = true)
Link copied to clipboard
fun resume(fromUser: Boolean = true)
Link copied to clipboard
fun select(deviceId: String, triggeredByFlip: Boolean = false)
Link copied to clipboard
fun setDirection(cameraDirection: CameraDirection)
Link copied to clipboard
fun setEnabled(enabled: Boolean, fromUser: Boolean = true)