@camera.ui/sdk / camera / CameraSource
Interface: CameraSource
Defined in: camera/device.ts:14
Camera source with snapshot and probe capabilities.
Extends
Extended by
Properties
_id
readonly_id:string
Defined in: camera/config.ts:23
Unique source ID.
Inherited from
audioCodecs?
optionalaudioCodecs?:AudioCodec[]
Defined in: camera/config.ts:41
Probed audio codecs of this source (camera to client, deduplicated, in track order). Filled by the server once the stream has been probed; absent until then.
Inherited from
backchannelAudioCodec?
optionalbackchannelAudioCodec?:AudioCodec
Defined in: camera/config.ts:43
Probed talkback audio codec (client to camera). Present only when the probed source has a backchannel.
Inherited from
CameraInput.backchannelAudioCodec
childSourceId?
optionalchildSourceId?:string
Defined in: camera/config.ts:45
Child source ID (for snapshot fallback).
Inherited from
hotMode
hotMode:
boolean
Defined in: camera/config.ts:31
Keep connection always active.
Inherited from
muted?
optionalmuted?:boolean
Defined in: camera/config.ts:35
Strip the audio track from this source (defaults to false).
Inherited from
name
name:
string
Defined in: camera/config.ts:25
Source display name.
Inherited from
preload
preload:
boolean
Defined in: camera/config.ts:33
Keep a keyframe cache for this source, so the view opens faster. Use hotMode to keep the stream connected.
Inherited from
role
role:
CameraRole
Defined in: camera/config.ts:27
Resolution role.
Inherited from
urls
urls:
StreamUrls
Defined in: camera/config.ts:37
Generated streaming URLs.
Inherited from
useForSnapshot
useForSnapshot:
boolean
Defined in: camera/config.ts:29
Use this source for snapshots.
Inherited from
videoCodec?
optionalvideoCodec?:VideoCodec
Defined in: camera/config.ts:39
Probed video codec of this source. Filled by the server once the stream has been probed; absent until then.
Inherited from
Methods
generateSnapshotUrl()
generateSnapshotUrl(
options?):string
Defined in: camera/device.ts:49
Generate Snapshot URL with specified options.
Parameters
options?
URL generation options
Returns
string
Snapshot URL string
getStreamStatus()
getStreamStatus():
Promise<string>
Defined in: camera/device.ts:40
Get the current stream connection status.
Returns
Promise<string>
Status string: 'connected', 'connecting', 'error', or 'idle'
probeStream()
probeStream(
probeConfig?,refresh?):Promise<ProbeStream|undefined>
Defined in: camera/device.ts:33
Probe stream for codec and track information.
Parameters
probeConfig?
What to probe for
refresh?
boolean
Force fresh probe (ignore cache)
Returns
Promise<ProbeStream | undefined>
Stream information or undefined if unavailable
snapshot()
snapshot(
forceNew?):Promise<ArrayBuffer|undefined>
Defined in: camera/device.ts:22
Get camera snapshot image.
Parameters
forceNew?
boolean
Force fresh snapshot (ignore cache)
Returns
Promise<ArrayBuffer | undefined>
JPEG image data or undefined if unavailable