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:23

Unique source ID.

Inherited from

CameraSource._id


audioCodecs?

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

CameraSource.audioCodecs


backchannelAudioCodec?

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

CameraSource.backchannelAudioCodec


childSourceId?

optional childSourceId?: string

Defined in: camera/config.ts:45

Child source ID (for snapshot fallback).

Inherited from

CameraSource.childSourceId


hotMode

hotMode: boolean

Defined in: camera/config.ts:31

Keep connection always active.

Inherited from

CameraSource.hotMode


muted?

optional muted?: boolean

Defined in: camera/config.ts:35

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

Inherited from

CameraSource.muted


name

name: string

Defined in: camera/config.ts:25

Source display name.

Inherited from

CameraSource.name


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

CameraSource.preload


role

role: CameraRole

Defined in: camera/config.ts:27

Resolution role.

Inherited from

CameraSource.role


urls

urls: StreamUrls

Defined in: camera/config.ts:37

Generated streaming URLs.

Inherited from

CameraSource.urls


useForSnapshot

useForSnapshot: boolean

Defined in: camera/config.ts:29

Use this source for snapshots.

Inherited from

CameraSource.useForSnapshot


videoCodec?

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

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