Skip to content

@camera.ui/sdk / camera / CameraDeviceSource

Interface: CameraDeviceSource ​

Defined in: camera/device.ts:53

Camera source with full streaming capabilities.

Extends ​

Properties ​

_id ​

readonly _id: string

Defined in: camera/config.ts:24

Unique source ID.

Inherited from ​

CameraSource._id


audioCodecs? ​

optional audioCodecs?: 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 ​

CameraSource.audioCodecs


backchannelAudioCodec? ​

optional backchannelAudioCodec?: 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 ​

CameraSource.backchannelAudioCodec


backchannelDisabled? ​

optional backchannelDisabled?: boolean

Defined in: camera/config.ts:38

Drop the talk channel of this source, so clients get no microphone (defaults to false).

Inherited from ​

CameraSource.backchannelDisabled


childCameraId? ​

optional childCameraId?: 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 ​

CameraSource.childCameraId


childCameraRole? ​

optional childCameraRole?: StreamingRole

Defined in: camera/config.ts:56

Role of the childCameraId stream shown in the overlay.

Inherited from ​

CameraSource.childCameraRole


childSourceId? ​

optional childSourceId?: string

Defined in: camera/config.ts:52

Child source ID (for snapshot fallback).

Inherited from ​

CameraSource.childSourceId


handshakeTimeout? ​

optional handshakeTimeout?: 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 ​

CameraSource.handshakeTimeout


hotMode ​

hotMode: boolean

Defined in: camera/config.ts:32

Keep connection always active.

Inherited from ​

CameraSource.hotMode


muted? ​

optional muted?: boolean

Defined in: camera/config.ts:36

Strip the audio track from this source (defaults to false).

Inherited from ​

CameraSource.muted


name ​

name: string

Defined in: camera/config.ts:26

Source display name.

Inherited from ​

CameraSource.name


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 ​

CameraSource.preload


role ​

role: CameraRole

Defined in: camera/config.ts:28

Resolution role.

Inherited from ​

CameraSource.role


timeout? ​

optional timeout?: 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 ​

CameraSource.timeout


urls ​

urls: StreamUrls

Defined in: camera/config.ts:44

Generated streaming URLs.

Inherited from ​

CameraSource.urls


useForSnapshot ​

useForSnapshot: boolean

Defined in: camera/config.ts:30

Use this source for snapshots.

Inherited from ​

CameraSource.useForSnapshot


videoCodec? ​

optional videoCodec?: 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 ​

CameraSource.videoCodec

Methods ​

createFmp4Session() ​

createFmp4Session(urlOrOptions?): Fmp4Session

Defined in: camera/device.ts:79

Create FMP4 streaming session.

Parameters ​

urlOrOptions? ​

string | RTSPUrlOptions

RTSP URL or options

Returns ​

Fmp4Session

FMP4 session instance


createRtpSession() ​

createRtpSession(urlOrOptions?): RtpSession

Defined in: camera/device.ts:70

Create RTP streaming session.

Parameters ​

urlOrOptions? ​

string | RTSPUrlOptions

RTSP URL or options

Returns ​

RtpSession

RTP session instance


generateRTSPUrl() ​

generateRTSPUrl(options?): string

Defined in: camera/device.ts:61

Generate RTSP URL with specified options.

Parameters ​

options? ​

RTSPUrlOptions

URL generation options

Returns ​

string

RTSP URL string


generateSnapshotUrl() ​

generateSnapshotUrl(options?): string

Defined in: camera/device.ts:49

Generate Snapshot URL with specified options.

Parameters ​

options? ​

SnapshotUrlOptions

URL generation options

Returns ​

string

Snapshot URL string

Inherited from ​

CameraSource.generateSnapshotUrl


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'

Inherited from ​

CameraSource.getStreamStatus


probeStream() ​

probeStream(probeConfig?, refresh?): Promise<ProbeStream | undefined>

Defined in: camera/device.ts:33

Probe stream for codec and track information.

Parameters ​

probeConfig? ​

ProbeConfig

What to probe for

refresh? ​

boolean

Force fresh probe (ignore cache)

Returns ​

Promise<ProbeStream | undefined>

Stream information or undefined if unavailable

Inherited from ​

CameraSource.probeStream


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

Inherited from ​

CameraSource.snapshot