|
@@ -45,8 +45,14 @@ export default class E2EEcontext {
|
45
|
45
|
baseUrl = `${ljm.src.substring(0, idx)}/`;
|
46
|
46
|
}
|
47
|
47
|
|
48
|
|
- // Initialize the E2EE worker.
|
49
|
|
- this._worker = new Worker(`${baseUrl}lib-jitsi-meet.e2ee-worker.js`, { name: 'E2EE Worker' });
|
|
48
|
+ // Initialize the E2EE worker. In order to avoid CORS issues, start the worker and have it
|
|
49
|
+ // synchronously load the JS.
|
|
50
|
+ const workerUrl = `${baseUrl}lib-jitsi-meet.e2ee-worker.js`;
|
|
51
|
+ const workerBlob
|
|
52
|
+ = new Blob([ `importScripts("${workerUrl}");` ], { type: 'application/javascript' });
|
|
53
|
+ const blobUrl = window.URL.createObjectURL(workerBlob);
|
|
54
|
+
|
|
55
|
+ this._worker = new Worker(blobUrl, { name: 'E2EE Worker' });
|
50
|
56
|
this._worker.onerror = e => logger.onerror(e);
|
51
|
57
|
|
52
|
58
|
// Initialize the salt and convert it once.
|