CameraInfo

actual class CameraInfo
expect class CameraInfo

Camera information holder for the active camera session.

This class exposes a reactive state stream with the latest camera capabilities and availability data represented as CameraInfoState.

actual class CameraInfo

Properties

Link copied to clipboard
actual val state: StateFlow<CameraInfoState>
expect val state: StateFlow<CameraInfoState>

Reactive stream of the current camera capability state.

actual val state: StateFlow<CameraInfoState>

Functions

Link copied to clipboard
fun CameraInfo.collectStateWithLifecycle(lifecycle: Lifecycle, minActiveState: Lifecycle.State = Lifecycle.State.STARTED, context: CoroutineContext = EmptyCoroutineContext): State<CameraInfoState>

Collects CameraInfo.state as Compose State, scoped to the provided Lifecycle.

fun CameraInfo.collectStateWithLifecycle(lifecycleOwner: LifecycleOwner = LocalLifecycleOwner.current, minActiveState: Lifecycle.State = Lifecycle.State.STARTED, context: CoroutineContext = EmptyCoroutineContext): State<CameraInfoState>

Collects CameraInfo.state as Compose State, scoped to the provided LifecycleOwner.