Skip to content

node-av / api / WebRTCStreamOptions

Interface: WebRTCStreamOptions

Defined in: src/api/webrtc-stream.ts:45

Options for configuring WebRTC session with werift integration.

Extends

  • Omit<RTPStreamOptions, "onVideoPacket" | "onAudioPacket" | "supportedVideoCodecs" | "supportedAudioCodecs">

Properties

audio?

optional audio: object

Defined in: src/api/rtp-stream.ts:92

Audio stream configuration.

channels?

optional channels: number

encoderOptions?

optional encoderOptions: Record<string, string | number | boolean | null | undefined>

mtu?

optional mtu: number

payloadType?

optional payloadType: number

sampleFormat?

optional sampleFormat: AVSampleFormat

sampleRate?

optional sampleRate: number

ssrc?

optional ssrc: number

Inherited from

RTPStreamOptions.audio


hardware?

optional hardware: { device?: string; deviceType: FFHWDeviceType | AVHWDeviceType; options?: Record<string, string>; } | "auto"

Defined in: src/api/rtp-stream.ts:69

Hardware acceleration configuration.

  • 'auto' - Automatically detect and use available hardware acceleration
  • Object with deviceType - Manually specify hardware acceleration type

Default

ts
{ deviceType: AV_HWDEVICE_TYPE_NONE }

Inherited from

RTPStreamOptions.hardware


iceServers?

optional iceServers: object[]

Defined in: src/api/webrtc-stream.ts:51

ICE servers for NAT traversal and STUN/TURN configuration.

urls

urls: string

Default

ts
[]

inputOptions?

optional inputOptions: DemuxerOptions

Defined in: src/api/rtp-stream.ts:74

Input media options passed to Demuxer.

Inherited from

RTPStreamOptions.inputOptions


onClose()?

optional onClose: (error?) => void

Defined in: src/api/rtp-stream.ts:45

Callback invoked when the stream is closed or encounters an error.

Parameters

error?

Error

Optional error if stream closed due to an error

Returns

void

Inherited from

RTPStreamOptions.onClose


onIceCandidate()?

optional onIceCandidate: (candidate) => void

Defined in: src/api/webrtc-stream.ts:59

Callback invoked when a new ICE candidate is discovered. Send this candidate to the remote peer via signaling channel.

Parameters

candidate

string

ICE candidate string to send to remote peer

Returns

void


video?

optional video: object

Defined in: src/api/rtp-stream.ts:79

Video stream configuration.

encoderOptions?

optional encoderOptions: Record<string, string | number | boolean | null | undefined>

fps?

optional fps: number

height?

optional height: number

mtu?

optional mtu: number

payloadType?

optional payloadType: number

ssrc?

optional ssrc: number

width?

optional width: number

Inherited from

RTPStreamOptions.video