|
@@ -29,6 +29,7 @@ const ALWAYS_ON_TOP_FILENAMES = [
|
29
|
29
|
const commands = {
|
30
|
30
|
avatarUrl: 'avatar-url',
|
31
|
31
|
displayName: 'display-name',
|
|
32
|
+ e2eeKey: 'e2ee-key',
|
32
|
33
|
email: 'email',
|
33
|
34
|
hangup: 'video-hangup',
|
34
|
35
|
password: 'password',
|
|
@@ -236,6 +237,8 @@ export default class JitsiMeetExternalAPI extends EventEmitter {
|
236
|
237
|
* information about the initial devices that will be used in the call.
|
237
|
238
|
* @param {Object} [options.userInfo] - Object containing information about
|
238
|
239
|
* the participant opening the meeting.
|
|
240
|
+ * @param {string} [options.e2eeKey] - The key used for End-to-End encryption.
|
|
241
|
+ * THIS IS EXPERIMENTAL.
|
239
|
242
|
*/
|
240
|
243
|
constructor(domain, ...args) {
|
241
|
244
|
super();
|
|
@@ -251,7 +254,8 @@ export default class JitsiMeetExternalAPI extends EventEmitter {
|
251
|
254
|
onload = undefined,
|
252
|
255
|
invitees,
|
253
|
256
|
devices,
|
254
|
|
- userInfo
|
|
257
|
+ userInfo,
|
|
258
|
+ e2eeKey
|
255
|
259
|
} = parseArguments(args);
|
256
|
260
|
|
257
|
261
|
this._parentNode = parentNode;
|
|
@@ -276,6 +280,7 @@ export default class JitsiMeetExternalAPI extends EventEmitter {
|
276
|
280
|
if (Array.isArray(invitees) && invitees.length > 0) {
|
277
|
281
|
this.invite(invitees);
|
278
|
282
|
}
|
|
283
|
+ this._tmpE2EEKey = e2eeKey;
|
279
|
284
|
this._isLargeVideoVisible = true;
|
280
|
285
|
this._numberOfParticipants = 0;
|
281
|
286
|
this._participants = {};
|
|
@@ -429,11 +434,17 @@ export default class JitsiMeetExternalAPI extends EventEmitter {
|
429
|
434
|
const userID = data.id;
|
430
|
435
|
|
431
|
436
|
switch (name) {
|
432
|
|
- case 'video-conference-joined':
|
|
437
|
+ case 'video-conference-joined': {
|
|
438
|
+ if (typeof this._tmpE2EEKey !== 'undefined') {
|
|
439
|
+ this.executeCommand(commands.e2eeKey, this._tmpE2EEKey);
|
|
440
|
+ this._tmpE2EEKey = undefined;
|
|
441
|
+ }
|
|
442
|
+
|
433
|
443
|
this._myUserID = userID;
|
434
|
444
|
this._participants[userID] = {
|
435
|
445
|
avatarURL: data.avatarURL
|
436
|
446
|
};
|
|
447
|
+ }
|
437
|
448
|
|
438
|
449
|
// eslint-disable-next-line no-fallthrough
|
439
|
450
|
case 'participant-joined': {
|