API reference

CameraState Enum

Extends Sendable
Represents the current lifecycle state of a Camera capability.
Modeled on StreamState so the parent camera capability reports its lifecycle with the same vocabulary as its child features. A camera becomes started once it is attached to a started session, and transitions through stopping to stopped when it (or the owning session) is stopped. Child features are only usable while the camera is started.

Signature

enum CameraState: Sendable

Enumeration Constants

MemberDescription
starting
The camera is in the process of starting up. Reserved for parity with StreamState and future asynchronous start paths. A camera is currently created already-attached to a started session (see DeviceSession/addCamera(config:)), so it enters started directly and this case is not emitted today.
started
The camera is attached to a started session; its child features can be used.
stopping
The camera is in the process of stopping.
stopped
The camera is stopped and detached from its session.