node-av 3.1.3 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +88 -52
- package/binding.gyp +23 -11
- package/dist/api/audio-frame-buffer.d.ts +201 -0
- package/dist/api/audio-frame-buffer.js +275 -0
- package/dist/api/audio-frame-buffer.js.map +1 -0
- package/dist/api/bitstream-filter.d.ts +320 -78
- package/dist/api/bitstream-filter.js +684 -151
- package/dist/api/bitstream-filter.js.map +1 -1
- package/dist/api/constants.d.ts +44 -0
- package/dist/api/constants.js +45 -0
- package/dist/api/constants.js.map +1 -0
- package/dist/api/data/test_av1.ivf +0 -0
- package/dist/api/data/test_mjpeg.mjpeg +0 -0
- package/dist/api/data/test_vp8.ivf +0 -0
- package/dist/api/data/test_vp9.ivf +0 -0
- package/dist/api/decoder.d.ts +454 -77
- package/dist/api/decoder.js +1081 -271
- package/dist/api/decoder.js.map +1 -1
- package/dist/api/{media-input.d.ts → demuxer.d.ts} +295 -45
- package/dist/api/demuxer.js +1965 -0
- package/dist/api/demuxer.js.map +1 -0
- package/dist/api/encoder.d.ts +423 -132
- package/dist/api/encoder.js +1089 -240
- package/dist/api/encoder.js.map +1 -1
- package/dist/api/filter-complex.d.ts +769 -0
- package/dist/api/filter-complex.js +1596 -0
- package/dist/api/filter-complex.js.map +1 -0
- package/dist/api/filter-presets.d.ts +80 -5
- package/dist/api/filter-presets.js +117 -7
- package/dist/api/filter-presets.js.map +1 -1
- package/dist/api/filter.d.ts +561 -125
- package/dist/api/filter.js +1083 -274
- package/dist/api/filter.js.map +1 -1
- package/dist/api/{fmp4.d.ts → fmp4-stream.d.ts} +141 -140
- package/dist/api/fmp4-stream.js +539 -0
- package/dist/api/fmp4-stream.js.map +1 -0
- package/dist/api/hardware.d.ts +58 -6
- package/dist/api/hardware.js +127 -11
- package/dist/api/hardware.js.map +1 -1
- package/dist/api/index.d.ts +8 -4
- package/dist/api/index.js +17 -8
- package/dist/api/index.js.map +1 -1
- package/dist/api/io-stream.d.ts +6 -6
- package/dist/api/io-stream.js +5 -4
- package/dist/api/io-stream.js.map +1 -1
- package/dist/api/{media-output.d.ts → muxer.d.ts} +280 -66
- package/dist/api/muxer.js +1934 -0
- package/dist/api/muxer.js.map +1 -0
- package/dist/api/pipeline.d.ts +77 -29
- package/dist/api/pipeline.js +449 -439
- package/dist/api/pipeline.js.map +1 -1
- package/dist/api/rtp-stream.d.ts +312 -0
- package/dist/api/rtp-stream.js +630 -0
- package/dist/api/rtp-stream.js.map +1 -0
- package/dist/api/types.d.ts +533 -56
- package/dist/api/utilities/async-queue.d.ts +91 -0
- package/dist/api/utilities/async-queue.js +162 -0
- package/dist/api/utilities/async-queue.js.map +1 -0
- package/dist/api/utilities/audio-sample.d.ts +11 -1
- package/dist/api/utilities/audio-sample.js +10 -0
- package/dist/api/utilities/audio-sample.js.map +1 -1
- package/dist/api/utilities/channel-layout.d.ts +1 -0
- package/dist/api/utilities/channel-layout.js +1 -0
- package/dist/api/utilities/channel-layout.js.map +1 -1
- package/dist/api/utilities/image.d.ts +39 -1
- package/dist/api/utilities/image.js +38 -0
- package/dist/api/utilities/image.js.map +1 -1
- package/dist/api/utilities/index.d.ts +3 -0
- package/dist/api/utilities/index.js +6 -0
- package/dist/api/utilities/index.js.map +1 -1
- package/dist/api/utilities/media-type.d.ts +2 -1
- package/dist/api/utilities/media-type.js +1 -0
- package/dist/api/utilities/media-type.js.map +1 -1
- package/dist/api/utilities/pixel-format.d.ts +4 -1
- package/dist/api/utilities/pixel-format.js +3 -0
- package/dist/api/utilities/pixel-format.js.map +1 -1
- package/dist/api/utilities/sample-format.d.ts +6 -1
- package/dist/api/utilities/sample-format.js +5 -0
- package/dist/api/utilities/sample-format.js.map +1 -1
- package/dist/api/utilities/scheduler.d.ts +138 -0
- package/dist/api/utilities/scheduler.js +98 -0
- package/dist/api/utilities/scheduler.js.map +1 -0
- package/dist/api/utilities/streaming.d.ts +105 -15
- package/dist/api/utilities/streaming.js +201 -12
- package/dist/api/utilities/streaming.js.map +1 -1
- package/dist/api/utilities/timestamp.d.ts +15 -1
- package/dist/api/utilities/timestamp.js +14 -0
- package/dist/api/utilities/timestamp.js.map +1 -1
- package/dist/api/utilities/whisper-model.d.ts +310 -0
- package/dist/api/utilities/whisper-model.js +528 -0
- package/dist/api/utilities/whisper-model.js.map +1 -0
- package/dist/api/webrtc-stream.d.ts +288 -0
- package/dist/api/webrtc-stream.js +440 -0
- package/dist/api/webrtc-stream.js.map +1 -0
- package/dist/api/whisper.d.ts +324 -0
- package/dist/api/whisper.js +362 -0
- package/dist/api/whisper.js.map +1 -0
- package/dist/constants/constants.d.ts +54 -2
- package/dist/constants/constants.js +48 -1
- package/dist/constants/constants.js.map +1 -1
- package/dist/constants/encoders.d.ts +2 -1
- package/dist/constants/encoders.js +4 -3
- package/dist/constants/encoders.js.map +1 -1
- package/dist/constants/hardware.d.ts +26 -0
- package/dist/constants/hardware.js +27 -0
- package/dist/constants/hardware.js.map +1 -0
- package/dist/constants/index.d.ts +1 -0
- package/dist/constants/index.js +1 -0
- package/dist/constants/index.js.map +1 -1
- package/dist/ffmpeg/index.d.ts +3 -3
- package/dist/ffmpeg/index.js +3 -3
- package/dist/ffmpeg/utils.d.ts +27 -0
- package/dist/ffmpeg/utils.js +28 -16
- package/dist/ffmpeg/utils.js.map +1 -1
- package/dist/lib/binding.d.ts +22 -11
- package/dist/lib/binding.js.map +1 -1
- package/dist/lib/codec-context.d.ts +87 -0
- package/dist/lib/codec-context.js +125 -4
- package/dist/lib/codec-context.js.map +1 -1
- package/dist/lib/codec-parameters.d.ts +229 -1
- package/dist/lib/codec-parameters.js +264 -0
- package/dist/lib/codec-parameters.js.map +1 -1
- package/dist/lib/codec-parser.d.ts +23 -0
- package/dist/lib/codec-parser.js +25 -0
- package/dist/lib/codec-parser.js.map +1 -1
- package/dist/lib/codec.d.ts +26 -4
- package/dist/lib/codec.js +35 -0
- package/dist/lib/codec.js.map +1 -1
- package/dist/lib/dictionary.js +1 -0
- package/dist/lib/dictionary.js.map +1 -1
- package/dist/lib/error.js +1 -1
- package/dist/lib/error.js.map +1 -1
- package/dist/lib/fifo.d.ts +416 -0
- package/dist/lib/fifo.js +453 -0
- package/dist/lib/fifo.js.map +1 -0
- package/dist/lib/filter-context.d.ts +52 -11
- package/dist/lib/filter-context.js +56 -12
- package/dist/lib/filter-context.js.map +1 -1
- package/dist/lib/filter-graph.d.ts +9 -0
- package/dist/lib/filter-graph.js +13 -0
- package/dist/lib/filter-graph.js.map +1 -1
- package/dist/lib/filter.d.ts +21 -0
- package/dist/lib/filter.js +28 -0
- package/dist/lib/filter.js.map +1 -1
- package/dist/lib/format-context.d.ts +48 -14
- package/dist/lib/format-context.js +76 -7
- package/dist/lib/format-context.js.map +1 -1
- package/dist/lib/frame.d.ts +264 -1
- package/dist/lib/frame.js +351 -1
- package/dist/lib/frame.js.map +1 -1
- package/dist/lib/hardware-device-context.d.ts +3 -2
- package/dist/lib/hardware-device-context.js.map +1 -1
- package/dist/lib/index.d.ts +2 -0
- package/dist/lib/index.js +4 -0
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/input-format.d.ts +21 -0
- package/dist/lib/input-format.js +42 -2
- package/dist/lib/input-format.js.map +1 -1
- package/dist/lib/native-types.d.ts +76 -27
- package/dist/lib/option.d.ts +25 -13
- package/dist/lib/option.js +28 -0
- package/dist/lib/option.js.map +1 -1
- package/dist/lib/output-format.d.ts +22 -1
- package/dist/lib/output-format.js +28 -0
- package/dist/lib/output-format.js.map +1 -1
- package/dist/lib/packet.d.ts +35 -0
- package/dist/lib/packet.js +52 -2
- package/dist/lib/packet.js.map +1 -1
- package/dist/lib/rational.d.ts +18 -0
- package/dist/lib/rational.js +19 -0
- package/dist/lib/rational.js.map +1 -1
- package/dist/lib/stream.d.ts +126 -0
- package/dist/lib/stream.js +188 -5
- package/dist/lib/stream.js.map +1 -1
- package/dist/lib/sync-queue.d.ts +179 -0
- package/dist/lib/sync-queue.js +197 -0
- package/dist/lib/sync-queue.js.map +1 -0
- package/dist/lib/types.d.ts +49 -1
- package/dist/lib/utilities.d.ts +281 -53
- package/dist/lib/utilities.js +298 -55
- package/dist/lib/utilities.js.map +1 -1
- package/install/check.js +2 -2
- package/package.json +37 -26
- package/dist/api/fmp4.js +0 -710
- package/dist/api/fmp4.js.map +0 -1
- package/dist/api/media-input.js +0 -1075
- package/dist/api/media-input.js.map +0 -1
- package/dist/api/media-output.js +0 -1040
- package/dist/api/media-output.js.map +0 -1
- package/dist/api/webrtc.d.ts +0 -664
- package/dist/api/webrtc.js +0 -1132
- package/dist/api/webrtc.js.map +0 -1
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
import { RTCRtpCodecParameters } from 'werift';
|
|
2
|
+
import type { AVCodecID } from '../constants/index.js';
|
|
3
|
+
import type { RTPStreamOptions } from './rtp-stream.js';
|
|
4
|
+
/**
|
|
5
|
+
* Codec information for WebRTC streaming.
|
|
6
|
+
*
|
|
7
|
+
* Contains RTP codec parameters and FFmpeg codec IDs for video and audio streams.
|
|
8
|
+
* Used for codec negotiation in WebRTC peer connections.
|
|
9
|
+
*/
|
|
10
|
+
export interface WebRTCCodecInfo {
|
|
11
|
+
/**
|
|
12
|
+
* Video codec configuration.
|
|
13
|
+
* Combines RTP parameters (mimeType, clockRate, etc.) with FFmpeg codec ID.
|
|
14
|
+
*/
|
|
15
|
+
video?: Partial<RTCRtpCodecParameters> & {
|
|
16
|
+
codecId: AVCodecID;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Optional audio codec configuration.
|
|
20
|
+
* Combines RTP parameters (mimeType, clockRate, channels) with FFmpeg codec ID.
|
|
21
|
+
*/
|
|
22
|
+
audio?: Partial<RTCRtpCodecParameters> & {
|
|
23
|
+
codecId: AVCodecID;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Options for configuring WebRTC session with werift integration.
|
|
28
|
+
*/
|
|
29
|
+
export interface WebRTCStreamOptions extends Omit<RTPStreamOptions, 'onVideoPacket' | 'onAudioPacket' | 'supportedVideoCodecs' | 'supportedAudioCodecs'> {
|
|
30
|
+
/**
|
|
31
|
+
* ICE servers for NAT traversal and STUN/TURN configuration.
|
|
32
|
+
*
|
|
33
|
+
* @default []
|
|
34
|
+
*/
|
|
35
|
+
iceServers?: {
|
|
36
|
+
urls: string;
|
|
37
|
+
}[];
|
|
38
|
+
/**
|
|
39
|
+
* Callback invoked when a new ICE candidate is discovered.
|
|
40
|
+
* Send this candidate to the remote peer via signaling channel.
|
|
41
|
+
*
|
|
42
|
+
* @param candidate - ICE candidate string to send to remote peer
|
|
43
|
+
*/
|
|
44
|
+
onIceCandidate?: (candidate: string) => void;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Complete WebRTC session management with werift integration.
|
|
48
|
+
*
|
|
49
|
+
* Provides end-to-end WebRTC streaming with automatic SDP negotiation,
|
|
50
|
+
* ICE candidate handling, and peer connection management.
|
|
51
|
+
* Built on top of {@link RTPStream} for generic RTP streaming with WebRTC-specific
|
|
52
|
+
* protocol details handled automatically.
|
|
53
|
+
* Integrates with werift library for RTCPeerConnection and media track handling.
|
|
54
|
+
* Ideal for building complete WebRTC streaming applications with minimal code.
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```typescript
|
|
58
|
+
* import { WebRTCStream } from 'node-av/api';
|
|
59
|
+
*
|
|
60
|
+
* // Create session from media source
|
|
61
|
+
* const session = await WebRTCStream.create('rtsp://camera.local/stream', {
|
|
62
|
+
* mtu: 1200,
|
|
63
|
+
* hardware: 'auto',
|
|
64
|
+
* iceServers: [{ urls: 'stun:stun.l.google.com:19302' }],
|
|
65
|
+
* onIceCandidate: (candidate) => {
|
|
66
|
+
* sendToClient({ type: 'candidate', value: candidate });
|
|
67
|
+
* }
|
|
68
|
+
* });
|
|
69
|
+
*
|
|
70
|
+
* // Process SDP offer from client
|
|
71
|
+
* const answer = await session.setOffer(clientOffer);
|
|
72
|
+
* sendToClient({ type: 'answer', value: answer });
|
|
73
|
+
*
|
|
74
|
+
* // Start streaming
|
|
75
|
+
* await session.start();
|
|
76
|
+
* ```
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* ```typescript
|
|
80
|
+
* // Complete WebSocket signaling server
|
|
81
|
+
* import { WebSocket } from 'ws';
|
|
82
|
+
*
|
|
83
|
+
* ws.on('message', async (data) => {
|
|
84
|
+
* const msg = JSON.parse(data);
|
|
85
|
+
*
|
|
86
|
+
* if (msg.type === 'offer') {
|
|
87
|
+
* const session = await WebRTCStream.create(msg.url, {
|
|
88
|
+
* hardware: 'auto',
|
|
89
|
+
* onIceCandidate: (candidate) => {
|
|
90
|
+
* ws.send(JSON.stringify({ type: 'candidate', value: candidate }));
|
|
91
|
+
* }
|
|
92
|
+
* });
|
|
93
|
+
*
|
|
94
|
+
* const answer = await session.setOffer(msg.value);
|
|
95
|
+
* ws.send(JSON.stringify({ type: 'answer', value: answer }));
|
|
96
|
+
*
|
|
97
|
+
* await session.start();
|
|
98
|
+
* } else if (msg.type === 'candidate') {
|
|
99
|
+
* session.addIceCandidate(msg.value);
|
|
100
|
+
* }
|
|
101
|
+
* });
|
|
102
|
+
* ```
|
|
103
|
+
*
|
|
104
|
+
* @see {@link RTPStream} For library-agnostic RTP streaming
|
|
105
|
+
* @see {@link Demuxer} For input media handling
|
|
106
|
+
* @see {@link HardwareContext} For GPU acceleration
|
|
107
|
+
*/
|
|
108
|
+
export declare class WebRTCStream {
|
|
109
|
+
private stream;
|
|
110
|
+
private pc;
|
|
111
|
+
private videoTrack;
|
|
112
|
+
private audioTrack;
|
|
113
|
+
private options;
|
|
114
|
+
private pendingIceCandidates;
|
|
115
|
+
/**
|
|
116
|
+
* @param options - Session configuration options
|
|
117
|
+
*
|
|
118
|
+
* Use {@link create} factory method
|
|
119
|
+
*
|
|
120
|
+
* @internal
|
|
121
|
+
*/
|
|
122
|
+
private constructor();
|
|
123
|
+
/**
|
|
124
|
+
* Create a WebRTC session from a media source.
|
|
125
|
+
*
|
|
126
|
+
* Opens the input media, creates internal streaming components, and prepares
|
|
127
|
+
* for WebRTC peer connection negotiation. Does not start streaming yet.
|
|
128
|
+
* Call {@link setOffer} to negotiate SDP and {@link start} to begin streaming.
|
|
129
|
+
*
|
|
130
|
+
* @param inputUrl - Media source URL (RTSP, file path, HTTP, etc.)
|
|
131
|
+
*
|
|
132
|
+
* @param options - Session configuration options
|
|
133
|
+
*
|
|
134
|
+
* @returns Configured WebRTC session instance
|
|
135
|
+
*
|
|
136
|
+
* @example
|
|
137
|
+
* ```typescript
|
|
138
|
+
* const session = await WebRTCStream.create('rtsp://camera.local/stream', {
|
|
139
|
+
* mtu: 1200,
|
|
140
|
+
* hardware: 'auto',
|
|
141
|
+
* iceServers: [{ urls: 'stun:stun.l.google.com:19302' }]
|
|
142
|
+
* });
|
|
143
|
+
* ```
|
|
144
|
+
*
|
|
145
|
+
* @example
|
|
146
|
+
* ```typescript
|
|
147
|
+
* // Session from file with hardware acceleration
|
|
148
|
+
* const session = await WebRTCStream.create('video.mp4', {
|
|
149
|
+
* hardware: {
|
|
150
|
+
* deviceType: AV_HWDEVICE_TYPE_CUDA
|
|
151
|
+
* }
|
|
152
|
+
* });
|
|
153
|
+
* ```
|
|
154
|
+
*/
|
|
155
|
+
static create(inputUrl: string, options?: WebRTCStreamOptions): WebRTCStream;
|
|
156
|
+
/**
|
|
157
|
+
* Start streaming media to WebRTC peer connection.
|
|
158
|
+
*
|
|
159
|
+
* Begins the media processing pipeline, reading packets from input,
|
|
160
|
+
* transcoding if necessary, and sending RTP packets to media tracks.
|
|
161
|
+
* Note: The stream is automatically started by {@link setOffer}, so calling
|
|
162
|
+
* this method explicitly is optional. This method is provided for cases where
|
|
163
|
+
* you need explicit control over when streaming begins.
|
|
164
|
+
*
|
|
165
|
+
* @returns Promise that resolves when streaming completes
|
|
166
|
+
*
|
|
167
|
+
* @throws {FFmpegError} If transcoding or muxing fails
|
|
168
|
+
*
|
|
169
|
+
* @example
|
|
170
|
+
* ```typescript
|
|
171
|
+
* const session = await WebRTCStream.create('input.mp4');
|
|
172
|
+
* session.onIceCandidate = (c) => sendToRemote(c);
|
|
173
|
+
*
|
|
174
|
+
* const answer = await session.setOffer(remoteOffer);
|
|
175
|
+
* sendToRemote(answer);
|
|
176
|
+
* // Stream is already started by setOffer
|
|
177
|
+
* ```
|
|
178
|
+
*/
|
|
179
|
+
start(): Promise<void>;
|
|
180
|
+
/**
|
|
181
|
+
* Stop streaming gracefully and clean up all resources.
|
|
182
|
+
*
|
|
183
|
+
* Stops the stream, closes peer connection, and releases all resources.
|
|
184
|
+
* Safe to call multiple times. After stopping, you can call start() again
|
|
185
|
+
* to restart the session.
|
|
186
|
+
*
|
|
187
|
+
* @example
|
|
188
|
+
* ```typescript
|
|
189
|
+
* const session = await WebRTCStream.create('input.mp4');
|
|
190
|
+
* await session.start();
|
|
191
|
+
*
|
|
192
|
+
* // Stop after 10 seconds
|
|
193
|
+
* setTimeout(async () => await session.stop(), 10000);
|
|
194
|
+
* ```
|
|
195
|
+
*/
|
|
196
|
+
stop(): Promise<void>;
|
|
197
|
+
/**
|
|
198
|
+
* Get detected codec information.
|
|
199
|
+
*
|
|
200
|
+
* Returns RTP codec parameters and FFmpeg codec IDs for video and audio.
|
|
201
|
+
* Useful for inspecting what codecs will be used in the WebRTC session.
|
|
202
|
+
* The input is automatically opened during {@link create}, so codecs can be
|
|
203
|
+
* detected immediately after session creation.
|
|
204
|
+
*
|
|
205
|
+
* @returns Codec configuration for video and audio streams
|
|
206
|
+
*
|
|
207
|
+
* @example
|
|
208
|
+
* ```typescript
|
|
209
|
+
* const session = await WebRTCStream.create('input.mp4');
|
|
210
|
+
* const codecs = session.getCodecs();
|
|
211
|
+
*
|
|
212
|
+
* console.log('Video:', codecs.video.mimeType);
|
|
213
|
+
* console.log('Audio:', codecs.audio?.mimeType);
|
|
214
|
+
* ```
|
|
215
|
+
*/
|
|
216
|
+
getCodecs(): WebRTCCodecInfo;
|
|
217
|
+
/**
|
|
218
|
+
* Process SDP offer from remote peer and generate SDP answer.
|
|
219
|
+
*
|
|
220
|
+
* Creates RTCPeerConnection with detected codecs, sets up media tracks,
|
|
221
|
+
* processes the remote SDP offer, and generates a local SDP answer.
|
|
222
|
+
* Also configures ICE candidate handling via {@link onIceCandidate} callback.
|
|
223
|
+
* Must be called before {@link start}.
|
|
224
|
+
*
|
|
225
|
+
* @param offerSdp - SDP offer string from remote WebRTC peer
|
|
226
|
+
*
|
|
227
|
+
* @returns SDP answer string to send back to remote peer
|
|
228
|
+
*
|
|
229
|
+
* @example
|
|
230
|
+
* ```typescript
|
|
231
|
+
* const session = await WebRTCStream.create('input.mp4');
|
|
232
|
+
*
|
|
233
|
+
* // Setup ICE candidate handler first
|
|
234
|
+
* session.onIceCandidate = (candidate) => {
|
|
235
|
+
* sendToRemote({ type: 'candidate', value: candidate });
|
|
236
|
+
* };
|
|
237
|
+
*
|
|
238
|
+
* // Process offer and send answer
|
|
239
|
+
* const answer = await session.setOffer(remoteOffer);
|
|
240
|
+
* sendToRemote({ type: 'answer', value: answer });
|
|
241
|
+
*
|
|
242
|
+
* // Start streaming
|
|
243
|
+
* await session.start();
|
|
244
|
+
* ```
|
|
245
|
+
*/
|
|
246
|
+
setOffer(offerSdp: string): Promise<string>;
|
|
247
|
+
/**
|
|
248
|
+
* Add ICE candidate from remote peer.
|
|
249
|
+
*
|
|
250
|
+
* Processes ICE candidates received from the remote peer via signaling channel.
|
|
251
|
+
* Should be called whenever a new candidate message arrives from remote peer.
|
|
252
|
+
* Can be called multiple times as candidates are discovered.
|
|
253
|
+
*
|
|
254
|
+
* Supports ICE trickling: If called before {@link setOffer}, candidates are buffered
|
|
255
|
+
* and applied automatically once the remote description is set.
|
|
256
|
+
*
|
|
257
|
+
* @param candidate - ICE candidate string from remote peer
|
|
258
|
+
*
|
|
259
|
+
* @example
|
|
260
|
+
* ```typescript
|
|
261
|
+
* // In signaling message handler
|
|
262
|
+
* if (msg.type === 'candidate') {
|
|
263
|
+
* session.addIceCandidate(msg.value);
|
|
264
|
+
* }
|
|
265
|
+
* ```
|
|
266
|
+
*/
|
|
267
|
+
addIceCandidate(candidate: string): void;
|
|
268
|
+
/**
|
|
269
|
+
* Get video codec configuration from input stream.
|
|
270
|
+
*
|
|
271
|
+
* @param codecId - FFmpeg codec ID
|
|
272
|
+
*
|
|
273
|
+
* @returns RTP codec parameters with codec ID or undefined if unsupported
|
|
274
|
+
*
|
|
275
|
+
* @internal
|
|
276
|
+
*/
|
|
277
|
+
private getVideoCodecConfig;
|
|
278
|
+
/**
|
|
279
|
+
* Get audio codec configuration from input stream.
|
|
280
|
+
*
|
|
281
|
+
* @param codecId - FFmpeg codec ID
|
|
282
|
+
*
|
|
283
|
+
* @returns RTP codec parameters with codec ID or undefined if unsupported
|
|
284
|
+
*
|
|
285
|
+
* @internal
|
|
286
|
+
*/
|
|
287
|
+
private getAudioCodecConfig;
|
|
288
|
+
}
|