@webex/plugin-meetings 3.12.0-next.3 → 3.12.0-next.31
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/AGENTS.md +9 -0
- package/dist/aiEnableRequest/index.js +1 -1
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/constants.js +3 -1
- package/dist/constants.js.map +1 -1
- package/dist/controls-options-manager/constants.js +11 -1
- package/dist/controls-options-manager/constants.js.map +1 -1
- package/dist/controls-options-manager/index.js +23 -21
- package/dist/controls-options-manager/index.js.map +1 -1
- package/dist/controls-options-manager/util.js +91 -0
- package/dist/controls-options-manager/util.js.map +1 -1
- package/dist/hashTree/constants.js +10 -1
- package/dist/hashTree/constants.js.map +1 -1
- package/dist/hashTree/hashTreeParser.js +550 -346
- package/dist/hashTree/hashTreeParser.js.map +1 -1
- package/dist/hashTree/utils.js +22 -0
- package/dist/hashTree/utils.js.map +1 -1
- package/dist/interceptors/locusRetry.js +23 -8
- package/dist/interceptors/locusRetry.js.map +1 -1
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/index.js +222 -61
- package/dist/locus-info/index.js.map +1 -1
- package/dist/meeting/index.js +372 -292
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/util.js +1 -0
- package/dist/meeting/util.js.map +1 -1
- package/dist/meetings/index.js +146 -62
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/util.js +39 -5
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +10 -0
- package/dist/member/index.js.map +1 -1
- package/dist/member/types.js.map +1 -1
- package/dist/member/util.js +3 -0
- package/dist/member/util.js.map +1 -1
- package/dist/metrics/constants.js +5 -1
- package/dist/metrics/constants.js.map +1 -1
- package/dist/multistream/sendSlotManager.js +116 -2
- package/dist/multistream/sendSlotManager.js.map +1 -1
- package/dist/types/constants.d.ts +1 -0
- package/dist/types/controls-options-manager/constants.d.ts +6 -1
- package/dist/types/hashTree/constants.d.ts +1 -0
- package/dist/types/hashTree/hashTreeParser.d.ts +53 -15
- package/dist/types/hashTree/utils.d.ts +11 -0
- package/dist/types/interceptors/locusRetry.d.ts +4 -4
- package/dist/types/locus-info/index.d.ts +38 -5
- package/dist/types/meeting/index.d.ts +11 -0
- package/dist/types/member/index.d.ts +1 -0
- package/dist/types/member/types.d.ts +1 -0
- package/dist/types/member/util.d.ts +1 -0
- package/dist/types/metrics/constants.d.ts +4 -0
- package/dist/types/multistream/sendSlotManager.d.ts +23 -1
- package/dist/webinar/index.js +301 -226
- package/dist/webinar/index.js.map +1 -1
- package/package.json +16 -16
- package/src/constants.ts +1 -0
- package/src/controls-options-manager/constants.ts +14 -1
- package/src/controls-options-manager/index.ts +26 -19
- package/src/controls-options-manager/util.ts +81 -1
- package/src/hashTree/constants.ts +9 -0
- package/src/hashTree/hashTreeParser.ts +273 -154
- package/src/hashTree/utils.ts +17 -0
- package/src/interceptors/locusRetry.ts +25 -4
- package/src/locus-info/index.ts +233 -79
- package/src/meeting/index.ts +98 -11
- package/src/meeting/util.ts +1 -0
- package/src/meetings/index.ts +58 -34
- package/src/meetings/util.ts +44 -1
- package/src/member/index.ts +10 -0
- package/src/member/types.ts +1 -0
- package/src/member/util.ts +3 -0
- package/src/metrics/constants.ts +5 -0
- package/src/multistream/sendSlotManager.ts +97 -3
- package/src/webinar/index.ts +75 -1
- package/test/unit/spec/controls-options-manager/index.js +114 -6
- package/test/unit/spec/controls-options-manager/util.js +165 -0
- package/test/unit/spec/hashTree/hashTreeParser.ts +839 -37
- package/test/unit/spec/hashTree/utils.ts +88 -1
- package/test/unit/spec/interceptors/locusRetry.ts +205 -4
- package/test/unit/spec/locus-info/index.js +262 -64
- package/test/unit/spec/meeting/index.js +54 -36
- package/test/unit/spec/meeting/utils.js +4 -0
- package/test/unit/spec/meetings/index.js +190 -8
- package/test/unit/spec/meetings/utils.js +124 -0
- package/test/unit/spec/member/index.js +7 -0
- package/test/unit/spec/member/util.js +24 -0
- package/test/unit/spec/multistream/sendSlotManager.ts +135 -36
- package/test/unit/spec/webinar/index.ts +60 -0
|
@@ -8,11 +8,14 @@ _Object$defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs2/regenerator"));
|
|
10
10
|
var _map = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/map"));
|
|
11
|
+
var _stringify = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/json/stringify"));
|
|
11
12
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/asyncToGenerator"));
|
|
12
13
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/classCallCheck"));
|
|
13
14
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/createClass"));
|
|
14
15
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
|
|
15
16
|
var _internalMediaCore = require("@webex/internal-media-core");
|
|
17
|
+
var _metrics = _interopRequireDefault(require("../metrics"));
|
|
18
|
+
var _constants = _interopRequireDefault(require("../metrics/constants"));
|
|
16
19
|
/**
|
|
17
20
|
* This class is used to manage the sendSlots for the given media types.
|
|
18
21
|
*/
|
|
@@ -223,6 +226,8 @@ var SendSlotManager = exports.default = /*#__PURE__*/function () {
|
|
|
223
226
|
}
|
|
224
227
|
|
|
225
228
|
/**
|
|
229
|
+
* @deprecated Use {@link setCustomCodecParameters} instead, which requires specifying the codec MIME type.
|
|
230
|
+
*
|
|
226
231
|
* This method is used to set the codec parameters for the sendSlot of the given mediaType
|
|
227
232
|
* @param {MediaType} mediaType MediaType of the sendSlot for which the codec parameters needs to be set (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)
|
|
228
233
|
* @param {Object} codecParameters
|
|
@@ -247,7 +252,11 @@ var SendSlotManager = exports.default = /*#__PURE__*/function () {
|
|
|
247
252
|
_context3.next = 2;
|
|
248
253
|
return slot.setCodecParameters(codecParameters);
|
|
249
254
|
case 2:
|
|
250
|
-
this.LoggerProxy.logger.
|
|
255
|
+
this.LoggerProxy.logger.warn('SendSlotsManager->setCodecParameters --> [DEPRECATION WARNING]: setCodecParameters has been deprecated, use setCustomCodecParameters instead');
|
|
256
|
+
_metrics.default.sendBehavioralMetric(_constants.default.DEPRECATED_SET_CODEC_PARAMETERS_USED, {
|
|
257
|
+
mediaType: mediaType,
|
|
258
|
+
codecParameters: codecParameters
|
|
259
|
+
});
|
|
251
260
|
case 3:
|
|
252
261
|
case "end":
|
|
253
262
|
return _context3.stop();
|
|
@@ -260,6 +269,8 @@ var SendSlotManager = exports.default = /*#__PURE__*/function () {
|
|
|
260
269
|
return setCodecParameters;
|
|
261
270
|
}()
|
|
262
271
|
/**
|
|
272
|
+
* @deprecated Use {@link markCustomCodecParametersForDeletion} instead, which requires specifying the codec MIME type.
|
|
273
|
+
*
|
|
263
274
|
* This method is used to delete the codec parameters for the sendSlot of the given mediaType
|
|
264
275
|
* @param {MediaType} mediaType MediaType of the sendSlot for which the codec parameters needs to be deleted (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)
|
|
265
276
|
* @param {Array<String>} parameters Array of keys of the codec parameters to be deleted
|
|
@@ -284,7 +295,11 @@ var SendSlotManager = exports.default = /*#__PURE__*/function () {
|
|
|
284
295
|
_context4.next = 2;
|
|
285
296
|
return slot.deleteCodecParameters(parameters);
|
|
286
297
|
case 2:
|
|
287
|
-
this.LoggerProxy.logger.
|
|
298
|
+
this.LoggerProxy.logger.warn('SendSlotsManager->deleteCodecParameters --> [DEPRECATION WARNING]: deleteCodecParameters has been deprecated, use markCustomCodecParametersForDeletion instead');
|
|
299
|
+
_metrics.default.sendBehavioralMetric(_constants.default.DEPRECATED_DELETE_CODEC_PARAMETERS_USED, {
|
|
300
|
+
mediaType: mediaType,
|
|
301
|
+
parameters: parameters
|
|
302
|
+
});
|
|
288
303
|
case 3:
|
|
289
304
|
case "end":
|
|
290
305
|
return _context4.stop();
|
|
@@ -296,6 +311,105 @@ var SendSlotManager = exports.default = /*#__PURE__*/function () {
|
|
|
296
311
|
}
|
|
297
312
|
return deleteCodecParameters;
|
|
298
313
|
}()
|
|
314
|
+
/**
|
|
315
|
+
* Sets custom codec parameters for the sendSlot of the given mediaType, scoped to a specific codec MIME type.
|
|
316
|
+
* Delegates to WCME's setCustomCodecParameters API.
|
|
317
|
+
* @param {MediaType} mediaType MediaType of the sendSlot
|
|
318
|
+
* @param {MediaCodecMimeType} codecMimeType The codec MIME type to apply parameters to (e.g. OPUS, H264, AV1)
|
|
319
|
+
* @param {CodecParameters} parameters Key-value pairs of codec parameters to set
|
|
320
|
+
* @returns {Promise<void>}
|
|
321
|
+
*/
|
|
322
|
+
)
|
|
323
|
+
}, {
|
|
324
|
+
key: "setCustomCodecParameters",
|
|
325
|
+
value: (function () {
|
|
326
|
+
var _setCustomCodecParameters = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee5(mediaType, codecMimeType, parameters) {
|
|
327
|
+
var slot, _t;
|
|
328
|
+
return _regenerator.default.wrap(function (_context5) {
|
|
329
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
330
|
+
case 0:
|
|
331
|
+
slot = this.slots.get(mediaType);
|
|
332
|
+
if (slot) {
|
|
333
|
+
_context5.next = 1;
|
|
334
|
+
break;
|
|
335
|
+
}
|
|
336
|
+
throw new Error("Slot for ".concat(mediaType, " does not exist"));
|
|
337
|
+
case 1:
|
|
338
|
+
_context5.prev = 1;
|
|
339
|
+
_context5.next = 2;
|
|
340
|
+
return slot.setCustomCodecParameters(codecMimeType, parameters);
|
|
341
|
+
case 2:
|
|
342
|
+
this.LoggerProxy.logger.info("SendSlotsManager->setCustomCodecParameters#Set custom codec parameters for ".concat(mediaType, " (codec: ").concat(codecMimeType, ") to ").concat((0, _stringify.default)(parameters)));
|
|
343
|
+
_context5.next = 4;
|
|
344
|
+
break;
|
|
345
|
+
case 3:
|
|
346
|
+
_context5.prev = 3;
|
|
347
|
+
_t = _context5["catch"](1);
|
|
348
|
+
this.LoggerProxy.logger.error("SendSlotsManager->setCustomCodecParameters#Failed to set custom codec parameters for ".concat(mediaType, " (codec: ").concat(codecMimeType, "): ").concat(_t));
|
|
349
|
+
throw _t;
|
|
350
|
+
case 4:
|
|
351
|
+
_context5.prev = 4;
|
|
352
|
+
_metrics.default.sendBehavioralMetric(_constants.default.SET_CUSTOM_CODEC_PARAMETERS_USED, {
|
|
353
|
+
mediaType: mediaType,
|
|
354
|
+
codecMimeType: codecMimeType,
|
|
355
|
+
parameters: parameters
|
|
356
|
+
});
|
|
357
|
+
return _context5.finish(4);
|
|
358
|
+
case 5:
|
|
359
|
+
case "end":
|
|
360
|
+
return _context5.stop();
|
|
361
|
+
}
|
|
362
|
+
}, _callee5, this, [[1, 3, 4, 5]]);
|
|
363
|
+
}));
|
|
364
|
+
function setCustomCodecParameters(_x8, _x9, _x0) {
|
|
365
|
+
return _setCustomCodecParameters.apply(this, arguments);
|
|
366
|
+
}
|
|
367
|
+
return setCustomCodecParameters;
|
|
368
|
+
}()
|
|
369
|
+
/**
|
|
370
|
+
* Marks custom codec parameters for deletion on the sendSlot of the given mediaType, scoped to a specific codec MIME type.
|
|
371
|
+
* Delegates to WCME's markCustomCodecParametersForDeletion API.
|
|
372
|
+
* @param {MediaType} mediaType MediaType of the sendSlot
|
|
373
|
+
* @param {MediaCodecMimeType} codecMimeType The codec MIME type whose parameters should be deleted (e.g. OPUS, H264, AV1)
|
|
374
|
+
* @param {string[]} parameters Array of parameter keys to delete
|
|
375
|
+
* @returns {Promise<void>}
|
|
376
|
+
*/
|
|
377
|
+
)
|
|
378
|
+
}, {
|
|
379
|
+
key: "markCustomCodecParametersForDeletion",
|
|
380
|
+
value: (function () {
|
|
381
|
+
var _markCustomCodecParametersForDeletion = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee6(mediaType, codecMimeType, parameters) {
|
|
382
|
+
var slot;
|
|
383
|
+
return _regenerator.default.wrap(function (_context6) {
|
|
384
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
385
|
+
case 0:
|
|
386
|
+
slot = this.slots.get(mediaType);
|
|
387
|
+
if (slot) {
|
|
388
|
+
_context6.next = 1;
|
|
389
|
+
break;
|
|
390
|
+
}
|
|
391
|
+
throw new Error("Slot for ".concat(mediaType, " does not exist"));
|
|
392
|
+
case 1:
|
|
393
|
+
_context6.next = 2;
|
|
394
|
+
return slot.markCustomCodecParametersForDeletion(codecMimeType, parameters);
|
|
395
|
+
case 2:
|
|
396
|
+
this.LoggerProxy.logger.info("SendSlotsManager->markCustomCodecParametersForDeletion#Marked codec parameters for deletion -> ".concat(parameters, " for ").concat(mediaType, " (codec: ").concat(codecMimeType, ")"));
|
|
397
|
+
_metrics.default.sendBehavioralMetric(_constants.default.MARK_CUSTOM_CODEC_PARAMETERS_FOR_DELETION_USED, {
|
|
398
|
+
mediaType: mediaType,
|
|
399
|
+
codecMimeType: codecMimeType,
|
|
400
|
+
parameters: parameters
|
|
401
|
+
});
|
|
402
|
+
case 3:
|
|
403
|
+
case "end":
|
|
404
|
+
return _context6.stop();
|
|
405
|
+
}
|
|
406
|
+
}, _callee6, this);
|
|
407
|
+
}));
|
|
408
|
+
function markCustomCodecParametersForDeletion(_x1, _x10, _x11) {
|
|
409
|
+
return _markCustomCodecParametersForDeletion.apply(this, arguments);
|
|
410
|
+
}
|
|
411
|
+
return markCustomCodecParametersForDeletion;
|
|
412
|
+
}()
|
|
299
413
|
/**
|
|
300
414
|
* This method is used to reset the SendSlotsManager by deleting all the sendSlots
|
|
301
415
|
* @returns {undefined}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_internalMediaCore","require","SendSlotManager","exports","default","LoggerProxy","_classCallCheck2","_defineProperty2","_map","_createClass2","key","value","createSlot","mediaConnection","mediaType","active","arguments","length","undefined","slots","has","Error","concat","slot","createSendSlot","set","logger","info","getSlot","get","setNamedMediaGroups","namedMediaGroups","MediaType","AudioMain","setSourceStateOverride","state","VideoMain","currentStateOverride","getSourceStateOverride","sourceStateOverrides","clearSourceStateOverride","delete","_publishStream","_asyncToGenerator2","_regenerator","mark","_callee","stream","wrap","_context","prev","next","publishStream","label","muted","stop","_x","_x2","apply","_unpublishStream","_callee2","_context2","unpublishStream","_x3","setActive","_setCodecParameters","_callee3","codecParameters","_context3","setCodecParameters","_x4","_x5","_deleteCodecParameters","_callee4","parameters","_context4","deleteCodecParameters","_x6","_x7","reset","clear"],"sources":["sendSlotManager.ts"],"sourcesContent":["import {\n SendSlot,\n MediaType,\n LocalStream,\n MultistreamRoapMediaConnection,\n NamedMediaGroup,\n StreamState,\n} from '@webex/internal-media-core';\n\n/**\n * This class is used to manage the sendSlots for the given media types.\n */\nexport default class SendSlotManager {\n private readonly slots: Map<MediaType, SendSlot> = new Map();\n private readonly LoggerProxy: any;\n private readonly sourceStateOverrides: Map<MediaType, StreamState> = new Map();\n\n /**\n * Constructor for SendSlotManager\n *\n * @param {any} LoggerProxy is used to log the messages\n * @constructor\n */\n constructor(LoggerProxy: any) {\n this.LoggerProxy = LoggerProxy;\n }\n\n /**\n * This method is used to create a sendSlot for the given mediaType and returns the created sendSlot\n * @param {MultistreamRoapMediaConnection} mediaConnection MultistreamRoapMediaConnection for which a sendSlot needs to be created\n * @param {MediaType} mediaType MediaType for which a sendSlot needs to be created (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)\n * @param {boolean} active This is optional boolean to set the active state of the sendSlot. Default is true\n * @returns {SendSlot} slot The created sendSlot\n */\n public createSlot(\n mediaConnection: MultistreamRoapMediaConnection,\n mediaType: MediaType,\n active = true\n ): SendSlot {\n if (this.slots.has(mediaType)) {\n throw new Error(`Slot for ${mediaType} already exists`);\n }\n\n const slot: SendSlot = mediaConnection.createSendSlot(mediaType, active);\n\n this.slots.set(mediaType, slot);\n\n this.LoggerProxy.logger.info(\n `SendSlotsManager->createSlot#Created slot for ${mediaType} with active ${active}`\n );\n\n return slot;\n }\n\n /**\n * This method is used to retrieve the sendSlot for the given mediaType\n * @param {MediaType} mediaType of which the slot needs to be retrieved\n * @returns {SendSlot}\n */\n public getSlot(mediaType: MediaType): SendSlot {\n const slot = this.slots.get(mediaType);\n\n if (!slot) {\n throw new Error(`Slot for ${mediaType} does not exist`);\n }\n\n return slot;\n }\n\n /**\n * Allow users to specify 'namedMediaGroups' to indicate which named media group its audio should be sent to.\n * @param {MediaType} mediaType MediaType of the sendSlot to which the audio stream needs to be send to the media group\n * @param {[]}namedMediaGroups - Allow users to specify 'namedMediaGroups'.If the value of 'namedMediaGroups' is zero,\n * named media group will be canceled and the audio stream will be sent to the floor.\n * @returns {void}\n */\n public setNamedMediaGroups(mediaType: MediaType, namedMediaGroups: NamedMediaGroup[]) {\n if (mediaType !== MediaType.AudioMain) {\n throw new Error(\n `sendSlotManager cannot set named media group which media type is ${mediaType}`\n );\n }\n\n const slot = this.slots.get(mediaType);\n\n if (!slot) {\n throw new Error(`Slot for ${mediaType} does not exist`);\n }\n\n slot.setNamedMediaGroups(namedMediaGroups);\n\n this.LoggerProxy.logger.info(\n `SendSlotsManager->setNamedMediaGroups#set named media group ${namedMediaGroups}`\n );\n }\n\n /**\n * Sets the source state override for the given media type.\n * @param {MediaType} mediaType - The type of media (must be MediaType.VideoMain to apply source state changes).\n * @param {StreamState | null} state - The state to set or null to clear the override value.\n * @returns {void}\n */\n public setSourceStateOverride(mediaType: MediaType, state: StreamState | null) {\n if (mediaType !== MediaType.VideoMain) {\n throw new Error(\n `Invalid media type '${mediaType}'. Source state overrides are only applicable to ${MediaType.VideoMain}.`\n );\n }\n\n const slot = this.slots.get(mediaType);\n\n if (!slot) {\n throw new Error(`Slot for ${mediaType} does not exist`);\n }\n\n const currentStateOverride = this.getSourceStateOverride(mediaType);\n if (currentStateOverride === state) {\n return;\n }\n\n if (state) {\n slot.setSourceStateOverride(state);\n this.sourceStateOverrides.set(mediaType, state);\n } else {\n slot.clearSourceStateOverride();\n this.sourceStateOverrides.delete(mediaType);\n }\n\n this.LoggerProxy.logger.info(\n `SendSlotManager->setSourceStateOverride#set source state override for ${mediaType} to ${state}`\n );\n }\n\n /**\n * Gets the source state override for the given media type.\n * @param {MediaType} mediaType - The type of media to get the source state override for.\n * @returns {StreamState | null} - The current source state override or null if not set.\n */\n private getSourceStateOverride(mediaType: MediaType): StreamState | null {\n if (mediaType !== MediaType.VideoMain) {\n throw new Error(\n `Invalid media type '${mediaType}'. Source state overrides are only applicable to ${MediaType.VideoMain}.`\n );\n }\n\n return this.sourceStateOverrides.get(mediaType) || null;\n }\n\n /**\n * This method publishes the given stream to the sendSlot for the given mediaType\n * @param {MediaType} mediaType MediaType of the sendSlot to which a stream needs to be published (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)\n * @param {LocalStream} stream LocalStream to be published\n * @returns {Promise<void>}\n */\n public async publishStream(mediaType: MediaType, stream: LocalStream): Promise<void> {\n const slot = this.slots.get(mediaType);\n\n if (!slot) {\n throw new Error(`Slot for ${mediaType} does not exist`);\n }\n\n await slot.publishStream(stream);\n\n this.LoggerProxy.logger.info(\n `SendSlotsManager->publishStream#Published stream for ${mediaType} and stream with label ${stream.label} and muted ${stream.muted}`\n );\n }\n\n /**\n * This method unpublishes the stream from the sendSlot of the given mediaType\n * @param {MediaType} mediaType MediaType of the sendSlot from which a stream needs to be unpublished (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)\n * @returns {Promise<void>}\n */\n public async unpublishStream(mediaType: MediaType): Promise<void> {\n const slot = this.slots.get(mediaType);\n\n if (!slot) {\n throw new Error(`Slot for ${mediaType} does not exist`);\n }\n\n await slot.unpublishStream();\n\n this.LoggerProxy.logger.info(\n `SendSlotsManager->unpublishStream#Unpublished stream for ${mediaType}`\n );\n }\n\n /**\n * This method is used to set the active state of the sendSlot for the given mediaType\n * @param {MediaType} mediaType The MediaType of the sendSlot for which the active state needs to be set (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)\n * @param {boolean} active The boolean to set the active state of the sendSlot. Default is true\n * @returns {void}\n */\n public setActive(mediaType: MediaType, active = true): void {\n const slot = this.slots.get(mediaType);\n\n if (!slot) {\n throw new Error(`Slot for ${mediaType} does not exist`);\n }\n\n slot.active = active;\n\n this.LoggerProxy.logger.info(\n `SendSlotsManager->setActive#Set active for ${mediaType} to ${active}`\n );\n }\n\n /**\n * This method is used to set the codec parameters for the sendSlot of the given mediaType\n * @param {MediaType} mediaType MediaType of the sendSlot for which the codec parameters needs to be set (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)\n * @param {Object} codecParameters\n * @returns {Promise<void>}\n */\n public async setCodecParameters(\n mediaType: MediaType,\n codecParameters: {\n [key: string]: string | undefined; // As per ts-sdp undefined is considered as a valid value to be used for codec parameters\n }\n ): Promise<void> {\n // These codec parameter changes underneath are SDP value changes that are taken care by WCME automatically. So no need for any change in streams from the web sdk side\n const slot = this.slots.get(mediaType);\n\n if (!slot) {\n throw new Error(`Slot for ${mediaType} does not exist`);\n }\n\n await slot.setCodecParameters(codecParameters);\n\n this.LoggerProxy.logger.info(\n `SendSlotsManager->setCodecParameters#Set codec parameters for ${mediaType} to ${codecParameters}`\n );\n }\n\n /**\n * This method is used to delete the codec parameters for the sendSlot of the given mediaType\n * @param {MediaType} mediaType MediaType of the sendSlot for which the codec parameters needs to be deleted (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)\n * @param {Array<String>} parameters Array of keys of the codec parameters to be deleted\n * @returns {Promise<void>}\n */\n public async deleteCodecParameters(mediaType: MediaType, parameters: string[]): Promise<void> {\n const slot = this.slots.get(mediaType);\n\n if (!slot) {\n throw new Error(`Slot for ${mediaType} does not exist`);\n }\n\n await slot.deleteCodecParameters(parameters);\n\n this.LoggerProxy.logger.info(\n `SendSlotsManager->deleteCodecParameters#Deleted the following codec parameters -> ${parameters} for ${mediaType}`\n );\n }\n\n /**\n * This method is used to reset the SendSlotsManager by deleting all the sendSlots\n * @returns {undefined}\n */\n public reset(): void {\n this.slots.clear();\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA,IAAAA,kBAAA,GAAAC,OAAA;AASA;AACA;AACA;AAFA,IAGqBC,eAAe,GAAAC,OAAA,CAAAC,OAAA;EAKlC;AACF;AACA;AACA;AACA;AACA;EACE,SAAAF,gBAAYG,WAAgB,EAAE;IAAA,IAAAC,gBAAA,CAAAF,OAAA,QAAAF,eAAA;IAAA,IAAAK,gBAAA,CAAAH,OAAA,iBAVqB,IAAAI,IAAA,CAAAJ,OAAA,CAAQ,CAAC;IAAA,IAAAG,gBAAA,CAAAH,OAAA;IAAA,IAAAG,gBAAA,CAAAH,OAAA,gCAES,IAAAI,IAAA,CAAAJ,OAAA,CAAQ,CAAC;IAS5E,IAAI,CAACC,WAAW,GAAGA,WAAW;EAChC;;EAEA;AACF;AACA;AACA;AACA;AACA;AACA;EANE,WAAAI,aAAA,CAAAL,OAAA,EAAAF,eAAA;IAAAQ,GAAA;IAAAC,KAAA,EAOA,SAAOC,UAAUA,CACfC,eAA+C,EAC/CC,SAAoB,EAEV;MAAA,IADVC,MAAM,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,IAAI;MAEb,IAAI,IAAI,CAACG,KAAK,CAACC,GAAG,CAACN,SAAS,CAAC,EAAE;QAC7B,MAAM,IAAIO,KAAK,aAAAC,MAAA,CAAaR,SAAS,oBAAiB,CAAC;MACzD;MAEA,IAAMS,IAAc,GAAGV,eAAe,CAACW,cAAc,CAACV,SAAS,EAAEC,MAAM,CAAC;MAExE,IAAI,CAACI,KAAK,CAACM,GAAG,CAACX,SAAS,EAAES,IAAI,CAAC;MAE/B,IAAI,CA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AAAyB,SAAA,CAAAxB,IAAA;YAAA;cACrE5B,IAAI,GAAG,IAAI,CAACJ,KAAK,CAACU,GAAG,CAACf,SAAS,CAAC;cAAA,IAEjCS,IAAI;gBAAAoD,SAAA,CAAAxB,IAAA;gBAAA;cAAA;cAAA,MACD,IAAI9B,KAAK,aAAAC,MAAA,CAAaR,SAAS,oBAAiB,CAAC;YAAA;cAAA6D,SAAA,CAAAxB,IAAA;cAAA,OAGnD5B,IAAI,CAACqD,qBAAqB,CAACF,UAAU,CAAC;YAAA;cAE5C,IAAI,CAACrE,WAAW,CAACqB,MAAM,CAACC,IAAI,sFAAAL,MAAA,CAC2DoD,UAAU,WAAApD,MAAA,CAAQR,SAAS,CAClH,CAAC;YAAC;YAAA;cAAA,OAAA6D,SAAA,CAAApB,IAAA;UAAA;QAAA,GAAAkB,QAAA;MAAA,CACH;MAAA,SAZYG,qBAAqBA,CAAAC,GAAA,EAAAC,GAAA;QAAA,OAAAN,sBAAA,CAAAd,KAAA,OAAA1C,SAAA;MAAA;MAAA,OAArB4D,qBAAqB;IAAA;IAclC;AACF;AACA;AACA;IAHE;EAAA;IAAAlE,GAAA;IAAAC,KAAA,EAIA,SAAOoE,KAAKA,CAAA,EAAS;MACnB,IAAI,CAAC5D,KAAK,CAAC6D,KAAK,CAAC,CAAC;IACpB;EAAC;AAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_internalMediaCore","require","_metrics","_interopRequireDefault","_constants","SendSlotManager","exports","default","LoggerProxy","_classCallCheck2","_defineProperty2","_map","_createClass2","key","value","createSlot","mediaConnection","mediaType","active","arguments","length","undefined","slots","has","Error","concat","slot","createSendSlot","set","logger","info","getSlot","get","setNamedMediaGroups","namedMediaGroups","MediaType","AudioMain","setSourceStateOverride","state","VideoMain","currentStateOverride","getSourceStateOverride","sourceStateOverrides","clearSourceStateOverride","delete","_publishStream","_asyncToGenerator2","_regenerator","mark","_callee","stream","wrap","_context","prev","next","publishStream","label","muted","stop","_x","_x2","apply","_unpublishStream","_callee2","_context2","unpublishStream","_x3","setActive","_setCodecParameters","_callee3","codecParameters","_context3","setCodecParameters","warn","Metrics","sendBehavioralMetric","BEHAVIORAL_METRICS","DEPRECATED_SET_CODEC_PARAMETERS_USED","_x4","_x5","_deleteCodecParameters","_callee4","parameters","_context4","deleteCodecParameters","DEPRECATED_DELETE_CODEC_PARAMETERS_USED","_x6","_x7","_setCustomCodecParameters","_callee5","codecMimeType","_t","_context5","setCustomCodecParameters","_stringify","error","SET_CUSTOM_CODEC_PARAMETERS_USED","finish","_x8","_x9","_x0","_markCustomCodecParametersForDeletion","_callee6","_context6","markCustomCodecParametersForDeletion","MARK_CUSTOM_CODEC_PARAMETERS_FOR_DELETION_USED","_x1","_x10","_x11","reset","clear"],"sources":["sendSlotManager.ts"],"sourcesContent":["import {\n SendSlot,\n MediaType,\n LocalStream,\n MultistreamRoapMediaConnection,\n NamedMediaGroup,\n StreamState,\n MediaCodecMimeType,\n CodecParameters,\n} from '@webex/internal-media-core';\nimport Metrics from '../metrics';\nimport BEHAVIORAL_METRICS from '../metrics/constants';\n\n/**\n * This class is used to manage the sendSlots for the given media types.\n */\nexport default class SendSlotManager {\n private readonly slots: Map<MediaType, SendSlot> = new Map();\n private readonly LoggerProxy: any;\n private readonly sourceStateOverrides: Map<MediaType, StreamState> = new Map();\n\n /**\n * Constructor for SendSlotManager\n *\n * @param {any} LoggerProxy is used to log the messages\n * @constructor\n */\n constructor(LoggerProxy: any) {\n this.LoggerProxy = LoggerProxy;\n }\n\n /**\n * This method is used to create a sendSlot for the given mediaType and returns the created sendSlot\n * @param {MultistreamRoapMediaConnection} mediaConnection MultistreamRoapMediaConnection for which a sendSlot needs to be created\n * @param {MediaType} mediaType MediaType for which a sendSlot needs to be created (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)\n * @param {boolean} active This is optional boolean to set the active state of the sendSlot. Default is true\n * @returns {SendSlot} slot The created sendSlot\n */\n public createSlot(\n mediaConnection: MultistreamRoapMediaConnection,\n mediaType: MediaType,\n active = true\n ): SendSlot {\n if (this.slots.has(mediaType)) {\n throw new Error(`Slot for ${mediaType} already exists`);\n }\n\n const slot: SendSlot = mediaConnection.createSendSlot(mediaType, active);\n\n this.slots.set(mediaType, slot);\n\n this.LoggerProxy.logger.info(\n `SendSlotsManager->createSlot#Created slot for ${mediaType} with active ${active}`\n );\n\n return slot;\n }\n\n /**\n * This method is used to retrieve the sendSlot for the given mediaType\n * @param {MediaType} mediaType of which the slot needs to be retrieved\n * @returns {SendSlot}\n */\n public getSlot(mediaType: MediaType): SendSlot {\n const slot = this.slots.get(mediaType);\n\n if (!slot) {\n throw new Error(`Slot for ${mediaType} does not exist`);\n }\n\n return slot;\n }\n\n /**\n * Allow users to specify 'namedMediaGroups' to indicate which named media group its audio should be sent to.\n * @param {MediaType} mediaType MediaType of the sendSlot to which the audio stream needs to be send to the media group\n * @param {[]}namedMediaGroups - Allow users to specify 'namedMediaGroups'.If the value of 'namedMediaGroups' is zero,\n * named media group will be canceled and the audio stream will be sent to the floor.\n * @returns {void}\n */\n public setNamedMediaGroups(mediaType: MediaType, namedMediaGroups: NamedMediaGroup[]) {\n if (mediaType !== MediaType.AudioMain) {\n throw new Error(\n `sendSlotManager cannot set named media group which media type is ${mediaType}`\n );\n }\n\n const slot = this.slots.get(mediaType);\n\n if (!slot) {\n throw new Error(`Slot for ${mediaType} does not exist`);\n }\n\n slot.setNamedMediaGroups(namedMediaGroups);\n\n this.LoggerProxy.logger.info(\n `SendSlotsManager->setNamedMediaGroups#set named media group ${namedMediaGroups}`\n );\n }\n\n /**\n * Sets the source state override for the given media type.\n * @param {MediaType} mediaType - The type of media (must be MediaType.VideoMain to apply source state changes).\n * @param {StreamState | null} state - The state to set or null to clear the override value.\n * @returns {void}\n */\n public setSourceStateOverride(mediaType: MediaType, state: StreamState | null) {\n if (mediaType !== MediaType.VideoMain) {\n throw new Error(\n `Invalid media type '${mediaType}'. Source state overrides are only applicable to ${MediaType.VideoMain}.`\n );\n }\n\n const slot = this.slots.get(mediaType);\n\n if (!slot) {\n throw new Error(`Slot for ${mediaType} does not exist`);\n }\n\n const currentStateOverride = this.getSourceStateOverride(mediaType);\n if (currentStateOverride === state) {\n return;\n }\n\n if (state) {\n slot.setSourceStateOverride(state);\n this.sourceStateOverrides.set(mediaType, state);\n } else {\n slot.clearSourceStateOverride();\n this.sourceStateOverrides.delete(mediaType);\n }\n\n this.LoggerProxy.logger.info(\n `SendSlotManager->setSourceStateOverride#set source state override for ${mediaType} to ${state}`\n );\n }\n\n /**\n * Gets the source state override for the given media type.\n * @param {MediaType} mediaType - The type of media to get the source state override for.\n * @returns {StreamState | null} - The current source state override or null if not set.\n */\n private getSourceStateOverride(mediaType: MediaType): StreamState | null {\n if (mediaType !== MediaType.VideoMain) {\n throw new Error(\n `Invalid media type '${mediaType}'. Source state overrides are only applicable to ${MediaType.VideoMain}.`\n );\n }\n\n return this.sourceStateOverrides.get(mediaType) || null;\n }\n\n /**\n * This method publishes the given stream to the sendSlot for the given mediaType\n * @param {MediaType} mediaType MediaType of the sendSlot to which a stream needs to be published (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)\n * @param {LocalStream} stream LocalStream to be published\n * @returns {Promise<void>}\n */\n public async publishStream(mediaType: MediaType, stream: LocalStream): Promise<void> {\n const slot = this.slots.get(mediaType);\n\n if (!slot) {\n throw new Error(`Slot for ${mediaType} does not exist`);\n }\n\n await slot.publishStream(stream);\n\n this.LoggerProxy.logger.info(\n `SendSlotsManager->publishStream#Published stream for ${mediaType} and stream with label ${stream.label} and muted ${stream.muted}`\n );\n }\n\n /**\n * This method unpublishes the stream from the sendSlot of the given mediaType\n * @param {MediaType} mediaType MediaType of the sendSlot from which a stream needs to be unpublished (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)\n * @returns {Promise<void>}\n */\n public async unpublishStream(mediaType: MediaType): Promise<void> {\n const slot = this.slots.get(mediaType);\n\n if (!slot) {\n throw new Error(`Slot for ${mediaType} does not exist`);\n }\n\n await slot.unpublishStream();\n\n this.LoggerProxy.logger.info(\n `SendSlotsManager->unpublishStream#Unpublished stream for ${mediaType}`\n );\n }\n\n /**\n * This method is used to set the active state of the sendSlot for the given mediaType\n * @param {MediaType} mediaType The MediaType of the sendSlot for which the active state needs to be set (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)\n * @param {boolean} active The boolean to set the active state of the sendSlot. Default is true\n * @returns {void}\n */\n public setActive(mediaType: MediaType, active = true): void {\n const slot = this.slots.get(mediaType);\n\n if (!slot) {\n throw new Error(`Slot for ${mediaType} does not exist`);\n }\n\n slot.active = active;\n\n this.LoggerProxy.logger.info(\n `SendSlotsManager->setActive#Set active for ${mediaType} to ${active}`\n );\n }\n\n /**\n * @deprecated Use {@link setCustomCodecParameters} instead, which requires specifying the codec MIME type.\n *\n * This method is used to set the codec parameters for the sendSlot of the given mediaType\n * @param {MediaType} mediaType MediaType of the sendSlot for which the codec parameters needs to be set (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)\n * @param {Object} codecParameters\n * @returns {Promise<void>}\n */\n public async setCodecParameters(\n mediaType: MediaType,\n codecParameters: {\n [key: string]: string | undefined; // As per ts-sdp undefined is considered as a valid value to be used for codec parameters\n }\n ): Promise<void> {\n // These codec parameter changes underneath are SDP value changes that are taken care by WCME automatically. So no need for any change in streams from the web sdk side\n const slot = this.slots.get(mediaType);\n\n if (!slot) {\n throw new Error(`Slot for ${mediaType} does not exist`);\n }\n\n await slot.setCodecParameters(codecParameters);\n\n this.LoggerProxy.logger.warn(\n 'SendSlotsManager->setCodecParameters --> [DEPRECATION WARNING]: setCodecParameters has been deprecated, use setCustomCodecParameters instead'\n );\n\n Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.DEPRECATED_SET_CODEC_PARAMETERS_USED, {\n mediaType,\n codecParameters,\n });\n }\n\n /**\n * @deprecated Use {@link markCustomCodecParametersForDeletion} instead, which requires specifying the codec MIME type.\n *\n * This method is used to delete the codec parameters for the sendSlot of the given mediaType\n * @param {MediaType} mediaType MediaType of the sendSlot for which the codec parameters needs to be deleted (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)\n * @param {Array<String>} parameters Array of keys of the codec parameters to be deleted\n * @returns {Promise<void>}\n */\n public async deleteCodecParameters(mediaType: MediaType, parameters: string[]): Promise<void> {\n const slot = this.slots.get(mediaType);\n\n if (!slot) {\n throw new Error(`Slot for ${mediaType} does not exist`);\n }\n\n await slot.deleteCodecParameters(parameters);\n\n this.LoggerProxy.logger.warn(\n 'SendSlotsManager->deleteCodecParameters --> [DEPRECATION WARNING]: deleteCodecParameters has been deprecated, use markCustomCodecParametersForDeletion instead'\n );\n\n Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.DEPRECATED_DELETE_CODEC_PARAMETERS_USED, {\n mediaType,\n parameters,\n });\n }\n\n /**\n * Sets custom codec parameters for the sendSlot of the given mediaType, scoped to a specific codec MIME type.\n * Delegates to WCME's setCustomCodecParameters API.\n * @param {MediaType} mediaType MediaType of the sendSlot\n * @param {MediaCodecMimeType} codecMimeType The codec MIME type to apply parameters to (e.g. OPUS, H264, AV1)\n * @param {CodecParameters} parameters Key-value pairs of codec parameters to set\n * @returns {Promise<void>}\n */\n public async setCustomCodecParameters(\n mediaType: MediaType,\n codecMimeType: MediaCodecMimeType,\n parameters: CodecParameters\n ): Promise<void> {\n const slot = this.slots.get(mediaType);\n\n if (!slot) {\n throw new Error(`Slot for ${mediaType} does not exist`);\n }\n\n try {\n await slot.setCustomCodecParameters(codecMimeType, parameters);\n\n this.LoggerProxy.logger.info(\n `SendSlotsManager->setCustomCodecParameters#Set custom codec parameters for ${mediaType} (codec: ${codecMimeType}) to ${JSON.stringify(\n parameters\n )}`\n );\n } catch (error) {\n this.LoggerProxy.logger.error(\n `SendSlotsManager->setCustomCodecParameters#Failed to set custom codec parameters for ${mediaType} (codec: ${codecMimeType}): ${error}`\n );\n throw error;\n } finally {\n Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.SET_CUSTOM_CODEC_PARAMETERS_USED, {\n mediaType,\n codecMimeType,\n parameters,\n });\n }\n }\n\n /**\n * Marks custom codec parameters for deletion on the sendSlot of the given mediaType, scoped to a specific codec MIME type.\n * Delegates to WCME's markCustomCodecParametersForDeletion API.\n * @param {MediaType} mediaType MediaType of the sendSlot\n * @param {MediaCodecMimeType} codecMimeType The codec MIME type whose parameters should be deleted (e.g. OPUS, H264, AV1)\n * @param {string[]} parameters Array of parameter keys to delete\n * @returns {Promise<void>}\n */\n public async markCustomCodecParametersForDeletion(\n mediaType: MediaType,\n codecMimeType: MediaCodecMimeType,\n parameters: string[]\n ): Promise<void> {\n const slot = this.slots.get(mediaType);\n\n if (!slot) {\n throw new Error(`Slot for ${mediaType} does not exist`);\n }\n\n await slot.markCustomCodecParametersForDeletion(codecMimeType, parameters);\n\n this.LoggerProxy.logger.info(\n `SendSlotsManager->markCustomCodecParametersForDeletion#Marked codec parameters for deletion -> ${parameters} for ${mediaType} (codec: ${codecMimeType})`\n );\n\n Metrics.sendBehavioralMetric(\n BEHAVIORAL_METRICS.MARK_CUSTOM_CODEC_PARAMETERS_FOR_DELETION_USED,\n {\n mediaType,\n codecMimeType,\n parameters,\n }\n );\n }\n\n /**\n * This method is used to reset the SendSlotsManager by deleting all the sendSlots\n * @returns {undefined}\n */\n public reset(): void {\n this.slots.clear();\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAAA,IAAAA,kBAAA,GAAAC,OAAA;AAUA,IAAAC,QAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,UAAA,GAAAD,sBAAA,CAAAF,OAAA;AAEA;AACA;AACA;AAFA,IAGqBI,eAAe,GAAAC,OAAA,CAAAC,OAAA;EAKlC;AACF;AACA;AACA;AACA;AACA;EACE,SAAAF,gBAAYG,WAAgB,EAAE;I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,CAAAlD,IAAA,GAAAkD,SAAA,CAAAjD,IAAA;YAAA;cAEd5B,IAAI,GAAG,IAAI,CAACJ,KAAK,CAACU,GAAG,CAACf,SAAS,CAAC;cAAA,IAEjCS,IAAI;gBAAA6E,SAAA,CAAAjD,IAAA;gBAAA;cAAA;cAAA,MACD,IAAI9B,KAAK,aAAAC,MAAA,CAAaR,SAAS,oBAAiB,CAAC;YAAA;cAAAsF,SAAA,CAAAjD,IAAA;cAAA,OAGnD5B,IAAI,CAAC8E,oCAAoC,CAACd,aAAa,EAAER,UAAU,CAAC;YAAA;cAE1E,IAAI,CAAC1E,WAAW,CAACqB,MAAM,CAACC,IAAI,mGAAAL,MAAA,CACwEyD,UAAU,WAAAzD,MAAA,CAAQR,SAAS,eAAAQ,MAAA,CAAYiE,aAAa,MACxJ,CAAC;cAEDhB,gBAAO,CAACC,oBAAoB,CAC1BC,kBAAkB,CAAC6B,8CAA8C,EACjE;gBACExF,SAAS,EAATA,SAAS;gBACTyE,aAAa,EAAbA,aAAa;gBACbR,UAAU,EAAVA;cACF,CACF,CAAC;YAAC;YAAA;cAAA,OAAAqB,SAAA,CAAA7C,IAAA;UAAA;QAAA,GAAA4C,QAAA;MAAA,CACH;MAAA,SAzBYE,oCAAoCA,CAAAE,GAAA,EAAAC,IAAA,EAAAC,IAAA;QAAA,OAAAP,qCAAA,CAAAxC,KAAA,OAAA1C,SAAA;MAAA;MAAA,OAApCqF,oCAAoC;IAAA;IA2BjD;AACF;AACA;AACA;IAHE;EAAA;IAAA3F,GAAA;IAAAC,KAAA,EAIA,SAAO+F,KAAKA,CAAA,EAAS;MACnB,IAAI,CAACvF,KAAK,CAACwF,KAAK,CAAC,CAAC;IACpB;EAAC;AAAA","ignoreList":[]}
|
|
@@ -73,6 +73,7 @@ export declare const _JOINED_ = "JOINED";
|
|
|
73
73
|
export declare const _LOCUS_ID_ = "LOCUS_ID";
|
|
74
74
|
export declare const _LEFT_ = "LEFT";
|
|
75
75
|
export declare const _MOVED_ = "MOVED";
|
|
76
|
+
export declare const _BREAKOUT_ENDED_ = "BREAKOUT_ENDED";
|
|
76
77
|
export declare const _ON_HOLD_LOBBY_ = "ON_HOLD_LOBBY";
|
|
77
78
|
export declare const _MEETING_LINK_ = "MEETING_LINK";
|
|
78
79
|
export declare const _MEETING_UUID_ = "MEETING_UUID";
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
declare const ENABLED = "enabled";
|
|
2
2
|
declare const CAN_SET = "canSet";
|
|
3
3
|
declare const CAN_UNSET = "canUnset";
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Body keys that represent audio controls. These do not support cross-locus
|
|
6
|
+
* authorization and must be sent directly to the current locus URL.
|
|
7
|
+
*/
|
|
8
|
+
declare const AUDIO_CONTROL_BODY_KEYS: ReadonlySet<string>;
|
|
9
|
+
export { ENABLED, CAN_SET, CAN_UNSET, AUDIO_CONTROL_BODY_KEYS };
|
|
@@ -45,9 +45,13 @@ export declare const LocusInfoUpdateType: {
|
|
|
45
45
|
readonly MEETING_ENDED: "MEETING_ENDED";
|
|
46
46
|
};
|
|
47
47
|
export type LocusInfoUpdateType = Enum<typeof LocusInfoUpdateType>;
|
|
48
|
-
export type
|
|
48
|
+
export type LocusInfoUpdate = {
|
|
49
|
+
updateType: typeof LocusInfoUpdateType.OBJECTS_UPDATED;
|
|
49
50
|
updatedObjects: HashTreeObject[];
|
|
50
|
-
}
|
|
51
|
+
} | {
|
|
52
|
+
updateType: typeof LocusInfoUpdateType.MEETING_ENDED;
|
|
53
|
+
};
|
|
54
|
+
export type LocusInfoUpdateCallback = (update: LocusInfoUpdate) => void;
|
|
51
55
|
/**
|
|
52
56
|
* This error is thrown if we receive information that the meeting has ended while we're processing some hash messages.
|
|
53
57
|
* It's handled internally by HashTreeParser and results in MEETING_ENDED being sent up.
|
|
@@ -67,6 +71,10 @@ declare class HashTreeParser {
|
|
|
67
71
|
heartbeatIntervalMs?: number;
|
|
68
72
|
private excludedDataSets;
|
|
69
73
|
state: 'active' | 'stopped';
|
|
74
|
+
private syncQueue;
|
|
75
|
+
private isSyncInProgress;
|
|
76
|
+
private isSyncAllInProgress;
|
|
77
|
+
private syncQueueProcessingPromise;
|
|
70
78
|
/**
|
|
71
79
|
* Constructor for HashTreeParser
|
|
72
80
|
* @param {Object} options
|
|
@@ -120,14 +128,6 @@ declare class HashTreeParser {
|
|
|
120
128
|
* @returns {Promise}
|
|
121
129
|
*/
|
|
122
130
|
private initializeNewVisibleDataSet;
|
|
123
|
-
/**
|
|
124
|
-
* Sends a special sync request to Locus with all leaves empty - this is a way to get all the data for a given dataset.
|
|
125
|
-
*
|
|
126
|
-
* @param {string} datasetName - name of the dataset for which to send the request
|
|
127
|
-
* @param {string} debugText - text to include in logs
|
|
128
|
-
* @returns {Promise}
|
|
129
|
-
*/
|
|
130
|
-
private sendInitializationSyncRequestToLocus;
|
|
131
131
|
/**
|
|
132
132
|
* Queries Locus for all up-to-date information about all visible data sets
|
|
133
133
|
*
|
|
@@ -298,11 +298,35 @@ declare class HashTreeParser {
|
|
|
298
298
|
* Performs a sync for the given data set.
|
|
299
299
|
*
|
|
300
300
|
* @param {InternalDataSet} dataSet - The data set to sync
|
|
301
|
-
* @param {string} rootHash - Our current root hash for this data set
|
|
302
301
|
* @param {string} reason - The reason for the sync (used for logging)
|
|
302
|
+
* @param {boolean} [isInitialization] - Whether this is an initialization sync (sends empty leaves data instead of comparing hashes)
|
|
303
303
|
* @returns {Promise<void>}
|
|
304
304
|
*/
|
|
305
305
|
private performSync;
|
|
306
|
+
/**
|
|
307
|
+
* Enqueues a sync for the given data set. If the data set is already in the queue, the request is ignored.
|
|
308
|
+
* This ensures that all syncs are executed sequentially and no more than 1 sync runs at a time.
|
|
309
|
+
*
|
|
310
|
+
* @param {string} dataSetName - The name of the data set to sync
|
|
311
|
+
* @param {string} reason - The reason for the sync (used for logging)
|
|
312
|
+
* @param {boolean} [isInitialization=false] - Whether this is an initialization sync (uses empty leaves data instead of hash comparison)
|
|
313
|
+
* @returns {void}
|
|
314
|
+
*/
|
|
315
|
+
private enqueueSyncForDataset;
|
|
316
|
+
/**
|
|
317
|
+
* Processes the sync queue sequentially. Only one instance of this method runs at a time.
|
|
318
|
+
*
|
|
319
|
+
* @returns {Promise<void>}
|
|
320
|
+
*/
|
|
321
|
+
private processSyncQueue;
|
|
322
|
+
/**
|
|
323
|
+
* Syncs all data sets that have hash trees, one by one in sequence, using the priority order
|
|
324
|
+
* provided by sortByInitPriority(). Does nothing if the parser is stopped or if a syncAllDatasets
|
|
325
|
+
* call is already in progress.
|
|
326
|
+
*
|
|
327
|
+
* @returns {Promise<void>}
|
|
328
|
+
*/
|
|
329
|
+
syncAllDatasets(): Promise<void>;
|
|
306
330
|
/**
|
|
307
331
|
* Runs the sync algorithm for the given data set.
|
|
308
332
|
*
|
|
@@ -333,24 +357,38 @@ declare class HashTreeParser {
|
|
|
333
357
|
*/
|
|
334
358
|
stop(): void;
|
|
335
359
|
/**
|
|
336
|
-
*
|
|
360
|
+
* Cleans up the HashTreeParser, stopping all timers and clearing all internal state.
|
|
361
|
+
* After calling this, the parser should not be used anymore.
|
|
362
|
+
* @returns {void}
|
|
363
|
+
*/
|
|
364
|
+
cleanUp(): void;
|
|
365
|
+
/**
|
|
366
|
+
* Resumes the HashTreeParser that was previously stopped, using a hash tree message.
|
|
337
367
|
* @param {HashTreeMessage} message - The message to resume with, it must contain metadata with visible data sets info
|
|
338
368
|
* @returns {void}
|
|
339
369
|
*/
|
|
340
|
-
|
|
370
|
+
resumeFromMessage(message: HashTreeMessage): void;
|
|
371
|
+
/**
|
|
372
|
+
* Resumes the HashTreeParser that was previously stopped, using a Locus API response.
|
|
373
|
+
* Unlike resumeFromMessage(), this does not require metadata/dataSets in the input,
|
|
374
|
+
* as it fetches all necessary information from Locus via initializeFromGetLociResponse.
|
|
375
|
+
* @param {LocusDTO} locus - locus object from an API response
|
|
376
|
+
* @returns {Promise}
|
|
377
|
+
*/
|
|
378
|
+
resumeFromApiResponse(locus: LocusDTO): Promise<void>;
|
|
341
379
|
private checkForSentinelHttpResponse;
|
|
342
380
|
/**
|
|
343
381
|
* Gets the current hashes from the locus for a specific data set.
|
|
344
382
|
* @param {string} dataSetName
|
|
345
383
|
* @param {string} currentRootHash
|
|
346
|
-
* @returns {
|
|
384
|
+
* @returns {Object|null} An object containing the hashes and leaf count, or null if the hashes match and no sync is needed
|
|
347
385
|
*/
|
|
348
386
|
private getHashesFromLocus;
|
|
349
387
|
/**
|
|
350
388
|
* Sends a sync request to Locus for the specified data set.
|
|
351
389
|
*
|
|
352
390
|
* @param {InternalDataSet} dataSet The data set to sync.
|
|
353
|
-
* @param {
|
|
391
|
+
* @param {Object} options Either `{ isInitialization: true }` for init syncs (uses leafCount=1 with empty leaf data) or `{ mismatchedLeavesData }` for normal syncs.
|
|
354
392
|
* @returns {Promise<HashTreeMessage|null>}
|
|
355
393
|
*/
|
|
356
394
|
private sendSyncRequestToLocus;
|
|
@@ -20,3 +20,14 @@ export declare function isMetadata(object: HashTreeObject): boolean;
|
|
|
20
20
|
* @returns {void}
|
|
21
21
|
*/
|
|
22
22
|
export declare const deleteNestedObjectsWithHtMeta: (currentLocusPart: any, parent?: any, currentKey?: string | number) => void;
|
|
23
|
+
/**
|
|
24
|
+
* Reorders items so that those matching the given priority list come first (in priority order),
|
|
25
|
+
* followed by everything else in their original order.
|
|
26
|
+
*
|
|
27
|
+
* @param {Array<T>} items - The items to reorder
|
|
28
|
+
* @param {string[]} priority - Ordered list of names that should come first
|
|
29
|
+
* @returns {Array<T>} A new array with prioritized items first
|
|
30
|
+
*/
|
|
31
|
+
export declare function sortByInitPriority<T extends {
|
|
32
|
+
name: string;
|
|
33
|
+
}>(items: T[], priority: string[]): T[];
|
|
@@ -11,11 +11,11 @@ export default class LocusRetryStatusInterceptor extends Interceptor {
|
|
|
11
11
|
*/
|
|
12
12
|
static create(): LocusRetryStatusInterceptor;
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
15
|
-
* @param {
|
|
16
|
-
* @
|
|
17
|
-
* @returns {Promise<WebexHttpError>}
|
|
14
|
+
* Check whether a URI is a Locus /hashtree or /sync endpoint.
|
|
15
|
+
* @param {string} uri
|
|
16
|
+
* @returns {boolean}
|
|
18
17
|
*/
|
|
18
|
+
private static isLocusHashtreeOrSync;
|
|
19
19
|
onResponseError(options: any, reason: any): Promise<unknown>;
|
|
20
20
|
/**
|
|
21
21
|
* Handle retries for locus service unavailable errors
|
|
@@ -25,10 +25,9 @@ export type HashTreeParserEntry = {
|
|
|
25
25
|
*
|
|
26
26
|
* @param {HashTreeMessage} message - The hash tree message to find the meeting for
|
|
27
27
|
* @param {MeetingCollection} meetingCollection - The collection of meetings to search
|
|
28
|
-
* @param {string} deviceUrl - The URL of the user's device
|
|
29
28
|
* @returns {any} The meeting if found, otherwise undefined
|
|
30
29
|
*/
|
|
31
|
-
export declare function findMeetingForHashTreeMessage(message: HashTreeMessage, meetingCollection: MeetingCollection
|
|
30
|
+
export declare function findMeetingForHashTreeMessage(message: HashTreeMessage | undefined, meetingCollection: MeetingCollection): any;
|
|
32
31
|
/**
|
|
33
32
|
* Creates a locus object from the objects received in a hash tree message. It usually will be
|
|
34
33
|
* incomplete, because hash tree messages only contain the parts of locus that have changed,
|
|
@@ -167,6 +166,28 @@ export default class LocusInfo extends EventsScope {
|
|
|
167
166
|
* @returns {void}
|
|
168
167
|
*/
|
|
169
168
|
sendClassicVsHashTreeMismatchMetric(meeting: any, message: string): void;
|
|
169
|
+
/**
|
|
170
|
+
* Helper that handles the common logic for reactivating a stopped HashTreeParser when
|
|
171
|
+
* a newer "replaces" is detected. Used by both the message and API response parser switch methods.
|
|
172
|
+
*
|
|
173
|
+
* @param {string} callerName - name of the calling method, used in log messages
|
|
174
|
+
* @param {string} locusUrl - the locus URL of the stopped parser
|
|
175
|
+
* @param {HashTreeParserEntry} stoppedEntry - the stopped parser entry
|
|
176
|
+
* @param {ReplacesInfo} replaces - replacement info extracted from self
|
|
177
|
+
* @param {Function} resumeCallback - callback to invoke after reactivation to resume the parser
|
|
178
|
+
* @returns {void}
|
|
179
|
+
*/
|
|
180
|
+
private resumeStoppedParser;
|
|
181
|
+
/**
|
|
182
|
+
* Handles an API response whose locusUrl doesn't match any active HashTreeParser
|
|
183
|
+
* (either no entry exists, or the existing entry is stopped).
|
|
184
|
+
* Creates a new parser or reactivates a stopped one using initializeFromGetLociResponse.
|
|
185
|
+
*
|
|
186
|
+
* @param {string} locusUrl - the locus URL from the API response
|
|
187
|
+
* @param {LocusDTO} locus - the locus DTO from the API response
|
|
188
|
+
* @returns {void}
|
|
189
|
+
*/
|
|
190
|
+
private handleHashTreeParserSwitchForAPIResponse;
|
|
170
191
|
/**
|
|
171
192
|
* Checks if the hash tree message should trigger a switch to a different HashTreeParser
|
|
172
193
|
*
|
|
@@ -183,13 +204,19 @@ export default class LocusInfo extends EventsScope {
|
|
|
183
204
|
* @returns {void}
|
|
184
205
|
*/
|
|
185
206
|
private handleHashTreeMessage;
|
|
207
|
+
/**
|
|
208
|
+
* Triggers a sync of all hash tree datasets for all hash tree parsers associated with this meeting.
|
|
209
|
+
* The syncs are executed sequentially within each parser.
|
|
210
|
+
*
|
|
211
|
+
* @returns {Promise<void>}
|
|
212
|
+
*/
|
|
213
|
+
syncAllHashTreeDatasets(): Promise<void>;
|
|
186
214
|
/**
|
|
187
215
|
* Callback registered with HashTreeParser to receive locus info updates.
|
|
188
216
|
* Updates our locus info based on the data parsed by the hash tree parser.
|
|
189
217
|
*
|
|
190
218
|
* @param {string} locusUrl - the locus URL for which the update is received
|
|
191
|
-
* @param {
|
|
192
|
-
* @param {Object} [data] - Additional data for the update, if applicable.
|
|
219
|
+
* @param {LocusInfoUpdate} update - Details about the update.
|
|
193
220
|
* @returns {void}
|
|
194
221
|
*/
|
|
195
222
|
private updateFromHashTree;
|
|
@@ -214,8 +241,8 @@ export default class LocusInfo extends EventsScope {
|
|
|
214
241
|
* @param {string} debugText string explaining the trigger for this call, added to logs for debugging purposes
|
|
215
242
|
* @param {object} locus locus object
|
|
216
243
|
* @param {object} metadata locus hash trees metadata
|
|
217
|
-
* @param {string} eventType locus event
|
|
218
244
|
* @param {DataSet[]} dataSets
|
|
245
|
+
* @param {string} eventType locus event
|
|
219
246
|
* @returns {void}
|
|
220
247
|
*/
|
|
221
248
|
private onFullLocusWithHashTrees;
|
|
@@ -444,4 +471,10 @@ export default class LocusInfo extends EventsScope {
|
|
|
444
471
|
* @memberof LocusInfo
|
|
445
472
|
*/
|
|
446
473
|
clearMainSessionLocusCache(): void;
|
|
474
|
+
/**
|
|
475
|
+
* Cleans up all hash tree parsers and clears internal maps.
|
|
476
|
+
* @returns {void}
|
|
477
|
+
* @memberof LocusInfo
|
|
478
|
+
*/
|
|
479
|
+
cleanUp(): void;
|
|
447
480
|
}
|
|
@@ -1318,6 +1318,11 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
|
1318
1318
|
* @returns{void}
|
|
1319
1319
|
*/
|
|
1320
1320
|
private triggerStopReceivingTranscriptionEvent;
|
|
1321
|
+
/**
|
|
1322
|
+
* Restores LLM subchannel subscriptions after reconnect when captions are active.
|
|
1323
|
+
* @returns {void}
|
|
1324
|
+
*/
|
|
1325
|
+
private restoreLLMSubscriptionsIfNeeded;
|
|
1321
1326
|
/**
|
|
1322
1327
|
* This is a callback for the LLM event that is triggered when it comes online
|
|
1323
1328
|
* This method in turn will trigger an event to the developers that the LLM is connected
|
|
@@ -1372,6 +1377,12 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
|
1372
1377
|
* @returns {void}
|
|
1373
1378
|
*/
|
|
1374
1379
|
saveDataChannelToken(join: any): void;
|
|
1380
|
+
/**
|
|
1381
|
+
* Ensures default-session data channel token exists after lobby admission.
|
|
1382
|
+
* Some lobby users do not receive a token until they are admitted.
|
|
1383
|
+
* @returns {Promise<boolean>} true when a new token is fetched and cached
|
|
1384
|
+
*/
|
|
1385
|
+
private ensureDefaultDatachannelTokenAfterAdmit;
|
|
1375
1386
|
/**
|
|
1376
1387
|
* Connects to low latency mercury and reconnects if the address has changed
|
|
1377
1388
|
* It will also disconnect if called when the meeting has ended
|
|
@@ -66,6 +66,7 @@ declare const MemberUtil: {
|
|
|
66
66
|
isDevice: (participant: Participant) => boolean;
|
|
67
67
|
isModeratorAssignmentProhibited: (participant: Participant) => boolean;
|
|
68
68
|
isPresenterAssignmentProhibited: (participant: Participant) => boolean;
|
|
69
|
+
isAttendeeAssignmentProhibited: (participant: Participant) => boolean;
|
|
69
70
|
/**
|
|
70
71
|
* checks to see if the participant id is the same as the passed id
|
|
71
72
|
* there are multiple ids that can be used
|
|
@@ -88,5 +88,9 @@ declare const BEHAVIORAL_METRICS: {
|
|
|
88
88
|
LOCUS_CLASSIC_VS_HASH_TREE_MISMATCH: string;
|
|
89
89
|
LOCUS_HASH_TREE_UNSUPPORTED_OPERATION: string;
|
|
90
90
|
MEDIA_STILL_NOT_CONNECTED: string;
|
|
91
|
+
DEPRECATED_SET_CODEC_PARAMETERS_USED: string;
|
|
92
|
+
DEPRECATED_DELETE_CODEC_PARAMETERS_USED: string;
|
|
93
|
+
SET_CUSTOM_CODEC_PARAMETERS_USED: string;
|
|
94
|
+
MARK_CUSTOM_CODEC_PARAMETERS_FOR_DELETION_USED: string;
|
|
91
95
|
};
|
|
92
96
|
export { BEHAVIORAL_METRICS as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SendSlot, MediaType, LocalStream, MultistreamRoapMediaConnection, NamedMediaGroup, StreamState } from '@webex/internal-media-core';
|
|
1
|
+
import { SendSlot, MediaType, LocalStream, MultistreamRoapMediaConnection, NamedMediaGroup, StreamState, MediaCodecMimeType, CodecParameters } from '@webex/internal-media-core';
|
|
2
2
|
/**
|
|
3
3
|
* This class is used to manage the sendSlots for the given media types.
|
|
4
4
|
*/
|
|
@@ -69,6 +69,8 @@ export default class SendSlotManager {
|
|
|
69
69
|
*/
|
|
70
70
|
setActive(mediaType: MediaType, active?: boolean): void;
|
|
71
71
|
/**
|
|
72
|
+
* @deprecated Use {@link setCustomCodecParameters} instead, which requires specifying the codec MIME type.
|
|
73
|
+
*
|
|
72
74
|
* This method is used to set the codec parameters for the sendSlot of the given mediaType
|
|
73
75
|
* @param {MediaType} mediaType MediaType of the sendSlot for which the codec parameters needs to be set (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)
|
|
74
76
|
* @param {Object} codecParameters
|
|
@@ -78,12 +80,32 @@ export default class SendSlotManager {
|
|
|
78
80
|
[key: string]: string | undefined;
|
|
79
81
|
}): Promise<void>;
|
|
80
82
|
/**
|
|
83
|
+
* @deprecated Use {@link markCustomCodecParametersForDeletion} instead, which requires specifying the codec MIME type.
|
|
84
|
+
*
|
|
81
85
|
* This method is used to delete the codec parameters for the sendSlot of the given mediaType
|
|
82
86
|
* @param {MediaType} mediaType MediaType of the sendSlot for which the codec parameters needs to be deleted (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)
|
|
83
87
|
* @param {Array<String>} parameters Array of keys of the codec parameters to be deleted
|
|
84
88
|
* @returns {Promise<void>}
|
|
85
89
|
*/
|
|
86
90
|
deleteCodecParameters(mediaType: MediaType, parameters: string[]): Promise<void>;
|
|
91
|
+
/**
|
|
92
|
+
* Sets custom codec parameters for the sendSlot of the given mediaType, scoped to a specific codec MIME type.
|
|
93
|
+
* Delegates to WCME's setCustomCodecParameters API.
|
|
94
|
+
* @param {MediaType} mediaType MediaType of the sendSlot
|
|
95
|
+
* @param {MediaCodecMimeType} codecMimeType The codec MIME type to apply parameters to (e.g. OPUS, H264, AV1)
|
|
96
|
+
* @param {CodecParameters} parameters Key-value pairs of codec parameters to set
|
|
97
|
+
* @returns {Promise<void>}
|
|
98
|
+
*/
|
|
99
|
+
setCustomCodecParameters(mediaType: MediaType, codecMimeType: MediaCodecMimeType, parameters: CodecParameters): Promise<void>;
|
|
100
|
+
/**
|
|
101
|
+
* Marks custom codec parameters for deletion on the sendSlot of the given mediaType, scoped to a specific codec MIME type.
|
|
102
|
+
* Delegates to WCME's markCustomCodecParametersForDeletion API.
|
|
103
|
+
* @param {MediaType} mediaType MediaType of the sendSlot
|
|
104
|
+
* @param {MediaCodecMimeType} codecMimeType The codec MIME type whose parameters should be deleted (e.g. OPUS, H264, AV1)
|
|
105
|
+
* @param {string[]} parameters Array of parameter keys to delete
|
|
106
|
+
* @returns {Promise<void>}
|
|
107
|
+
*/
|
|
108
|
+
markCustomCodecParametersForDeletion(mediaType: MediaType, codecMimeType: MediaCodecMimeType, parameters: string[]): Promise<void>;
|
|
87
109
|
/**
|
|
88
110
|
* This method is used to reset the SendSlotsManager by deleting all the sendSlots
|
|
89
111
|
* @returns {undefined}
|