@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:24
Unique source ID.
Inherited from ​
audioCodecs? ​
optionalaudioCodecs?:AudioCodec[]
Defined in: camera/config.ts:48
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:50
Probed talkback audio codec (client to camera). Present only when the probed source has a backchannel.
Inherited from ​
CameraInput.backchannelAudioCodec
backchannelDisabled? ​
optionalbackchannelDisabled?:boolean
Defined in: camera/config.ts:38
Drop the talk channel of this source, so clients get no microphone (defaults to false).
Inherited from ​
CameraInput.backchannelDisabled
childCameraId? ​
optionalchildCameraId?:string
Defined in: camera/config.ts:54
Camera whose stream shows in the picture-in-picture overlay, instead of a source of this camera.
Inherited from ​
childCameraRole? ​
optionalchildCameraRole?:StreamingRole
Defined in: camera/config.ts:56
Role of the childCameraId stream shown in the overlay.
Inherited from ​
childSourceId? ​
optionalchildSourceId?:string
Defined in: camera/config.ts:52
Child source ID (for snapshot fallback).
Inherited from ​
handshakeTimeout? ​
optionalhandshakeTimeout?:number
Defined in: camera/config.ts:42
Seconds allowed per RTSP request while connecting. Raise it for cameras that wake slowly. Unset means 5.
Inherited from ​
hotMode ​
hotMode:
boolean
Defined in: camera/config.ts:32
Keep connection always active.
Inherited from ​
muted? ​
optionalmuted?:boolean
Defined in: camera/config.ts:36
Strip the audio track from this source (defaults to false).
Inherited from ​
name ​
name:
string
Defined in: camera/config.ts:26
Source display name.
Inherited from ​
preload ​
preload:
boolean
Defined in: camera/config.ts:34
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:28
Resolution role.
Inherited from ​
timeout? ​
optionaltimeout?:number
Defined in: camera/config.ts:40
Seconds without media before the stream reconnects. Unset means the host default: 5 for cameras, 60 for plugin-served sources.
Inherited from ​
urls ​
urls:
StreamUrls
Defined in: camera/config.ts:44
Generated streaming URLs.
Inherited from ​
useForSnapshot ​
useForSnapshot:
boolean
Defined in: camera/config.ts:30
Use this source for snapshots.
Inherited from ​
videoCodec? ​
optionalvideoCodec?:VideoCodec
Defined in: camera/config.ts:46
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