@webex/plugin-meetings 3.12.0-next.1 → 3.12.0-next.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/dist/aiEnableRequest/index.js +1 -1
  2. package/dist/breakouts/breakout.js +1 -1
  3. package/dist/breakouts/index.js +1 -1
  4. package/dist/hashTree/constants.js +10 -1
  5. package/dist/hashTree/constants.js.map +1 -1
  6. package/dist/hashTree/hashTreeParser.js +56 -31
  7. package/dist/hashTree/hashTreeParser.js.map +1 -1
  8. package/dist/hashTree/utils.js +22 -0
  9. package/dist/hashTree/utils.js.map +1 -1
  10. package/dist/interpretation/index.js +1 -1
  11. package/dist/interpretation/siLanguage.js +1 -1
  12. package/dist/locus-info/index.js +38 -14
  13. package/dist/locus-info/index.js.map +1 -1
  14. package/dist/meeting/index.js +427 -323
  15. package/dist/meeting/index.js.map +1 -1
  16. package/dist/meeting/util.js +1 -0
  17. package/dist/meeting/util.js.map +1 -1
  18. package/dist/metrics/constants.js +5 -1
  19. package/dist/metrics/constants.js.map +1 -1
  20. package/dist/multistream/sendSlotManager.js +116 -2
  21. package/dist/multistream/sendSlotManager.js.map +1 -1
  22. package/dist/types/hashTree/constants.d.ts +1 -0
  23. package/dist/types/hashTree/hashTreeParser.d.ts +12 -2
  24. package/dist/types/hashTree/utils.d.ts +11 -0
  25. package/dist/types/locus-info/index.d.ts +8 -3
  26. package/dist/types/meeting/index.d.ts +24 -1
  27. package/dist/types/metrics/constants.d.ts +4 -0
  28. package/dist/types/multistream/sendSlotManager.d.ts +23 -1
  29. package/dist/webinar/index.js +325 -220
  30. package/dist/webinar/index.js.map +1 -1
  31. package/package.json +15 -15
  32. package/src/hashTree/constants.ts +9 -0
  33. package/src/hashTree/hashTreeParser.ts +60 -36
  34. package/src/hashTree/utils.ts +17 -0
  35. package/src/locus-info/index.ts +48 -24
  36. package/src/meeting/index.ts +165 -57
  37. package/src/meeting/util.ts +1 -0
  38. package/src/metrics/constants.ts +5 -0
  39. package/src/multistream/sendSlotManager.ts +97 -3
  40. package/src/webinar/index.ts +120 -18
  41. package/test/unit/spec/hashTree/hashTreeParser.ts +295 -30
  42. package/test/unit/spec/hashTree/utils.ts +88 -1
  43. package/test/unit/spec/locus-info/index.js +47 -22
  44. package/test/unit/spec/meeting/index.js +179 -48
  45. package/test/unit/spec/meeting/utils.js +4 -0
  46. package/test/unit/spec/meetings/index.js +3 -3
  47. package/test/unit/spec/multistream/sendSlotManager.ts +135 -36
  48. package/test/unit/spec/webinar/index.ts +193 -8
@@ -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.info("SendSlotsManager->setCodecParameters#Set codec parameters for ".concat(mediaType, " to ").concat(codecParameters));
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.info("SendSlotsManager->deleteCodecParameters#Deleted the following codec parameters -> ".concat(parameters, " for ").concat(mediaType));
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;IAAA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C5D,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;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,K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AE,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":[]}
@@ -7,3 +7,4 @@ export declare const DataSetNames: {
7
7
  SELF: string;
8
8
  UNJOINED: string;
9
9
  };
10
+ export declare const DATA_SET_INIT_PRIORITY: string[];
@@ -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 LocusInfoUpdateCallback = (updateType: LocusInfoUpdateType, data?: {
48
+ export type LocusInfoUpdate = {
49
+ updateType: typeof LocusInfoUpdateType.OBJECTS_UPDATED;
49
50
  updatedObjects: HashTreeObject[];
50
- }) => void;
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.
@@ -332,6 +336,12 @@ declare class HashTreeParser {
332
336
  * @returns {void}
333
337
  */
334
338
  stop(): void;
339
+ /**
340
+ * Cleans up the HashTreeParser, stopping all timers and clearing all internal state.
341
+ * After calling this, the parser should not be used anymore.
342
+ * @returns {void}
343
+ */
344
+ cleanUp(): void;
335
345
  /**
336
346
  * Resumes the HashTreeParser that was previously stopped.
337
347
  * @param {HashTreeMessage} message - The message to resume with, it must contain metadata with visible data sets info
@@ -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[];
@@ -188,8 +188,7 @@ export default class LocusInfo extends EventsScope {
188
188
  * Updates our locus info based on the data parsed by the hash tree parser.
189
189
  *
190
190
  * @param {string} locusUrl - the locus URL for which the update is received
191
- * @param {LocusInfoUpdateType} updateType - The type of update received.
192
- * @param {Object} [data] - Additional data for the update, if applicable.
191
+ * @param {LocusInfoUpdate} update - Details about the update.
193
192
  * @returns {void}
194
193
  */
195
194
  private updateFromHashTree;
@@ -214,8 +213,8 @@ export default class LocusInfo extends EventsScope {
214
213
  * @param {string} debugText string explaining the trigger for this call, added to logs for debugging purposes
215
214
  * @param {object} locus locus object
216
215
  * @param {object} metadata locus hash trees metadata
217
- * @param {string} eventType locus event
218
216
  * @param {DataSet[]} dataSets
217
+ * @param {string} eventType locus event
219
218
  * @returns {void}
220
219
  */
221
220
  private onFullLocusWithHashTrees;
@@ -444,4 +443,10 @@ export default class LocusInfo extends EventsScope {
444
443
  * @memberof LocusInfo
445
444
  */
446
445
  clearMainSessionLocusCache(): void;
446
+ /**
447
+ * Cleans up all hash tree parsers and clears internal maps.
448
+ * @returns {void}
449
+ * @memberof LocusInfo
450
+ */
451
+ cleanUp(): void;
447
452
  }
@@ -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
@@ -1359,10 +1364,28 @@ export default class Meeting extends StatelessWebexPlugin {
1359
1364
  * @returns {Promise<void>}
1360
1365
  */
1361
1366
  private cleanupLLMConneciton;
1367
+ /**
1368
+ * Clears all data channel tokens stored in LLM.
1369
+ * Called during meeting cleanup to ensure stale tokens are not reused.
1370
+ * @returns {void}
1371
+ */
1372
+ clearDataChannelToken(): void;
1373
+ /**
1374
+ * Saves the data channel tokens from the join response into LLM so that
1375
+ * updateLLMConnection / updatePSDataChannel don't need to fetch them from locusInfo.
1376
+ * @param {Object} join - The parsed join response (from MeetingUtil.parseLocusJoin)
1377
+ * @returns {void}
1378
+ */
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;
1362
1386
  /**
1363
1387
  * Connects to low latency mercury and reconnects if the address has changed
1364
1388
  * It will also disconnect if called when the meeting has ended
1365
- * @param {String} datachannelUrl
1366
1389
  * @returns {Promise}
1367
1390
  */
1368
1391
  updateLLMConnection(): Promise<any>;
@@ -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}