@relaymessenger/livekit 0.1.0-staging.2 → 0.1.0-staging.21
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 +25 -89
- package/dist/index.d.ts +1 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -3
- package/dist/index.js.map +1 -1
- package/dist/livekit.d.ts +50 -6
- package/dist/livekit.d.ts.map +1 -1
- package/dist/livekit.js +110 -29
- package/dist/livekit.js.map +1 -1
- package/package.json +7 -9
- package/dist/engine-werift.d.ts +0 -19
- package/dist/engine-werift.d.ts.map +0 -1
- package/dist/engine-werift.js +0 -263
- package/dist/engine-werift.js.map +0 -1
- package/dist/transport.d.ts +0 -159
- package/dist/transport.d.ts.map +0 -1
- package/dist/transport.js +0 -634
- package/dist/transport.js.map +0 -1
package/dist/engine-werift.js
DELETED
|
@@ -1,263 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Relay's default call participant engine: werift (pure-TypeScript WebRTC:
|
|
3
|
-
* ICE, DTLS, SRTP, RTP) plus `@evan/opus` (prebuilt libopus, WASM fallback).
|
|
4
|
-
*
|
|
5
|
-
* API sources read for this file, in node_modules/werift/lib/webrtc/src:
|
|
6
|
-
* - peerConnection.d.ts: `new RTCPeerConnection({ codecs: { audio: [...] } })`,
|
|
7
|
-
* `addTransceiver(track, { direction })`, the W3C-style `ontrack`,
|
|
8
|
-
* `onconnectionstatechange`, `localDescription`, `close()`, and the
|
|
9
|
-
* `"icegatheringstatechange"` / `"connectionstatechange"` events emitted
|
|
10
|
-
* through `EventTarget.addEventListener` (peerConnection.js:317, :330).
|
|
11
|
-
* `RTCConfiguration.iceServers: RTCIceServer[]` ({ urls, username?,
|
|
12
|
-
* credential? }) and `iceTransportPolicy: "all" | "relay"` (peerConnection.d.ts
|
|
13
|
-
* :264-273); utils.js:110-179 parses `stun|stuns|turn|turns:` URLs with
|
|
14
|
-
* `?transport=`, and `secureTransportManager.js:121` maps `"relay"` to
|
|
15
|
-
* `forceTurn`. The W3C setters `onicecandidate`, `onicegatheringstatechange`
|
|
16
|
-
* and `oniceconnectionstatechange` (peerConnection.d.ts:67-82, fired at
|
|
17
|
-
* peerConnection.js:314-341) feed the transport's ICE diagnostics.
|
|
18
|
-
* - media/track.d.ts: `MediaStreamTrack({ kind })`, `writeRtp(RtpPacket)`,
|
|
19
|
-
* `onReceiveRtp: Event<[RtpPacket, Extensions?]>` with `subscribe()`.
|
|
20
|
-
* - media/rtpSender.js:544-549: the sender rewrites ssrc and payloadType and
|
|
21
|
-
* offsets sequenceNumber/timestamp, so the local track starts both at 0.
|
|
22
|
-
* - ../../rtp/src/codec/opus.d.ts: `OpusRtpPayload.deSerialize(buffer)`.
|
|
23
|
-
* - node_modules/@evan/opus/lib.d.ts: `Encoder.encode(pcm16)` returns one Opus
|
|
24
|
-
* packet; `Decoder.decode(packet)` returns interleaved PCM16 bytes.
|
|
25
|
-
* Participant shapes copied from the headless phone that joined Relay's room
|
|
26
|
-
* through Cloudflare's SFU on 2026-09-21 (_runtime/bin/headless-phone-webrtc.mjs
|
|
27
|
-
* lines 93-160): `bundlePolicy: "max-bundle", iceServers: []` (Cloudflare
|
|
28
|
-
* supplies its ICE candidates in the answer), the local track is id
|
|
29
|
-
* "microphone" in stream "relay-call" (Relay-iOS RelayWebRTCAudioTransport),
|
|
30
|
-
* the first RTP packet carries the marker bit, empty payloads are skipped and a
|
|
31
|
-
* decode failure never tears the sink down.
|
|
32
|
-
*/
|
|
33
|
-
import { Decoder, Encoder } from "@evan/opus";
|
|
34
|
-
import { MediaStreamTrack, OpusRtpPayload, RTCPeerConnection, RTCRtpCodecParameters, RtpHeader, RtpPacket, } from "werift";
|
|
35
|
-
/** Opus on the wire is always 48 kHz; Relay sends stereo so callers may pass either channel count. */
|
|
36
|
-
export const WERIFT_SAMPLE_RATE = 48_000;
|
|
37
|
-
export const WERIFT_CHANNEL_COUNT = 2;
|
|
38
|
-
/** One RTP packet carries 20 ms: 960 frames at 48 kHz, timestamp advances by 960. */
|
|
39
|
-
export const WERIFT_PACKET_MS = 20;
|
|
40
|
-
const PACKET_FRAMES = (WERIFT_SAMPLE_RATE * WERIFT_PACKET_MS) / 1000;
|
|
41
|
-
const PACKET_SAMPLES = PACKET_FRAMES * WERIFT_CHANNEL_COUNT;
|
|
42
|
-
/** Dynamic payload type; werift's sender replaces it with the negotiated one. */
|
|
43
|
-
const LOCAL_PAYLOAD_TYPE = 111;
|
|
44
|
-
/** Packets counted for `diagnostics()`; the recent window is the last 5 s. */
|
|
45
|
-
export const STATS_WINDOW_MS = 5_000;
|
|
46
|
-
/** Monotone packet counter with first/last epoch timestamps and a 5 s window. */
|
|
47
|
-
class PacketClock {
|
|
48
|
-
count = 0;
|
|
49
|
-
firstAt;
|
|
50
|
-
lastAt;
|
|
51
|
-
#recent = [];
|
|
52
|
-
mark(now = Date.now()) {
|
|
53
|
-
this.count += 1;
|
|
54
|
-
this.firstAt ??= now;
|
|
55
|
-
this.lastAt = now;
|
|
56
|
-
this.#recent.push(now);
|
|
57
|
-
this.#prune(now);
|
|
58
|
-
}
|
|
59
|
-
recent(now = Date.now()) {
|
|
60
|
-
this.#prune(now);
|
|
61
|
-
return this.#recent.length;
|
|
62
|
-
}
|
|
63
|
-
#prune(now) {
|
|
64
|
-
const floor = now - STATS_WINDOW_MS;
|
|
65
|
-
let drop = 0;
|
|
66
|
-
while (drop < this.#recent.length && this.#recent[drop] < floor)
|
|
67
|
-
drop += 1;
|
|
68
|
-
if (drop)
|
|
69
|
-
this.#recent.splice(0, drop);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
/** Convert any PCM16 frame to interleaved 48 kHz stereo by linear interpolation. */
|
|
73
|
-
export const toWireFormat = (data) => {
|
|
74
|
-
const { samples, sampleRate, channelCount } = data;
|
|
75
|
-
const inputFrames = Math.floor(samples.length / channelCount);
|
|
76
|
-
if (sampleRate === WERIFT_SAMPLE_RATE && channelCount === WERIFT_CHANNEL_COUNT) {
|
|
77
|
-
return samples;
|
|
78
|
-
}
|
|
79
|
-
const outputFrames = Math.round((inputFrames * WERIFT_SAMPLE_RATE) / sampleRate);
|
|
80
|
-
const out = new Int16Array(outputFrames * WERIFT_CHANNEL_COUNT);
|
|
81
|
-
const ratio = sampleRate / WERIFT_SAMPLE_RATE;
|
|
82
|
-
const leftIndex = 0;
|
|
83
|
-
const rightIndex = channelCount > 1 ? 1 : 0;
|
|
84
|
-
for (let frame = 0; frame < outputFrames; frame += 1) {
|
|
85
|
-
const position = frame * ratio;
|
|
86
|
-
const base = Math.min(Math.floor(position), inputFrames - 1);
|
|
87
|
-
const next = Math.min(base + 1, inputFrames - 1);
|
|
88
|
-
const fraction = position - Math.floor(position);
|
|
89
|
-
const left = samples[base * channelCount + leftIndex] * (1 - fraction)
|
|
90
|
-
+ samples[next * channelCount + leftIndex] * fraction;
|
|
91
|
-
const right = samples[base * channelCount + rightIndex] * (1 - fraction)
|
|
92
|
-
+ samples[next * channelCount + rightIndex] * fraction;
|
|
93
|
-
out[frame * 2] = Math.round(left);
|
|
94
|
-
out[frame * 2 + 1] = Math.round(right);
|
|
95
|
-
}
|
|
96
|
-
return out;
|
|
97
|
-
};
|
|
98
|
-
/**
|
|
99
|
-
* PCM16 in, paced 20 ms Opus RTP out. Frames are accumulated into whole
|
|
100
|
-
* packets; a timer drains one packet every 20 ms so the wire sees a steady
|
|
101
|
-
* cadence regardless of how the adapter chunks its writes.
|
|
102
|
-
*/
|
|
103
|
-
class WeriftAudioSource {
|
|
104
|
-
#encoder = new Encoder({
|
|
105
|
-
channels: WERIFT_CHANNEL_COUNT,
|
|
106
|
-
sample_rate: WERIFT_SAMPLE_RATE,
|
|
107
|
-
application: "voip",
|
|
108
|
-
});
|
|
109
|
-
#track = new MediaStreamTrack({ kind: "audio", id: "microphone", streamId: "relay-call" });
|
|
110
|
-
#packets = [];
|
|
111
|
-
#rtp = new PacketClock();
|
|
112
|
-
#opusPackets = 0;
|
|
113
|
-
#pending = new Int16Array(0);
|
|
114
|
-
#sequenceNumber = 1;
|
|
115
|
-
#timestamp = 0;
|
|
116
|
-
#first = true;
|
|
117
|
-
#pump;
|
|
118
|
-
#stopped = false;
|
|
119
|
-
stats() {
|
|
120
|
-
return {
|
|
121
|
-
opusPackets: this.#opusPackets,
|
|
122
|
-
rtpPackets: this.#rtp.count,
|
|
123
|
-
firstRtpAt: this.#rtp.firstAt,
|
|
124
|
-
lastRtpAt: this.#rtp.lastAt,
|
|
125
|
-
recentRtpPackets: this.#rtp.recent(),
|
|
126
|
-
queued: this.#packets.length,
|
|
127
|
-
pacerAlive: this.#pump !== undefined,
|
|
128
|
-
};
|
|
129
|
-
}
|
|
130
|
-
createTrack() {
|
|
131
|
-
const track = this.#track;
|
|
132
|
-
const stop = track.stop;
|
|
133
|
-
track.stop = () => {
|
|
134
|
-
this.#stopped = true;
|
|
135
|
-
this.#packets.length = 0;
|
|
136
|
-
this.#pending = new Int16Array(0);
|
|
137
|
-
this.#stopPump();
|
|
138
|
-
stop();
|
|
139
|
-
};
|
|
140
|
-
return track;
|
|
141
|
-
}
|
|
142
|
-
onData(data) {
|
|
143
|
-
if (this.#stopped)
|
|
144
|
-
return;
|
|
145
|
-
const wire = toWireFormat(data);
|
|
146
|
-
const merged = new Int16Array(this.#pending.length + wire.length);
|
|
147
|
-
merged.set(this.#pending);
|
|
148
|
-
merged.set(wire, this.#pending.length);
|
|
149
|
-
let offset = 0;
|
|
150
|
-
while (merged.length - offset >= PACKET_SAMPLES) {
|
|
151
|
-
const frame = merged.subarray(offset, offset + PACKET_SAMPLES);
|
|
152
|
-
this.#packets.push(Buffer.from(this.#encoder.encode(frame)));
|
|
153
|
-
this.#opusPackets += 1;
|
|
154
|
-
offset += PACKET_SAMPLES;
|
|
155
|
-
}
|
|
156
|
-
this.#pending = merged.slice(offset);
|
|
157
|
-
this.#startPump();
|
|
158
|
-
}
|
|
159
|
-
#startPump() {
|
|
160
|
-
if (this.#pump || this.#packets.length === 0)
|
|
161
|
-
return;
|
|
162
|
-
this.#sendNext();
|
|
163
|
-
if (this.#packets.length === 0)
|
|
164
|
-
return;
|
|
165
|
-
this.#pump = setInterval(() => {
|
|
166
|
-
this.#sendNext();
|
|
167
|
-
if (this.#packets.length === 0)
|
|
168
|
-
this.#stopPump();
|
|
169
|
-
}, WERIFT_PACKET_MS);
|
|
170
|
-
this.#pump.unref?.();
|
|
171
|
-
}
|
|
172
|
-
#stopPump() {
|
|
173
|
-
if (!this.#pump)
|
|
174
|
-
return;
|
|
175
|
-
clearInterval(this.#pump);
|
|
176
|
-
this.#pump = undefined;
|
|
177
|
-
}
|
|
178
|
-
#sendNext() {
|
|
179
|
-
const payload = this.#packets.shift();
|
|
180
|
-
if (!payload || this.#stopped)
|
|
181
|
-
return;
|
|
182
|
-
const header = new RtpHeader({
|
|
183
|
-
payloadType: LOCAL_PAYLOAD_TYPE,
|
|
184
|
-
sequenceNumber: this.#sequenceNumber,
|
|
185
|
-
timestamp: this.#timestamp,
|
|
186
|
-
ssrc: 0,
|
|
187
|
-
marker: this.#first,
|
|
188
|
-
});
|
|
189
|
-
this.#first = false;
|
|
190
|
-
this.#sequenceNumber = (this.#sequenceNumber + 1) & 0xffff;
|
|
191
|
-
this.#timestamp = (this.#timestamp + PACKET_FRAMES) >>> 0;
|
|
192
|
-
this.#track.writeRtp(new RtpPacket(header, payload));
|
|
193
|
-
this.#rtp.mark();
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
/** Opus RTP in, PCM16 (48 kHz stereo) out, one `ondata` per packet. */
|
|
197
|
-
class WeriftAudioSink {
|
|
198
|
-
ondata = null;
|
|
199
|
-
#decoder = new Decoder({ channels: WERIFT_CHANNEL_COUNT, sample_rate: WERIFT_SAMPLE_RATE });
|
|
200
|
-
#rtp = new PacketClock();
|
|
201
|
-
#decodeFailures = 0;
|
|
202
|
-
#unsubscribe;
|
|
203
|
-
stats() {
|
|
204
|
-
return {
|
|
205
|
-
rtpPackets: this.#rtp.count,
|
|
206
|
-
decodeFailures: this.#decodeFailures,
|
|
207
|
-
firstRtpAt: this.#rtp.firstAt,
|
|
208
|
-
lastRtpAt: this.#rtp.lastAt,
|
|
209
|
-
recentRtpPackets: this.#rtp.recent(),
|
|
210
|
-
};
|
|
211
|
-
}
|
|
212
|
-
constructor(track) {
|
|
213
|
-
const { unSubscribe } = track.onReceiveRtp.subscribe((rtp) => {
|
|
214
|
-
this.#rtp.mark();
|
|
215
|
-
const handler = this.ondata;
|
|
216
|
-
if (!handler || !rtp.payload?.length)
|
|
217
|
-
return;
|
|
218
|
-
const packet = OpusRtpPayload.deSerialize(rtp.payload);
|
|
219
|
-
let bytes;
|
|
220
|
-
try {
|
|
221
|
-
bytes = this.#decoder.decode(packet.payload);
|
|
222
|
-
}
|
|
223
|
-
catch {
|
|
224
|
-
this.#decodeFailures += 1;
|
|
225
|
-
return;
|
|
226
|
-
}
|
|
227
|
-
const samples = new Int16Array(bytes.byteLength >> 1);
|
|
228
|
-
new Uint8Array(samples.buffer).set(bytes.subarray(0, samples.byteLength));
|
|
229
|
-
handler({
|
|
230
|
-
samples,
|
|
231
|
-
sampleRate: WERIFT_SAMPLE_RATE,
|
|
232
|
-
bitsPerSample: 16,
|
|
233
|
-
channelCount: WERIFT_CHANNEL_COUNT,
|
|
234
|
-
numberOfFrames: samples.length / WERIFT_CHANNEL_COUNT,
|
|
235
|
-
});
|
|
236
|
-
});
|
|
237
|
-
this.#unsubscribe = unSubscribe;
|
|
238
|
-
}
|
|
239
|
-
stop() {
|
|
240
|
-
this.ondata = null;
|
|
241
|
-
this.#unsubscribe();
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
export const createWeriftPeerConnection = (config = { iceServers: [], iceTransportPolicy: "all" }) => new RTCPeerConnection({
|
|
245
|
-
bundlePolicy: "max-bundle",
|
|
246
|
-
iceServers: config.iceServers,
|
|
247
|
-
iceTransportPolicy: config.iceTransportPolicy,
|
|
248
|
-
codecs: {
|
|
249
|
-
audio: [
|
|
250
|
-
new RTCRtpCodecParameters({
|
|
251
|
-
mimeType: "audio/opus",
|
|
252
|
-
clockRate: WERIFT_SAMPLE_RATE,
|
|
253
|
-
channels: WERIFT_CHANNEL_COUNT,
|
|
254
|
-
}),
|
|
255
|
-
],
|
|
256
|
-
},
|
|
257
|
-
});
|
|
258
|
-
export const createWeriftWebRTCFactory = () => ({
|
|
259
|
-
createPeerConnection: (config) => createWeriftPeerConnection(config),
|
|
260
|
-
createAudioSource: () => new WeriftAudioSource(),
|
|
261
|
-
createAudioSink: (track) => new WeriftAudioSink(track),
|
|
262
|
-
});
|
|
263
|
-
//# sourceMappingURL=engine-werift.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"engine-werift.js","sourceRoot":"","sources":["../src/engine-werift.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,qBAAqB,EACrB,SAAS,EACT,SAAS,GACV,MAAM,QAAQ,CAAC;AAYhB,sGAAsG;AACtG,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC;AACzC,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC;AACtC,qFAAqF;AACrF,MAAM,CAAC,MAAM,gBAAgB,GAAG,EAAE,CAAC;AACnC,MAAM,aAAa,GAAG,CAAC,kBAAkB,GAAG,gBAAgB,CAAC,GAAG,IAAI,CAAC;AACrE,MAAM,cAAc,GAAG,aAAa,GAAG,oBAAoB,CAAC;AAC5D,iFAAiF;AACjF,MAAM,kBAAkB,GAAG,GAAG,CAAC;AAI/B,8EAA8E;AAC9E,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,CAAC;AAErC,iFAAiF;AACjF,MAAM,WAAW;IACf,KAAK,GAAG,CAAC,CAAC;IACV,OAAO,CAA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E,CAAC,MAAM,EAAE,EAAE,CAAC,0BAA0B,CAAC,MAAM,CAAuC;IAC1G,iBAAiB,EAAE,GAAG,EAAE,CAAC,IAAI,iBAAiB,EAAE;IAChD,eAAe,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,eAAe,CAAC,KAAoC,CAAC;CACtF,CAAC,CAAC"}
|
package/dist/transport.d.ts
DELETED
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
import type { CallRoomEndedFrame, CallRoomOptions, CallRoomStateFrame, Relay } from "@relaymessenger/sdk";
|
|
2
|
-
export interface RelayAudioFrame {
|
|
3
|
-
/** Interleaved signed PCM16 samples. */
|
|
4
|
-
samples: Int16Array;
|
|
5
|
-
sampleRate: number;
|
|
6
|
-
channelCount: number;
|
|
7
|
-
}
|
|
8
|
-
/** Standard `RTCIceServer` shape: STUN or TURN URLs with optional credentials. */
|
|
9
|
-
export interface RelayIceServer {
|
|
10
|
-
urls: string | string[];
|
|
11
|
-
username?: string;
|
|
12
|
-
credential?: string;
|
|
13
|
-
}
|
|
14
|
-
export type RelayIceTransportPolicy = "all" | "relay";
|
|
15
|
-
export type RelayCallEngine = "werift" | "wrtc";
|
|
16
|
-
export interface RelayCallTransportOptions {
|
|
17
|
-
relay: Relay;
|
|
18
|
-
callId: string;
|
|
19
|
-
room?: CallRoomOptions;
|
|
20
|
-
/**
|
|
21
|
-
* WebRTC engine. `"werift"` (default) is pure TypeScript plus prebuilt Opus
|
|
22
|
-
* and loads no native binding. `"wrtc"` loads `@roamhq/wrtc` on demand.
|
|
23
|
-
*/
|
|
24
|
-
engine?: RelayCallEngine;
|
|
25
|
-
/**
|
|
26
|
-
* STUN and TURN servers handed to the engine's `RTCPeerConnection`. Defaults
|
|
27
|
-
* to none: Cloudflare's SFU answers with its own host candidates. Set TURN
|
|
28
|
-
* servers when the agent runs behind a NAT or firewall that blocks UDP.
|
|
29
|
-
*/
|
|
30
|
-
iceServers?: RelayIceServer[];
|
|
31
|
-
/** `"relay"` forces every candidate through TURN. Defaults to `"all"`. */
|
|
32
|
-
iceTransportPolicy?: RelayIceTransportPolicy;
|
|
33
|
-
/** Maximum wait for the WebRTC peer to become connected. Defaults to 15 seconds. */
|
|
34
|
-
mediaConnectTimeoutMs?: number;
|
|
35
|
-
/** @deprecated Use `mediaConnectTimeoutMs`. */
|
|
36
|
-
connectionTimeoutMs?: number;
|
|
37
|
-
/**
|
|
38
|
-
* Called once per call when outbound audio is queued but no RTP packet has
|
|
39
|
-
* been written for 2 s while media is connected. Receives the diagnostics
|
|
40
|
-
* summary. Defaults to a no-op; nothing is restarted.
|
|
41
|
-
*/
|
|
42
|
-
onWarning?: (message: string) => void;
|
|
43
|
-
}
|
|
44
|
-
/** Packet counts for the other participant's track, as seen by this participant. */
|
|
45
|
-
export interface RelayCallInboundDiagnostics {
|
|
46
|
-
/** RTP packets received on the subscribed track. */
|
|
47
|
-
rtpPackets: number;
|
|
48
|
-
/** Opus packets the decoder rejected. */
|
|
49
|
-
decodeFailures: number;
|
|
50
|
-
/** PCM frames handed to the `audio` listeners. */
|
|
51
|
-
frames: number;
|
|
52
|
-
/** ms since `connect()` for the first and last RTP packet; undefined until one arrives. */
|
|
53
|
-
firstPacketAtMs: number | undefined;
|
|
54
|
-
lastPacketAtMs: number | undefined;
|
|
55
|
-
/** RTP packets received in the 5 s before `diagnostics()` was called. */
|
|
56
|
-
recentRtpPackets: number;
|
|
57
|
-
}
|
|
58
|
-
/** Packet counts for this participant's published track. */
|
|
59
|
-
export interface RelayCallOutboundDiagnostics {
|
|
60
|
-
/** PCM slices accepted from the caller and handed to the engine source. */
|
|
61
|
-
frames: number;
|
|
62
|
-
opusPackets: number;
|
|
63
|
-
rtpPackets: number;
|
|
64
|
-
firstPacketAtMs: number | undefined;
|
|
65
|
-
lastPacketAtMs: number | undefined;
|
|
66
|
-
/** RTP packets written in the 5 s before `diagnostics()` was called. */
|
|
67
|
-
recentRtpPackets: number;
|
|
68
|
-
/** Encoded packets waiting for the 20 ms pacer. */
|
|
69
|
-
queued: number;
|
|
70
|
-
/** `undefined` when the engine does not expose its pacer (`wrtc`). */
|
|
71
|
-
pacerAlive: boolean | undefined;
|
|
72
|
-
}
|
|
73
|
-
/** Room signaling frames counted since `connect()`. */
|
|
74
|
-
export interface RelayCallRoomDiagnostics {
|
|
75
|
-
roomStates: number;
|
|
76
|
-
/** Subscription (pull) offers received from the room. */
|
|
77
|
-
offers: number;
|
|
78
|
-
endedReason: string | undefined;
|
|
79
|
-
/** `error` frame messages, in order. */
|
|
80
|
-
errors: string[];
|
|
81
|
-
}
|
|
82
|
-
/** ICE facts recorded for one call, for logs and for the connect timeout error. */
|
|
83
|
-
export interface RelayCallIceDiagnostics {
|
|
84
|
-
/** Local candidates gathered, counted by type. */
|
|
85
|
-
local: {
|
|
86
|
-
host: number;
|
|
87
|
-
srflx: number;
|
|
88
|
-
relay: number;
|
|
89
|
-
other: number;
|
|
90
|
-
};
|
|
91
|
-
/** Remote candidates from the SFU answer: transport and port only, never the address. */
|
|
92
|
-
remote: Array<{
|
|
93
|
-
transport: string;
|
|
94
|
-
port: number;
|
|
95
|
-
}>;
|
|
96
|
-
/** ICE gathering, ICE connection and peer connection state changes since `connect()`. */
|
|
97
|
-
transitions: Array<{
|
|
98
|
-
kind: "gathering" | "ice" | "connection";
|
|
99
|
-
state: string;
|
|
100
|
-
atMs: number;
|
|
101
|
-
}>;
|
|
102
|
-
connected: boolean;
|
|
103
|
-
inbound: RelayCallInboundDiagnostics;
|
|
104
|
-
outbound: RelayCallOutboundDiagnostics;
|
|
105
|
-
room: RelayCallRoomDiagnostics;
|
|
106
|
-
/** One-line rendering of the fields above. */
|
|
107
|
-
summary: string;
|
|
108
|
-
}
|
|
109
|
-
export interface RelayCallTransportCloseEvent {
|
|
110
|
-
code: number;
|
|
111
|
-
reason: string;
|
|
112
|
-
wasClean: boolean;
|
|
113
|
-
}
|
|
114
|
-
type TransportEventMap = {
|
|
115
|
-
audio: [RelayAudioFrame];
|
|
116
|
-
connected: [];
|
|
117
|
-
roomState: [CallRoomStateFrame];
|
|
118
|
-
ended: [CallRoomEndedFrame];
|
|
119
|
-
error: [Error];
|
|
120
|
-
close: [RelayCallTransportCloseEvent];
|
|
121
|
-
};
|
|
122
|
-
type TransportEvent = keyof TransportEventMap;
|
|
123
|
-
type TransportListener<K extends TransportEvent> = (...args: TransportEventMap[K]) => void;
|
|
124
|
-
export declare class RelayCallTransportError extends Error {
|
|
125
|
-
readonly code?: string;
|
|
126
|
-
constructor(message: string, code?: string);
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* Provider-neutral Node WebRTC bridge for Relay Call rooms.
|
|
130
|
-
*
|
|
131
|
-
* The class owns Relay media negotiation internally. Higher-level adapters only
|
|
132
|
-
* exchange PCM16 frames and call lifecycle events.
|
|
133
|
-
*/
|
|
134
|
-
export declare class RelayCallTransport {
|
|
135
|
-
#private;
|
|
136
|
-
constructor(options: RelayCallTransportOptions);
|
|
137
|
-
on<K extends TransportEvent>(event: K, listener: TransportListener<K>): this;
|
|
138
|
-
off<K extends TransportEvent>(event: K, listener: TransportListener<K>): this;
|
|
139
|
-
connect(): Promise<void>;
|
|
140
|
-
/** Replace only the room signaling socket and replay the identical publication. */
|
|
141
|
-
reconnect(): Promise<void>;
|
|
142
|
-
/**
|
|
143
|
-
* ICE candidates, state transitions, packet counts in both directions and
|
|
144
|
-
* room frame counts recorded for this call, with a one-line summary.
|
|
145
|
-
*/
|
|
146
|
-
diagnostics(): RelayCallIceDiagnostics;
|
|
147
|
-
/**
|
|
148
|
-
* Feed interleaved PCM16 audio into Relay. Frames are split into 10 ms WebRTC
|
|
149
|
-
* source slices and paced in real time, so adapters may push larger chunks.
|
|
150
|
-
*/
|
|
151
|
-
writeAudio(frame: RelayAudioFrame): Promise<void>;
|
|
152
|
-
/** Drop queued outgoing PCM. At most one already-submitted 10 ms slice remains. */
|
|
153
|
-
clearAudio(): void;
|
|
154
|
-
setMuted(muted: boolean): void;
|
|
155
|
-
end(): void;
|
|
156
|
-
close(): void;
|
|
157
|
-
}
|
|
158
|
-
export {};
|
|
159
|
-
//# sourceMappingURL=transport.d.ts.map
|
package/dist/transport.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../src/transport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,kBAAkB,EAElB,eAAe,EAGf,kBAAkB,EAElB,KAAK,EACN,MAAM,qBAAqB,CAAC;AAE7B,MAAM,WAAW,eAAe;IAC9B,wCAAwC;IACxC,OAAO,EAAE,UAAU,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;CACtB;AA4FD,kFAAkF;AAClF,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,MAAM,uBAAuB,GAAG,KAAK,GAAG,OAAO,CAAC;AAetD,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,MAAM,CAAC;AAEhD,MAAM,WAAW,yBAAyB;IACxC,KAAK,EAAE,KAAK,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,eAAe,CAAC;IAGvB;;;OAGG;IACH,MAAM,CAAC,EAAE,eAAe,CAAC;IAGzB;;;;OAIG;IACH,UAAU,CAAC,EAAE,cAAc,EAAE,CAAC;IAC9B,0EAA0E;IAC1E,kBAAkB,CAAC,EAAE,uBAAuB,CAAC;IAG7C,oFAAoF;IACpF,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,+CAA+C;IAC/C,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;;;OAIG;IACH,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACvC;AAED,oFAAoF;AACpF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