@webex/plugin-meetings 3.11.0-next.3 → 3.11.0-next.30
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/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/config.js +5 -1
- package/dist/config.js.map +1 -1
- package/dist/hashTree/hashTree.js +18 -0
- package/dist/hashTree/hashTree.js.map +1 -1
- package/dist/hashTree/hashTreeParser.js +603 -266
- package/dist/hashTree/hashTreeParser.js.map +1 -1
- package/dist/hashTree/types.js +4 -2
- package/dist/hashTree/types.js.map +1 -1
- package/dist/hashTree/utils.js +10 -0
- package/dist/hashTree/utils.js.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/interceptors/constant.js +12 -0
- package/dist/interceptors/constant.js.map +1 -0
- package/dist/interceptors/dataChannelAuthToken.js +233 -0
- package/dist/interceptors/dataChannelAuthToken.js.map +1 -0
- package/dist/interceptors/index.js +7 -0
- package/dist/interceptors/index.js.map +1 -1
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/index.js +80 -44
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/types.js.map +1 -1
- package/dist/media/MediaConnectionAwaiter.js +57 -1
- package/dist/media/MediaConnectionAwaiter.js.map +1 -1
- package/dist/media/properties.js +4 -2
- package/dist/media/properties.js.map +1 -1
- package/dist/meeting/index.js +134 -40
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/request.js +50 -0
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/request.type.js.map +1 -1
- package/dist/meeting/util.js +108 -2
- package/dist/meeting/util.js.map +1 -1
- package/dist/meetings/index.js +76 -34
- package/dist/meetings/index.js.map +1 -1
- package/dist/metrics/constants.js +2 -1
- package/dist/metrics/constants.js.map +1 -1
- package/dist/multistream/mediaRequestManager.js +1 -1
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/remoteMediaManager.js +11 -0
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- package/dist/reactions/reactions.type.js.map +1 -1
- package/dist/types/config.d.ts +3 -0
- package/dist/types/hashTree/hashTree.d.ts +7 -0
- package/dist/types/hashTree/hashTreeParser.d.ts +83 -12
- package/dist/types/hashTree/types.d.ts +3 -0
- package/dist/types/hashTree/utils.d.ts +6 -0
- package/dist/types/interceptors/constant.d.ts +5 -0
- package/dist/types/interceptors/dataChannelAuthToken.d.ts +35 -0
- package/dist/types/interceptors/index.d.ts +2 -1
- package/dist/types/locus-info/index.d.ts +9 -2
- package/dist/types/locus-info/types.d.ts +1 -0
- package/dist/types/media/MediaConnectionAwaiter.d.ts +10 -1
- package/dist/types/media/properties.d.ts +2 -1
- package/dist/types/meeting/index.d.ts +27 -5
- package/dist/types/meeting/request.d.ts +16 -1
- package/dist/types/meeting/request.type.d.ts +5 -0
- package/dist/types/meeting/util.d.ts +28 -0
- package/dist/types/meetings/index.d.ts +3 -1
- package/dist/types/metrics/constants.d.ts +1 -0
- package/dist/types/reactions/reactions.type.d.ts +1 -0
- package/dist/webinar/index.js +1 -1
- package/package.json +22 -22
- package/src/config.ts +3 -0
- package/src/hashTree/hashTree.ts +17 -0
- package/src/hashTree/hashTreeParser.ts +525 -188
- package/src/hashTree/types.ts +4 -0
- package/src/hashTree/utils.ts +9 -0
- package/src/index.ts +6 -1
- package/src/interceptors/constant.ts +6 -0
- package/src/interceptors/dataChannelAuthToken.ts +142 -0
- package/src/interceptors/index.ts +2 -1
- package/src/locus-info/index.ts +110 -35
- package/src/locus-info/types.ts +1 -0
- package/src/media/MediaConnectionAwaiter.ts +41 -1
- package/src/media/properties.ts +3 -1
- package/src/meeting/index.ts +101 -22
- package/src/meeting/request.ts +42 -0
- package/src/meeting/request.type.ts +6 -0
- package/src/meeting/util.ts +132 -1
- package/src/meetings/index.ts +88 -7
- package/src/metrics/constants.ts +1 -0
- package/src/multistream/mediaRequestManager.ts +1 -1
- package/src/multistream/remoteMediaManager.ts +13 -0
- package/src/reactions/reactions.type.ts +1 -0
- package/test/unit/spec/hashTree/hashTree.ts +66 -0
- package/test/unit/spec/hashTree/hashTreeParser.ts +1594 -162
- package/test/unit/spec/interceptors/dataChannelAuthToken.ts +141 -0
- package/test/unit/spec/locus-info/index.js +173 -45
- package/test/unit/spec/media/MediaConnectionAwaiter.ts +41 -1
- package/test/unit/spec/media/properties.ts +12 -3
- package/test/unit/spec/meeting/index.js +414 -62
- package/test/unit/spec/meeting/request.js +64 -0
- package/test/unit/spec/meeting/utils.js +294 -22
- package/test/unit/spec/meetings/index.js +550 -10
- package/test/unit/spec/multistream/remoteMediaManager.ts +30 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import HashTree from './hashTree';
|
|
2
2
|
import { Enum } from '../constants';
|
|
3
|
-
import { HashTreeObject } from './types';
|
|
3
|
+
import { HtMeta, HashTreeObject } from './types';
|
|
4
4
|
import { LocusDTO } from '../locus-info/types';
|
|
5
5
|
export interface DataSet {
|
|
6
6
|
url: string;
|
|
@@ -23,10 +23,21 @@ export interface HashTreeMessage {
|
|
|
23
23
|
locusStateElements?: Array<HashTreeObject>;
|
|
24
24
|
locusSessionId?: string;
|
|
25
25
|
locusUrl: string;
|
|
26
|
+
heartbeatIntervalMs?: number;
|
|
27
|
+
}
|
|
28
|
+
export interface VisibleDataSetInfo {
|
|
29
|
+
name: string;
|
|
30
|
+
url: string;
|
|
31
|
+
dataChannelUrl?: string;
|
|
32
|
+
}
|
|
33
|
+
export interface Metadata {
|
|
34
|
+
htMeta: HtMeta;
|
|
35
|
+
visibleDataSets: VisibleDataSetInfo[];
|
|
26
36
|
}
|
|
27
37
|
interface InternalDataSet extends DataSet {
|
|
28
38
|
hashTree?: HashTree;
|
|
29
39
|
timer?: ReturnType<typeof setTimeout>;
|
|
40
|
+
heartbeatWatchdogTimer?: ReturnType<typeof setTimeout>;
|
|
30
41
|
}
|
|
31
42
|
type WebexRequestMethod = (options: Record<string, any>) => Promise<any>;
|
|
32
43
|
export declare const LocusInfoUpdateType: {
|
|
@@ -45,8 +56,10 @@ declare class HashTreeParser {
|
|
|
45
56
|
visibleDataSetsUrl: string;
|
|
46
57
|
webexRequest: WebexRequestMethod;
|
|
47
58
|
locusInfoUpdateCallback: LocusInfoUpdateCallback;
|
|
48
|
-
visibleDataSets:
|
|
59
|
+
visibleDataSets: VisibleDataSetInfo[];
|
|
49
60
|
debugId: string;
|
|
61
|
+
heartbeatIntervalMs?: number;
|
|
62
|
+
private excludedDataSets;
|
|
50
63
|
/**
|
|
51
64
|
* Constructor for HashTreeParser
|
|
52
65
|
* @param {Object} options
|
|
@@ -57,16 +70,37 @@ declare class HashTreeParser {
|
|
|
57
70
|
dataSets: Array<DataSet>;
|
|
58
71
|
locus: any;
|
|
59
72
|
};
|
|
73
|
+
metadata: Metadata | null;
|
|
60
74
|
webexRequest: WebexRequestMethod;
|
|
61
75
|
locusInfoUpdateCallback: LocusInfoUpdateCallback;
|
|
62
76
|
debugId: string;
|
|
77
|
+
excludedDataSets?: string[];
|
|
63
78
|
});
|
|
79
|
+
/**
|
|
80
|
+
* Checks if the given data set name is in the list of visible data sets
|
|
81
|
+
* @param {string} dataSetName data set name to check
|
|
82
|
+
* @returns {Boolean} True if the data set is visible, false otherwise
|
|
83
|
+
*/
|
|
84
|
+
private isVisibleDataSet;
|
|
85
|
+
/**
|
|
86
|
+
* Checks if the given data set name is in the excluded list
|
|
87
|
+
* @param {string} dataSetName data set name to check
|
|
88
|
+
* @returns {boolean} True if the data set is excluded, false otherwise
|
|
89
|
+
*/
|
|
90
|
+
private isExcludedDataSet;
|
|
91
|
+
/**
|
|
92
|
+
* Adds a data set to the visible data sets list, unless it is in the excluded list.
|
|
93
|
+
* @param {VisibleDataSetInfo} dataSetInfo data set info to add
|
|
94
|
+
* @returns {boolean} True if the data set was added, false if it was excluded
|
|
95
|
+
*/
|
|
96
|
+
private addToVisibleDataSetsList;
|
|
64
97
|
/**
|
|
65
98
|
* Initializes a new visible data set by creating a hash tree for it, adding it to all the internal structures,
|
|
66
99
|
* and sending an initial sync request to Locus with empty leaf data - that will trigger Locus to gives us all the data
|
|
67
100
|
* from that dataset (in the response or via messages).
|
|
68
101
|
*
|
|
69
|
-
* @param {
|
|
102
|
+
* @param {VisibleDataSetInfo} visibleDataSetInfo Information about the new visible data set
|
|
103
|
+
* @param {DataSet} dataSetInfo The new data set to be added
|
|
70
104
|
* @returns {Promise}
|
|
71
105
|
*/
|
|
72
106
|
private initializeNewVisibleDataSet;
|
|
@@ -79,12 +113,11 @@ declare class HashTreeParser {
|
|
|
79
113
|
*/
|
|
80
114
|
private sendInitializationSyncRequestToLocus;
|
|
81
115
|
/**
|
|
82
|
-
* Queries Locus for information about all
|
|
116
|
+
* Queries Locus for all up-to-date information about all visible data sets
|
|
83
117
|
*
|
|
84
|
-
* @param {string} url - url from which we can get info about all data sets
|
|
85
118
|
* @returns {Promise}
|
|
86
119
|
*/
|
|
87
|
-
private
|
|
120
|
+
private getAllVisibleDataSetsFromLocus;
|
|
88
121
|
/**
|
|
89
122
|
* Initializes the hash tree parser from a message received from Locus.
|
|
90
123
|
*
|
|
@@ -105,7 +138,7 @@ declare class HashTreeParser {
|
|
|
105
138
|
/**
|
|
106
139
|
* Initializes data sets by doing an initialization sync on each visible data set that doesn't have a hash tree yet.
|
|
107
140
|
*
|
|
108
|
-
* @param {DataSet[]}
|
|
141
|
+
* @param {DataSet[]} visibleDataSets Array of visible DataSet objects to initialize
|
|
109
142
|
* @param {string} debugText Text to include in logs for debugging purposes
|
|
110
143
|
* @returns {Promise}
|
|
111
144
|
*/
|
|
@@ -121,6 +154,15 @@ declare class HashTreeParser {
|
|
|
121
154
|
* @returns {any} - An object mapping dataset names to arrays of leaf data
|
|
122
155
|
*/
|
|
123
156
|
private analyzeLocusHtMeta;
|
|
157
|
+
/**
|
|
158
|
+
* Analyzes the Metadata object that is sent outside of Locus object, and appends its data to passed in leafInfo
|
|
159
|
+
* structure.
|
|
160
|
+
*
|
|
161
|
+
* @param {Record<string, LeafInfo[]>} leafInfo the structure to which the Metadata info will be appended
|
|
162
|
+
* @param {Metadata} metadata Metadata object
|
|
163
|
+
* @returns {void}
|
|
164
|
+
*/
|
|
165
|
+
private analyzeMetadata;
|
|
124
166
|
/**
|
|
125
167
|
* Checks if the provided hash tree message indicates the end of the meeting and that there won't be any more updates.
|
|
126
168
|
*
|
|
@@ -135,6 +177,15 @@ declare class HashTreeParser {
|
|
|
135
177
|
* @returns {void}
|
|
136
178
|
*/
|
|
137
179
|
private handleRootHashHeartBeatMessage;
|
|
180
|
+
/**
|
|
181
|
+
* Handles updates to Metadata object that we receive from Locus via other means than messages. Right now
|
|
182
|
+
* that means only in the API response alongside locus object.
|
|
183
|
+
*
|
|
184
|
+
* @param {Metadata} metadata received in Locus update other than a message (for example in an API response)
|
|
185
|
+
* @param {HashTreeObject[]} updatedObjects a list of updated hash tree objects to which any updates resulting from new Metadata will be added
|
|
186
|
+
* @returns {void}
|
|
187
|
+
*/
|
|
188
|
+
handleMetadataUpdate(metadata: Metadata, updatedObjects: HashTreeObject[]): void;
|
|
138
189
|
/**
|
|
139
190
|
* This method should be called when we receive a partial locus DTO that contains dataSets and htMeta information
|
|
140
191
|
* It updates the hash trees with the new leaf data based on the received Locus
|
|
@@ -145,6 +196,7 @@ declare class HashTreeParser {
|
|
|
145
196
|
handleLocusUpdate(update: {
|
|
146
197
|
dataSets?: Array<DataSet>;
|
|
147
198
|
locus: any;
|
|
199
|
+
metadata?: Metadata;
|
|
148
200
|
}): void;
|
|
149
201
|
/**
|
|
150
202
|
* Updates the internal data set information based on the received data set from Locus.
|
|
@@ -175,18 +227,17 @@ declare class HashTreeParser {
|
|
|
175
227
|
* visible data sets and they require async initialization, the names of these data sets
|
|
176
228
|
* are returned in an array.
|
|
177
229
|
*
|
|
178
|
-
* @param {
|
|
179
|
-
* @param {
|
|
230
|
+
* @param {VisibleDataSetInfo[]} removedDataSets - The list of removed data sets.
|
|
231
|
+
* @param {VisibleDataSetInfo[]} addedDataSets - The list of added data sets.
|
|
180
232
|
* @param {HashTreeObject[]} updatedObjects - The list of updated hash tree objects to which changes will be added.
|
|
181
|
-
* @returns {
|
|
233
|
+
* @returns {VisibleDataSetInfo[]} list of data sets that couldn't be initialized synchronously
|
|
182
234
|
*/
|
|
183
235
|
private processVisibleDataSetChanges;
|
|
184
236
|
/**
|
|
185
237
|
* Adds entries to the passed in updateObjects array
|
|
186
238
|
* for the changes that result from adding and removing visible data sets.
|
|
187
239
|
*
|
|
188
|
-
* @param {
|
|
189
|
-
* @param {string[]} addedDataSets - The list of added data sets.
|
|
240
|
+
* @param {VisibleDataSetInfo[]} addedDataSets - The list of added data sets.
|
|
190
241
|
* @returns {Promise<void>}
|
|
191
242
|
*/
|
|
192
243
|
private initializeNewVisibleDataSets;
|
|
@@ -220,6 +271,15 @@ declare class HashTreeParser {
|
|
|
220
271
|
* @returns {number} - A weighted backoff time based on the provided configuration, using algorithm supplied by Locus team
|
|
221
272
|
*/
|
|
222
273
|
private getWeightedBackoffTime;
|
|
274
|
+
/**
|
|
275
|
+
* Performs a sync for the given data set.
|
|
276
|
+
*
|
|
277
|
+
* @param {InternalDataSet} dataSet - The data set to sync
|
|
278
|
+
* @param {string} rootHash - Our current root hash for this data set
|
|
279
|
+
* @param {string} reason - The reason for the sync (used for logging)
|
|
280
|
+
* @returns {Promise<void>}
|
|
281
|
+
*/
|
|
282
|
+
private performSync;
|
|
223
283
|
/**
|
|
224
284
|
* Runs the sync algorithm for the given data set.
|
|
225
285
|
*
|
|
@@ -227,6 +287,16 @@ declare class HashTreeParser {
|
|
|
227
287
|
* @returns {void}
|
|
228
288
|
*/
|
|
229
289
|
private runSyncAlgorithm;
|
|
290
|
+
/**
|
|
291
|
+
* Resets the heartbeat watchdog timers for the specified data sets. Each data set has its own
|
|
292
|
+
* watchdog timer that monitors whether heartbeats are being received within the expected interval.
|
|
293
|
+
* If a heartbeat is not received for a specific data set within heartbeatIntervalMs plus
|
|
294
|
+
* a backoff-calculated time, the sync algorithm is initiated for that data set
|
|
295
|
+
*
|
|
296
|
+
* @param {Array<DataSet>} receivedDataSets - The data sets from the received message for which watchdog timers should be reset
|
|
297
|
+
* @returns {void}
|
|
298
|
+
*/
|
|
299
|
+
private resetHeartbeatWatchdogs;
|
|
230
300
|
/**
|
|
231
301
|
* Stops all timers for the data sets to prevent any further sync attempts.
|
|
232
302
|
* @returns {void}
|
|
@@ -235,6 +305,7 @@ declare class HashTreeParser {
|
|
|
235
305
|
/**
|
|
236
306
|
* Gets the current hashes from the locus for a specific data set.
|
|
237
307
|
* @param {string} dataSetName
|
|
308
|
+
* @param {string} currentRootHash
|
|
238
309
|
* @returns {string[]}
|
|
239
310
|
*/
|
|
240
311
|
private getHashesFromLocus;
|
|
@@ -8,6 +8,8 @@ export declare const ObjectType: {
|
|
|
8
8
|
readonly fullState: "fullstate";
|
|
9
9
|
readonly links: "links";
|
|
10
10
|
readonly control: "controlentry";
|
|
11
|
+
readonly metadata: "metadata";
|
|
12
|
+
readonly embeddedApp: "embeddedapp";
|
|
11
13
|
};
|
|
12
14
|
export type ObjectType = Enum<typeof ObjectType>;
|
|
13
15
|
export declare const ObjectTypeToLocusKeyMap: {
|
|
@@ -18,6 +20,7 @@ export declare const ObjectTypeToLocusKeyMap: {
|
|
|
18
20
|
participant: string;
|
|
19
21
|
mediashare: string;
|
|
20
22
|
controlentry: string;
|
|
23
|
+
embeddedapp: string;
|
|
21
24
|
};
|
|
22
25
|
export interface HtMeta {
|
|
23
26
|
elementId: {
|
|
@@ -5,6 +5,12 @@ import { HashTreeObject } from './types';
|
|
|
5
5
|
* @returns {boolean} True if the object is of type "self", false otherwise
|
|
6
6
|
*/
|
|
7
7
|
export declare function isSelf(object: HashTreeObject): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Checks if the given hash tree object is of type "Metadata"
|
|
10
|
+
* @param {HashTreeObject} object object to check
|
|
11
|
+
* @returns {boolean} True if the object is of type "Metadata", false otherwise
|
|
12
|
+
*/
|
|
13
|
+
export declare function isMetadata(object: HashTreeObject): boolean;
|
|
8
14
|
/**
|
|
9
15
|
* Analyzes given part of Locus DTO recursively and delete any nested objects that have their own htMeta
|
|
10
16
|
*
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2015-2026 Cisco Systems, Inc. See LICENSE file.
|
|
3
|
+
*/
|
|
4
|
+
import { Interceptor } from '@webex/http-core';
|
|
5
|
+
/**
|
|
6
|
+
* @class
|
|
7
|
+
*/
|
|
8
|
+
export default class DataChannelAuthTokenInterceptor extends Interceptor {
|
|
9
|
+
private _refreshDataChannelToken;
|
|
10
|
+
private _isDataChannelTokenEnabled;
|
|
11
|
+
constructor(options: any);
|
|
12
|
+
/**
|
|
13
|
+
* @returns {DataChannelAuthTokenInterceptor}
|
|
14
|
+
*/
|
|
15
|
+
static create(): DataChannelAuthTokenInterceptor;
|
|
16
|
+
private getRetryKey;
|
|
17
|
+
private getHeader;
|
|
18
|
+
/**
|
|
19
|
+
* Intercept responses and, on 401/403 with `Data-Channel-Auth-Token` header,
|
|
20
|
+
* attempt to refresh the data channel token and retry the original request once.
|
|
21
|
+
*
|
|
22
|
+
* @param {Object} options
|
|
23
|
+
* @param {Object} reason
|
|
24
|
+
* @returns {Promise<HttpResponse>}
|
|
25
|
+
*/
|
|
26
|
+
onResponseError(options: any, reason: any): Promise<unknown>;
|
|
27
|
+
/**
|
|
28
|
+
* Retry the failed data channel request after a delay.
|
|
29
|
+
* Refreshes the Data-Channel-Auth-Token and re-sends the original request.
|
|
30
|
+
*
|
|
31
|
+
* @param {Object} options - Original request options.
|
|
32
|
+
* @returns {Promise<HttpResponse>} - Resolves on successful retry.
|
|
33
|
+
*/
|
|
34
|
+
refreshTokenAndRetryWithDelay(options: any): Promise<unknown>;
|
|
35
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import LocusRetryStatusInterceptor from './locusRetry';
|
|
2
2
|
import LocusRouteTokenInterceptor from './locusRouteToken';
|
|
3
|
-
|
|
3
|
+
import DataChannelAuthTokenInterceptor from './dataChannelAuthToken';
|
|
4
|
+
export { LocusRetryStatusInterceptor, LocusRouteTokenInterceptor, DataChannelAuthTokenInterceptor };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import EventsScope from '../common/events/events-scope';
|
|
2
2
|
import { LOCUSEVENT } from '../constants';
|
|
3
|
-
import HashTreeParser, { DataSet, HashTreeMessage } from '../hashTree/hashTreeParser';
|
|
3
|
+
import HashTreeParser, { DataSet, HashTreeMessage, Metadata } from '../hashTree/hashTreeParser';
|
|
4
4
|
import { HashTreeObject } from '../hashTree/types';
|
|
5
5
|
import { Links, LocusDTO } from './types';
|
|
6
6
|
export type LocusLLMEvent = {
|
|
@@ -12,6 +12,7 @@ export type LocusLLMEvent = {
|
|
|
12
12
|
export type LocusApiResponseBody = {
|
|
13
13
|
dataSets?: DataSet[];
|
|
14
14
|
locus: LocusDTO;
|
|
15
|
+
metadata?: Metadata;
|
|
15
16
|
};
|
|
16
17
|
/**
|
|
17
18
|
* @description LocusInfo extends ChildEmitter to convert locusInfo info a private emitter to parent object
|
|
@@ -105,6 +106,7 @@ export default class LocusInfo extends EventsScope {
|
|
|
105
106
|
trigger: 'join-response';
|
|
106
107
|
locus: LocusDTO;
|
|
107
108
|
dataSets?: DataSet[];
|
|
109
|
+
metadata?: Metadata;
|
|
108
110
|
} | {
|
|
109
111
|
trigger: 'locus-message';
|
|
110
112
|
locus?: LocusDTO;
|
|
@@ -171,7 +173,9 @@ export default class LocusInfo extends EventsScope {
|
|
|
171
173
|
/**
|
|
172
174
|
* Function for handling full locus when it's using hash trees (so not the "classic" one).
|
|
173
175
|
*
|
|
176
|
+
* @param {string} debugText string explaining the trigger for this call, added to logs for debugging purposes
|
|
174
177
|
* @param {object} locus locus object
|
|
178
|
+
* @param {object} metadata locus hash trees metadata
|
|
175
179
|
* @param {string} eventType locus event
|
|
176
180
|
* @param {DataSet[]} dataSets
|
|
177
181
|
* @returns {void}
|
|
@@ -180,6 +184,7 @@ export default class LocusInfo extends EventsScope {
|
|
|
180
184
|
/**
|
|
181
185
|
* Function for handling full locus when it's the "classic" one (not hash trees)
|
|
182
186
|
*
|
|
187
|
+
* @param {string} debugText string explaining the trigger for this call, added to logs for debugging purposes
|
|
183
188
|
* @param {object} locus locus object
|
|
184
189
|
* @param {string} eventType locus event
|
|
185
190
|
* @returns {void}
|
|
@@ -187,13 +192,15 @@ export default class LocusInfo extends EventsScope {
|
|
|
187
192
|
private onFullLocusClassic;
|
|
188
193
|
/**
|
|
189
194
|
* updates the locus with full locus object
|
|
195
|
+
* @param {string} debugText string explaining the trigger for this call, added to logs for debugging purposes
|
|
190
196
|
* @param {object} locus locus object
|
|
191
197
|
* @param {string} eventType locus event
|
|
192
198
|
* @param {DataSet[]} dataSets
|
|
199
|
+
* @param {object} metadata locus hash trees metadata
|
|
193
200
|
* @returns {object} null
|
|
194
201
|
* @memberof LocusInfo
|
|
195
202
|
*/
|
|
196
|
-
onFullLocus(locus: any, eventType?: string, dataSets?: Array<DataSet
|
|
203
|
+
onFullLocus(debugText: string, locus: any, eventType?: string, dataSets?: Array<DataSet>, metadata?: Metadata): void;
|
|
197
204
|
/**
|
|
198
205
|
* Common part of handling full locus, used by both classic and hash tree based locus handling
|
|
199
206
|
* @param {object} locus locus object
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export interface MediaConnectionAwaiterProps {
|
|
2
2
|
webrtcMediaConnection: any;
|
|
3
|
+
correlationId: string;
|
|
3
4
|
}
|
|
4
5
|
/**
|
|
5
6
|
* @class MediaConnectionAwaiter
|
|
@@ -10,6 +11,7 @@ export default class MediaConnectionAwaiter {
|
|
|
10
11
|
private defer;
|
|
11
12
|
private retried;
|
|
12
13
|
private iceConnected;
|
|
14
|
+
private correlationId;
|
|
13
15
|
private onTimeoutCallback;
|
|
14
16
|
private peerConnectionStateCallback;
|
|
15
17
|
private iceConnectionStateCallback;
|
|
@@ -17,7 +19,7 @@ export default class MediaConnectionAwaiter {
|
|
|
17
19
|
/**
|
|
18
20
|
* @param {MediaConnectionAwaiterProps} mediaConnectionAwaiterProps
|
|
19
21
|
*/
|
|
20
|
-
constructor({ webrtcMediaConnection }: MediaConnectionAwaiterProps);
|
|
22
|
+
constructor({ webrtcMediaConnection, correlationId }: MediaConnectionAwaiterProps);
|
|
21
23
|
/**
|
|
22
24
|
* Returns true if the connection is connected, false otherwise.
|
|
23
25
|
*
|
|
@@ -66,6 +68,13 @@ export default class MediaConnectionAwaiter {
|
|
|
66
68
|
* @returns {void}
|
|
67
69
|
*/
|
|
68
70
|
iceGatheringStateHandler(): void;
|
|
71
|
+
/**
|
|
72
|
+
* sends a metric with some additional info that might help debugging
|
|
73
|
+
* issues where browser doesn't update the RTCPeerConnection's iceConnectionState or connectionState
|
|
74
|
+
*
|
|
75
|
+
* @returns {void}
|
|
76
|
+
*/
|
|
77
|
+
sendMetric(): Promise<void>;
|
|
69
78
|
/**
|
|
70
79
|
* Function called when the timeout is reached.
|
|
71
80
|
*
|
|
@@ -93,9 +93,10 @@ export default class MediaProperties {
|
|
|
93
93
|
/**
|
|
94
94
|
* Waits for the webrtc media connection to be connected.
|
|
95
95
|
*
|
|
96
|
+
* @param {string} correlationId
|
|
96
97
|
* @returns {Promise<void>}
|
|
97
98
|
*/
|
|
98
|
-
waitForMediaConnectionConnected(): Promise<void>;
|
|
99
|
+
waitForMediaConnectionConnected(correlationId: string): Promise<void>;
|
|
99
100
|
/**
|
|
100
101
|
* Returns ICE transport information:
|
|
101
102
|
* - selectedCandidatePairChanges - number of times the selected candidate pair was changed, it should be at least 1 for successful connections
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { StatelessWebexPlugin } from '@webex/webex-core';
|
|
3
3
|
import { ClientEvent, ClientEventLeaveReason } from '@webex/internal-plugin-metrics';
|
|
4
|
-
import { ClientEvent as RawClientEvent } from '@webex/event-dictionary-ts';
|
|
4
|
+
import type { ClientEvent as RawClientEvent } from '@webex/event-dictionary-ts';
|
|
5
5
|
import { MediaType, StatsAnalyzer, NetworkQualityMonitor, StatsMonitor } from '@webex/internal-media-core';
|
|
6
|
+
import { DataChannelTokenType } from '@webex/internal-plugin-llm';
|
|
6
7
|
import { LocalStream, LocalCameraStream, LocalDisplayStream, LocalSystemAudioStream, LocalMicrophoneStream } from '@webex/media-helpers';
|
|
7
8
|
import Roap, { type TurnDiscoverySkipReason } from '../roap/index';
|
|
8
9
|
import { type TurnServerInfo } from '../roap/types';
|
|
@@ -23,7 +24,7 @@ import { LocusMediaRequest } from './locusMediaRequest';
|
|
|
23
24
|
import { BrbState } from './brbState';
|
|
24
25
|
import { SetStageOptions } from './request.type';
|
|
25
26
|
import { Invitee } from './type';
|
|
26
|
-
import { DataSet } from '../hashTree/hashTreeParser';
|
|
27
|
+
import { DataSet, Metadata } from '../hashTree/hashTreeParser';
|
|
27
28
|
import { LocusDTO } from '../locus-info/types';
|
|
28
29
|
export type CaptionData = {
|
|
29
30
|
id: string;
|
|
@@ -70,6 +71,7 @@ export type AddMediaOptions = {
|
|
|
70
71
|
remoteMediaManagerConfig?: RemoteMediaManagerConfiguration;
|
|
71
72
|
bundlePolicy?: BundlePolicy;
|
|
72
73
|
allowMediaInLobby?: boolean;
|
|
74
|
+
allowPublishMediaInLobby?: boolean;
|
|
73
75
|
additionalMediaOptions?: AdditionalMediaOptions;
|
|
74
76
|
};
|
|
75
77
|
export type AdditionalMediaOptions = {
|
|
@@ -405,6 +407,10 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
|
405
407
|
keepAliveTimerId: NodeJS.Timeout;
|
|
406
408
|
lastVideoLayoutInfo: any;
|
|
407
409
|
locusInfo: any;
|
|
410
|
+
isUserUnadmitted?: boolean;
|
|
411
|
+
joinedWith?: any;
|
|
412
|
+
selfId?: string;
|
|
413
|
+
roles: any[];
|
|
408
414
|
locusMediaRequest?: LocusMediaRequest;
|
|
409
415
|
mediaProperties: MediaProperties;
|
|
410
416
|
mediaRequestManagers: {
|
|
@@ -438,7 +444,6 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
|
438
444
|
endCallInitJoinReq: any;
|
|
439
445
|
endJoinReqResp: any;
|
|
440
446
|
endLocalSDPGenRemoteSDPRecvDelay: any;
|
|
441
|
-
joinedWith: any;
|
|
442
447
|
locusId: any;
|
|
443
448
|
startCallInitJoinReq: any;
|
|
444
449
|
startJoinReqResp: any;
|
|
@@ -453,12 +458,10 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
|
453
458
|
permissionTokenReceivedLocalTime: number;
|
|
454
459
|
resourceId: any;
|
|
455
460
|
resourceUrl: string;
|
|
456
|
-
selfId: string;
|
|
457
461
|
state: any;
|
|
458
462
|
localAudioStreamMuteStateHandler: () => void;
|
|
459
463
|
localVideoStreamMuteStateHandler: () => void;
|
|
460
464
|
localOutputTrackChangeHandler: () => void;
|
|
461
|
-
roles: any[];
|
|
462
465
|
environment: string;
|
|
463
466
|
namespace: string;
|
|
464
467
|
allowMediaInLobby: boolean;
|
|
@@ -1060,6 +1063,7 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
|
1060
1063
|
host: object;
|
|
1061
1064
|
selfId: string;
|
|
1062
1065
|
dataSets: DataSet[];
|
|
1066
|
+
metadata: Metadata;
|
|
1063
1067
|
}): void;
|
|
1064
1068
|
/**
|
|
1065
1069
|
* Upload logs for the current meeting
|
|
@@ -2087,5 +2091,23 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
|
2087
2091
|
* @memberof Meetings
|
|
2088
2092
|
*/
|
|
2089
2093
|
cancelSipCallOut(participantId: string): Promise<any>;
|
|
2094
|
+
/**
|
|
2095
|
+
* Method to get new data
|
|
2096
|
+
* @returns {Promise}
|
|
2097
|
+
*/
|
|
2098
|
+
refreshDataChannelToken(): Promise<{
|
|
2099
|
+
body: {
|
|
2100
|
+
datachannelToken: any;
|
|
2101
|
+
dataChannelTokenType: DataChannelTokenType;
|
|
2102
|
+
};
|
|
2103
|
+
}>;
|
|
2104
|
+
/**
|
|
2105
|
+
* Determines the current data channel token type based on the meeting state.
|
|
2106
|
+
*
|
|
2107
|
+
* variant should be used when connecting to the LLM data channel.
|
|
2108
|
+
*
|
|
2109
|
+
* @returns {DataChannelTokenType} The token type representing the current session mode.
|
|
2110
|
+
*/
|
|
2111
|
+
getDataChannelTokenType(): DataChannelTokenType;
|
|
2090
2112
|
}
|
|
2091
2113
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { StatelessWebexPlugin } from '@webex/webex-core';
|
|
2
|
-
import { SendReactionOptions, BrbOptions, ToggleReactionsOptions, PostMeetingDataConsentOptions, SynchronizeVideoLayout } from './request.type';
|
|
2
|
+
import { SendReactionOptions, BrbOptions, ToggleReactionsOptions, PostMeetingDataConsentOptions, SynchronizeVideoLayout, fetchDataChannelTokenOptions } from './request.type';
|
|
3
3
|
import { AnnotationInfo } from '../annotation/annotation.types';
|
|
4
4
|
import { ClientMediaPreferences } from '../reachability/reachability.types';
|
|
5
5
|
/**
|
|
@@ -364,4 +364,19 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
364
364
|
* @returns {Promise} The API response
|
|
365
365
|
*/
|
|
366
366
|
cancelSipCallOut(participantId: any): Promise<any>;
|
|
367
|
+
/**
|
|
368
|
+
* Sends a request to retrieve the datachannel authorization token for a participant.
|
|
369
|
+
*
|
|
370
|
+
* For regular meeting data channel:
|
|
371
|
+
* GET /locus/api/v1/loci/{uuid:lid}/participant/{uuid:pid}/datachannel/token
|
|
372
|
+
*
|
|
373
|
+
* For practice session data channel:
|
|
374
|
+
* GET /locus/api/v1/loci/{uuid:lid}/participant/{uuid:pid}/practiceSession/datachannel/token
|
|
375
|
+
*
|
|
376
|
+
* @param {string} locusUrl - The locus url.
|
|
377
|
+
* @param {string} requestingParticipantId - The participant UUID.
|
|
378
|
+
* @param {boolean} [isPracticeSession=false] - Whether to get the practice session token.
|
|
379
|
+
* @returns {Promise<{datachannelToken: string}>}
|
|
380
|
+
*/
|
|
381
|
+
fetchDatachannelToken({ locusUrl, requestingParticipantId, isPracticeSession, }: fetchDataChannelTokenOptions): Promise<any>;
|
|
367
382
|
}
|
|
@@ -94,4 +94,9 @@ export type SetStageVideoLayout = {
|
|
|
94
94
|
export type UnsetStageVideoLayout = {
|
|
95
95
|
overrideDefault: false;
|
|
96
96
|
};
|
|
97
|
+
export type fetchDataChannelTokenOptions = {
|
|
98
|
+
locusUrl: string;
|
|
99
|
+
requestingParticipantId: string;
|
|
100
|
+
isPracticeSession: boolean;
|
|
101
|
+
};
|
|
97
102
|
export type SynchronizeVideoLayout = SetStageVideoLayout | UnsetStageVideoLayout;
|
|
@@ -2,6 +2,34 @@ import { LocalCameraStream, LocalMicrophoneStream } from '@webex/media-helpers';
|
|
|
2
2
|
import { SELF_POLICY, IP_VERSION } from '../constants';
|
|
3
3
|
declare const MeetingUtil: {
|
|
4
4
|
parseLocusJoin: (response: any) => any;
|
|
5
|
+
/**
|
|
6
|
+
* Sanitizes a WebSocket URL by extracting only protocol, host, and pathname
|
|
7
|
+
* Returns concatenated protocol + host + pathname for safe logging
|
|
8
|
+
* Note: This is used for logging only; URL matching uses partial matching via _urlsPartiallyMatch
|
|
9
|
+
* @param {string} urlString - The URL to sanitize
|
|
10
|
+
* @returns {string} Sanitized URL or empty string if parsing fails
|
|
11
|
+
*/
|
|
12
|
+
sanitizeWebSocketUrl: (urlString: string) => string;
|
|
13
|
+
/**
|
|
14
|
+
* Checks if two URLs partially match using an endsWith approach
|
|
15
|
+
* Combines host and pathname, then checks if one ends with the other
|
|
16
|
+
* This handles cases where one URL goes through a proxy (e.g., /webproxy/) while the other is direct
|
|
17
|
+
* @param {string} url1 - First URL to compare
|
|
18
|
+
* @param {string} url2 - Second URL to compare
|
|
19
|
+
* @returns {boolean} True if one URL path ends with the other (partial match), false otherwise
|
|
20
|
+
*/
|
|
21
|
+
_urlsPartiallyMatch: (url1: string, url2: string) => boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Gets socket URL information for metrics, including whether the socket URLs match
|
|
24
|
+
* Uses partial matching to handle proxy URLs (e.g., URLs with /webproxy/ prefix)
|
|
25
|
+
* @param {Object} webex - The webex instance
|
|
26
|
+
* @returns {Object} Object with hasMismatchedSocket, mercurySocketUrl, and deviceSocketUrl properties
|
|
27
|
+
*/
|
|
28
|
+
getSocketUrlInfo: (webex: any) => {
|
|
29
|
+
hasMismatchedSocket: boolean;
|
|
30
|
+
mercurySocketUrl: string;
|
|
31
|
+
deviceSocketUrl: string;
|
|
32
|
+
};
|
|
5
33
|
remoteUpdateAudioVideo: (meeting: any, audioMuted?: boolean, videoMuted?: boolean) => any;
|
|
6
34
|
hasOwner: (info: any) => any;
|
|
7
35
|
isOwnerSelf: (owner: any, selfId: any) => boolean;
|
|
@@ -95,6 +95,8 @@ export default class Meetings extends WebexPlugin {
|
|
|
95
95
|
preferredWebexSite: any;
|
|
96
96
|
reachability: Reachability;
|
|
97
97
|
registered: any;
|
|
98
|
+
registrationPromise: Promise<void>;
|
|
99
|
+
unregistrationPromise: Promise<void>;
|
|
98
100
|
request: any;
|
|
99
101
|
geoHintInfo: any;
|
|
100
102
|
meetingInfo: any;
|
|
@@ -287,7 +289,7 @@ export default class Meetings extends WebexPlugin {
|
|
|
287
289
|
* @public
|
|
288
290
|
* @memberof Meetings
|
|
289
291
|
*/
|
|
290
|
-
unregister():
|
|
292
|
+
unregister(): Promise<void>;
|
|
291
293
|
/**
|
|
292
294
|
* Creates a noise reduction effect
|
|
293
295
|
*
|
package/dist/webinar/index.js
CHANGED