|
@@ -341,6 +341,13 @@ export default class E2EEcontext {
|
341
|
341
|
controller.enqueue(encodedFrame);
|
342
|
342
|
}
|
343
|
343
|
});
|
|
344
|
+ } else if (keyIndex >= this._cryptoKeyRing.length
|
|
345
|
+ && this._cryptoKeyRing[this._currentKeyIndex % this._cryptoKeyRing.length]) {
|
|
346
|
+ // If we are encrypting but don't have a key for the remote drop the frame.
|
|
347
|
+ // This is a heuristic since we don't know whether a packet is encrypted,
|
|
348
|
+ // do not have a checksum and do not have signaling for whether a remote participant does
|
|
349
|
+ // encrypt or not.
|
|
350
|
+ return;
|
344
|
351
|
}
|
345
|
352
|
|
346
|
353
|
// TODO: this just passes through to the decoder. Is that ok? If we don't know the key yet
|