livekit-client 2.5.8 → 2.5.9
Sign up to get free protection for your applications and to get access to all the features.
- 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 +49 -20
- package/dist/livekit-client.e2ee.worker.mjs.map +1 -1
- package/dist/livekit-client.esm.mjs +2 -2
- 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/worker/FrameCryptor.d.ts.map +1 -1
- package/dist/src/e2ee/worker/ParticipantKeyHandler.d.ts +25 -5
- package/dist/src/e2ee/worker/ParticipantKeyHandler.d.ts.map +1 -1
- package/dist/src/room/participant/LocalParticipant.d.ts.map +1 -1
- package/dist/ts4.2/src/e2ee/worker/ParticipantKeyHandler.d.ts +25 -5
- package/package.json +2 -2
- package/src/e2ee/worker/FrameCryptor.test.ts +311 -113
- package/src/e2ee/worker/FrameCryptor.ts +10 -5
- package/src/e2ee/worker/ParticipantKeyHandler.test.ts +169 -5
- package/src/e2ee/worker/ParticipantKeyHandler.ts +50 -20
- package/src/e2ee/worker/__snapshots__/ParticipantKeyHandler.test.ts.snap +356 -0
- package/src/room/participant/LocalParticipant.ts +4 -1
@@ -0,0 +1,356 @@
|
|
1
|
+
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
2
|
+
|
3
|
+
exports[`ParticipantKeyHandler > ratchetKey > ratchets keys predictably > ciphertexts 1`] = `
|
4
|
+
[
|
5
|
+
Uint8Array [
|
6
|
+
42,
|
7
|
+
226,
|
8
|
+
94,
|
9
|
+
49,
|
10
|
+
152,
|
11
|
+
18,
|
12
|
+
79,
|
13
|
+
1,
|
14
|
+
55,
|
15
|
+
190,
|
16
|
+
250,
|
17
|
+
80,
|
18
|
+
143,
|
19
|
+
19,
|
20
|
+
134,
|
21
|
+
218,
|
22
|
+
200,
|
23
|
+
55,
|
24
|
+
87,
|
25
|
+
102,
|
26
|
+
117,
|
27
|
+
217,
|
28
|
+
130,
|
29
|
+
48,
|
30
|
+
11,
|
31
|
+
66,
|
32
|
+
63,
|
33
|
+
102,
|
34
|
+
115,
|
35
|
+
144,
|
36
|
+
117,
|
37
|
+
92,
|
38
|
+
232,
|
39
|
+
],
|
40
|
+
Uint8Array [
|
41
|
+
4,
|
42
|
+
164,
|
43
|
+
120,
|
44
|
+
76,
|
45
|
+
172,
|
46
|
+
225,
|
47
|
+
17,
|
48
|
+
14,
|
49
|
+
176,
|
50
|
+
186,
|
51
|
+
111,
|
52
|
+
5,
|
53
|
+
10,
|
54
|
+
176,
|
55
|
+
29,
|
56
|
+
42,
|
57
|
+
19,
|
58
|
+
215,
|
59
|
+
72,
|
60
|
+
227,
|
61
|
+
203,
|
62
|
+
139,
|
63
|
+
219,
|
64
|
+
147,
|
65
|
+
85,
|
66
|
+
78,
|
67
|
+
62,
|
68
|
+
191,
|
69
|
+
186,
|
70
|
+
123,
|
71
|
+
248,
|
72
|
+
60,
|
73
|
+
147,
|
74
|
+
],
|
75
|
+
Uint8Array [
|
76
|
+
58,
|
77
|
+
173,
|
78
|
+
85,
|
79
|
+
162,
|
80
|
+
211,
|
81
|
+
200,
|
82
|
+
200,
|
83
|
+
87,
|
84
|
+
214,
|
85
|
+
65,
|
86
|
+
218,
|
87
|
+
92,
|
88
|
+
74,
|
89
|
+
53,
|
90
|
+
143,
|
91
|
+
183,
|
92
|
+
58,
|
93
|
+
242,
|
94
|
+
19,
|
95
|
+
39,
|
96
|
+
226,
|
97
|
+
180,
|
98
|
+
204,
|
99
|
+
127,
|
100
|
+
109,
|
101
|
+
219,
|
102
|
+
156,
|
103
|
+
152,
|
104
|
+
103,
|
105
|
+
158,
|
106
|
+
186,
|
107
|
+
240,
|
108
|
+
161,
|
109
|
+
],
|
110
|
+
Uint8Array [
|
111
|
+
46,
|
112
|
+
137,
|
113
|
+
107,
|
114
|
+
8,
|
115
|
+
239,
|
116
|
+
248,
|
117
|
+
217,
|
118
|
+
214,
|
119
|
+
106,
|
120
|
+
234,
|
121
|
+
103,
|
122
|
+
34,
|
123
|
+
108,
|
124
|
+
179,
|
125
|
+
18,
|
126
|
+
186,
|
127
|
+
5,
|
128
|
+
33,
|
129
|
+
31,
|
130
|
+
21,
|
131
|
+
9,
|
132
|
+
48,
|
133
|
+
194,
|
134
|
+
205,
|
135
|
+
206,
|
136
|
+
136,
|
137
|
+
6,
|
138
|
+
179,
|
139
|
+
64,
|
140
|
+
150,
|
141
|
+
126,
|
142
|
+
175,
|
143
|
+
132,
|
144
|
+
],
|
145
|
+
Uint8Array [
|
146
|
+
249,
|
147
|
+
123,
|
148
|
+
86,
|
149
|
+
179,
|
150
|
+
18,
|
151
|
+
9,
|
152
|
+
149,
|
153
|
+
42,
|
154
|
+
110,
|
155
|
+
112,
|
156
|
+
29,
|
157
|
+
193,
|
158
|
+
208,
|
159
|
+
63,
|
160
|
+
48,
|
161
|
+
118,
|
162
|
+
15,
|
163
|
+
186,
|
164
|
+
27,
|
165
|
+
101,
|
166
|
+
23,
|
167
|
+
31,
|
168
|
+
111,
|
169
|
+
152,
|
170
|
+
193,
|
171
|
+
235,
|
172
|
+
89,
|
173
|
+
25,
|
174
|
+
161,
|
175
|
+
246,
|
176
|
+
231,
|
177
|
+
198,
|
178
|
+
126,
|
179
|
+
],
|
180
|
+
Uint8Array [
|
181
|
+
56,
|
182
|
+
134,
|
183
|
+
196,
|
184
|
+
195,
|
185
|
+
242,
|
186
|
+
10,
|
187
|
+
187,
|
188
|
+
122,
|
189
|
+
111,
|
190
|
+
179,
|
191
|
+
147,
|
192
|
+
206,
|
193
|
+
74,
|
194
|
+
153,
|
195
|
+
45,
|
196
|
+
244,
|
197
|
+
88,
|
198
|
+
119,
|
199
|
+
25,
|
200
|
+
114,
|
201
|
+
11,
|
202
|
+
2,
|
203
|
+
149,
|
204
|
+
121,
|
205
|
+
227,
|
206
|
+
219,
|
207
|
+
39,
|
208
|
+
11,
|
209
|
+
13,
|
210
|
+
175,
|
211
|
+
182,
|
212
|
+
168,
|
213
|
+
96,
|
214
|
+
],
|
215
|
+
Uint8Array [
|
216
|
+
36,
|
217
|
+
12,
|
218
|
+
119,
|
219
|
+
157,
|
220
|
+
146,
|
221
|
+
42,
|
222
|
+
43,
|
223
|
+
107,
|
224
|
+
61,
|
225
|
+
43,
|
226
|
+
242,
|
227
|
+
166,
|
228
|
+
11,
|
229
|
+
180,
|
230
|
+
148,
|
231
|
+
39,
|
232
|
+
177,
|
233
|
+
248,
|
234
|
+
194,
|
235
|
+
166,
|
236
|
+
201,
|
237
|
+
53,
|
238
|
+
192,
|
239
|
+
57,
|
240
|
+
62,
|
241
|
+
70,
|
242
|
+
37,
|
243
|
+
252,
|
244
|
+
243,
|
245
|
+
156,
|
246
|
+
140,
|
247
|
+
185,
|
248
|
+
42,
|
249
|
+
],
|
250
|
+
Uint8Array [
|
251
|
+
222,
|
252
|
+
127,
|
253
|
+
32,
|
254
|
+
228,
|
255
|
+
99,
|
256
|
+
198,
|
257
|
+
31,
|
258
|
+
158,
|
259
|
+
192,
|
260
|
+
101,
|
261
|
+
82,
|
262
|
+
129,
|
263
|
+
175,
|
264
|
+
153,
|
265
|
+
112,
|
266
|
+
43,
|
267
|
+
57,
|
268
|
+
207,
|
269
|
+
246,
|
270
|
+
54,
|
271
|
+
127,
|
272
|
+
165,
|
273
|
+
99,
|
274
|
+
254,
|
275
|
+
4,
|
276
|
+
178,
|
277
|
+
40,
|
278
|
+
53,
|
279
|
+
66,
|
280
|
+
92,
|
281
|
+
13,
|
282
|
+
69,
|
283
|
+
0,
|
284
|
+
],
|
285
|
+
Uint8Array [
|
286
|
+
249,
|
287
|
+
181,
|
288
|
+
181,
|
289
|
+
168,
|
290
|
+
27,
|
291
|
+
48,
|
292
|
+
221,
|
293
|
+
221,
|
294
|
+
174,
|
295
|
+
187,
|
296
|
+
16,
|
297
|
+
153,
|
298
|
+
144,
|
299
|
+
156,
|
300
|
+
164,
|
301
|
+
232,
|
302
|
+
185,
|
303
|
+
202,
|
304
|
+
132,
|
305
|
+
58,
|
306
|
+
75,
|
307
|
+
156,
|
308
|
+
232,
|
309
|
+
238,
|
310
|
+
191,
|
311
|
+
33,
|
312
|
+
9,
|
313
|
+
31,
|
314
|
+
151,
|
315
|
+
43,
|
316
|
+
224,
|
317
|
+
136,
|
318
|
+
190,
|
319
|
+
],
|
320
|
+
Uint8Array [
|
321
|
+
58,
|
322
|
+
99,
|
323
|
+
16,
|
324
|
+
151,
|
325
|
+
148,
|
326
|
+
131,
|
327
|
+
138,
|
328
|
+
94,
|
329
|
+
230,
|
330
|
+
95,
|
331
|
+
38,
|
332
|
+
81,
|
333
|
+
137,
|
334
|
+
162,
|
335
|
+
78,
|
336
|
+
61,
|
337
|
+
243,
|
338
|
+
207,
|
339
|
+
255,
|
340
|
+
109,
|
341
|
+
48,
|
342
|
+
248,
|
343
|
+
217,
|
344
|
+
135,
|
345
|
+
133,
|
346
|
+
248,
|
347
|
+
56,
|
348
|
+
74,
|
349
|
+
41,
|
350
|
+
113,
|
351
|
+
153,
|
352
|
+
108,
|
353
|
+
202,
|
354
|
+
],
|
355
|
+
]
|
356
|
+
`;
|
@@ -282,7 +282,10 @@ export default class LocalParticipant extends Participant {
|
|
282
282
|
(!name || this.name === name) &&
|
283
283
|
(!metadata || this.metadata === metadata) &&
|
284
284
|
(!attributes ||
|
285
|
-
Object.entries(attributes).every(
|
285
|
+
Object.entries(attributes).every(
|
286
|
+
([key, value]) =>
|
287
|
+
this.attributes[key] === value || (value === '' && !this.attributes[key]),
|
288
|
+
))
|
286
289
|
) {
|
287
290
|
this.pendingSignalRequests.delete(requestId);
|
288
291
|
resolve();
|