@webex/plugin-meetings 3.13.0-next.1 → 3.13.0-next.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/babel.config.js +17 -1
- package/dist/aiEnableRequest/index.js +1 -1
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/common/wasm-loader.js +174 -0
- package/dist/common/wasm-loader.js.map +1 -0
- package/dist/config.js +2 -1
- package/dist/config.js.map +1 -1
- package/dist/constants.js +1 -1
- package/dist/constants.js.map +1 -1
- package/dist/e2ee/E2eeManager.js +91 -0
- package/dist/e2ee/E2eeManager.js.map +1 -0
- package/dist/e2ee/E2eeSignaling.js +200 -0
- package/dist/e2ee/E2eeSignaling.js.map +1 -0
- package/dist/e2ee/MediaEncryptionService.js +75 -0
- package/dist/e2ee/MediaEncryptionService.js.map +1 -0
- package/dist/e2ee/mls.js +558 -0
- package/dist/e2ee/mls.js.map +1 -0
- package/dist/e2ee/types.js +59 -0
- package/dist/e2ee/types.js.map +1 -0
- package/dist/e2ee/wasm.d.js +7 -0
- package/dist/e2ee/wasm.d.js.map +1 -0
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/meetings/index.js +20 -0
- package/dist/meetings/index.js.map +1 -1
- package/dist/types/common/wasm-loader.d.ts +55 -0
- package/dist/types/config.d.ts +1 -0
- package/dist/types/constants.d.ts +1 -1
- package/dist/types/e2ee/E2eeManager.d.ts +23 -0
- package/dist/types/e2ee/E2eeSignaling.d.ts +94 -0
- package/dist/types/e2ee/MediaEncryptionService.d.ts +27 -0
- package/dist/types/e2ee/mls.d.ts +191 -0
- package/dist/types/e2ee/types.d.ts +104 -0
- package/dist/types/meetings/index.d.ts +4 -0
- package/dist/webinar/index.js +1 -1
- package/package.json +21 -21
- package/src/common/wasm-loader.ts +124 -0
- package/src/config.ts +1 -0
- package/src/constants.ts +1 -1
- package/src/e2ee/E2eeManager.ts +58 -0
- package/src/e2ee/E2eeSignaling.ts +215 -0
- package/src/e2ee/MediaEncryptionService.ts +41 -0
- package/src/e2ee/mls.ts +548 -0
- package/src/e2ee/types.ts +114 -0
- package/src/e2ee/wasm.d.ts +153 -0
- package/src/meetings/ai-docs/meetings-spec.md +2 -0
- package/src/meetings/index.ts +18 -0
- package/test/integration/spec/transcription.js +1 -1
- package/test/unit/spec/common/wasm-loader.ts +171 -0
- package/test/unit/spec/e2ee/E2eeManager.ts +82 -0
- package/test/unit/spec/e2ee/E2eeSignaling.ts +172 -0
- package/test/unit/spec/e2ee/MediaEncryptionService.ts +43 -0
- package/test/unit/spec/e2ee/mls.ts +765 -0
- package/test/unit/spec/meeting-info/index.js +2 -3
- package/test/unit/spec/meetings/index.js +20 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2015-2026 Cisco Systems, Inc. See LICENSE file.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* An emscripten MODULARIZE factory — the default export of a generated `*.js` WASM loader. Calling
|
|
6
|
+
* it instantiates the module; `locateFile` lets us point the loader at the `.wasm` binary URL.
|
|
7
|
+
*/
|
|
8
|
+
export type EmscriptenModuleFactory<TModule = unknown> = (moduleOverrides?: {
|
|
9
|
+
locateFile?: (path: string) => string;
|
|
10
|
+
}) => Promise<TModule>;
|
|
11
|
+
type ModuleImporter = (jsUrl: string) => Promise<{
|
|
12
|
+
default: EmscriptenModuleFactory;
|
|
13
|
+
}>;
|
|
14
|
+
/**
|
|
15
|
+
* Loads and caches emscripten WebAssembly modules, each uniquely identified by its `.wasm` URL
|
|
16
|
+
* (the `.js` loader URL is derived by replacing the `.wasm` suffix). A single instance can load
|
|
17
|
+
* multiple distinct modules; each URL is loaded at most once and cached. Instantiated once per
|
|
18
|
+
* session so slow loads can be warmed ahead of when they're needed.
|
|
19
|
+
*/
|
|
20
|
+
export default class WasmLoader {
|
|
21
|
+
private readonly importModule;
|
|
22
|
+
private readonly modules;
|
|
23
|
+
/**
|
|
24
|
+
* @param {Object} [options]
|
|
25
|
+
* @param {Function} [options.importModule] - Override the dynamic import (used by tests).
|
|
26
|
+
*/
|
|
27
|
+
constructor({ importModule }?: {
|
|
28
|
+
importModule?: ModuleImporter;
|
|
29
|
+
});
|
|
30
|
+
/**
|
|
31
|
+
* @param {string} wasmUrl
|
|
32
|
+
* @returns {boolean} whether the module for the given URL has finished loading and is cached.
|
|
33
|
+
*/
|
|
34
|
+
isLoaded(wasmUrl: string): boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Warms the cache for the given module URL. Safe to call repeatedly; concurrent calls share a
|
|
37
|
+
* single load.
|
|
38
|
+
* @param {string} wasmUrl
|
|
39
|
+
* @returns {Promise<void>}
|
|
40
|
+
*/
|
|
41
|
+
preload(wasmUrl: string): Promise<void>;
|
|
42
|
+
/**
|
|
43
|
+
* Returns the cached module for the given URL, loading it if necessary.
|
|
44
|
+
* @param {string} wasmUrl
|
|
45
|
+
* @returns {Promise<TModule>}
|
|
46
|
+
*/
|
|
47
|
+
get<TModule = unknown>(wasmUrl: string): Promise<TModule>;
|
|
48
|
+
/**
|
|
49
|
+
* @param {string} wasmUrl
|
|
50
|
+
* @param {CachedModule} cached
|
|
51
|
+
* @returns {Promise<unknown>}
|
|
52
|
+
*/
|
|
53
|
+
private load;
|
|
54
|
+
}
|
|
55
|
+
export {};
|
package/dist/types/config.d.ts
CHANGED
|
@@ -138,7 +138,7 @@ export declare const ICE_TIMEOUT = 2000;
|
|
|
138
138
|
export declare const ICE_FAIL_TIMEOUT = 3000;
|
|
139
139
|
export declare const RETRY_TIMEOUT = 3000;
|
|
140
140
|
export declare const ICE_CONNECTION_TIMEOUT = 20000;
|
|
141
|
-
export declare const DTLS_CONNECTION_TIMEOUT =
|
|
141
|
+
export declare const DTLS_CONNECTION_TIMEOUT = 15000;
|
|
142
142
|
export declare const ROAP_OFFER_ANSWER_EXCHANGE_TIMEOUT = 35000;
|
|
143
143
|
export declare const WEBINAR_ERROR_WEBCAST: number[];
|
|
144
144
|
export declare const WEBINAR_ERROR_REGISTRATION_ID: number[];
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2015-2026 Cisco Systems, Inc. See LICENSE file.
|
|
3
|
+
*/
|
|
4
|
+
import WasmLoader from '../common/wasm-loader';
|
|
5
|
+
/**
|
|
6
|
+
* Owns E2EE resource preloading for a Meetings plugin session. The per-meeting controller is added
|
|
7
|
+
* in the follow-up integration change; this first step keeps the slow WASM load off the join path.
|
|
8
|
+
*/
|
|
9
|
+
export default class E2eeManager {
|
|
10
|
+
private readonly webex;
|
|
11
|
+
private readonly wasmLoader;
|
|
12
|
+
private readonly assetLoader;
|
|
13
|
+
constructor({ webex, wasmLoader }: {
|
|
14
|
+
webex: any;
|
|
15
|
+
wasmLoader: WasmLoader;
|
|
16
|
+
});
|
|
17
|
+
/**
|
|
18
|
+
* Warms the E2EE WASM module when configured and supported. Callers should not await this from
|
|
19
|
+
* registration; a loading failure must not prevent the client from registering for meetings.
|
|
20
|
+
* @returns {Promise<void>}
|
|
21
|
+
*/
|
|
22
|
+
preload(): Promise<void>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2015-2026 Cisco Systems, Inc. See LICENSE file.
|
|
3
|
+
*/
|
|
4
|
+
import type LLMChannel from '@webex/internal-plugin-llm';
|
|
5
|
+
/** Source labels passed to the MLS engine for incoming signaling messages. */
|
|
6
|
+
type E2eeSignalingSource = 'llm' | 'mercury';
|
|
7
|
+
/** LLM event carrying the channel's connection state. */
|
|
8
|
+
export declare const LLM_ONLINE_EVENT = "online";
|
|
9
|
+
/** Mercury events carrying MLS protocol messages. */
|
|
10
|
+
export declare const MEDIA_ENCRYPTION_MERCURY_EVENTS: string[];
|
|
11
|
+
/** The subset of the MLS engine the signaling adapter drives. */
|
|
12
|
+
export interface IMlsSignalingTarget {
|
|
13
|
+
handleEvent(bytes: Uint8Array, source: E2eeSignalingSource): void;
|
|
14
|
+
setLlmConnectedBeforeJoin(connected: boolean): void;
|
|
15
|
+
llmConnected(): void;
|
|
16
|
+
}
|
|
17
|
+
/** The subset of a mercury channel the adapter subscribes to for MLS protocol events. */
|
|
18
|
+
export interface IMercuryChannel {
|
|
19
|
+
on(event: string, handler: (envelope: any) => void): void;
|
|
20
|
+
off(event: string, handler: (envelope: any) => void): void;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Mercury (and LLM) adapter for the MLS engine. Subscribes to this meeting's
|
|
24
|
+
* media_encryption.* events on both the LLM and mercury channels and forwards them to the engine,
|
|
25
|
+
* and tracks whether the signaling channel is connected so the engine knows when it can proceed
|
|
26
|
+
* with its join.
|
|
27
|
+
*/
|
|
28
|
+
export default class E2eeSignaling {
|
|
29
|
+
private llm?;
|
|
30
|
+
private readonly mercury;
|
|
31
|
+
private readonly getLocusUrl;
|
|
32
|
+
private readonly session;
|
|
33
|
+
private started;
|
|
34
|
+
/**
|
|
35
|
+
* @param {Object} deps
|
|
36
|
+
* @param {LLMChannel} [deps.llm] - This meeting's LLM channel, when one is available.
|
|
37
|
+
* @param {IMercuryChannel} deps.mercury - The mercury channel (webex.internal.mercury).
|
|
38
|
+
* @param {Function} deps.getLocusUrl - Returns the meeting's current locus url (read live, as it
|
|
39
|
+
* can change, e.g. when moving between breakout sessions).
|
|
40
|
+
* @param {IMlsSignalingTarget} deps.session - The MLS engine to drive.
|
|
41
|
+
*/
|
|
42
|
+
constructor({ llm, mercury, getLocusUrl, session, }: {
|
|
43
|
+
llm?: LLMChannel;
|
|
44
|
+
mercury: IMercuryChannel;
|
|
45
|
+
getLocusUrl: () => string | undefined;
|
|
46
|
+
session: IMlsSignalingTarget;
|
|
47
|
+
});
|
|
48
|
+
/**
|
|
49
|
+
* Subscribes to MLS mercury events and wires up connection tracking. Idempotent.
|
|
50
|
+
* @returns {void}
|
|
51
|
+
*/
|
|
52
|
+
start(): void;
|
|
53
|
+
/**
|
|
54
|
+
* Removes all subscriptions. Idempotent.
|
|
55
|
+
* @returns {void}
|
|
56
|
+
*/
|
|
57
|
+
stop(): void;
|
|
58
|
+
/**
|
|
59
|
+
* Replaces the meeting-owned LLM channel after the meeting reconnects its data channel.
|
|
60
|
+
* @param {LLMChannel} [llm]
|
|
61
|
+
* @returns {void}
|
|
62
|
+
*/
|
|
63
|
+
setLlmChannel(llm?: LLMChannel): void;
|
|
64
|
+
/**
|
|
65
|
+
* Forwards a signaling envelope to the engine, tagging which channel it came from.
|
|
66
|
+
* @param {Object} envelope - The mercury event envelope.
|
|
67
|
+
* @param {E2eeSignalingSource} source - The channel the envelope arrived on.
|
|
68
|
+
* @returns {void}
|
|
69
|
+
*/
|
|
70
|
+
private forwardEvent;
|
|
71
|
+
/**
|
|
72
|
+
* @param {Object} envelope - The mercury event envelope from the LLM channel.
|
|
73
|
+
* @returns {void}
|
|
74
|
+
*/
|
|
75
|
+
private onLlmEvent;
|
|
76
|
+
/**
|
|
77
|
+
* @param {Object} envelope - The mercury event envelope from the mercury channel.
|
|
78
|
+
* @returns {void}
|
|
79
|
+
*/
|
|
80
|
+
private onMercuryEvent;
|
|
81
|
+
/**
|
|
82
|
+
* @returns {void}
|
|
83
|
+
*/
|
|
84
|
+
private onLlmOnline;
|
|
85
|
+
/** @returns {void} */
|
|
86
|
+
private subscribeToLlmEvents;
|
|
87
|
+
/** @returns {void} */
|
|
88
|
+
private unsubscribeFromLlmEvents;
|
|
89
|
+
/**
|
|
90
|
+
* @returns {boolean} whether the LLM is connected for this specific session (locus-url matched).
|
|
91
|
+
*/
|
|
92
|
+
private isLlmOnlineForThisSession;
|
|
93
|
+
}
|
|
94
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2015-2026 Cisco Systems, Inc. See LICENSE file.
|
|
3
|
+
*/
|
|
4
|
+
/** The bound webex.request function shape consumed by this adapter. */
|
|
5
|
+
type WebexRequestMethod = (options: Record<string, any>) => Promise<any>;
|
|
6
|
+
/**
|
|
7
|
+
* Routes the MLS engine's protocol HTTP requests to the media-encryption service via
|
|
8
|
+
* webex.request. Bodies are plain JS objects; MLS owns the conversion to/from the engine's bytes.
|
|
9
|
+
* Requests use standard webex auth (Authorization bearer token) — no custom header is needed.
|
|
10
|
+
*/
|
|
11
|
+
export default class MediaEncryptionService {
|
|
12
|
+
private readonly webexRequest;
|
|
13
|
+
/**
|
|
14
|
+
* @param {Object} deps
|
|
15
|
+
* @param {WebexRequestMethod} deps.webexRequest - The (bound) webex.request method.
|
|
16
|
+
*/
|
|
17
|
+
constructor({ webexRequest }: {
|
|
18
|
+
webexRequest: WebexRequestMethod;
|
|
19
|
+
});
|
|
20
|
+
/**
|
|
21
|
+
* @param {string} url - The absolute request URL provided by the engine.
|
|
22
|
+
* @param {unknown} body - Request payload, sent as JSON.
|
|
23
|
+
* @returns {Promise<unknown>} The JSON-parsed response body.
|
|
24
|
+
*/
|
|
25
|
+
request(url: string, body: unknown): Promise<unknown>;
|
|
26
|
+
}
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2015-2026 Cisco Systems, Inc. See LICENSE file.
|
|
3
|
+
*/
|
|
4
|
+
import type { E2eeKey, E2eeRosterMember, E2eeSignalingSource, IMlsHttpClient, MLSConfig, SframeParams } from './types';
|
|
5
|
+
import type { ModuleInstance } from './wasm';
|
|
6
|
+
/** Payloads for each event emitted by {@link MLS}. */
|
|
7
|
+
export interface MLSEventMap {
|
|
8
|
+
joinSuccess: {
|
|
9
|
+
epoch: number;
|
|
10
|
+
securityCode: string;
|
|
11
|
+
sframe: SframeParams;
|
|
12
|
+
key: E2eeKey;
|
|
13
|
+
};
|
|
14
|
+
joinFailure: {
|
|
15
|
+
reason: string;
|
|
16
|
+
};
|
|
17
|
+
mediaEncryptionRequestFailure: {
|
|
18
|
+
errorCode: number;
|
|
19
|
+
message: string;
|
|
20
|
+
};
|
|
21
|
+
newKey: E2eeKey;
|
|
22
|
+
useKey: {
|
|
23
|
+
epoch: number;
|
|
24
|
+
};
|
|
25
|
+
purgeKeys: {
|
|
26
|
+
epoch: number;
|
|
27
|
+
};
|
|
28
|
+
rosterAdded: E2eeRosterMember[];
|
|
29
|
+
rosterRemoved: {
|
|
30
|
+
urls: string[];
|
|
31
|
+
};
|
|
32
|
+
leaderChanged: {
|
|
33
|
+
isLeader: boolean;
|
|
34
|
+
};
|
|
35
|
+
evicted: void;
|
|
36
|
+
versionNegotiated: {
|
|
37
|
+
version: number;
|
|
38
|
+
};
|
|
39
|
+
securityCodeChanged: {
|
|
40
|
+
code: string;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export type MLSEvent = keyof MLSEventMap;
|
|
44
|
+
/**
|
|
45
|
+
* Pure MLS protocol engine wrapping the WebE2EE WASM module. It has no webex/HTTP/LLM
|
|
46
|
+
* dependencies: all I/O flows through the injected {@link IMlsHttpClient}, and all outputs are
|
|
47
|
+
* emitted as typed events. This keeps it unit-testable in isolation.
|
|
48
|
+
*/
|
|
49
|
+
export default class MLS {
|
|
50
|
+
private readonly loadModule;
|
|
51
|
+
private readonly httpClient;
|
|
52
|
+
private readonly emitter;
|
|
53
|
+
private readonly transactions;
|
|
54
|
+
private e2ee;
|
|
55
|
+
private lastSecurityCode;
|
|
56
|
+
/**
|
|
57
|
+
* @param {Object} deps
|
|
58
|
+
* @param {IMlsHttpClient} deps.httpClient - Transport for the engine's protocol requests.
|
|
59
|
+
* @param {Function} deps.loadModule - Loads the WASM module instance; supplied by the integration layer.
|
|
60
|
+
*/
|
|
61
|
+
constructor({ httpClient, loadModule, }: {
|
|
62
|
+
httpClient: IMlsHttpClient;
|
|
63
|
+
loadModule: () => Promise<ModuleInstance>;
|
|
64
|
+
});
|
|
65
|
+
/**
|
|
66
|
+
* Subscribe to an engine event.
|
|
67
|
+
* @param {MLSEvent} event
|
|
68
|
+
* @param {Function} listener
|
|
69
|
+
* @returns {void}
|
|
70
|
+
*/
|
|
71
|
+
on<K extends MLSEvent>(event: K, listener: (payload: MLSEventMap[K]) => void): void;
|
|
72
|
+
/**
|
|
73
|
+
* Unsubscribe from an engine event.
|
|
74
|
+
* @param {MLSEvent} event
|
|
75
|
+
* @param {Function} listener
|
|
76
|
+
* @returns {void}
|
|
77
|
+
*/
|
|
78
|
+
off<K extends MLSEvent>(event: K, listener: (payload: MLSEventMap[K]) => void): void;
|
|
79
|
+
/**
|
|
80
|
+
* @param {MLSEvent} event
|
|
81
|
+
* @param {*} [payload]
|
|
82
|
+
* @returns {void}
|
|
83
|
+
*/
|
|
84
|
+
private emitEvent;
|
|
85
|
+
/**
|
|
86
|
+
* Loads the WASM module, instantiates the engine, wires its callbacks, and applies credentials,
|
|
87
|
+
* trust anchors and timeouts. Must be called before {@link join}.
|
|
88
|
+
* @param {MLSConfig} config
|
|
89
|
+
* @returns {Promise<void>}
|
|
90
|
+
*/
|
|
91
|
+
initialize(config: MLSConfig): Promise<void>;
|
|
92
|
+
/**
|
|
93
|
+
* @returns {void}
|
|
94
|
+
*/
|
|
95
|
+
private setupCallbacks;
|
|
96
|
+
/**
|
|
97
|
+
* Sends an engine HTTP request through the injected {@link IMlsHttpClient}, converting between
|
|
98
|
+
* the engine's JSON bytes and the client's objects. Conversion failures reject so the engine's
|
|
99
|
+
* request is completed as failed.
|
|
100
|
+
* @param {string} url - The absolute request URL provided by the engine.
|
|
101
|
+
* @param {Uint8Array} body - JSON request payload as bytes (owned copy, not a WASM memory view).
|
|
102
|
+
* @returns {Promise<Uint8Array>} JSON response payload as bytes.
|
|
103
|
+
*/
|
|
104
|
+
private sendHttpRequest;
|
|
105
|
+
/**
|
|
106
|
+
* @param {string} url - Request URL, used only for logging.
|
|
107
|
+
* @param {Uint8Array} body - JSON request payload as bytes.
|
|
108
|
+
* @returns {unknown} the parsed request body.
|
|
109
|
+
* @throws {Error} when the bytes are not valid JSON.
|
|
110
|
+
*/
|
|
111
|
+
private static decodeRequestBody;
|
|
112
|
+
/**
|
|
113
|
+
* @param {string} url - Request URL, used only for logging.
|
|
114
|
+
* @param {unknown} response - Response object from the HTTP client.
|
|
115
|
+
* @returns {Uint8Array} the response serialized as JSON bytes.
|
|
116
|
+
* @throws {Error} when the response cannot be serialized to JSON.
|
|
117
|
+
*/
|
|
118
|
+
private static encodeResponseBody;
|
|
119
|
+
/**
|
|
120
|
+
* Hands a media-encryption service request outcome back to the engine. libe2ee throws
|
|
121
|
+
* `e2ee_negotiation_failure` out of this call when it can't recover from the service's error code
|
|
122
|
+
* or fails to process a successful response; this surfaces in JS as an opaque value with no
|
|
123
|
+
* message. That is unrecoverable for the in-flight operation, so it is reported as
|
|
124
|
+
* `mediaEncryptionRequestFailure` instead of escaping as an unhandled rejection.
|
|
125
|
+
* @param {number} handlerId
|
|
126
|
+
* @param {boolean} success
|
|
127
|
+
* @param {Uint8Array} body
|
|
128
|
+
* @param {number} errorCode - Media-encryption service error code, or 0 when not applicable.
|
|
129
|
+
* @param {string} message
|
|
130
|
+
* @returns {void}
|
|
131
|
+
*/
|
|
132
|
+
private completeHttpRequest;
|
|
133
|
+
/**
|
|
134
|
+
* @param {*} error - Rejection from the HTTP client.
|
|
135
|
+
* @returns {number} the media-encryption service error code from the response body, or 0.
|
|
136
|
+
*/
|
|
137
|
+
private static getMesErrorCode;
|
|
138
|
+
/**
|
|
139
|
+
* @returns {void}
|
|
140
|
+
*/
|
|
141
|
+
private emitSecurityCodeIfChanged;
|
|
142
|
+
/**
|
|
143
|
+
* Starts the MLS join.
|
|
144
|
+
* @returns {void}
|
|
145
|
+
*/
|
|
146
|
+
join(): void;
|
|
147
|
+
/**
|
|
148
|
+
* Leaves the MLS group.
|
|
149
|
+
* @returns {void}
|
|
150
|
+
*/
|
|
151
|
+
leave(): void;
|
|
152
|
+
/**
|
|
153
|
+
* Forwards an incoming MLS protocol event (from the signaling channel) to the engine.
|
|
154
|
+
* @param {Uint8Array} eventData
|
|
155
|
+
* @param {E2eeSignalingSource} source - Which channel the event arrived on, logged for diagnostics.
|
|
156
|
+
* @returns {void}
|
|
157
|
+
*/
|
|
158
|
+
handleEvent(eventData: Uint8Array, source: E2eeSignalingSource): void;
|
|
159
|
+
/**
|
|
160
|
+
* Tells the engine whether the signaling channel was already connected before join.
|
|
161
|
+
* @param {boolean} connected
|
|
162
|
+
* @returns {void}
|
|
163
|
+
*/
|
|
164
|
+
setLlmConnectedBeforeJoin(connected: boolean): void;
|
|
165
|
+
/**
|
|
166
|
+
* Notifies the engine that the signaling channel is now connected.
|
|
167
|
+
* @returns {void}
|
|
168
|
+
*/
|
|
169
|
+
llmConnected(): void;
|
|
170
|
+
/**
|
|
171
|
+
* @returns {string} the current security code, or '' if not initialized.
|
|
172
|
+
*/
|
|
173
|
+
getSecurityCode(): string;
|
|
174
|
+
/**
|
|
175
|
+
* @returns {E2eeRosterMember[]} the current MLS roster, or [] if not initialized.
|
|
176
|
+
*/
|
|
177
|
+
getRoster(): E2eeRosterMember[];
|
|
178
|
+
/**
|
|
179
|
+
* @returns {boolean} whether this client is the group leader.
|
|
180
|
+
*/
|
|
181
|
+
isLeader(): boolean;
|
|
182
|
+
/**
|
|
183
|
+
* @returns {WebE2EEInstance}
|
|
184
|
+
*/
|
|
185
|
+
private assertInitialized;
|
|
186
|
+
/**
|
|
187
|
+
* @param {RosterMember} member - raw WASM roster member.
|
|
188
|
+
* @returns {E2eeRosterMember}
|
|
189
|
+
*/
|
|
190
|
+
private static toRosterMember;
|
|
191
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2015-2026 Cisco Systems, Inc. See LICENSE file.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* SDK-facing shapes used by the isolated MLS protocol engine. Integration-specific meeting,
|
|
6
|
+
* identity-plugin and signaling types are added by the later adapter phases.
|
|
7
|
+
*/
|
|
8
|
+
/** Credential-validation outcome from the MLS roster. Keep ordinals in sync with libe2ee. */
|
|
9
|
+
export declare const E2eeValidationResult: {
|
|
10
|
+
readonly Success: 0;
|
|
11
|
+
readonly PartialSuccess: 1;
|
|
12
|
+
readonly Failure: 2;
|
|
13
|
+
readonly ParseError: 3;
|
|
14
|
+
readonly UnknownIssuer: 4;
|
|
15
|
+
readonly UnknownPublicKey: 5;
|
|
16
|
+
readonly InvalidSignature: 6;
|
|
17
|
+
readonly Expired: 7;
|
|
18
|
+
readonly Inactive: 8;
|
|
19
|
+
readonly Revoked: 9;
|
|
20
|
+
readonly UnsupportedCaType: 10;
|
|
21
|
+
readonly InvalidKeypackageSignature: 11;
|
|
22
|
+
readonly UnsupportedCredentialType: 12;
|
|
23
|
+
readonly MissingDisplayNameExtension: 13;
|
|
24
|
+
};
|
|
25
|
+
export type E2eeValidationResult = (typeof E2eeValidationResult)[keyof typeof E2eeValidationResult];
|
|
26
|
+
/** Identity type attached to the leaf certificate. Keep ordinals in sync with libe2ee. */
|
|
27
|
+
export declare const E2eeIdentityType: {
|
|
28
|
+
readonly WebexAnonymousIdentity: 0;
|
|
29
|
+
readonly WebexMachineIdentity: 1;
|
|
30
|
+
readonly WebexUserIdentity: 2;
|
|
31
|
+
readonly ExternalVerifiedIdentity: 3;
|
|
32
|
+
};
|
|
33
|
+
export type E2eeIdentityType = (typeof E2eeIdentityType)[keyof typeof E2eeIdentityType];
|
|
34
|
+
/** A media-encryption (SFrame) key for an MLS epoch. */
|
|
35
|
+
export interface E2eeKey {
|
|
36
|
+
epoch: number;
|
|
37
|
+
baseKey: Uint8Array;
|
|
38
|
+
index: number;
|
|
39
|
+
indexBits: number;
|
|
40
|
+
canEncrypt: boolean;
|
|
41
|
+
}
|
|
42
|
+
/** SFrame parameters negotiated for an MLS group. */
|
|
43
|
+
export interface SframeParams {
|
|
44
|
+
cipherSuite: number;
|
|
45
|
+
epochBits: number;
|
|
46
|
+
}
|
|
47
|
+
/** Parsed certificate information returned with a roster member. */
|
|
48
|
+
export interface E2eeCertificateInfo {
|
|
49
|
+
primaryName: string;
|
|
50
|
+
commonName: string;
|
|
51
|
+
organizationName: string;
|
|
52
|
+
emailAddresses: string[];
|
|
53
|
+
domainNames: string[];
|
|
54
|
+
notBefore: number;
|
|
55
|
+
notAfter: number;
|
|
56
|
+
signatureAlgorithm: string;
|
|
57
|
+
publicKeyAlgorithm: string;
|
|
58
|
+
identityType?: E2eeIdentityType;
|
|
59
|
+
der: Uint8Array;
|
|
60
|
+
}
|
|
61
|
+
export interface E2eeIdentityResult {
|
|
62
|
+
result: E2eeValidationResult;
|
|
63
|
+
certificateChain: E2eeCertificateInfo[];
|
|
64
|
+
failedCertIndex?: number;
|
|
65
|
+
}
|
|
66
|
+
/** A member of the MLS roster and its credential-validation result. */
|
|
67
|
+
export interface E2eeRosterMember {
|
|
68
|
+
url: string;
|
|
69
|
+
displayName: string;
|
|
70
|
+
deviceType: string;
|
|
71
|
+
validationResult: E2eeValidationResult;
|
|
72
|
+
identityResults?: E2eeIdentityResult[];
|
|
73
|
+
}
|
|
74
|
+
/** Credentials and trust anchors consumed by the WASM engine. */
|
|
75
|
+
export interface MLSConfig {
|
|
76
|
+
participantId: string;
|
|
77
|
+
deviceUrl: string;
|
|
78
|
+
deviceType?: string;
|
|
79
|
+
correlationId: string;
|
|
80
|
+
displayName: string;
|
|
81
|
+
serviceUrl: string;
|
|
82
|
+
credentials?: {
|
|
83
|
+
privateKey: Uint8Array;
|
|
84
|
+
certChain: Uint8Array[];
|
|
85
|
+
};
|
|
86
|
+
trustAnchors?: {
|
|
87
|
+
webexCaRoots?: string;
|
|
88
|
+
domainNameRoots?: string;
|
|
89
|
+
userIdentityRoots?: string;
|
|
90
|
+
domainNameRootsP7b?: Uint8Array;
|
|
91
|
+
};
|
|
92
|
+
joinTimeout?: number;
|
|
93
|
+
coalesceWindow?: number;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* HTTP transport the MLS engine uses for its protocol requests. Implemented by
|
|
97
|
+
* MediaEncryptionService (which routes to webex.request); injected so the engine stays pure.
|
|
98
|
+
* Bodies are plain JS objects: MLS converts the engine's JSON bytes to/from objects at its boundary.
|
|
99
|
+
*/
|
|
100
|
+
export interface IMlsHttpClient {
|
|
101
|
+
request(url: string, body: unknown): Promise<unknown>;
|
|
102
|
+
}
|
|
103
|
+
/** Signaling transport that delivered an MLS protocol message. */
|
|
104
|
+
export type E2eeSignalingSource = 'llm' | 'mercury';
|
|
@@ -5,6 +5,8 @@ import { WebexPlugin } from '@webex/webex-core';
|
|
|
5
5
|
import { DeviceRegistrationOptions } from '@webex/internal-plugin-device';
|
|
6
6
|
import * as mediaHelpersModule from '@webex/media-helpers';
|
|
7
7
|
import 'webrtc-adapter';
|
|
8
|
+
import WasmLoader from '../common/wasm-loader';
|
|
9
|
+
import E2eeManager from '../e2ee/E2eeManager';
|
|
8
10
|
import { LOCUSEVENT, DESTINATION_TYPE } from '../constants';
|
|
9
11
|
import { CallStateForMetrics } from '../meeting';
|
|
10
12
|
import Reachability from '../reachability';
|
|
@@ -104,6 +106,8 @@ export default class Meetings extends WebexPlugin {
|
|
|
104
106
|
breakoutLocusForHandleLater: any;
|
|
105
107
|
namespace: string;
|
|
106
108
|
registrationStatus: MeetingRegistrationStatus;
|
|
109
|
+
wasmLoader?: WasmLoader;
|
|
110
|
+
e2eeManager?: E2eeManager;
|
|
107
111
|
/**
|
|
108
112
|
* Emits a metric describing how well this browser runs WebAssembly, used to spot browsers
|
|
109
113
|
* where real-time WASM effects (e.g. background noise removal) run poorly.
|
package/dist/webinar/index.js
CHANGED
package/package.json
CHANGED
|
@@ -44,12 +44,12 @@
|
|
|
44
44
|
"@webex/eslint-config-legacy": "0.0.0",
|
|
45
45
|
"@webex/jest-config-legacy": "0.0.0",
|
|
46
46
|
"@webex/legacy-tools": "0.0.0",
|
|
47
|
-
"@webex/plugin-rooms": "3.13.0-next.
|
|
48
|
-
"@webex/test-helper-chai": "3.
|
|
49
|
-
"@webex/test-helper-mocha": "3.
|
|
50
|
-
"@webex/test-helper-mock-webex": "3.
|
|
51
|
-
"@webex/test-helper-retry": "3.
|
|
52
|
-
"@webex/test-helper-test-users": "3.
|
|
47
|
+
"@webex/plugin-rooms": "3.13.0-next.7",
|
|
48
|
+
"@webex/test-helper-chai": "3.13.0-next.1",
|
|
49
|
+
"@webex/test-helper-mocha": "3.13.0-next.1",
|
|
50
|
+
"@webex/test-helper-mock-webex": "3.13.0-next.1",
|
|
51
|
+
"@webex/test-helper-retry": "3.13.0-next.1",
|
|
52
|
+
"@webex/test-helper-test-users": "3.13.0-next.1",
|
|
53
53
|
"chai": "^4.3.4",
|
|
54
54
|
"chai-as-promised": "^7.1.1",
|
|
55
55
|
"eslint": "^8.24.0",
|
|
@@ -61,24 +61,24 @@
|
|
|
61
61
|
"typescript": "^4.7.4"
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@webex/common": "3.
|
|
64
|
+
"@webex/common": "3.13.0-next.1",
|
|
65
65
|
"@webex/event-dictionary-ts": "^1.0.2215",
|
|
66
66
|
"@webex/internal-media-core": "2.32.1",
|
|
67
|
-
"@webex/internal-plugin-conversation": "3.13.0-next.
|
|
68
|
-
"@webex/internal-plugin-device": "3.
|
|
69
|
-
"@webex/internal-plugin-identity": "
|
|
70
|
-
"@webex/internal-plugin-llm": "3.
|
|
71
|
-
"@webex/internal-plugin-mercury": "3.
|
|
72
|
-
"@webex/internal-plugin-metrics": "3.
|
|
73
|
-
"@webex/internal-plugin-support": "3.13.0-next.
|
|
74
|
-
"@webex/internal-plugin-user": "3.
|
|
75
|
-
"@webex/internal-plugin-voicea": "3.
|
|
76
|
-
"@webex/media-helpers": "3.
|
|
77
|
-
"@webex/plugin-people": "3.
|
|
78
|
-
"@webex/plugin-rooms": "3.13.0-next.
|
|
67
|
+
"@webex/internal-plugin-conversation": "3.13.0-next.7",
|
|
68
|
+
"@webex/internal-plugin-device": "3.13.0-next.3",
|
|
69
|
+
"@webex/internal-plugin-identity": "3.13.0-next.3",
|
|
70
|
+
"@webex/internal-plugin-llm": "3.13.0-next.3",
|
|
71
|
+
"@webex/internal-plugin-mercury": "3.13.0-next.3",
|
|
72
|
+
"@webex/internal-plugin-metrics": "3.13.0-next.3",
|
|
73
|
+
"@webex/internal-plugin-support": "3.13.0-next.7",
|
|
74
|
+
"@webex/internal-plugin-user": "3.13.0-next.3",
|
|
75
|
+
"@webex/internal-plugin-voicea": "3.13.0-next.3",
|
|
76
|
+
"@webex/media-helpers": "3.13.0-next.1",
|
|
77
|
+
"@webex/plugin-people": "3.13.0-next.3",
|
|
78
|
+
"@webex/plugin-rooms": "3.13.0-next.7",
|
|
79
79
|
"@webex/ts-sdp": "^1.8.1",
|
|
80
80
|
"@webex/web-capabilities": "^1.13.1",
|
|
81
|
-
"@webex/webex-core": "3.
|
|
81
|
+
"@webex/webex-core": "3.13.0-next.3",
|
|
82
82
|
"ampersand-collection": "^2.0.2",
|
|
83
83
|
"bowser": "^2.11.0",
|
|
84
84
|
"btoa": "^1.2.1",
|
|
@@ -96,5 +96,5 @@
|
|
|
96
96
|
"//": [
|
|
97
97
|
"TODO: upgrade jwt-decode when moving to node 18"
|
|
98
98
|
],
|
|
99
|
-
"version": "3.13.0-next.
|
|
99
|
+
"version": "3.13.0-next.11"
|
|
100
100
|
}
|