node-av / api / WebRTCStreamOptions
Interface: WebRTCStreamOptions
Defined in: src/api/webrtc-stream.ts:46
Options for configuring WebRTC session with werift integration.
Extends
Omit<RTPStreamOptions,"onVideoPacket"|"onAudioPacket"|"supportedVideoCodecs"|"supportedAudioCodecs">
Properties
audio?
optionalaudio:object
Defined in: src/api/rtp-stream.ts:93
Audio stream configuration.
channels?
optionalchannels:number
encoderOptions?
optionalencoderOptions:Record<string,string|number|boolean|null|undefined>
mtu?
optionalmtu:number
payloadType?
optionalpayloadType:number
sampleFormat?
optionalsampleFormat:AVSampleFormat
sampleRate?
optionalsampleRate:number
ssrc?
optionalssrc:number
Inherited from
hardware?
optionalhardware: {device?:string;deviceType:FFHWDeviceType|AVHWDeviceType;options?:Record<string,string>; } |"auto"
Defined in: src/api/rtp-stream.ts:70
Hardware acceleration configuration.
'auto'- Automatically detect and use available hardware acceleration- Object with deviceType - Manually specify hardware acceleration type
Default
{ deviceType: AV_HWDEVICE_TYPE_NONE }Inherited from
iceServers?
optionaliceServers:object[]
Defined in: src/api/webrtc-stream.ts:52
ICE servers for NAT traversal and STUN/TURN configuration.
urls
urls:
string
Default
[]inputOptions?
optionalinputOptions:DemuxerOptions
Defined in: src/api/rtp-stream.ts:75
Input media options passed to Demuxer.
Inherited from
onClose()?
optionalonClose: (error?) =>void
Defined in: src/api/rtp-stream.ts:46
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
onIceCandidate()?
optionalonIceCandidate: (candidate) =>void
Defined in: src/api/webrtc-stream.ts:60
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
signal?
optionalsignal:AbortSignal
Defined in: src/api/rtp-stream.ts:109
AbortSignal for cancellation.
When aborted, the stream stops gracefully, equivalent to calling stop(). If already aborted when start() is called, throws AbortError.
Inherited from
video?
optionalvideo:object
Defined in: src/api/rtp-stream.ts:80
Video stream configuration.
encoderOptions?
optionalencoderOptions:Record<string,string|number|boolean|null|undefined>
fps?
optionalfps:number
height?
optionalheight:number
mtu?
optionalmtu:number
payloadType?
optionalpayloadType:number
ssrc?
optionalssrc:number
width?
optionalwidth:number
