@webex/plugin-meetings 3.12.0-webex-services-ready.4 → 3.13.0
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/.sdd/manifest.json +1312 -0
- package/.sdd/templates/.source.json +30 -0
- package/.sdd/templates/component-repo/module-docs/module-spec-quality.md +111 -0
- package/.sdd/templates/component-repo/module-docs/module-spec.template.md +321 -0
- package/.sdd/templates/component-repo/reference-docs/adr/_adr-example.md +59 -0
- package/.sdd/templates/component-repo/reference-docs/patterns/_pattern-example.md +49 -0
- package/.sdd/templates/component-repo/reference-docs/rules/_rule-example.md +42 -0
- package/.sdd/templates/component-repo/standing-docs/AGENTS.template.md +120 -0
- package/.sdd/templates/component-repo/standing-docs/ARCHITECTURE.template.md +206 -0
- package/.sdd/templates/component-repo/standing-docs/CONTRACTS.template.md +90 -0
- package/.sdd/templates/component-repo/standing-docs/DATA_MODEL.template.md +68 -0
- package/.sdd/templates/component-repo/standing-docs/GETTING_STARTED.template.md +111 -0
- package/.sdd/templates/component-repo/standing-docs/GLOSSARY.template.md +57 -0
- package/.sdd/templates/component-repo/standing-docs/REVIEW_CHECKLIST.template.md +69 -0
- package/.sdd/templates/component-repo/standing-docs/RULES.template.md +96 -0
- package/.sdd/templates/component-repo/standing-docs/SECURITY.template.md +84 -0
- package/.sdd/templates/component-repo/standing-docs/SERVICE_STATE.template.md +82 -0
- package/.sdd/templates/component-repo/standing-docs/SPEC_INDEX.template.md +94 -0
- package/.sdd/templates/component-repo/standing-docs/TEST_INDEX.template.md +64 -0
- package/.sdd/templates/component-repo/template-map.json +112 -0
- package/AGENTS.md +130 -4
- package/ai-docs/ARCHITECTURE.md +208 -0
- package/ai-docs/CONTRACTS.md +267 -0
- package/ai-docs/DATA_MODEL.md +64 -0
- package/ai-docs/GETTING_STARTED.md +73 -0
- package/ai-docs/GLOSSARY.md +56 -0
- package/ai-docs/REVIEW_CHECKLIST.md +45 -0
- package/ai-docs/RULES.md +79 -0
- package/ai-docs/SECURITY.md +74 -0
- package/ai-docs/SERVICE_STATE.md +59 -0
- package/ai-docs/SPEC_INDEX.md +85 -0
- package/ai-docs/TEST_INDEX.md +45 -0
- package/ai-docs/adr/0001-migrate-existing-docs-into-sdd.md +61 -0
- package/ai-docs/patterns/defensive-error-propagation.md +55 -0
- package/ai-docs/patterns/event-scope-emission.md +46 -0
- package/ai-docs/patterns/source-to-test-path-mirroring.md +45 -0
- package/ai-docs/patterns/stateless-plugin-request-classes.md +53 -0
- package/ai-docs/patterns/typed-constants-and-enum-values.md +47 -0
- package/assets/README.md +28 -0
- package/assets/e2ee-0.0.1.js +2 -0
- package/assets/e2ee-0.0.1.wasm +0 -0
- package/dist/aiEnableRequest/index.js +1 -1
- package/dist/annotation/index.js +55 -19
- package/dist/annotation/index.js.map +1 -1
- package/dist/assets/e2ee-0.0.1.js +2 -0
- package/dist/assets/e2ee-0.0.1.wasm +0 -0
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +39 -5
- package/dist/breakouts/index.js.map +1 -1
- package/dist/common/errors/webex-errors.js +7 -2
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/config.js +1 -0
- package/dist/config.js.map +1 -1
- package/dist/constants.js +6 -5
- package/dist/constants.js.map +1 -1
- package/dist/hashTree/hashTreeParser.js +101 -48
- package/dist/hashTree/hashTreeParser.js.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/interceptors/dataChannelAuthToken.js +41 -59
- package/dist/interceptors/dataChannelAuthToken.js.map +1 -1
- package/dist/interceptors/locusRetry.js +1 -1
- package/dist/interceptors/locusRetry.js.map +1 -1
- package/dist/interpretation/index.js +46 -12
- package/dist/interpretation/index.js.map +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/index.js +236 -80
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/types.js +2 -1
- package/dist/locus-info/types.js.map +1 -1
- package/dist/media/MediaConnectionAwaiter.js +225 -175
- package/dist/media/MediaConnectionAwaiter.js.map +1 -1
- package/dist/meeting/index.js +355 -299
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/util.js +8 -2
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting/voicea-meeting.js +2 -1
- package/dist/meeting/voicea-meeting.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +10 -3
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meetings/index.js +72 -31
- package/dist/meetings/index.js.map +1 -1
- package/dist/multistream/remoteMediaManager.js +32 -4
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- package/dist/multistream/sendSlotManager.js +11 -1
- package/dist/multistream/sendSlotManager.js.map +1 -1
- package/dist/types/annotation/index.d.ts +19 -0
- package/dist/types/common/errors/webex-errors.d.ts +6 -2
- package/dist/types/config.d.ts +1 -0
- package/dist/types/constants.d.ts +2 -1
- package/dist/types/hashTree/hashTreeParser.d.ts +12 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/locus-info/index.d.ts +45 -1
- package/dist/types/locus-info/types.d.ts +1 -0
- package/dist/types/media/MediaConnectionAwaiter.d.ts +61 -53
- package/dist/types/meeting/index.d.ts +49 -12
- package/dist/types/meeting/util.d.ts +3 -1
- package/dist/types/meeting-info/meeting-info-v2.d.ts +1 -0
- package/dist/types/meetings/index.d.ts +2 -1
- package/dist/types/multistream/remoteMediaManager.d.ts +18 -0
- package/dist/types/multistream/sendSlotManager.d.ts +5 -1
- package/dist/webinar/index.js +298 -255
- package/dist/webinar/index.js.map +1 -1
- package/package.json +25 -23
- package/src/aiEnableRequest/ai-docs/ai-enable-request-spec.md +223 -0
- package/src/annotation/ai-docs/annotation-spec.md +236 -0
- package/src/annotation/index.ts +61 -29
- package/src/breakouts/ai-docs/breakouts-spec.md +324 -0
- package/src/breakouts/index.ts +35 -2
- package/src/common/errors/webex-errors.ts +8 -2
- package/src/config.ts +5 -1
- package/src/constants.ts +2 -1
- package/src/controls-options-manager/ai-docs/controls-options-manager-spec.md +243 -0
- package/src/hashTree/ai-docs/hash-tree-spec.md +267 -0
- package/src/hashTree/hashTreeParser.ts +67 -3
- package/src/index.ts +1 -0
- package/src/interceptors/ai-docs/interceptors-spec.md +247 -0
- package/src/interceptors/dataChannelAuthToken.ts +48 -77
- package/src/interceptors/locusRetry.ts +1 -1
- package/src/interpretation/ai-docs/interpretation-spec.md +256 -0
- package/src/interpretation/index.ts +38 -1
- package/src/locus-info/ai-docs/locus-info-spec.md +293 -0
- package/src/locus-info/index.ts +156 -35
- package/src/locus-info/types.ts +1 -0
- package/src/media/MediaConnectionAwaiter.ts +223 -207
- package/src/media/ai-docs/media-spec.md +267 -0
- package/src/meeting/ai-docs/meeting-spec.md +404 -0
- package/src/meeting/index.ts +332 -296
- package/src/meeting/util.ts +7 -4
- package/src/meeting/voicea-meeting.ts +1 -1
- package/src/meeting-info/ai-docs/meeting-info-spec.md +261 -0
- package/src/meeting-info/meeting-info-v2.ts +7 -2
- package/src/meetings/ai-docs/meetings-spec.md +296 -0
- package/src/meetings/index.ts +59 -23
- package/src/member/ai-docs/member-spec.md +196 -0
- package/src/members/ai-docs/members-spec.md +256 -0
- package/src/metrics/ai-docs/metrics-spec.md +185 -0
- package/src/multistream/ai-docs/multistream-spec.md +295 -0
- package/src/multistream/remoteMediaManager.ts +23 -1
- package/src/multistream/sendSlotManager.ts +15 -1
- package/src/personal-meeting-room/ai-docs/personal-meeting-room-spec.md +234 -0
- package/src/reachability/ai-docs/reachability-spec.md +261 -0
- package/src/reactions/ai-docs/reactions-spec.md +198 -0
- package/src/reconnection-manager/ai-docs/reconnection-manager-spec.md +272 -0
- package/src/recording-controller/ai-docs/recording-controller-spec.md +223 -0
- package/src/roap/ai-docs/roap-spec.md +241 -0
- package/src/webinar/ai-docs/webinar-spec.md +243 -0
- package/src/webinar/index.ts +168 -188
- package/test/unit/spec/annotation/index.ts +214 -182
- package/test/unit/spec/breakouts/index.ts +145 -13
- package/test/unit/spec/hashTree/hashTreeParser.ts +212 -1
- package/test/unit/spec/interceptors/dataChannelAuthToken.ts +81 -99
- package/test/unit/spec/interceptors/locusRetry.ts +29 -1
- package/test/unit/spec/interpretation/index.ts +93 -0
- package/test/unit/spec/locus-info/index.js +397 -0
- package/test/unit/spec/media/MediaConnectionAwaiter.ts +426 -19
- package/test/unit/spec/media/properties.ts +3 -3
- package/test/unit/spec/meeting/index.js +1219 -723
- package/test/unit/spec/meeting/utils.js +52 -18
- package/test/unit/spec/meeting/voicea-meeting.ts +85 -1
- package/test/unit/spec/meeting-info/meetinginfov2.js +69 -1
- package/test/unit/spec/meetings/index.js +145 -43
- package/test/unit/spec/multistream/remoteMediaManager.ts +46 -0
- package/test/unit/spec/multistream/sendSlotManager.ts +30 -2
- package/test/unit/spec/webinar/index.ts +886 -718
|
@@ -1 +1 @@
|
|
|
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;AAC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CAAoC,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":[]}
|
|
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","_this","forEach","catch","message","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 unpublishing and deleting all the sendSlots.\n * Each slot is explicitly unpublished first so it detaches its stream event listeners\n * (OutputTrackChange, ConstraintsChange, mute-state, Ended); otherwise an abandoned slot stays\n * subscribed to a stream that may be reused by a later meeting and throws when that stream's\n * track changes, because the slot's sender belongs to this (now-closing) peer connection.\n * @returns {undefined}\n */\n public reset(): void {\n this.slots.forEach((slot, mediaType) => {\n slot.unpublishStream().catch((error) => {\n this.LoggerProxy.logger.warn(\n `SendSlotsManager->reset#Failed to unpublish stream for ${mediaType} while resetting: ${\n error?.message || error\n }`\n );\n });\n });\n\n this.slots.clear();\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAAA,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,EAQA,SAAO+F,KAAKA,CAAA,EAAS;MAAA,IAAAC,KAAA;MACnB,IAAI,CAACxF,KAAK,CAACyF,OAAO,CAAC,UAACrF,IAAI,EAAET,SAAS,EAAK;QACtCS,IAAI,CAACuC,eAAe,CAAC,CAAC,CAAC+C,KAAK,CAAC,UAACjB,KAAK,EAAK;UACtCe,KAAI,CAACtG,WAAW,CAACqB,MAAM,CAAC4C,IAAI,2DAAAhD,MAAA,CACgCR,SAAS,wBAAAQ,MAAA,CACjE,CAAAsE,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAEkB,OAAO,KAAIlB,KAAK,CAE3B,CAAC;QACH,CAAC,CAAC;MACJ,CAAC,CAAC;MAEF,IAAI,CAACzE,KAAK,CAAC4F,KAAK,CAAC,CAAC;IACpB;EAAC;AAAA","ignoreList":[]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { WebexPlugin } from '@webex/webex-core';
|
|
2
|
+
import type LLMChannel from '@webex/internal-plugin-llm';
|
|
2
3
|
import { StrokeData, RequestData, IAnnotationChannel } from './annotation.types';
|
|
3
4
|
/**
|
|
4
5
|
* @description Annotation to handle LLM and Mercury message and locus API
|
|
@@ -11,10 +12,27 @@ declare class AnnotationChannel extends WebexPlugin implements IAnnotationChanne
|
|
|
11
12
|
approvalUrl: string;
|
|
12
13
|
locusUrl: string;
|
|
13
14
|
deviceUrl: string;
|
|
15
|
+
/** Currently registered LLM channel */
|
|
16
|
+
private channel?;
|
|
17
|
+
/** Event handler bound to the channel, for cleanup */
|
|
18
|
+
private channelHandler?;
|
|
14
19
|
/**
|
|
15
20
|
* Initializes annotation module
|
|
16
21
|
*/
|
|
17
22
|
constructor(...args: any[]);
|
|
23
|
+
/**
|
|
24
|
+
* Register an LLMChannel with annotation. Only one channel can be registered
|
|
25
|
+
* at a time - the owner is responsible for switching channels when context
|
|
26
|
+
* changes (e.g., entering/leaving practice session).
|
|
27
|
+
* @param {LLMChannel} channel - The LLM channel to register
|
|
28
|
+
* @returns {void}
|
|
29
|
+
*/
|
|
30
|
+
registerChannel(channel: LLMChannel): void;
|
|
31
|
+
/**
|
|
32
|
+
* Unregister the current LLMChannel from annotation
|
|
33
|
+
* @returns {void}
|
|
34
|
+
*/
|
|
35
|
+
unregisterChannel(): void;
|
|
18
36
|
/**
|
|
19
37
|
* Process Stroke Data
|
|
20
38
|
* @param {object} data
|
|
@@ -33,6 +51,7 @@ declare class AnnotationChannel extends WebexPlugin implements IAnnotationChanne
|
|
|
33
51
|
private eventDataProcessor;
|
|
34
52
|
/**
|
|
35
53
|
* Listen to websocket messages
|
|
54
|
+
* @deprecated LLM event subscription is now handled by registerChannel()
|
|
36
55
|
* @returns {undefined}
|
|
37
56
|
*/
|
|
38
57
|
private listenToEvents;
|
|
@@ -94,6 +94,7 @@ declare class AddMediaFailed extends WebexMeetingsError {
|
|
|
94
94
|
selectedCandidatePairChanges?: number;
|
|
95
95
|
numTransports?: number;
|
|
96
96
|
iceConnected?: boolean;
|
|
97
|
+
iceConnectedAtLeastOnce?: boolean;
|
|
97
98
|
/**
|
|
98
99
|
* Creates a new AddMediaFailed error
|
|
99
100
|
* @param {Object} options
|
|
@@ -101,7 +102,8 @@ declare class AddMediaFailed extends WebexMeetingsError {
|
|
|
101
102
|
* @param {string} [options.connectionType] - The ICE connection type at the time of failure (e.g. 'UDP', 'TURN-TLS')
|
|
102
103
|
* @param {number} [options.selectedCandidatePairChanges] - Number of times the selected candidate pair changed
|
|
103
104
|
* @param {number} [options.numTransports] - Number of ICE transports
|
|
104
|
-
* @param {boolean} [options.iceConnected] - Whether ICE
|
|
105
|
+
* @param {boolean} [options.iceConnected] - Whether ICE is connected at the time of failure
|
|
106
|
+
* @param {boolean} [options.iceConnectedAtLeastOnce] - Whether ICE connected at least once before failure
|
|
105
107
|
*/
|
|
106
108
|
constructor(options?: {
|
|
107
109
|
cause?: Error;
|
|
@@ -109,10 +111,11 @@ declare class AddMediaFailed extends WebexMeetingsError {
|
|
|
109
111
|
selectedCandidatePairChanges?: number;
|
|
110
112
|
numTransports?: number;
|
|
111
113
|
iceConnected?: boolean;
|
|
114
|
+
iceConnectedAtLeastOnce?: boolean;
|
|
112
115
|
});
|
|
113
116
|
/**
|
|
114
117
|
* Returns true if the failure was due to a DTLS handshake failure
|
|
115
|
-
* (ICE connected
|
|
118
|
+
* (ICE is still connected but the overall media connection failed).
|
|
116
119
|
*/
|
|
117
120
|
get isDtlsHandshakeFailure(): boolean;
|
|
118
121
|
}
|
|
@@ -123,6 +126,7 @@ export { AddMediaFailed };
|
|
|
123
126
|
*/
|
|
124
127
|
declare class MediaConnectionTimedOutError extends Error {
|
|
125
128
|
iceConnected: boolean;
|
|
129
|
+
iceConnectedAtLeastOnce?: boolean;
|
|
126
130
|
cause?: any;
|
|
127
131
|
constructor(message: string, iceConnected: boolean, cause?: any);
|
|
128
132
|
}
|
package/dist/types/config.d.ts
CHANGED
|
@@ -137,7 +137,8 @@ export declare const INTENT_TO_JOIN: number[];
|
|
|
137
137
|
export declare const ICE_TIMEOUT = 2000;
|
|
138
138
|
export declare const ICE_FAIL_TIMEOUT = 3000;
|
|
139
139
|
export declare const RETRY_TIMEOUT = 3000;
|
|
140
|
-
export declare const
|
|
140
|
+
export declare const ICE_CONNECTION_TIMEOUT = 20000;
|
|
141
|
+
export declare const DTLS_CONNECTION_TIMEOUT = 7000;
|
|
141
142
|
export declare const ROAP_OFFER_ANSWER_EXCHANGE_TIMEOUT = 35000;
|
|
142
143
|
export declare const WEBINAR_ERROR_WEBCAST: number[];
|
|
143
144
|
export declare const WEBINAR_ERROR_REGISTRATION_ID: number[];
|
|
@@ -88,6 +88,7 @@ export type HashTreeParserCallbacks = {
|
|
|
88
88
|
locusInfoUpdateCallback: LocusInfoUpdateCallback;
|
|
89
89
|
syncLatencyTracker?: SyncLatencyTracker;
|
|
90
90
|
generateTrackingId?: GenerateTrackingId;
|
|
91
|
+
isLlmExpected: () => boolean;
|
|
91
92
|
};
|
|
92
93
|
/**
|
|
93
94
|
* This error is thrown if we receive information that the meeting has ended while we're processing some hash messages.
|
|
@@ -121,6 +122,7 @@ declare class HashTreeParser {
|
|
|
121
122
|
private dataSetsSyncedDuringBackoff;
|
|
122
123
|
private syncQueueProcessingPromise;
|
|
123
124
|
private topLevelHeartbeatIntervalMs?;
|
|
125
|
+
private pendingLlmWatchdogDataSetNames;
|
|
124
126
|
/**
|
|
125
127
|
* Constructor for HashTreeParser
|
|
126
128
|
* @param {Object} options
|
|
@@ -479,6 +481,16 @@ declare class HashTreeParser {
|
|
|
479
481
|
* @returns {void}
|
|
480
482
|
*/
|
|
481
483
|
private resetHeartbeatWatchdogs;
|
|
484
|
+
/**
|
|
485
|
+
* Re-evaluates heartbeat watchdog timers for LLM data sets. While LLM is not expected,
|
|
486
|
+
* resetHeartbeatWatchdogs skips setting watchdog timers for LLM data sets and records them in
|
|
487
|
+
* pendingLlmWatchdogDataSetNames. This must be called when LLM transitions to expected (e.g. self
|
|
488
|
+
* reports JOINED) to arm the watchdogs for those pending data sets (avoids a timing issue where
|
|
489
|
+
* the "main"/"atd-active"/"atd-unmuted" data set arrives before the self update). The pending set
|
|
490
|
+
* is consumed and cleared here.
|
|
491
|
+
* @returns {void}
|
|
492
|
+
*/
|
|
493
|
+
reevaluateLlmWatchdogs(): void;
|
|
482
494
|
/**
|
|
483
495
|
* Stops all timers for the data sets to prevent any further sync attempts.
|
|
484
496
|
* @returns {void}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -91,6 +91,12 @@ export default class LocusInfo extends EventsScope {
|
|
|
91
91
|
* @returns {undefined}
|
|
92
92
|
*/
|
|
93
93
|
constructor(callbacks: LocusInfoCallbacks, webex: any, meetingId: any);
|
|
94
|
+
/**
|
|
95
|
+
* Whether this meeting uses hash tree based Locus (as opposed to a classic, delta based Locus).
|
|
96
|
+
*
|
|
97
|
+
* @returns {boolean}
|
|
98
|
+
*/
|
|
99
|
+
isUsingHashTrees(): boolean;
|
|
94
100
|
/**
|
|
95
101
|
* Does a Locus sync. It tries to get the latest delta DTO or if it can't, it falls back to getting the full Locus DTO.
|
|
96
102
|
* WARNING: This function must not be used for hash tree based Locus meetings.
|
|
@@ -98,9 +104,41 @@ export default class LocusInfo extends EventsScope {
|
|
|
98
104
|
* @param {Meeting} meeting
|
|
99
105
|
* @param {boolean} isLocusUrlChanged
|
|
100
106
|
* @param {Locus} locus
|
|
101
|
-
* @
|
|
107
|
+
* @param {Object} [options]
|
|
108
|
+
* @param {boolean} [options.destroyOnTransientFailure=true] controls what happens on a *transient*
|
|
109
|
+
* sync failure (a terminal failure, e.g. a 403 meaning the meeting has ended, always destroys
|
|
110
|
+
* the meeting regardless of this flag). When true, a transient failure destroys the meeting and
|
|
111
|
+
* the returned promise still resolves. When false, the meeting is preserved and the returned
|
|
112
|
+
* promise rejects so the caller can retry.
|
|
113
|
+
* @returns {Promise} resolves once the fetched DTO has been applied; see destroyOnTransientFailure
|
|
114
|
+
* for the failure behavior
|
|
102
115
|
*/
|
|
103
116
|
private doLocusSync;
|
|
117
|
+
/**
|
|
118
|
+
* Syncs this meeting's Locus state (e.g. after a network reconnection), routing to whichever
|
|
119
|
+
* mechanism the meeting uses (a meeting only ever uses one): hash tree datasets via
|
|
120
|
+
* syncAllHashTreeDatasets() or a standalone Locus DTO fetch for classic meetings.
|
|
121
|
+
* A transient failure preserves the meeting (so the caller can retry); only a terminal failure
|
|
122
|
+
* (e.g. a 403 meaning the meeting has ended) destroys it.
|
|
123
|
+
*
|
|
124
|
+
* The classic path is only needed when Meetings#syncMeetings() can't do its usual
|
|
125
|
+
* getActiveMeetings() fetch (e.g. unverified guests, for whom Locus rejects that call); signed-in
|
|
126
|
+
* users resync classic meetings via getActiveMeetings() and pass canSyncClassicLocus as false.
|
|
127
|
+
*
|
|
128
|
+
* @param {Meeting} meeting
|
|
129
|
+
* @param {Object} options
|
|
130
|
+
* @param {boolean} options.canSyncClassicLocus - whether this sync is allowed to fetch a
|
|
131
|
+
* standalone Locus DTO for classic meetings
|
|
132
|
+
* @param {boolean} options.canSyncHashTree - whether this sync is allowed to sync hash tree
|
|
133
|
+
* datasets for hash tree based meetings
|
|
134
|
+
* @returns {Promise<void>} resolves once the sync (hash tree or classic) completes; for the
|
|
135
|
+
* classic path it rejects only on a transient failure, so the caller can retry (a terminal
|
|
136
|
+
* failure destroys the meeting and resolves)
|
|
137
|
+
*/
|
|
138
|
+
sync(meeting: any, { canSyncClassicLocus, canSyncHashTree }: {
|
|
139
|
+
canSyncClassicLocus: boolean;
|
|
140
|
+
canSyncHashTree: boolean;
|
|
141
|
+
}): Promise<void>;
|
|
104
142
|
/**
|
|
105
143
|
* Apply locus delta data to meeting
|
|
106
144
|
* @param {string} action Locus delta action
|
|
@@ -124,6 +162,12 @@ export default class LocusInfo extends EventsScope {
|
|
|
124
162
|
* @memberof LocusInfo
|
|
125
163
|
*/
|
|
126
164
|
init(locus?: any): void;
|
|
165
|
+
/**
|
|
166
|
+
* Whether we expect to receive updates over the LLM connection. This is used by hash tree parsers
|
|
167
|
+
* to decide whether to arm heartbeat watchdog timers for LLM data sets.
|
|
168
|
+
* @returns {boolean}
|
|
169
|
+
*/
|
|
170
|
+
private isLlmExpected;
|
|
127
171
|
/**
|
|
128
172
|
* Creates a HashTreeParser instance for a given locusUrl and stores it in the map.
|
|
129
173
|
* @param {Object} params
|
|
@@ -4,96 +4,104 @@ export interface MediaConnectionAwaiterProps {
|
|
|
4
4
|
}
|
|
5
5
|
export interface FailureResult {
|
|
6
6
|
iceConnected: boolean;
|
|
7
|
+
iceConnectedAtLeastOnce: boolean;
|
|
7
8
|
}
|
|
8
9
|
/**
|
|
9
|
-
*
|
|
10
|
+
* Waits for ICE and DTLS connectivity using explicit lifecycle states.
|
|
10
11
|
*/
|
|
11
12
|
export default class MediaConnectionAwaiter {
|
|
12
|
-
private
|
|
13
|
-
private
|
|
13
|
+
private props;
|
|
14
|
+
private state;
|
|
15
|
+
private timer?;
|
|
16
|
+
private iceConnectedAtLeastOnce;
|
|
14
17
|
private defer;
|
|
15
|
-
private retried;
|
|
16
|
-
private iceConnected;
|
|
17
|
-
private correlationId;
|
|
18
|
-
private onTimeoutCallback;
|
|
19
|
-
private peerConnectionStateCallback;
|
|
20
|
-
private iceConnectionStateCallback;
|
|
21
|
-
private iceGatheringStateCallback;
|
|
22
18
|
/**
|
|
23
|
-
* @param {MediaConnectionAwaiterProps}
|
|
19
|
+
* @param {MediaConnectionAwaiterProps} props
|
|
24
20
|
*/
|
|
25
|
-
constructor(
|
|
21
|
+
constructor(props: MediaConnectionAwaiterProps);
|
|
26
22
|
/**
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
* @returns {boolean}
|
|
23
|
+
* Registers listeners and starts the wait once, settling terminal connections immediately.
|
|
24
|
+
* @returns {Promise<void>} Rejects with FailureResult on failure
|
|
30
25
|
*/
|
|
31
|
-
|
|
26
|
+
waitForMediaConnectionConnected(): Promise<void>;
|
|
32
27
|
/**
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
* @
|
|
28
|
+
* Applies a transition to a new state and owns its deadline or terminal settlement.
|
|
29
|
+
* @param {EnteredState} next - State to enter; an active wait cannot return to idle
|
|
30
|
+
* @param {string} reason - Trigger or reason for the transition
|
|
31
|
+
* @returns {void}
|
|
36
32
|
*/
|
|
37
|
-
private
|
|
33
|
+
private enter;
|
|
38
34
|
/**
|
|
39
|
-
* Returns
|
|
40
|
-
*
|
|
35
|
+
* Returns whether the promise has settled.
|
|
41
36
|
* @returns {boolean}
|
|
42
37
|
*/
|
|
43
|
-
private
|
|
38
|
+
private isTerminal;
|
|
44
39
|
/**
|
|
45
|
-
* Returns
|
|
46
|
-
*
|
|
47
|
-
* @returns {boolean}
|
|
40
|
+
* Returns the current state only if it owns a connection deadline.
|
|
41
|
+
* @returns {ActiveState | undefined}
|
|
48
42
|
*/
|
|
49
|
-
private
|
|
43
|
+
private getActiveState;
|
|
44
|
+
/**
|
|
45
|
+
* Logs current browser state and transitions when connectivity or phase changes.
|
|
46
|
+
* @param {string} trigger - Callback or operation that triggered evaluation
|
|
47
|
+
* @returns {boolean} Whether a state transition occurred
|
|
48
|
+
*/
|
|
49
|
+
private evaluate;
|
|
50
|
+
/**
|
|
51
|
+
* Listener for peer connection state changes.
|
|
52
|
+
* @returns {void}
|
|
53
|
+
*/
|
|
54
|
+
peerConnectionStateHandler: () => void;
|
|
50
55
|
/**
|
|
51
|
-
*
|
|
52
|
-
*
|
|
56
|
+
* Listener for ICE connection state changes.
|
|
53
57
|
* @returns {void}
|
|
54
58
|
*/
|
|
55
|
-
|
|
59
|
+
iceConnectionStateHandler: () => void;
|
|
56
60
|
/**
|
|
57
|
-
*
|
|
58
|
-
*
|
|
61
|
+
* Restarts only an unchanged ICE phase when gathering completes.
|
|
59
62
|
* @returns {void}
|
|
60
63
|
*/
|
|
61
|
-
|
|
64
|
+
iceGatheringStateHandler: () => void;
|
|
62
65
|
/**
|
|
63
|
-
*
|
|
64
|
-
*
|
|
66
|
+
* Rechecks connectivity before applying the deadline or the ICE gathering retry.
|
|
65
67
|
* @returns {void}
|
|
66
68
|
*/
|
|
67
|
-
|
|
69
|
+
onTimeout: () => void;
|
|
68
70
|
/**
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
+
* Arms an active phase's deadline and logs every start or restart.
|
|
72
|
+
* @param {ActiveState} state - Active state whose deadline is being started
|
|
73
|
+
* @param {string} reason - Why the deadline is being started or restarted
|
|
71
74
|
* @returns {void}
|
|
72
75
|
*/
|
|
73
|
-
|
|
76
|
+
private armTimer;
|
|
74
77
|
/**
|
|
75
|
-
*
|
|
76
|
-
*
|
|
78
|
+
* Releases the deadline and registered listeners on either terminal transition.
|
|
77
79
|
* @returns {void}
|
|
78
80
|
*/
|
|
79
|
-
|
|
81
|
+
private teardown;
|
|
80
82
|
/**
|
|
81
|
-
*
|
|
82
|
-
* issues where browser doesn't update the RTCPeerConnection's iceConnectionState or connectionState
|
|
83
|
-
*
|
|
83
|
+
* Registers each callback once with a stable function reference.
|
|
84
84
|
* @returns {void}
|
|
85
85
|
*/
|
|
86
|
-
|
|
86
|
+
private registerCallbacks;
|
|
87
87
|
/**
|
|
88
|
-
*
|
|
89
|
-
*
|
|
88
|
+
* Removes callbacks when the wait reaches a terminal state.
|
|
90
89
|
* @returns {void}
|
|
91
90
|
*/
|
|
92
|
-
|
|
91
|
+
private unregisterCallbacks;
|
|
93
92
|
/**
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
* @returns {Promise<void>} In case of failure, the promise is rejected with FailureResult
|
|
93
|
+
* Returns whether ICE gathering has completed.
|
|
94
|
+
* @returns {boolean}
|
|
97
95
|
*/
|
|
98
|
-
|
|
96
|
+
private isIceGatheringCompleted;
|
|
97
|
+
/**
|
|
98
|
+
* Captures current and historical ICE connectivity for failures and metrics.
|
|
99
|
+
* @returns {FailureResult}
|
|
100
|
+
*/
|
|
101
|
+
private getConnectivity;
|
|
102
|
+
/**
|
|
103
|
+
* Sends connectivity diagnostics when a deadline expires.
|
|
104
|
+
* @returns {Promise<void>}
|
|
105
|
+
*/
|
|
106
|
+
private sendMetric;
|
|
99
107
|
}
|
|
@@ -5,6 +5,8 @@ import type { ClientEvent as RawClientEvent } from '@webex/event-dictionary-ts';
|
|
|
5
5
|
import { MediaType, StatsAnalyzer, NetworkQualityMonitor, StatsMonitor } from '@webex/internal-media-core';
|
|
6
6
|
import { DataChannelTokenType } from '@webex/internal-plugin-llm';
|
|
7
7
|
import { LocalStream, LocalCameraStream, LocalDisplayStream, LocalSystemAudioStream, LocalMicrophoneStream } from '@webex/media-helpers';
|
|
8
|
+
import { type VoiceaChannel } from '@webex/internal-plugin-voicea';
|
|
9
|
+
import type { MetricEventMeetingJoinPhase } from '@webex/internal-plugin-metrics/src/metrics.types';
|
|
8
10
|
import Roap, { type TurnDiscoverySkipReason } from '../roap/index';
|
|
9
11
|
import { type TurnServerInfo } from '../roap/types';
|
|
10
12
|
import { type BundlePolicy } from '../media';
|
|
@@ -88,6 +90,7 @@ export type CallStateForMetrics = {
|
|
|
88
90
|
userNameInput?: string;
|
|
89
91
|
emailInput?: string;
|
|
90
92
|
pstnCorrelationId?: string;
|
|
93
|
+
meetingJoinPhase?: MetricEventMeetingJoinPhase;
|
|
91
94
|
};
|
|
92
95
|
export declare const MEDIA_UPDATE_TYPE: {
|
|
93
96
|
TRANSCODED_MEDIA_CONNECTION: string;
|
|
@@ -491,6 +494,13 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
|
491
494
|
turnDiscoverySkippedReason: TurnDiscoverySkipReason;
|
|
492
495
|
turnServerUsed: boolean;
|
|
493
496
|
areVoiceaEventsSetup: boolean;
|
|
497
|
+
/**
|
|
498
|
+
* Returns the initial transcription object shape.
|
|
499
|
+
* Used by constructor and reset paths to ensure consistent initialization.
|
|
500
|
+
* @private
|
|
501
|
+
* @returns {Transcription}
|
|
502
|
+
*/
|
|
503
|
+
private getInitialTranscription;
|
|
494
504
|
isMoveToInProgress: boolean;
|
|
495
505
|
registrationIdStatus: string;
|
|
496
506
|
brbState: BrbState;
|
|
@@ -511,6 +521,19 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
|
511
521
|
private logUploadIntervalIndex;
|
|
512
522
|
private mediaServerIp;
|
|
513
523
|
private llmHealthCheckTimer?;
|
|
524
|
+
/**
|
|
525
|
+
* The LLM channel owned by this meeting for datachannel communication.
|
|
526
|
+
* Created in updateLLMConnection, cleaned up in cleanupLLMConneciton.
|
|
527
|
+
*/
|
|
528
|
+
private llmChannel?;
|
|
529
|
+
/**
|
|
530
|
+
* The Voicea channel for transcription/captions, bound to this meeting's LLM channel.
|
|
531
|
+
*/
|
|
532
|
+
voiceaChannel?: VoiceaChannel;
|
|
533
|
+
/**
|
|
534
|
+
* Pending datachannel token saved from join response, used when creating the LLM channel.
|
|
535
|
+
*/
|
|
536
|
+
private _pendingDatachannelToken?;
|
|
514
537
|
/**
|
|
515
538
|
* @param {Object} attrs
|
|
516
539
|
* @param {Object} options
|
|
@@ -1377,6 +1400,8 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
|
1377
1400
|
private processLocusLLMEvent;
|
|
1378
1401
|
/**
|
|
1379
1402
|
* Verifies the relay event was delivered for the active LLM session binding.
|
|
1403
|
+
* With the factory pattern, each meeting owns its channel, so we just verify
|
|
1404
|
+
* the route matches our channel's binding or the practice session binding.
|
|
1380
1405
|
* @param {RelayEvent} event Event object coming from LLM Connection
|
|
1381
1406
|
* @returns {boolean}
|
|
1382
1407
|
*/
|
|
@@ -1466,28 +1491,25 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
|
1466
1491
|
*/
|
|
1467
1492
|
private stopListeningForMeetingEvents;
|
|
1468
1493
|
/**
|
|
1469
|
-
* Disconnects and cleans up the
|
|
1470
|
-
*
|
|
1471
|
-
* Ownership-aware: only calls `disconnectLLM` when this meeting is the
|
|
1472
|
-
* current owner of the default LLM session (or when no owner is recorded).
|
|
1473
|
-
* Event listeners belonging to this meeting instance are always detached
|
|
1474
|
-
* so they do not receive another meeting's relay events.
|
|
1494
|
+
* Disconnects and cleans up the LLM channel owned by this meeting.
|
|
1475
1495
|
*
|
|
1476
1496
|
* @param {Object} options
|
|
1477
|
-
* @param {boolean} [options.removeOnlineListener=true] removes the one-time online listener
|
|
1478
1497
|
* @param {boolean} [options.throwOnError=true] rethrows disconnect errors when true
|
|
1498
|
+
* @param {boolean} [options.preserveVoiceaChannel=false] when true, keeps voiceaChannel for switchLLMChannel() during reconnects
|
|
1479
1499
|
* @returns {Promise<void>}
|
|
1480
1500
|
*/
|
|
1481
1501
|
private cleanupLLMConneciton;
|
|
1482
1502
|
/**
|
|
1483
|
-
*
|
|
1484
|
-
*
|
|
1503
|
+
* Sets the datachannel token on the meeting's LLM channel.
|
|
1504
|
+
* Used by the DataChannelAuthTokenInterceptor after refreshing tokens.
|
|
1505
|
+
* @param {string} token - The new datachannel token
|
|
1485
1506
|
* @returns {void}
|
|
1486
1507
|
*/
|
|
1487
|
-
|
|
1508
|
+
setLLMChannelDataToken(token: string): void;
|
|
1488
1509
|
/**
|
|
1489
|
-
* Saves the data channel tokens from the join response
|
|
1490
|
-
*
|
|
1510
|
+
* Saves the data channel tokens from the join response.
|
|
1511
|
+
* Default session token is stored on this.llmChannel when available.
|
|
1512
|
+
* Practice session token is stored on the webinar's practice LLM channel.
|
|
1491
1513
|
* @param {Object} join - The parsed join response (from MeetingUtil.parseLocusJoin)
|
|
1492
1514
|
* @returns {void}
|
|
1493
1515
|
*/
|
|
@@ -1608,6 +1630,7 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
|
1608
1630
|
* @returns {boolean}
|
|
1609
1631
|
*/
|
|
1610
1632
|
private isErrorMeaningLocusDroppedUs;
|
|
1633
|
+
private isLocusUserFullError;
|
|
1611
1634
|
/**
|
|
1612
1635
|
* Determines if the next media attempt should use only TURN-TLS (iceTransportPolicy='relay').
|
|
1613
1636
|
* We do this in the hope that it will minimize the chance of Homer sending DTLS packets on a wrong
|
|
@@ -2308,6 +2331,20 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
|
2308
2331
|
dataChannelTokenType: DataChannelTokenType;
|
|
2309
2332
|
};
|
|
2310
2333
|
}>;
|
|
2334
|
+
/**
|
|
2335
|
+
* Checks if the LLM channel is connected.
|
|
2336
|
+
* Handles practice session context automatically - returns practice session
|
|
2337
|
+
* LLM channel status when in practice session, main LLM channel status otherwise.
|
|
2338
|
+
* @returns {boolean} True if the appropriate LLM channel is connected
|
|
2339
|
+
*/
|
|
2340
|
+
isLLMConnected(): boolean;
|
|
2341
|
+
/**
|
|
2342
|
+
* Gets the locus URL from the LLM channel.
|
|
2343
|
+
* Handles practice session context automatically - returns practice session
|
|
2344
|
+
* LLM channel's locus URL when in practice session, main LLM channel's locus URL otherwise.
|
|
2345
|
+
* @returns {string | undefined} The locus URL or undefined
|
|
2346
|
+
*/
|
|
2347
|
+
getLLMLocusUrl(): string | undefined;
|
|
2311
2348
|
/**
|
|
2312
2349
|
* Determines the current data channel token type based on the meeting state.
|
|
2313
2350
|
*
|
|
@@ -49,7 +49,9 @@ declare const MeetingUtil: {
|
|
|
49
49
|
*/
|
|
50
50
|
getCaEventLabelsForIpVersion(webex: any): Array<string> | undefined;
|
|
51
51
|
joinMeeting: (meeting: any, options: any) => Promise<any>;
|
|
52
|
-
cleanUp: (meeting: any
|
|
52
|
+
cleanUp: (meeting: any, { preserveVoiceaChannel }?: {
|
|
53
|
+
preserveVoiceaChannel?: boolean;
|
|
54
|
+
}) => any;
|
|
53
55
|
disconnectPhoneAudio: (meeting: any, phoneUrl: any) => any;
|
|
54
56
|
/**
|
|
55
57
|
* Returns options for leaving a meeting.
|
|
@@ -252,5 +252,6 @@ export default class MeetingInfoV2 {
|
|
|
252
252
|
}, installedOrgID?: any, locusId?: any, extraParams?: object, options?: {
|
|
253
253
|
meetingId?: string;
|
|
254
254
|
sendCAevents?: boolean;
|
|
255
|
+
correlationId?: string;
|
|
255
256
|
}, registrationId?: string, fullSiteUrl?: string, classificationId?: string): Promise<any>;
|
|
256
257
|
}
|