|
@@ -335,10 +335,20 @@ export default class E2EEcontext {
|
335
|
335
|
|
336
|
336
|
newUint8.set([ 0xd8, 0xff, 0xfe ]); // opus silence frame.
|
337
|
337
|
encodedFrame.data = newData;
|
|
338
|
+ } else { // video, replace with a 320x180px black frame
|
|
339
|
+ const newData = new ArrayBuffer(60);
|
|
340
|
+ const newUint8 = new Uint8Array(newData);
|
|
341
|
+
|
|
342
|
+ newUint8.set([
|
|
343
|
+ 0xb0, 0x05, 0x00, 0x9d, 0x01, 0x2a, 0xa0, 0x00, 0x5a, 0x00, 0x39, 0x03, 0x00, 0x00, 0x1c, 0x22,
|
|
344
|
+ 0x16, 0x16, 0x22, 0x66, 0x12, 0x20, 0x04, 0x90, 0x40, 0x00, 0xc5, 0x01, 0xe0, 0x7c, 0x4d, 0x2f,
|
|
345
|
+ 0xfa, 0xdd, 0x4d, 0xa5, 0x7f, 0x89, 0xa5, 0xff, 0x5b, 0xa9, 0xb4, 0xaf, 0xf1, 0x34, 0xbf, 0xeb,
|
|
346
|
+ 0x75, 0x36, 0x95, 0xfe, 0x26, 0x96, 0x60, 0xfe, 0xff, 0xba, 0xff, 0x40
|
|
347
|
+ ]);
|
|
348
|
+ encodedFrame.data = newData;
|
338
|
349
|
}
|
339
|
350
|
|
340
|
|
- // Just feed the (potentially encrypted) frame in case of error.
|
341
|
|
- // Worst case it is garbage.
|
|
351
|
+ // TODO: notify the application about error status.
|
342
|
352
|
controller.enqueue(encodedFrame);
|
343
|
353
|
});
|
344
|
354
|
}
|