@camera.ui/sdk / camera / CameraDevice
Interface: CameraDevice
Defined in: camera/device.ts:86
Main camera device interface. Provides access to camera streams, sensors, and services.
Properties
connected
readonlyconnected:boolean
Defined in: camera/device.ts:134
Whether camera is connected.
detectionSettings
readonlydetectionSettings:CameraDetectionSettings
Defined in: camera/device.ts:110
Detection settings.
disabled
readonlydisabled:boolean
Defined in: camera/device.ts:94
Whether camera is disabled.
frameWorkerConnected
readonlyframeWorkerConnected:boolean
Defined in: camera/device.ts:136
Whether frame worker is connected.
frameWorkerSettings
readonlyframeWorkerSettings:CameraFrameWorkerSettings
Defined in: camera/device.ts:118
Frame worker settings.
highResolutionSource
readonlyhighResolutionSource:CameraDeviceSource|undefined
Defined in: camera/device.ts:126
High resolution source (if available).
id
readonlyid:string
Defined in: camera/device.ts:88
Unique camera ID.
info
readonlyinfo:CameraInformation
Defined in: camera/device.ts:104
Camera hardware information.
interfaceSettings
readonlyinterfaceSettings:CameraUiSettings
Defined in: camera/device.ts:120
UI display settings.
isCloud
readonlyisCloud:boolean
Defined in: camera/device.ts:106
Whether camera streams from cloud.
logger
readonlylogger:LoggerService
Defined in: camera/device.ts:144
Logger service for this camera.
lowResolutionSource
readonlylowResolutionSource:CameraDeviceSource|undefined
Defined in: camera/device.ts:130
Low resolution source (if available).
midResolutionSource
readonlymidResolutionSource:CameraDeviceSource|undefined
Defined in: camera/device.ts:128
Mid resolution source (if available).
name
readonlyname:string
Defined in: camera/device.ts:96
Camera display name.
nativeId
readonlynativeId:string|undefined
Defined in: camera/device.ts:90
Native device ID from plugin.
onConnected
readonlyonConnected:Observable<boolean>
Defined in: camera/device.ts:138
Observable for connection state changes.
onDetectionEvent
readonlyonDetectionEvent:Observable<{event:DetectionEvent;type:DetectionEventType; }>
Defined in: camera/device.ts:142
Observable for detection events. Segments ride on the 'segment-*' messages only, thumbnails on 'segment-start' and 'segment-end'.
onFrameWorkerConnected
readonlyonFrameWorkerConnected:Observable<boolean>
Defined in: camera/device.ts:140
Observable for frame worker state changes.
pluginInfo
readonlypluginInfo:CameraPluginInfo|undefined
Defined in: camera/device.ts:92
Source plugin information.
ptzAutotrack
readonlyptzAutotrack:PtzAutotrackSettings
Defined in: camera/device.ts:112
PTZ autotracking settings.
recordingSettings
readonlyrecordingSettings:CameraRecordingSettings
Defined in: camera/device.ts:114
Recording settings.
room
readonlyroom:string
Defined in: camera/device.ts:98
Room this camera belongs to.
snapshotSettings
readonlysnapshotSettings:SnapshotSettings
Defined in: camera/device.ts:102
Snapshot settings.
snapshotSource
readonlysnapshotSource:CameraSource|undefined
Defined in: camera/device.ts:132
Snapshot source (if available).
snooze
readonlysnooze:boolean
Defined in: camera/device.ts:116
Whether detections are snoozed (paused).
sources
readonlysources:CameraDeviceSource[]
Defined in: camera/device.ts:122
All video sources.
streamSource
readonlystreamSource:CameraDeviceSource
Defined in: camera/device.ts:124
Primary streaming source.
type
readonlytype:CameraType
Defined in: camera/device.ts:100
Camera type (camera/doorbell).
zones
readonlyzones:CameraZones
Defined in: camera/device.ts:108
Zone configurations, one list per purpose.
Methods
addSensor()
addSensor<
T>(sensor):Promise<void>
Defined in: camera/device.ts:195
Register a sensor that belongs to this camera's hardware (spotlight, siren, PTZ, battery, ...). The host assigns it to this camera and reconciles it across restarts like a standalone sensor.
Registering here declares "this sensor belongs to this camera and no other": the assignment is locked, users cannot re-assign it. For sensors the user should assign freely, register via sensorManager.addSensor() instead.
Type Parameters
T
T extends object
Parameters
sensor
Sensor<T>
Sensor instance to register
Returns
Promise<void>
connect()
connect():
Promise<void>
Defined in: camera/device.ts:168
Tell the server this camera is online. Only the plugin that owns this camera (via pluginInfo) may connect it.
Returns
Promise<void>
createStorage()
createStorage<
T>(schemas):DeviceStorage<T>
Defined in: camera/device.ts:162
Create storage for plugin-specific camera configuration.
Type Parameters
T
T extends Record<string, any> = Record<string, any>
Parameters
schemas
Schema definitions for the storage
Returns
Typed device storage instance
disconnect()
disconnect():
Promise<void>
Defined in: camera/device.ts:174
Tell the server this camera is offline. Only the plugin that owns this camera (via pluginInfo) may disconnect it.
Returns
Promise<void>
getSourceById()
getSourceById(
id):CameraDeviceSource|undefined
Defined in: camera/device.ts:153
Get a source by its ID.
Parameters
id
string
The source ID
Returns
CameraDeviceSource | undefined
The matching source, or undefined if not found
implement()
implement(
impl):Promise<void>
Defined in: camera/device.ts:211
Register a camera implementation for streaming and/or snapshot. The impl value should implement StreamingInterface, SnapshotInterface, or both.
Parameters
impl
Object or class implementing camera interfaces
Returns
Promise<void>
onPropertyChange()
onPropertyChange<
T>(property):Observable<{newData:Camera[T];oldData:Camera[T];property:T; }>
Defined in: camera/device.ts:183
Observe camera property changes.
Type Parameters
T
T extends keyof Camera
Parameters
property
T | T[]
Property name(s) to observe
Returns
Observable<{ newData: Camera[T]; oldData: Camera[T]; property: T; }>
Observable emitting old and new values
removeSensor()
removeSensor(
sensorId):Promise<void>
Defined in: camera/device.ts:203
Unregister a sensor this plugin registered on this camera. The persisted entity stays (shows disconnected) unless the user deletes it.
Parameters
sensorId
string
ID of sensor to unregister
Returns
Promise<void>