CamSelector

actual class CamSelector

Camera Selector.

Defines criteria for selecting a specific camera based on its position (Front/Back) and lens type (e.g., Wide, UltraWide, Telephoto).

This class wraps the internal CameraSelector from CameraX to provide a unified selector.

See also

expect class CamSelector

Selector used to choose the camera sensor (Front/Back) and lens type (Wide, UltraWide, etc).

This class encapsulates the criteria for selecting a camera device. It primarily determines which direction the camera faces (CamPosition) and which lens configurations are preferred (CamLensType).

See also

actual class CamSelector

Constructors

Link copied to clipboard
actual constructor(camPosition: CamPosition, camLensTypes: List<CamLensType>)
actual constructor(cameraDevice: CameraDevice)
expect constructor(camPosition: CamPosition, camLensTypes: List<CamLensType> = listOf(CamLensType.Wide))
expect constructor(cameraDevice: CameraDevice)
actual constructor(camPosition: CamPosition, camLensTypes: List<CamLensType>)
actual constructor(cameraDevice: CameraDevice)

Types

Link copied to clipboard
actual object Companion
expect object Companion
actual object Companion

Properties

Link copied to clipboard

A list of preferred lens types (e.g., CamLensType.Wide, CamLensType.Telephoto). Defaults to a list containing only CamLensType.Wide.

Link copied to clipboard

The position of the camera (e.g., CamPosition.Front or CamPosition.Back).

Link copied to clipboard

Returns a new CamSelector with the inverted camera position (Front to Back, or Back to Front) while maintaining the same preferred lens types.

Functions

Link copied to clipboard
actual open operator override fun equals(other: Any?): Boolean
expect open operator override fun equals(other: Any?): Boolean
actual open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
actual open override fun hashCode(): Int
expect open override fun hashCode(): Int
actual open override fun hashCode(): Int
Link copied to clipboard
actual open override fun toString(): String
expect open override fun toString(): String
actual open override fun toString(): String