livekit-client 1.13.3 → 1.13.4
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +2 -2
- package/dist/livekit-client.e2ee.worker.js +1 -1
- package/dist/livekit-client.e2ee.worker.js.map +1 -1
- package/dist/livekit-client.e2ee.worker.mjs +86 -16
- package/dist/livekit-client.e2ee.worker.mjs.map +1 -1
- package/dist/livekit-client.esm.mjs +87 -8
- package/dist/livekit-client.esm.mjs.map +1 -1
- package/dist/livekit-client.umd.js +1 -1
- package/dist/livekit-client.umd.js.map +1 -1
- package/dist/src/e2ee/utils.d.ts +3 -0
- package/dist/src/e2ee/utils.d.ts.map +1 -1
- package/dist/src/e2ee/worker/FrameCryptor.d.ts.map +1 -1
- package/dist/src/room/RTCEngine.d.ts.map +1 -1
- package/dist/src/room/track/LocalTrack.d.ts +7 -0
- package/dist/src/room/track/LocalTrack.d.ts.map +1 -1
- package/dist/src/room/track/RemoteTrack.d.ts +7 -0
- package/dist/src/room/track/RemoteTrack.d.ts.map +1 -1
- package/dist/ts4.2/src/e2ee/utils.d.ts +3 -0
- package/dist/ts4.2/src/room/track/LocalTrack.d.ts +7 -0
- package/dist/ts4.2/src/room/track/RemoteTrack.d.ts +7 -0
- package/package.json +1 -1
- package/src/e2ee/utils.ts +52 -0
- package/src/e2ee/worker/FrameCryptor.ts +45 -27
- package/src/room/RTCEngine.ts +3 -2
- package/src/room/Room.ts +3 -3
- package/src/room/participant/LocalParticipant.ts +2 -2
- package/src/room/track/LocalTrack.ts +14 -0
- package/src/room/track/RemoteTrack.ts +14 -0
package/dist/src/e2ee/utils.d.ts
CHANGED
@@ -22,4 +22,7 @@ export declare function mimeTypeToVideoCodecString(mimeType: string): "vp8" | "h
|
|
22
22
|
* https://tools.ietf.org/html/draft-omara-sframe-00#section-4.3.5.1
|
23
23
|
*/
|
24
24
|
export declare function ratchet(material: CryptoKey, salt: string): Promise<ArrayBuffer>;
|
25
|
+
export declare function needsRbspUnescaping(frameData: Uint8Array): boolean;
|
26
|
+
export declare function parseRbsp(stream: Uint8Array): Uint8Array;
|
27
|
+
export declare function writeRbsp(data_in: Uint8Array): Uint8Array;
|
25
28
|
//# sourceMappingURL=utils.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/e2ee/utils.ts"],"names":[],"mappings":"AAIA,wBAAgB,eAAe,YAE9B;AAED,wBAAgB,0BAA0B,YAGzC;AAED,wBAAgB,2BAA2B,YAM1C;AAED,wBAAgB,YAAY,CAC1B,KAAK,EAAE,oBAAoB,GAAG,oBAAoB,GACjD,KAAK,IAAI,oBAAoB,CAE/B;AAED,wBAAsB,SAAS,CAC7B,QAAQ,EAAE,UAAU,GAAG,WAAW,EAClC,SAAS,GAAE,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAmC,EACrE,KAAK,GAAE,QAAQ,GAAG,SAAqB,sBAUxC;AAED,wBAAsB,2BAA2B,CAAC,QAAQ,EAAE,MAAM,sBAcjE;AAED,wBAAsB,2BAA2B,CAAC,YAAY,EAAE,WAAW,sBAO1E;AA0BD;;;GAGG;AACH,wBAAsB,UAAU,CAAC,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM;;;GAiBjE;AAED,wBAAgB,aAAa,IAAI,UAAU,CAE1C;AAED,wBAAgB,0BAA0B,CAAC,QAAQ,EAAE,MAAM,kCAM1D;AAED;;;GAGG;AACH,wBAAsB,OAAO,CAAC,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAKrF"}
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/e2ee/utils.ts"],"names":[],"mappings":"AAIA,wBAAgB,eAAe,YAE9B;AAED,wBAAgB,0BAA0B,YAGzC;AAED,wBAAgB,2BAA2B,YAM1C;AAED,wBAAgB,YAAY,CAC1B,KAAK,EAAE,oBAAoB,GAAG,oBAAoB,GACjD,KAAK,IAAI,oBAAoB,C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IAAI,CAAC;IAC5E,iBAAiB,EAAE,CAAC,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,KAAK,IAAI,CAAC;IAC7E,gBAAgB;IAChB,gBAAgB,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,KAAK,IAAI,CAAC;IAC/D,iBAAiB,EAAE,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,KAAK,IAAI,CAAC;IAC7D,qBAAqB,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,eAAe,KAAK,IAAI,CAAC;IACvE,iBAAiB,EAAE,CAAC,KAAK,EAAE,eAAe,EAAE,KAAK,IAAI,CAAC;IACtD,UAAU,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;IACtC,uBAAuB,EAAE,CAAC,MAAM,EAAE,uBAAuB,KAAK,IAAI,CAAC;IACnE,eAAe,EAAE,CAAC,cAAc,EAAE,WAAW,EAAE,KAAK,IAAI,CAAC;IACzD,kBAAkB,EAAE,CAAC,MAAM,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACxD,iBAAiB,EAAE,CAAC,IAAI,EAAE,oBAAoB,KAAK,IAAI,CAAC;IACxD,4BAA4B,EAAE,CAAC,MAAM,EAAE,4BAA4B,KAAK,IAAI,CAAC;CAC9E,CAAC"}
|
@@ -56,6 +56,13 @@ export default abstract class LocalTrack extends Track {
|
|
56
56
|
**/
|
57
57
|
pauseUpstream(): Promise<void>;
|
58
58
|
resumeUpstream(): Promise<void>;
|
59
|
+
/**
|
60
|
+
* Gets the RTCStatsReport for the LocalTrack's underlying RTCRtpSender
|
61
|
+
* See https://developer.mozilla.org/en-US/docs/Web/API/RTCStatsReport
|
62
|
+
*
|
63
|
+
* @returns Promise<RTCStatsReport> | undefined
|
64
|
+
*/
|
65
|
+
getRTCStatsReport(): Promise<RTCStatsReport | undefined>;
|
59
66
|
/**
|
60
67
|
* Sets a processor on this track.
|
61
68
|
* See https://github.com/livekit/track-processors-js for example usage
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"LocalTrack.d.ts","sourceRoot":"","sources":["../../../../src/room/track/LocalTrack.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,EAAoC,MAAM,UAAU,CAAC;AACnE,OAAO,EAAE,KAAK,EAAgC,MAAM,SAAS,CAAC;AAC9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAIxD,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,UAAW,SAAQ,KAAK;IACpD,gBAAgB;IAChB,MAAM,CAAC,EAAE,YAAY,CAAC;IAEtB,gBAAgB;IAChB,KAAK,CAAC,EAAE,UAAU,CAAC;IAEnB,IAAI,WAAW,0BAEd;IAED,SAAS,CAAC,YAAY,EAAE,qBAAqB,CAAC;IAE9C,SAAS,CAAC,cAAc,EAAE,OAAO,CAAC;IAElC,SAAS,CAAC,cAAc,EAAE,OAAO,CAAC;IAElC,SAAS,CAAC,QAAQ,EAAE,KAAK,CAAC;IAE1B,SAAS,CAAC,iBAAiB,EAAE,KAAK,CAAC;IAEnC,SAAS,CAAC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IAE9C,SAAS,CAAC,SAAS,CAAC,EAAE,cAAc,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC;IAEvD,SAAS,CAAC,aAAa,EAAE,KAAK,CAAC;IAE/B;;;;;;OAMG;IACH,SAAS,aACP,UAAU,EAAE,gBAAgB,EAC5B,IAAI,EAAE,KAAK,CAAC,IAAI,EAChB,WAAW,CAAC,EAAE,qBAAqB,EACnC,iBAAiB,UAAQ;IAiB3B,IAAI,EAAE,IAAI,MAAM,CAEf;IAED,IAAI,UAAU,IAAI,KAAK,CAAC,UAAU,GAAG,SAAS,CAa7C;IAED,OAAO,CAAC,iBAAiB,CAAkB;I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AAC;IAK3B,MAAM,IAAI,OAAO,CAAC,UAAU,CAAC;IAK7B,YAAY,CAAC,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,UAAO,GAAG,OAAO,CAAC,UAAU,CAAC;cAiB1E,OAAO,CAAC,WAAW,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,UAAU,CAAC;IAyCjF,SAAS,CAAC,aAAa,CAAC,KAAK,EAAE,OAAO;IAYtC,SAAS,KAAK,kBAAkB,IAAI,OAAO,CAO1C;cAEe,0BAA0B;IAY1C,OAAO,CAAC,oBAAoB,CAGxB;IAEJ,OAAO,CAAC,yBAAyB,CAExB;IAET,OAAO,CAAC,sBAAsB,CAG5B;IAEF,OAAO,CAAC,WAAW,CAOjB;IAEF,IAAI;IAUJ;;;;;QAKI;IACE,aAAa;IAwBb,cAAc;IAoBpB;;;;;OAKG;IACG,iBAAiB,IAAI,OAAO,CAAC,cAAc,GAAG,SAAS,CAAC;IAQ9D;;;;;;;;;OASG;IACG,YAAY,CAChB,SAAS,EAAE,cAAc,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,EAC3C,0BAA0B,UAAO;IAyCnC,YAAY;IAIZ;;;;;;OAMG;IACG,aAAa;IAanB,SAAS,CAAC,QAAQ,CAAC,aAAa,IAAI,IAAI;CACzC"}
|
@@ -9,6 +9,13 @@ export default abstract class RemoteTrack extends Track {
|
|
9
9
|
setMediaStream(stream: MediaStream): void;
|
10
10
|
start(): void;
|
11
11
|
stop(): void;
|
12
|
+
/**
|
13
|
+
* Gets the RTCStatsReport for the RemoteTrack's underlying RTCRtpReceiver
|
14
|
+
* See https://developer.mozilla.org/en-US/docs/Web/API/RTCStatsReport
|
15
|
+
*
|
16
|
+
* @returns Promise<RTCStatsReport> | undefined
|
17
|
+
*/
|
18
|
+
getRTCStatsReport(): Promise<RTCStatsReport | undefined>;
|
12
19
|
startMonitor(): void;
|
13
20
|
protected abstract monitorReceiver(): void;
|
14
21
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"RemoteTrack.d.ts","sourceRoot":"","sources":["../../../../src/room/track/RemoteTrack.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,WAAY,SAAQ,KAAK;IACrD,gBAAgB;IAChB,QAAQ,CAAC,EAAE,cAAc,CAAC;gBAGxB,UAAU,EAAE,gBAAgB,EAC5B,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,KAAK,CAAC,IAAI,EAChB,QAAQ,CAAC,EAAE,cAAc;IAO3B,gBAAgB;IAChB,QAAQ,CAAC,KAAK,EAAE,OAAO;IAQvB,gBAAgB;IAChB,cAAc,CAAC,MAAM,EAAE,WAAW;IAYlC,KAAK;IAML,IAAI;
|
1
|
+
{"version":3,"file":"RemoteTrack.d.ts","sourceRoot":"","sources":["../../../../src/room/track/RemoteTrack.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,WAAY,SAAQ,KAAK;IACrD,gBAAgB;IAChB,QAAQ,CAAC,EAAE,cAAc,CAAC;gBAGxB,UAAU,EAAE,gBAAgB,EAC5B,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,KAAK,CAAC,IAAI,EAChB,QAAQ,CAAC,EAAE,cAAc;IAO3B,gBAAgB;IAChB,QAAQ,CAAC,KAAK,EAAE,OAAO;IAQvB,gBAAgB;IAChB,cAAc,CAAC,MAAM,EAAE,WAAW;IAYlC,KAAK;IAML,IAAI;IAMJ;;;;;OAKG;IACG,iBAAiB,IAAI,OAAO,CAAC,cAAc,GAAG,SAAS,CAAC;IAS9D,YAAY;IAMZ,SAAS,CAAC,QAAQ,CAAC,eAAe,IAAI,IAAI;CAC3C"}
|
@@ -22,4 +22,7 @@ export declare function mimeTypeToVideoCodecString(mimeType: string): "vp8" | "h
|
|
22
22
|
* https://tools.ietf.org/html/draft-omara-sframe-00#section-4.3.5.1
|
23
23
|
*/
|
24
24
|
export declare function ratchet(material: CryptoKey, salt: string): Promise<ArrayBuffer>;
|
25
|
+
export declare function needsRbspUnescaping(frameData: Uint8Array): boolean;
|
26
|
+
export declare function parseRbsp(stream: Uint8Array): Uint8Array;
|
27
|
+
export declare function writeRbsp(data_in: Uint8Array): Uint8Array;
|
25
28
|
//# sourceMappingURL=utils.d.ts.map
|
@@ -56,6 +56,13 @@ export default abstract class LocalTrack extends Track {
|
|
56
56
|
**/
|
57
57
|
pauseUpstream(): Promise<void>;
|
58
58
|
resumeUpstream(): Promise<void>;
|
59
|
+
/**
|
60
|
+
* Gets the RTCStatsReport for the LocalTrack's underlying RTCRtpSender
|
61
|
+
* See https://developer.mozilla.org/en-US/docs/Web/API/RTCStatsReport
|
62
|
+
*
|
63
|
+
* @returns Promise<RTCStatsReport> | undefined
|
64
|
+
*/
|
65
|
+
getRTCStatsReport(): Promise<RTCStatsReport | undefined>;
|
59
66
|
/**
|
60
67
|
* Sets a processor on this track.
|
61
68
|
* See https://github.com/livekit/track-processors-js for example usage
|
@@ -9,6 +9,13 @@ export default abstract class RemoteTrack extends Track {
|
|
9
9
|
setMediaStream(stream: MediaStream): void;
|
10
10
|
start(): void;
|
11
11
|
stop(): void;
|
12
|
+
/**
|
13
|
+
* Gets the RTCStatsReport for the RemoteTrack's underlying RTCRtpReceiver
|
14
|
+
* See https://developer.mozilla.org/en-US/docs/Web/API/RTCStatsReport
|
15
|
+
*
|
16
|
+
* @returns Promise<RTCStatsReport> | undefined
|
17
|
+
*/
|
18
|
+
getRTCStatsReport(): Promise<RTCStatsReport | undefined>;
|
12
19
|
startMonitor(): void;
|
13
20
|
protected abstract monitorReceiver(): void;
|
14
21
|
}
|
package/package.json
CHANGED
package/src/e2ee/utils.ts
CHANGED
@@ -134,3 +134,55 @@ export async function ratchet(material: CryptoKey, salt: string): Promise<ArrayB
|
|
134
134
|
// https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/deriveBits
|
135
135
|
return crypto.subtle.deriveBits(algorithmOptions, material, 256);
|
136
136
|
}
|
137
|
+
|
138
|
+
export function needsRbspUnescaping(frameData: Uint8Array) {
|
139
|
+
for (var i = 0; i < frameData.length - 3; i++) {
|
140
|
+
if (frameData[i] == 0 && frameData[i + 1] == 0 && frameData[i + 2] == 3) return true;
|
141
|
+
}
|
142
|
+
return false;
|
143
|
+
}
|
144
|
+
|
145
|
+
export function parseRbsp(stream: Uint8Array): Uint8Array {
|
146
|
+
const dataOut: number[] = [];
|
147
|
+
var length = stream.length;
|
148
|
+
for (var i = 0; i < stream.length; ) {
|
149
|
+
// Be careful about over/underflow here. byte_length_ - 3 can underflow, and
|
150
|
+
// i + 3 can overflow, but byte_length_ - i can't, because i < byte_length_
|
151
|
+
// above, and that expression will produce the number of bytes left in
|
152
|
+
// the stream including the byte at i.
|
153
|
+
if (length - i >= 3 && !stream[i] && !stream[i + 1] && stream[i + 2] == 3) {
|
154
|
+
// Two rbsp bytes.
|
155
|
+
dataOut.push(stream[i++]);
|
156
|
+
dataOut.push(stream[i++]);
|
157
|
+
// Skip the emulation byte.
|
158
|
+
i++;
|
159
|
+
} else {
|
160
|
+
// Single rbsp byte.
|
161
|
+
dataOut.push(stream[i++]);
|
162
|
+
}
|
163
|
+
}
|
164
|
+
return new Uint8Array(dataOut);
|
165
|
+
}
|
166
|
+
|
167
|
+
const kZerosInStartSequence = 2;
|
168
|
+
const kEmulationByte = 3;
|
169
|
+
|
170
|
+
export function writeRbsp(data_in: Uint8Array): Uint8Array {
|
171
|
+
const dataOut: number[] = [];
|
172
|
+
var numConsecutiveZeros = 0;
|
173
|
+
for (var i = 0; i < data_in.length; ++i) {
|
174
|
+
var byte = data_in[i];
|
175
|
+
if (byte <= kEmulationByte && numConsecutiveZeros >= kZerosInStartSequence) {
|
176
|
+
// Need to escape.
|
177
|
+
dataOut.push(kEmulationByte);
|
178
|
+
numConsecutiveZeros = 0;
|
179
|
+
}
|
180
|
+
dataOut.push(byte);
|
181
|
+
if (byte == 0) {
|
182
|
+
++numConsecutiveZeros;
|
183
|
+
} else {
|
184
|
+
numConsecutiveZeros = 0;
|
185
|
+
}
|
186
|
+
}
|
187
|
+
return new Uint8Array(dataOut);
|
188
|
+
}
|
@@ -8,7 +8,7 @@ import { ENCRYPTION_ALGORITHM, IV_LENGTH, UNENCRYPTED_BYTES } from '../constants
|
|
8
8
|
import { CryptorError, CryptorErrorReason } from '../errors';
|
9
9
|
import { CryptorCallbacks, CryptorEvent } from '../events';
|
10
10
|
import type { DecodeRatchetOptions, KeyProviderOptions, KeySet } from '../types';
|
11
|
-
import { deriveKeys, isVideoFrame } from '../utils';
|
11
|
+
import { deriveKeys, isVideoFrame, needsRbspUnescaping, parseRbsp, writeRbsp } from '../utils';
|
12
12
|
import type { ParticipantKeyHandler } from './ParticipantKeyHandler';
|
13
13
|
import { SifGuard } from './SifGuard';
|
14
14
|
|
@@ -211,13 +211,9 @@ export class FrameCryptor extends BaseFrameCryptor {
|
|
211
211
|
encodedFrame.getMetadata().synchronizationSource ?? -1,
|
212
212
|
encodedFrame.timestamp,
|
213
213
|
);
|
214
|
-
|
214
|
+
let frameInfo = this.getUnencryptedBytes(encodedFrame);
|
215
215
|
// Thіs is not encrypted and contains the VP8 payload descriptor or the Opus TOC byte.
|
216
|
-
const frameHeader = new Uint8Array(
|
217
|
-
encodedFrame.data,
|
218
|
-
0,
|
219
|
-
this.getUnencryptedBytes(encodedFrame),
|
220
|
-
);
|
216
|
+
const frameHeader = new Uint8Array(encodedFrame.data, 0, frameInfo.unencryptedBytes);
|
221
217
|
|
222
218
|
// Frame trailer contains the R|IV_LENGTH and key index
|
223
219
|
const frameTrailer = new Uint8Array(2);
|
@@ -240,20 +236,25 @@ export class FrameCryptor extends BaseFrameCryptor {
|
|
240
236
|
additionalData: new Uint8Array(encodedFrame.data, 0, frameHeader.byteLength),
|
241
237
|
},
|
242
238
|
encryptionKey,
|
243
|
-
new Uint8Array(encodedFrame.data,
|
239
|
+
new Uint8Array(encodedFrame.data, frameInfo.unencryptedBytes),
|
244
240
|
);
|
245
241
|
|
246
|
-
|
247
|
-
|
242
|
+
let newDataWithoutHeader = new Uint8Array(
|
243
|
+
cipherText.byteLength + iv.byteLength + frameTrailer.byteLength,
|
248
244
|
);
|
249
|
-
|
245
|
+
newDataWithoutHeader.set(new Uint8Array(cipherText)); // add ciphertext.
|
246
|
+
newDataWithoutHeader.set(new Uint8Array(iv), cipherText.byteLength); // append IV.
|
247
|
+
newDataWithoutHeader.set(frameTrailer, cipherText.byteLength + iv.byteLength); // append frame trailer.
|
248
|
+
|
249
|
+
if (frameInfo.isH264) {
|
250
|
+
newDataWithoutHeader = writeRbsp(newDataWithoutHeader);
|
251
|
+
}
|
250
252
|
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
newUint8.set(frameTrailer, frameHeader.byteLength + cipherText.byteLength + iv.byteLength); // append frame trailer.
|
253
|
+
var newData = new Uint8Array(frameHeader.byteLength + newDataWithoutHeader.byteLength);
|
254
|
+
newData.set(frameHeader);
|
255
|
+
newData.set(newDataWithoutHeader, frameHeader.byteLength);
|
255
256
|
|
256
|
-
encodedFrame.data = newData;
|
257
|
+
encodedFrame.data = newData.buffer;
|
257
258
|
|
258
259
|
return controller.enqueue(encodedFrame);
|
259
260
|
} catch (e: any) {
|
@@ -350,7 +351,7 @@ export class FrameCryptor extends BaseFrameCryptor {
|
|
350
351
|
if (!ratchetOpts.encryptionKey && !keySet) {
|
351
352
|
throw new TypeError(`no encryption key found for decryption of ${this.participantIdentity}`);
|
352
353
|
}
|
353
|
-
|
354
|
+
let frameInfo = this.getUnencryptedBytes(encodedFrame);
|
354
355
|
// Construct frame trailer. Similar to the frame header described in
|
355
356
|
// https://tools.ietf.org/html/draft-omara-sframe-00#section-4.2
|
356
357
|
// but we put it at the end.
|
@@ -360,11 +361,20 @@ export class FrameCryptor extends BaseFrameCryptor {
|
|
360
361
|
// ---------+-------------------------+-+---------+----
|
361
362
|
|
362
363
|
try {
|
363
|
-
const frameHeader = new Uint8Array(
|
364
|
+
const frameHeader = new Uint8Array(encodedFrame.data, 0, frameInfo.unencryptedBytes);
|
365
|
+
var encryptedData = new Uint8Array(
|
364
366
|
encodedFrame.data,
|
365
|
-
|
366
|
-
|
367
|
+
frameHeader.length,
|
368
|
+
encodedFrame.data.byteLength - frameHeader.length,
|
367
369
|
);
|
370
|
+
if (frameInfo.isH264 && needsRbspUnescaping(encryptedData)) {
|
371
|
+
encryptedData = parseRbsp(encryptedData);
|
372
|
+
const newUint8 = new Uint8Array(frameHeader.byteLength + encryptedData.byteLength);
|
373
|
+
newUint8.set(frameHeader);
|
374
|
+
newUint8.set(encryptedData, frameHeader.byteLength);
|
375
|
+
encodedFrame.data = newUint8.buffer;
|
376
|
+
}
|
377
|
+
|
368
378
|
const frameTrailer = new Uint8Array(encodedFrame.data, encodedFrame.data.byteLength - 2, 2);
|
369
379
|
|
370
380
|
const ivLength = frameTrailer[0];
|
@@ -493,7 +503,11 @@ export class FrameCryptor extends BaseFrameCryptor {
|
|
493
503
|
return iv;
|
494
504
|
}
|
495
505
|
|
496
|
-
private getUnencryptedBytes(frame: RTCEncodedVideoFrame | RTCEncodedAudioFrame):
|
506
|
+
private getUnencryptedBytes(frame: RTCEncodedVideoFrame | RTCEncodedAudioFrame): {
|
507
|
+
unencryptedBytes: number;
|
508
|
+
isH264: boolean;
|
509
|
+
} {
|
510
|
+
var frameInfo = { unencryptedBytes: 0, isH264: false };
|
497
511
|
if (isVideoFrame(frame)) {
|
498
512
|
let detectedCodec = this.getVideoCodec(frame) ?? this.videoCodec;
|
499
513
|
|
@@ -502,7 +516,8 @@ export class FrameCryptor extends BaseFrameCryptor {
|
|
502
516
|
}
|
503
517
|
|
504
518
|
if (detectedCodec === 'vp8') {
|
505
|
-
|
519
|
+
frameInfo.unencryptedBytes = UNENCRYPTED_BYTES[frame.type];
|
520
|
+
return frameInfo;
|
506
521
|
}
|
507
522
|
|
508
523
|
const data = new Uint8Array(frame.data);
|
@@ -510,19 +525,20 @@ export class FrameCryptor extends BaseFrameCryptor {
|
|
510
525
|
const naluIndices = findNALUIndices(data);
|
511
526
|
|
512
527
|
// if the detected codec is undefined we test whether it _looks_ like a h264 frame as a best guess
|
513
|
-
|
528
|
+
frameInfo.isH264 =
|
514
529
|
detectedCodec === 'h264' ||
|
515
530
|
naluIndices.some((naluIndex) =>
|
516
531
|
[NALUType.SLICE_IDR, NALUType.SLICE_NON_IDR].includes(parseNALUType(data[naluIndex])),
|
517
532
|
);
|
518
533
|
|
519
|
-
if (isH264) {
|
534
|
+
if (frameInfo.isH264) {
|
520
535
|
for (const index of naluIndices) {
|
521
536
|
let type = parseNALUType(data[index]);
|
522
537
|
switch (type) {
|
523
538
|
case NALUType.SLICE_IDR:
|
524
539
|
case NALUType.SLICE_NON_IDR:
|
525
|
-
|
540
|
+
frameInfo.unencryptedBytes = index + 2;
|
541
|
+
return frameInfo;
|
526
542
|
default:
|
527
543
|
break;
|
528
544
|
}
|
@@ -533,9 +549,11 @@ export class FrameCryptor extends BaseFrameCryptor {
|
|
533
549
|
// no op, we just continue and fallback to vp8
|
534
550
|
}
|
535
551
|
|
536
|
-
|
552
|
+
frameInfo.unencryptedBytes = UNENCRYPTED_BYTES[frame.type];
|
553
|
+
return frameInfo;
|
537
554
|
} else {
|
538
|
-
|
555
|
+
frameInfo.unencryptedBytes = UNENCRYPTED_BYTES.audio;
|
556
|
+
return frameInfo;
|
539
557
|
}
|
540
558
|
}
|
541
559
|
|
package/src/room/RTCEngine.ts
CHANGED
@@ -267,7 +267,7 @@ export default class RTCEngine extends (EventEmitter as new () => TypedEventEmit
|
|
267
267
|
this.subscriber.close();
|
268
268
|
this.subscriber = undefined;
|
269
269
|
}
|
270
|
-
|
270
|
+
this.hasPublished = false;
|
271
271
|
this.primaryPC = undefined;
|
272
272
|
|
273
273
|
const dcCleanup = (dc: RTCDataChannel | undefined) => {
|
@@ -1092,7 +1092,8 @@ export default class RTCEngine extends (EventEmitter as new () => TypedEventEmit
|
|
1092
1092
|
// this means we'd have to check its status manually and update address
|
1093
1093
|
// manually
|
1094
1094
|
now - startTime > minReconnectWait &&
|
1095
|
-
this.primaryPC?.connectionState === 'connected'
|
1095
|
+
this.primaryPC?.connectionState === 'connected' &&
|
1096
|
+
(!this.hasPublished || this.publisher?.pc.connectionState === 'connected')
|
1096
1097
|
) {
|
1097
1098
|
this.pcState = PCState.Connected;
|
1098
1099
|
}
|
package/src/room/Room.ts
CHANGED
@@ -457,9 +457,9 @@ class Room extends (EventEmitter as new () => TypedEmitter<RoomEventCallbacks>)
|
|
457
457
|
}
|
458
458
|
}
|
459
459
|
if (nextUrl) {
|
460
|
-
log.info(
|
461
|
-
nextUrl
|
462
|
-
|
460
|
+
log.info(
|
461
|
+
`Initial connection failed with ConnectionError: ${e.message}. Retrying with another region: ${nextUrl}`,
|
462
|
+
);
|
463
463
|
await connectFn(resolve, reject, nextUrl);
|
464
464
|
} else {
|
465
465
|
reject(e);
|
@@ -145,8 +145,8 @@ export default class LocalParticipant extends Participant {
|
|
145
145
|
|
146
146
|
this.engine
|
147
147
|
.on(EngineEvent.Connected, this.handleReconnected)
|
148
|
-
.on(EngineEvent.
|
149
|
-
.on(EngineEvent.
|
148
|
+
.on(EngineEvent.SignalRestarted, this.handleReconnected)
|
149
|
+
.on(EngineEvent.SignalResumed, this.handleReconnected)
|
150
150
|
.on(EngineEvent.Restarting, this.handleReconnecting)
|
151
151
|
.on(EngineEvent.Resuming, this.handleReconnecting)
|
152
152
|
.on(EngineEvent.Disconnected, this.handleDisconnected);
|
@@ -372,6 +372,20 @@ export default abstract class LocalTrack extends Track {
|
|
372
372
|
}
|
373
373
|
}
|
374
374
|
|
375
|
+
/**
|
376
|
+
* Gets the RTCStatsReport for the LocalTrack's underlying RTCRtpSender
|
377
|
+
* See https://developer.mozilla.org/en-US/docs/Web/API/RTCStatsReport
|
378
|
+
*
|
379
|
+
* @returns Promise<RTCStatsReport> | undefined
|
380
|
+
*/
|
381
|
+
async getRTCStatsReport(): Promise<RTCStatsReport | undefined> {
|
382
|
+
if (!this.sender?.getStats) {
|
383
|
+
return;
|
384
|
+
}
|
385
|
+
const statsReport = await this.sender.getStats();
|
386
|
+
return statsReport;
|
387
|
+
}
|
388
|
+
|
375
389
|
/**
|
376
390
|
* Sets a processor on this track.
|
377
391
|
* See https://github.com/livekit/track-processors-js for example usage
|
@@ -51,6 +51,20 @@ export default abstract class RemoteTrack extends Track {
|
|
51
51
|
super.disable();
|
52
52
|
}
|
53
53
|
|
54
|
+
/**
|
55
|
+
* Gets the RTCStatsReport for the RemoteTrack's underlying RTCRtpReceiver
|
56
|
+
* See https://developer.mozilla.org/en-US/docs/Web/API/RTCStatsReport
|
57
|
+
*
|
58
|
+
* @returns Promise<RTCStatsReport> | undefined
|
59
|
+
*/
|
60
|
+
async getRTCStatsReport(): Promise<RTCStatsReport | undefined> {
|
61
|
+
if (!this.receiver?.getStats) {
|
62
|
+
return;
|
63
|
+
}
|
64
|
+
const statsReport = await this.receiver.getStats();
|
65
|
+
return statsReport;
|
66
|
+
}
|
67
|
+
|
54
68
|
/* @internal */
|
55
69
|
startMonitor() {
|
56
70
|
if (!this.monitorInterval) {
|