@webex/plugin-meetings 3.10.0-next.7 → 3.10.0-next.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/annotation/annotation.types.js.map +1 -1
- package/dist/annotation/constants.js.map +1 -1
- package/dist/annotation/index.js +19 -22
- package/dist/annotation/index.js.map +1 -1
- package/dist/breakouts/breakout.js +6 -6
- package/dist/breakouts/breakout.js.map +1 -1
- package/dist/breakouts/collection.js.map +1 -1
- package/dist/breakouts/edit-lock-error.js +9 -11
- package/dist/breakouts/edit-lock-error.js.map +1 -1
- package/dist/breakouts/events.js.map +1 -1
- package/dist/breakouts/index.js +126 -127
- package/dist/breakouts/index.js.map +1 -1
- package/dist/breakouts/request.js +6 -8
- package/dist/breakouts/request.js.map +1 -1
- package/dist/breakouts/utils.js.map +1 -1
- package/dist/common/browser-detection.js.map +1 -1
- package/dist/common/collection.js +1 -2
- package/dist/common/collection.js.map +1 -1
- package/dist/common/config.js.map +1 -1
- package/dist/common/errors/captcha-error.js +9 -11
- package/dist/common/errors/captcha-error.js.map +1 -1
- package/dist/common/errors/intent-to-join.js +10 -12
- package/dist/common/errors/intent-to-join.js.map +1 -1
- package/dist/common/errors/join-forbidden-error.js +10 -12
- package/dist/common/errors/join-forbidden-error.js.map +1 -1
- package/dist/common/errors/join-meeting.js +10 -12
- package/dist/common/errors/join-meeting.js.map +1 -1
- package/dist/common/errors/join-webinar-error.js +9 -11
- package/dist/common/errors/join-webinar-error.js.map +1 -1
- package/dist/common/errors/media.js +9 -11
- package/dist/common/errors/media.js.map +1 -1
- package/dist/common/errors/multistream-not-supported-error.js +9 -11
- package/dist/common/errors/multistream-not-supported-error.js.map +1 -1
- package/dist/common/errors/no-meeting-info.js +9 -11
- package/dist/common/errors/no-meeting-info.js.map +1 -1
- package/dist/common/errors/parameter.js +11 -14
- package/dist/common/errors/parameter.js.map +1 -1
- package/dist/common/errors/password-error.js +9 -11
- package/dist/common/errors/password-error.js.map +1 -1
- package/dist/common/errors/permission.js +9 -11
- package/dist/common/errors/permission.js.map +1 -1
- package/dist/common/errors/reclaim-host-role-errors.js +32 -38
- package/dist/common/errors/reclaim-host-role-errors.js.map +1 -1
- package/dist/common/errors/reconnection-not-started.js +5 -6
- package/dist/common/errors/reconnection-not-started.js.map +1 -1
- package/dist/common/errors/reconnection.js +9 -11
- package/dist/common/errors/reconnection.js.map +1 -1
- package/dist/common/errors/stats.js +9 -11
- package/dist/common/errors/stats.js.map +1 -1
- package/dist/common/errors/webex-errors.js +20 -29
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/common/errors/webex-meetings-error.js +9 -12
- package/dist/common/errors/webex-meetings-error.js.map +1 -1
- package/dist/common/events/events-scope.js +9 -10
- package/dist/common/events/events-scope.js.map +1 -1
- package/dist/common/events/events.js +9 -10
- package/dist/common/events/events.js.map +1 -1
- package/dist/common/events/trigger-proxy.js.map +1 -1
- package/dist/common/events/util.js.map +1 -1
- package/dist/common/logs/logger-config.js.map +1 -1
- package/dist/common/logs/logger-proxy.js.map +1 -1
- package/dist/common/logs/request.js +17 -17
- package/dist/common/logs/request.js.map +1 -1
- package/dist/common/queue.js +1 -2
- package/dist/common/queue.js.map +1 -1
- package/dist/config.js +0 -1
- package/dist/config.js.map +1 -1
- package/dist/constants.js +0 -5
- package/dist/constants.js.map +1 -1
- package/dist/controls-options-manager/constants.js.map +1 -1
- package/dist/controls-options-manager/enums.js.map +1 -1
- package/dist/controls-options-manager/index.js +1 -2
- package/dist/controls-options-manager/index.js.map +1 -1
- package/dist/controls-options-manager/types.js.map +1 -1
- package/dist/controls-options-manager/util.js +1 -2
- package/dist/controls-options-manager/util.js.map +1 -1
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -1
- package/dist/interceptors/index.js.map +1 -1
- package/dist/interceptors/locusRetry.js +6 -8
- package/dist/interceptors/locusRetry.js.map +1 -1
- package/dist/interceptors/locusRouteToken.js +6 -8
- package/dist/interceptors/locusRouteToken.js.map +1 -1
- package/dist/interpretation/collection.js.map +1 -1
- package/dist/interpretation/index.js +1 -2
- package/dist/interpretation/index.js.map +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/interpretation/siLanguage.js.map +1 -1
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/embeddedAppsUtils.js.map +1 -1
- package/dist/locus-info/fullState.js.map +1 -1
- package/dist/locus-info/hostUtils.js.map +1 -1
- package/dist/locus-info/index.js +40 -46
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/infoUtils.js.map +1 -1
- package/dist/locus-info/mediaSharesUtils.js.map +1 -1
- package/dist/locus-info/parser.js +3 -4
- package/dist/locus-info/parser.js.map +1 -1
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/media/MediaConnectionAwaiter.js +1 -2
- package/dist/media/MediaConnectionAwaiter.js.map +1 -1
- package/dist/media/index.js +0 -2
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +15 -17
- package/dist/media/properties.js.map +1 -1
- package/dist/media/util.js.map +1 -1
- package/dist/meeting/brbState.js +8 -9
- package/dist/meeting/brbState.js.map +1 -1
- package/dist/meeting/connectionStateHandler.js +10 -13
- package/dist/meeting/connectionStateHandler.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +1514 -1512
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/locusMediaRequest.js +13 -17
- package/dist/meeting/locusMediaRequest.js.map +1 -1
- package/dist/meeting/muteState.js +11 -12
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +101 -104
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/request.type.js.map +1 -1
- package/dist/meeting/state.js.map +1 -1
- package/dist/meeting/type.js.map +1 -1
- package/dist/meeting/util.js +23 -23
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting/voicea-meeting.js +3 -3
- package/dist/meeting/voicea-meeting.js.map +1 -1
- package/dist/meeting-info/collection.js +7 -10
- package/dist/meeting-info/collection.js.map +1 -1
- package/dist/meeting-info/index.js +1 -2
- package/dist/meeting-info/index.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +135 -146
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meeting-info/request.js +1 -2
- package/dist/meeting-info/request.js.map +1 -1
- package/dist/meeting-info/util.js +36 -37
- package/dist/meeting-info/util.js.map +1 -1
- package/dist/meeting-info/utilv2.js +30 -31
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/collection.js +6 -8
- package/dist/meetings/collection.js.map +1 -1
- package/dist/meetings/index.js +89 -93
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/meetings.types.js.map +1 -1
- package/dist/meetings/request.js +6 -8
- package/dist/meetings/request.js.map +1 -1
- package/dist/meetings/util.js +25 -23
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +1 -2
- package/dist/member/index.js.map +1 -1
- package/dist/member/types.js +6 -3
- package/dist/member/types.js.map +1 -1
- package/dist/member/util.js.map +1 -1
- package/dist/members/collection.js +1 -2
- package/dist/members/collection.js.map +1 -1
- package/dist/members/index.js +18 -21
- package/dist/members/index.js.map +1 -1
- package/dist/members/request.js +8 -11
- package/dist/members/request.js.map +1 -1
- package/dist/members/types.js.map +1 -1
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/constants.js.map +1 -1
- package/dist/metrics/index.js +3 -4
- package/dist/metrics/index.js.map +1 -1
- package/dist/multistream/mediaRequestManager.js +1 -2
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/receiveSlot.js +34 -45
- package/dist/multistream/receiveSlot.js.map +1 -1
- package/dist/multistream/receiveSlotManager.js +8 -9
- package/dist/multistream/receiveSlotManager.js.map +1 -1
- package/dist/multistream/remoteMedia.js +12 -15
- package/dist/multistream/remoteMedia.js.map +1 -1
- package/dist/multistream/remoteMediaGroup.js +1 -2
- package/dist/multistream/remoteMediaGroup.js.map +1 -1
- package/dist/multistream/remoteMediaManager.js +122 -123
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- package/dist/multistream/sendSlotManager.js +29 -30
- package/dist/multistream/sendSlotManager.js.map +1 -1
- package/dist/personal-meeting-room/index.js +16 -19
- package/dist/personal-meeting-room/index.js.map +1 -1
- package/dist/personal-meeting-room/request.js +7 -10
- package/dist/personal-meeting-room/request.js.map +1 -1
- package/dist/personal-meeting-room/util.js.map +1 -1
- package/dist/reachability/clusterReachability.js +36 -39
- package/dist/reachability/clusterReachability.js.map +1 -1
- package/dist/reachability/index.js +203 -205
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/reachability.types.js.map +1 -1
- package/dist/reachability/request.js.map +1 -1
- package/dist/reachability/util.js.map +1 -1
- package/dist/reactions/constants.js.map +1 -1
- package/dist/reactions/reactions.js.map +1 -1
- package/dist/reactions/reactions.type.js.map +1 -1
- package/dist/reconnection-manager/index.js +178 -176
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/recording-controller/enums.js.map +1 -1
- package/dist/recording-controller/index.js +1 -2
- package/dist/recording-controller/index.js.map +1 -1
- package/dist/recording-controller/util.js.map +1 -1
- package/dist/roap/index.js +12 -15
- package/dist/roap/index.js.map +1 -1
- package/dist/roap/request.js +24 -26
- package/dist/roap/request.js.map +1 -1
- package/dist/roap/turnDiscovery.js +75 -76
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/roap/types.js.map +1 -1
- package/dist/transcription/index.js +4 -5
- package/dist/transcription/index.js.map +1 -1
- package/dist/webinar/collection.js +1 -2
- package/dist/webinar/collection.js.map +1 -1
- package/dist/webinar/index.js +148 -158
- package/dist/webinar/index.js.map +1 -1
- package/package.json +13 -13
|
@@ -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","_callee$","_context","prev","next","publishStream","label","muted","stop","_x","_x2","apply","_unpublishStream","_callee2","_callee2$","_context2","unpublishStream","_x3","setActive","_setCodecParameters","_callee3","codecParameters","_callee3$","_context3","setCodecParameters","_x4","_x5","_deleteCodecParameters","_callee4","parameters","_callee4$","_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,IAAAI,aAAA,CAAAL,OAAA,EAAAF,eAAA;IAAAQ,GAAA;IAAAC,KAAA,EAOA,SAAAC,WACEC,eAA+C,EAC/CC,SAAoB,EAEV;MAAA,IADVC,MAAM,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,IAAI;MAEb,IAAI,IAAI,CAACG,KAAK,CAACC,GAAG,CAACN,SAAS,CAAC,EAAE;QAC7B,MAAM,IAAIO,KAAK,aAAAC,MAAA,CAAaR,SAAS,oBAAiB,CAAC;MACzD;MAEA,IAAMS,IAAc,GAAGV,eAAe,CAACW,cAAc,CAACV,SAAS,EAAEC,MAAM,CAAC;MAExE,IAAI,CAACI,KAAK,CAACM,GAAG,CAACX,SAAS,EAAES,IAAI,CAAC;MAE/B,IAAI,CAAClB,WAAW,CAACqB,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AI,GAAG,IAAI,CAACJ,KAAK,CAACU,GAAG,CAACf,SAAS,CAAC;cAAA,IAEjCS,IAAI;gBAAAwD,SAAA,CAAA3B,IAAA;gBAAA;cAAA;cAAA,MACD,IAAI/B,KAAK,aAAAC,MAAA,CAAaR,SAAS,oBAAiB,CAAC;YAAA;cAAAiE,SAAA,CAAA3B,IAAA;cAAA,OAGnD7B,IAAI,CAACyD,qBAAqB,CAACH,UAAU,CAAC;YAAA;cAE5C,IAAI,CAACxE,WAAW,CAACqB,MAAM,CAACC,IAAI,sFAAAL,MAAA,CAC2DuD,UAAU,WAAAvD,MAAA,CAAQR,SAAS,CAClH,CAAC;YAAC;YAAA;cAAA,OAAAiE,SAAA,CAAAvB,IAAA;UAAA;QAAA,GAAAoB,QAAA;MAAA,CACH;MAAA,SAAAI,sBAAAC,GAAA,EAAAC,GAAA;QAAA,OAAAP,sBAAA,CAAAhB,KAAA,OAAA3C,SAAA;MAAA;MAAA,OAAAgE,qBAAA;IAAA;IAED;AACF;AACA;AACA;IAHE;EAAA;IAAAtE,GAAA;IAAAC,KAAA,EAIA,SAAAwE,MAAA,EAAqB;MACnB,IAAI,CAAChE,KAAK,CAACiE,KAAK,CAAC,CAAC;IACpB;EAAC;EAAA,OAAAlF,eAAA;AAAA"}
|
|
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;EA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YAAA;cAE5C,IAAI,CAACrE,WAAW,CAACqB,MAAM,CAACC,IAAI,sFAAAL,MAAA,CAC2DoD,UAAU,WAAApD,MAAA,CAAQR,SAAS,CAClH,CAAC;YAAC;YAAA;cAAA,OAAA6D,SAAA,CAAApB,IAAA;UAAA;QAAA,GAAAkB,QAAA;MAAA,CACH;MAAA,SAZYG,qBAAqBA,CAAAC,GAAA,EAAAC,GAAA;QAAA,OAAAN,sBAAA,CAAAd,KAAA,OAAA1C,SAAA;MAAA;MAAA,OAArB4D,qBAAqB;IAAA;IAclC;AACF;AACA;AACA;IAHE;EAAA;IAAAlE,GAAA;IAAAC,KAAA,EAIA,SAAOoE,KAAKA,CAAA,EAAS;MACnB,IAAI,CAAC5D,KAAK,CAAC6D,KAAK,CAAC,CAAC;IACpB;EAAC;AAAA","ignoreList":[]}
|
|
@@ -10,23 +10,20 @@ exports.default = void 0;
|
|
|
10
10
|
var _promise = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/promise"));
|
|
11
11
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/classCallCheck"));
|
|
12
12
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/createClass"));
|
|
13
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/assertThisInitialized"));
|
|
14
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/inherits"));
|
|
15
13
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/possibleConstructorReturn"));
|
|
16
14
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/getPrototypeOf"));
|
|
15
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/inherits"));
|
|
17
16
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
|
|
18
17
|
var _webexCore = require("@webex/webex-core");
|
|
19
18
|
var _constants = require("../constants");
|
|
20
19
|
var _parameter = _interopRequireDefault(require("../common/errors/parameter"));
|
|
21
20
|
var _request = _interopRequireDefault(require("./request"));
|
|
22
|
-
function
|
|
23
|
-
function _isNativeReflectConstruct() {
|
|
21
|
+
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
22
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } // @ts-ignore
|
|
24
23
|
/**
|
|
25
24
|
* @class PersonalMeetingRoom
|
|
26
25
|
*/
|
|
27
26
|
var PersonalMeetingRoom = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
28
|
-
(0, _inherits2.default)(PersonalMeetingRoom, _StatelessWebexPlugin);
|
|
29
|
-
var _super = _createSuper(PersonalMeetingRoom);
|
|
30
27
|
/**
|
|
31
28
|
*
|
|
32
29
|
* @param {Object} attrs
|
|
@@ -35,7 +32,7 @@ var PersonalMeetingRoom = exports.default = /*#__PURE__*/function (_StatelessWeb
|
|
|
35
32
|
function PersonalMeetingRoom(attrs, options) {
|
|
36
33
|
var _this;
|
|
37
34
|
(0, _classCallCheck2.default)(this, PersonalMeetingRoom);
|
|
38
|
-
_this =
|
|
35
|
+
_this = _callSuper(this, PersonalMeetingRoom, [{}, options]);
|
|
39
36
|
/**
|
|
40
37
|
* The pmr server object
|
|
41
38
|
* @instance
|
|
@@ -43,16 +40,16 @@ var PersonalMeetingRoom = exports.default = /*#__PURE__*/function (_StatelessWeb
|
|
|
43
40
|
* @public
|
|
44
41
|
* @memberof PersonalMeetingRoom
|
|
45
42
|
*/
|
|
46
|
-
(0, _defineProperty2.default)(
|
|
47
|
-
(0, _defineProperty2.default)(
|
|
48
|
-
(0, _defineProperty2.default)(
|
|
49
|
-
(0, _defineProperty2.default)(
|
|
50
|
-
(0, _defineProperty2.default)(
|
|
51
|
-
(0, _defineProperty2.default)(
|
|
52
|
-
(0, _defineProperty2.default)(
|
|
53
|
-
(0, _defineProperty2.default)(
|
|
54
|
-
(0, _defineProperty2.default)(
|
|
55
|
-
(0, _defineProperty2.default)(
|
|
43
|
+
(0, _defineProperty2.default)(_this, "link", void 0);
|
|
44
|
+
(0, _defineProperty2.default)(_this, "meetingInfo", void 0);
|
|
45
|
+
(0, _defineProperty2.default)(_this, "name", void 0);
|
|
46
|
+
(0, _defineProperty2.default)(_this, "personalMeetingRoomRequest", void 0);
|
|
47
|
+
(0, _defineProperty2.default)(_this, "pmr", void 0);
|
|
48
|
+
(0, _defineProperty2.default)(_this, "sipUri", void 0);
|
|
49
|
+
(0, _defineProperty2.default)(_this, "userId", void 0);
|
|
50
|
+
(0, _defineProperty2.default)(_this, "meetingLink", void 0);
|
|
51
|
+
(0, _defineProperty2.default)(_this, "number", void 0);
|
|
52
|
+
(0, _defineProperty2.default)(_this, "namespace", _constants.MEETINGS);
|
|
56
53
|
_this.pmr = null;
|
|
57
54
|
/**
|
|
58
55
|
* The pmr sip Uri
|
|
@@ -115,7 +112,8 @@ var PersonalMeetingRoom = exports.default = /*#__PURE__*/function (_StatelessWeb
|
|
|
115
112
|
* @public
|
|
116
113
|
* @memberof PersonalMeetingRoom
|
|
117
114
|
*/
|
|
118
|
-
(0,
|
|
115
|
+
(0, _inherits2.default)(PersonalMeetingRoom, _StatelessWebexPlugin);
|
|
116
|
+
return (0, _createClass2.default)(PersonalMeetingRoom, [{
|
|
119
117
|
key: "claim",
|
|
120
118
|
value: function claim(link, pin) {
|
|
121
119
|
var _this2 = this;
|
|
@@ -178,6 +176,5 @@ var PersonalMeetingRoom = exports.default = /*#__PURE__*/function (_StatelessWeb
|
|
|
178
176
|
});
|
|
179
177
|
}
|
|
180
178
|
}]);
|
|
181
|
-
return PersonalMeetingRoom;
|
|
182
179
|
}(_webexCore.StatelessWebexPlugin);
|
|
183
180
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_webexCore","require","_constants","_parameter","_interopRequireDefault","_request","
|
|
1
|
+
{"version":3,"names":["_webexCore","require","_constants","_parameter","_interopRequireDefault","_request","_callSuper","t","o","e","_getPrototypeOf2","default","_possibleConstructorReturn2","_isNativeReflectConstruct","_Reflect$construct","constructor","apply","Boolean","prototype","valueOf","call","PersonalMeetingRoom","exports","_StatelessWebexPlugin","attrs","options","_this","_classCallCheck2","_defineProperty2","MEETINGS","pmr","sipUri","link","userId","name","meetingInfo","personalMeetingRoomRequest","PersonalMeetingRoomRequest","_inherits2","_createClass2","key","value","claim","pin","_this2","preferred","arguments","length","undefined","webex","internal","device","passcode","meetingAddress","claimPmr","then","body","set","_promise","reject","ParameterError","sipMeetingUri","meetingLink","webExMeetingLink","owner","meetingName","number","meetingNumber","get","_this3","type","DESTINATION_TYPE","PERSONAL_ROOM","fetchMeetingInfo","isPmr","TypeError","StatelessWebexPlugin"],"sources":["index.ts"],"sourcesContent":["// @ts-ignore\nimport {StatelessWebexPlugin} from '@webex/webex-core';\n\nimport {MEETINGS, DESTINATION_TYPE} from '../constants';\nimport ParameterError from '../common/errors/parameter';\n\nimport PersonalMeetingRoomRequest from './request';\n\n/**\n * @class PersonalMeetingRoom\n */\nexport default class PersonalMeetingRoom extends StatelessWebexPlugin {\n link: any;\n meetingInfo: any;\n name: any;\n personalMeetingRoomRequest: any;\n pmr: any;\n sipUri: any;\n userId: any;\n meetingLink: any;\n number: any;\n\n namespace = MEETINGS;\n\n /**\n *\n * @param {Object} attrs\n * @param {Object} options\n */\n constructor(attrs: any, options: any) {\n super({}, options);\n /**\n * The pmr server object\n * @instance\n * @type {Object}\n * @public\n * @memberof PersonalMeetingRoom\n */\n this.pmr = null;\n /**\n * The pmr sip Uri\n * @instance\n * @type {String}\n * @public\n * @memberof PersonalMeetingRoom\n */\n this.sipUri = null;\n /**\n * The pmr link\n * @instance\n * @type {String}\n * @public\n * @memberof PersonalMeetingRoom\n */\n this.link = null;\n /**\n * The pmr server object\n * @instance\n * @type {Object}\n * @public\n * @memberof PersonalMeetingRoom\n */\n this.userId = null;\n /**\n * The pmr name\n * @instance\n * @type {String}\n * @public\n * @memberof PersonalMeetingRoom\n */\n this.name = null;\n /**\n * The meeting info request server interface\n * @instance\n * @type {MeetingInfo}\n * @private\n * @memberof PersonalMeetingRoom\n */\n this.meetingInfo = attrs.meetingInfo;\n /**\n * The pmr server request interface\n * @instance\n * @type {Object}\n * @private\n * @memberof PersonalMeetingRoom\n */\n // @ts-ignore\n this.personalMeetingRoomRequest = new PersonalMeetingRoomRequest({}, options);\n }\n\n /**\n * claims a pmr and updates the cached PMR values\n * @param {String} link\n * @param {String} pin\n * @param {Boolean} [preferred] defaults to true to set this claimed PMR as the preferred\n * @returns {Promise}\n * @public\n * @memberof PersonalMeetingRoom\n */\n public claim(link: string, pin: string, preferred = true) {\n const options = {\n // @ts-ignore\n userId: this.webex.internal.device.userId,\n passcode: pin,\n meetingAddress: link,\n preferred,\n };\n\n return this.personalMeetingRoomRequest.claimPmr(options).then((pmr) => {\n if (pmr && pmr.body) {\n this.set(pmr.body);\n } else {\n return Promise.reject(new ParameterError('No PMR body provided. PMR values not updated.'));\n }\n\n return pmr.body;\n });\n }\n\n /**\n * @param {Object} body the response body from meeting info request\n * @returns {undefined}\n * @private\n * @memberof PersonalMeetingRoom\n */\n private set(body: any) {\n this.pmr = body;\n this.sipUri = body.sipMeetingUri;\n this.meetingLink = body.webExMeetingLink || body.meetingLink;\n this.userId = body.owner;\n this.name = body.meetingName;\n this.number = body.meetingNumber;\n }\n\n /**\n * TODO: implement TTL for syncing and caching so to not request again and again\n * @param {Object} options\n * @returns {Promise}\n * @public\n * @memberof PersonalMeetingRoom\n */\n public get() {\n const options = {\n type: DESTINATION_TYPE.PERSONAL_ROOM,\n };\n\n return this.meetingInfo.fetchMeetingInfo(options).then((pmr) => {\n if (pmr && pmr.body && pmr.body.isPmr) {\n this.set(pmr.body);\n } else {\n return Promise.reject(new TypeError('The PMR requested is NOT a PMR. PMR values not set.'));\n }\n\n return pmr.body;\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AACA,IAAAA,UAAA,GAAAC,OAAA;AAEA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAC,sBAAA,CAAAH,OAAA;AAEA,IAAAI,QAAA,GAAAD,sBAAA,CAAAH,OAAA;AAAmD,SAAAK,WAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,WAAAD,CAAA,OAAAE,gBAAA,CAAAC,OAAA,EAAAH,CAAA,OAAAI,2BAAA,CAAAD,OAAA,EAAAJ,CAAA,EAAAM,yBAAA,KAAAC,kBAAA,CAAAN,CAAA,EAAAC,CAAA,YAAAC,gBAAA,CAAAC,OAAA,EAAAJ,CAAA,EAAAQ,WAAA,IAAAP,CAAA,CAAAQ,KAAA,CAAAT,CAAA,EAAAE,CAAA;AAAA,SAAAI,0BAAA,cAAAN,CAAA,IAAAU,OAAA,CAAAC,SAAA,CAAAC,OAAA,CAAAC,IAAA,CAAAN,kBAAA,CAAAG,OAAA,iCAAAV,CAAA,aAAAM,yBAAA,YAAAA,0BAAA,aAAAN,CAAA,UANnD;AAQA;AACA;AACA;AAFA,IAGqBc,mBAAmB,GAAAC,OAAA,CAAAX,OAAA,0BAAAY,qBAAA;EAatC;AACF;AACA;AACA;AACA;EACE,SAAAF,oBAAYG,KAAU,EAAEC,OAAY,EAAE;IAAA,IAAAC,KAAA;IAAA,IAAAC,gBAAA,CAAAhB,OAAA,QAAAU,mBAAA;IACpCK,KAAA,GAAApB,UAAA,OAAAe,mBAAA,GAAM,CAAC,CAAC,EAAEI,OAAO;IACjB;AACJ;AACA;AACA;AACA;AACA;AACA;IANI,IAAAG,gBAAA,CAAAjB,OAAA,EAAAe,KAAA;IAAA,IAAAE,gBAAA,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B,GAAGA,CAAA,EAAG;MAAA,IAAAC,MAAA;MACX,IAAM5C,OAAO,GAAG;QACd6C,IAAI,EAAEC,2BAAgB,CAACC;MACzB,CAAC;MAED,OAAO,IAAI,CAACrC,WAAW,CAACsC,gBAAgB,CAAChD,OAAO,CAAC,CAAC8B,IAAI,CAAC,UAACzB,GAAG,EAAK;QAC9D,IAAIA,GAAG,IAAIA,GAAG,CAAC0B,IAAI,IAAI1B,GAAG,CAAC0B,IAAI,CAACkB,KAAK,EAAE;UACrCL,MAAI,CAACZ,GAAG,CAAC3B,GAAG,CAAC0B,IAAI,CAAC;QACpB,CAAC,MAAM;UACL,OAAOE,QAAA,CAAA/C,OAAA,CAAQgD,MAAM,CAAC,IAAIgB,SAAS,CAAC,qDAAqD,CAAC,CAAC;QAC7F;QAEA,OAAO7C,GAAG,CAAC0B,IAAI;MACjB,CAAC,CAAC;IACJ;EAAC;AAAA,EAhJ8CoB,+BAAoB","ignoreList":[]}
|
|
@@ -10,34 +10,32 @@ exports.default = void 0;
|
|
|
10
10
|
var _promise = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/promise"));
|
|
11
11
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/classCallCheck"));
|
|
12
12
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/createClass"));
|
|
13
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/assertThisInitialized"));
|
|
14
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/inherits"));
|
|
15
13
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/possibleConstructorReturn"));
|
|
16
14
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/getPrototypeOf"));
|
|
15
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/inherits"));
|
|
17
16
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
|
|
18
17
|
var _webexCore = require("@webex/webex-core");
|
|
19
18
|
var _constants = require("../constants");
|
|
20
19
|
var _parameter = _interopRequireDefault(require("../common/errors/parameter"));
|
|
21
20
|
var _util = _interopRequireDefault(require("./util"));
|
|
22
|
-
function
|
|
23
|
-
function _isNativeReflectConstruct() {
|
|
21
|
+
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
22
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } // @ts-ignore
|
|
24
23
|
/**
|
|
25
24
|
* @class MeetingInfoRequest
|
|
26
25
|
*/
|
|
27
26
|
var PersonalMeetingRoomRequest = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
28
|
-
(0, _inherits2.default)(PersonalMeetingRoomRequest, _StatelessWebexPlugin);
|
|
29
|
-
var _super = _createSuper(PersonalMeetingRoomRequest);
|
|
30
27
|
function PersonalMeetingRoomRequest() {
|
|
31
28
|
var _this;
|
|
32
29
|
(0, _classCallCheck2.default)(this, PersonalMeetingRoomRequest);
|
|
33
30
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
34
31
|
args[_key] = arguments[_key];
|
|
35
32
|
}
|
|
36
|
-
_this =
|
|
37
|
-
(0, _defineProperty2.default)(
|
|
33
|
+
_this = _callSuper(this, PersonalMeetingRoomRequest, [].concat(args));
|
|
34
|
+
(0, _defineProperty2.default)(_this, "namespace", _constants.MEETINGS);
|
|
38
35
|
return _this;
|
|
39
36
|
}
|
|
40
|
-
(0,
|
|
37
|
+
(0, _inherits2.default)(PersonalMeetingRoomRequest, _StatelessWebexPlugin);
|
|
38
|
+
return (0, _createClass2.default)(PersonalMeetingRoomRequest, [{
|
|
41
39
|
key: "claimPmr",
|
|
42
40
|
value:
|
|
43
41
|
/**
|
|
@@ -64,6 +62,5 @@ var PersonalMeetingRoomRequest = exports.default = /*#__PURE__*/function (_State
|
|
|
64
62
|
return this.request(request);
|
|
65
63
|
}
|
|
66
64
|
}]);
|
|
67
|
-
return PersonalMeetingRoomRequest;
|
|
68
65
|
}(_webexCore.StatelessWebexPlugin);
|
|
69
66
|
//# sourceMappingURL=request.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_webexCore","require","_constants","_parameter","_interopRequireDefault","_util","
|
|
1
|
+
{"version":3,"names":["_webexCore","require","_constants","_parameter","_interopRequireDefault","_util","_callSuper","t","o","e","_getPrototypeOf2","default","_possibleConstructorReturn2","_isNativeReflectConstruct","_Reflect$construct","constructor","apply","Boolean","prototype","valueOf","call","PersonalMeetingRoomRequest","exports","_StatelessWebexPlugin","_this","_classCallCheck2","_len","arguments","length","args","Array","_key","concat","_defineProperty2","MEETINGS","_inherits2","_createClass2","key","value","claimPmr","options","userId","passcode","meetingAddress","preferred","ParameterError","validPin","PersonalMeetingRoomUtil","getClaimPmrPin","_promise","reject","validLink","getClaimPmrLink","request","getClaimedRequestParams","StatelessWebexPlugin"],"sources":["request.ts"],"sourcesContent":["// @ts-ignore\nimport {StatelessWebexPlugin} from '@webex/webex-core';\n\nimport {MEETINGS} from '../constants';\nimport ParameterError from '../common/errors/parameter';\n\nimport PersonalMeetingRoomUtil from './util';\n\n/**\n * @class MeetingInfoRequest\n */\nexport default class PersonalMeetingRoomRequest extends StatelessWebexPlugin {\n namespace = MEETINGS;\n\n /**\n *\n * @param {Object} options with format of {userId, passcode, meetingAddress, preferred}\n * @returns {Promise} returns a promise that resolves/rejects the result of the request\n * @memberof PersonalMeetingRoomRequest\n */\n claimPmr(options: any) {\n if (\n !options ||\n !options.userId ||\n !options.passcode ||\n !options.meetingAddress ||\n !options.preferred\n ) {\n throw new ParameterError(\n 'Claiming a PMR should be done with userId, passcode, preferred, and meetingAddress in options.'\n );\n }\n const validPin = PersonalMeetingRoomUtil.getClaimPmrPin(options.passcode);\n\n if (!validPin) {\n return Promise.reject(new ParameterError('The host pin provided was of an invalid format'));\n }\n const validLink = PersonalMeetingRoomUtil.getClaimPmrLink(options.meetingAddress);\n\n if (!validLink) {\n return Promise.reject(new ParameterError('The PMR link provided was of an invalid format'));\n }\n const request = PersonalMeetingRoomUtil.getClaimedRequestParams(validLink, validPin, options);\n\n // @ts-ignore\n return this.request(request);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AACA,IAAAA,UAAA,GAAAC,OAAA;AAEA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAC,sBAAA,CAAAH,OAAA;AAEA,IAAAI,KAAA,GAAAD,sBAAA,CAAAH,OAAA;AAA6C,SAAAK,WAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,WAAAD,CAAA,OAAAE,gBAAA,CAAAC,OAAA,EAAAH,CAAA,OAAAI,2BAAA,CAAAD,OAAA,EAAAJ,CAAA,EAAAM,yBAAA,KAAAC,kBAAA,CAAAN,CAAA,EAAAC,CAAA,YAAAC,gBAAA,CAAAC,OAAA,EAAAJ,CAAA,EAAAQ,WAAA,IAAAP,CAAA,CAAAQ,KAAA,CAAAT,CAAA,EAAAE,CAAA;AAAA,SAAAI,0BAAA,cAAAN,CAAA,IAAAU,OAAA,CAAAC,SAAA,CAAAC,OAAA,CAAAC,IAAA,CAAAN,kBAAA,CAAAG,OAAA,iCAAAV,CAAA,aAAAM,yBAAA,YAAAA,0BAAA,aAAAN,CAAA,UAN7C;AAQA;AACA;AACA;AAFA,IAGqBc,0BAA0B,GAAAC,OAAA,CAAAX,OAAA,0BAAAY,qBAAA;EAAA,SAAAF,2BAAA;IAAA,IAAAG,KAAA;IAAA,IAAAC,gBAAA,CAAAd,OAAA,QAAAU,0BAAA;IAAA,SAAAK,IA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,QAAQ,EAAEN,OAAO,CAAC;;MAE7F;MACA,OAAO,IAAI,CAACa,OAAO,CAACA,OAAO,CAAC;IAC9B;EAAC;AAAA,EAnCqDE,+BAAoB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_constants","require","PersonalMeetingRoomUtil","getClaimPmrLink","pmrLink","validator","VALID_PMR_ADDRESS","test","match","VALID_PMR_LINK","concat","WEBEX_DOT_COM","getClaimPmrPin","hostPin","VALID_PIN","getClaimedRequestParams","link","pin","options","method","HTTP_VERBS","POST","api","HECATE","resource","CMR_MEETINGS","CLAIM","body","userId","passcode","preferred","meetingAddress","_default","exports","default"],"sources":["util.ts"],"sourcesContent":["import {\n HTTP_VERBS,\n VALID_PIN,\n VALID_PMR_ADDRESS,\n VALID_PMR_LINK,\n CMR_MEETINGS,\n CLAIM,\n HECATE,\n WEBEX_DOT_COM,\n} from '../constants';\n\nconst PersonalMeetingRoomUtil: any = {};\n\nPersonalMeetingRoomUtil.getClaimPmrLink = (pmrLink) => {\n let validator = VALID_PMR_ADDRESS.test(pmrLink);\n\n if (validator) {\n return pmrLink;\n }\n validator = pmrLink.match(VALID_PMR_LINK);\n if (validator) {\n // userId + '@' + site + '.webex.com'\n return `${validator[4]}@${validator[2]}.${WEBEX_DOT_COM}`;\n }\n\n return null;\n};\n\nPersonalMeetingRoomUtil.getClaimPmrPin = (hostPin) => {\n if (VALID_PIN.test(hostPin)) {\n return hostPin;\n }\n\n return null;\n};\n\nPersonalMeetingRoomUtil.getClaimedRequestParams = (link, pin, options) => ({\n method: HTTP_VERBS.POST,\n api: HECATE,\n resource: `/${CMR_MEETINGS}/${CLAIM}`,\n body: {\n userId: options.userId,\n passcode: pin,\n preferred: options.preferred,\n meetingAddress: link,\n },\n});\n\nexport default PersonalMeetingRoomUtil;\n"],"mappings":";;;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAWA,IAAMC,uBAA4B,GAAG,CAAC,CAAC;AAEvCA,uBAAuB,CAACC,eAAe,GAAG,UAACC,OAAO,EAAK;EACrD,IAAIC,SAAS,GAAGC,4BAAiB,CAACC,IAAI,CAACH,OAAO,CAAC;EAE/C,IAAIC,SAAS,EAAE;IACb,OAAOD,OAAO;EAChB;EACAC,SAAS,GAAGD,OAAO,CAACI,KAAK,CAACC,yBAAc,CAAC;EACzC,IAAIJ,SAAS,EAAE;IACb;IACA,UAAAK,MAAA,CAAUL,SAAS,CAAC,CAAC,CAAC,OAAAK,MAAA,CAAIL,SAAS,CAAC,CAAC,CAAC,OAAAK,MAAA,CAAIC,wBAAa;EACzD;EAEA,OAAO,IAAI;AACb,CAAC;AAEDT,uBAAuB,CAACU,cAAc,GAAG,UAACC,OAAO,EAAK;EACpD,IAAIC,oBAAS,CAACP,IAAI,CAACM,OAAO,CAAC,EAAE;IAC3B,OAAOA,OAAO;EAChB;EAEA,OAAO,IAAI;AACb,CAAC;AAEDX,uBAAuB,CAACa,uBAAuB,GAAG,UAACC,IAAI,EAAEC,GAAG,EAAEC,OAAO;EAAA,OAAM;IACzEC,MAAM,EAAEC,qBAAU,CAACC,IAAI;IACvBC,GAAG,EAAEC,iBAAM;IACXC,QAAQ,MAAAd,MAAA,CAAMe,uBAAY,OAAAf,MAAA,CAAIgB,gBAAK,CAAE;IACrCC,IAAI,EAAE;MACJC,MAAM,EAAEV,OAAO,CAACU,MAAM;MACtBC,QAAQ,EAAEZ,GAAG;MACba,SAAS,EAAEZ,OAAO,CAACY,SAAS;MAC5BC,cAAc,EAAEf;IAClB;EACF,CAAC;AAAA,CAAC;AAAC,IAAAgB,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEYhC,uBAAuB"}
|
|
1
|
+
{"version":3,"names":["_constants","require","PersonalMeetingRoomUtil","getClaimPmrLink","pmrLink","validator","VALID_PMR_ADDRESS","test","match","VALID_PMR_LINK","concat","WEBEX_DOT_COM","getClaimPmrPin","hostPin","VALID_PIN","getClaimedRequestParams","link","pin","options","method","HTTP_VERBS","POST","api","HECATE","resource","CMR_MEETINGS","CLAIM","body","userId","passcode","preferred","meetingAddress","_default","exports","default"],"sources":["util.ts"],"sourcesContent":["import {\n HTTP_VERBS,\n VALID_PIN,\n VALID_PMR_ADDRESS,\n VALID_PMR_LINK,\n CMR_MEETINGS,\n CLAIM,\n HECATE,\n WEBEX_DOT_COM,\n} from '../constants';\n\nconst PersonalMeetingRoomUtil: any = {};\n\nPersonalMeetingRoomUtil.getClaimPmrLink = (pmrLink) => {\n let validator = VALID_PMR_ADDRESS.test(pmrLink);\n\n if (validator) {\n return pmrLink;\n }\n validator = pmrLink.match(VALID_PMR_LINK);\n if (validator) {\n // userId + '@' + site + '.webex.com'\n return `${validator[4]}@${validator[2]}.${WEBEX_DOT_COM}`;\n }\n\n return null;\n};\n\nPersonalMeetingRoomUtil.getClaimPmrPin = (hostPin) => {\n if (VALID_PIN.test(hostPin)) {\n return hostPin;\n }\n\n return null;\n};\n\nPersonalMeetingRoomUtil.getClaimedRequestParams = (link, pin, options) => ({\n method: HTTP_VERBS.POST,\n api: HECATE,\n resource: `/${CMR_MEETINGS}/${CLAIM}`,\n body: {\n userId: options.userId,\n passcode: pin,\n preferred: options.preferred,\n meetingAddress: link,\n },\n});\n\nexport default PersonalMeetingRoomUtil;\n"],"mappings":";;;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAWA,IAAMC,uBAA4B,GAAG,CAAC,CAAC;AAEvCA,uBAAuB,CAACC,eAAe,GAAG,UAACC,OAAO,EAAK;EACrD,IAAIC,SAAS,GAAGC,4BAAiB,CAACC,IAAI,CAACH,OAAO,CAAC;EAE/C,IAAIC,SAAS,EAAE;IACb,OAAOD,OAAO;EAChB;EACAC,SAAS,GAAGD,OAAO,CAACI,KAAK,CAACC,yBAAc,CAAC;EACzC,IAAIJ,SAAS,EAAE;IACb;IACA,UAAAK,MAAA,CAAUL,SAAS,CAAC,CAAC,CAAC,OAAAK,MAAA,CAAIL,SAAS,CAAC,CAAC,CAAC,OAAAK,MAAA,CAAIC,wBAAa;EACzD;EAEA,OAAO,IAAI;AACb,CAAC;AAEDT,uBAAuB,CAACU,cAAc,GAAG,UAACC,OAAO,EAAK;EACpD,IAAIC,oBAAS,CAACP,IAAI,CAACM,OAAO,CAAC,EAAE;IAC3B,OAAOA,OAAO;EAChB;EAEA,OAAO,IAAI;AACb,CAAC;AAEDX,uBAAuB,CAACa,uBAAuB,GAAG,UAACC,IAAI,EAAEC,GAAG,EAAEC,OAAO;EAAA,OAAM;IACzEC,MAAM,EAAEC,qBAAU,CAACC,IAAI;IACvBC,GAAG,EAAEC,iBAAM;IACXC,QAAQ,MAAAd,MAAA,CAAMe,uBAAY,OAAAf,MAAA,CAAIgB,gBAAK,CAAE;IACrCC,IAAI,EAAE;MACJC,MAAM,EAAEV,OAAO,CAACU,MAAM;MACtBC,QAAQ,EAAEZ,GAAG;MACba,SAAS,EAAEZ,OAAO,CAACY,SAAS;MAC5BC,cAAc,EAAEf;IAClB;EACF,CAAC;AAAA,CAAC;AAAC,IAAAgB,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEYhC,uBAAuB","ignoreList":[]}
|
|
@@ -20,10 +20,9 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime-corejs2/hel
|
|
|
20
20
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/toConsumableArray"));
|
|
21
21
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/classCallCheck"));
|
|
22
22
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/createClass"));
|
|
23
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/assertThisInitialized"));
|
|
24
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/inherits"));
|
|
25
23
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/possibleConstructorReturn"));
|
|
26
24
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/getPrototypeOf"));
|
|
25
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/inherits"));
|
|
27
26
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
|
|
28
27
|
var _common = require("@webex/common");
|
|
29
28
|
var _loggerProxy = _interopRequireDefault(require("../common/logs/logger-proxy"));
|
|
@@ -33,8 +32,8 @@ var _constants = require("../constants");
|
|
|
33
32
|
var _reachability = require("./reachability.types");
|
|
34
33
|
function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
35
34
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
36
|
-
function
|
|
37
|
-
function _isNativeReflectConstruct() {
|
|
35
|
+
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
36
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
38
37
|
// data for the Events.resultReady event
|
|
39
38
|
|
|
40
39
|
// data for the Events.clientMediaIpsUpdated event
|
|
@@ -51,8 +50,6 @@ var Events = exports.Events = {
|
|
|
51
50
|
* It emits events from Events enum
|
|
52
51
|
*/
|
|
53
52
|
var ClusterReachability = exports.ClusterReachability = /*#__PURE__*/function (_EventsScope) {
|
|
54
|
-
(0, _inherits2.default)(ClusterReachability, _EventsScope);
|
|
55
|
-
var _super = _createSuper(ClusterReachability);
|
|
56
53
|
/**
|
|
57
54
|
* Constructor for ClusterReachability
|
|
58
55
|
* @param {string} name cluster name
|
|
@@ -61,19 +58,19 @@ var ClusterReachability = exports.ClusterReachability = /*#__PURE__*/function (_
|
|
|
61
58
|
function ClusterReachability(name, clusterInfo) {
|
|
62
59
|
var _this;
|
|
63
60
|
(0, _classCallCheck2.default)(this, ClusterReachability);
|
|
64
|
-
_this =
|
|
65
|
-
(0, _defineProperty2.default)(
|
|
66
|
-
(0, _defineProperty2.default)(
|
|
67
|
-
(0, _defineProperty2.default)(
|
|
68
|
-
(0, _defineProperty2.default)(
|
|
69
|
-
(0, _defineProperty2.default)(
|
|
70
|
-
(0, _defineProperty2.default)(
|
|
61
|
+
_this = _callSuper(this, ClusterReachability);
|
|
62
|
+
(0, _defineProperty2.default)(_this, "numUdpUrls", void 0);
|
|
63
|
+
(0, _defineProperty2.default)(_this, "numTcpUrls", void 0);
|
|
64
|
+
(0, _defineProperty2.default)(_this, "numXTlsUrls", void 0);
|
|
65
|
+
(0, _defineProperty2.default)(_this, "result", void 0);
|
|
66
|
+
(0, _defineProperty2.default)(_this, "pc", void 0);
|
|
67
|
+
(0, _defineProperty2.default)(_this, "defer", void 0);
|
|
71
68
|
// this defer is resolved once reachability checks for this cluster are completed
|
|
72
|
-
(0, _defineProperty2.default)(
|
|
73
|
-
(0, _defineProperty2.default)(
|
|
74
|
-
(0, _defineProperty2.default)(
|
|
75
|
-
(0, _defineProperty2.default)(
|
|
76
|
-
(0, _defineProperty2.default)(
|
|
69
|
+
(0, _defineProperty2.default)(_this, "startTimestamp", void 0);
|
|
70
|
+
(0, _defineProperty2.default)(_this, "srflxIceCandidates", []);
|
|
71
|
+
(0, _defineProperty2.default)(_this, "isVideoMesh", void 0);
|
|
72
|
+
(0, _defineProperty2.default)(_this, "name", void 0);
|
|
73
|
+
(0, _defineProperty2.default)(_this, "reachedSubnets", new _set.default());
|
|
77
74
|
_this.name = name;
|
|
78
75
|
_this.isVideoMesh = clusterInfo.isVideoMesh;
|
|
79
76
|
_this.numUdpUrls = clusterInfo.udp.length;
|
|
@@ -99,7 +96,8 @@ var ClusterReachability = exports.ClusterReachability = /*#__PURE__*/function (_
|
|
|
99
96
|
* Gets total elapsed time, can be called only after start() is called
|
|
100
97
|
* @returns {Number} Milliseconds
|
|
101
98
|
*/
|
|
102
|
-
(0,
|
|
99
|
+
(0, _inherits2.default)(ClusterReachability, _EventsScope);
|
|
100
|
+
return (0, _createClass2.default)(ClusterReachability, [{
|
|
103
101
|
key: "getElapsedTime",
|
|
104
102
|
value: function getElapsedTime() {
|
|
105
103
|
return Math.round(performance.now() - this.startTimestamp);
|
|
@@ -278,7 +276,7 @@ var ClusterReachability = exports.ClusterReachability = /*#__PURE__*/function (_
|
|
|
278
276
|
value: function saveResult(protocol, latency, publicIp, serverIp) {
|
|
279
277
|
var result = this.result[protocol];
|
|
280
278
|
if (result.latencyInMilliseconds === undefined) {
|
|
281
|
-
_loggerProxy.default.logger.log(
|
|
279
|
+
_loggerProxy.default.logger.log(// @ts-ignore
|
|
282
280
|
"Reachability:index#saveResult --> Successfully reached ".concat(this.name, " over ").concat(protocol, ": ").concat(latency, "ms"));
|
|
283
281
|
result.latencyInMilliseconds = latency;
|
|
284
282
|
result.result = 'reachable';
|
|
@@ -382,18 +380,18 @@ var ClusterReachability = exports.ClusterReachability = /*#__PURE__*/function (_
|
|
|
382
380
|
}, {
|
|
383
381
|
key: "start",
|
|
384
382
|
value: (function () {
|
|
385
|
-
var _start = (0, _asyncToGenerator2.default)(
|
|
386
|
-
var offer, gatherIceCandidatePromise;
|
|
387
|
-
return _regenerator.default.wrap(function
|
|
383
|
+
var _start = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
384
|
+
var offer, gatherIceCandidatePromise, _t;
|
|
385
|
+
return _regenerator.default.wrap(function (_context) {
|
|
388
386
|
while (1) switch (_context.prev = _context.next) {
|
|
389
387
|
case 0:
|
|
390
388
|
if (this.pc) {
|
|
391
|
-
_context.next =
|
|
389
|
+
_context.next = 1;
|
|
392
390
|
break;
|
|
393
391
|
}
|
|
394
392
|
_loggerProxy.default.logger.warn("Reachability:ClusterReachability#start --> Error: peerConnection is undefined");
|
|
395
393
|
return _context.abrupt("return", this.result);
|
|
396
|
-
case
|
|
394
|
+
case 1:
|
|
397
395
|
// Initialize this.result as saying that nothing is reachable.
|
|
398
396
|
// It will get updated as we go along and successfully gather ICE candidates.
|
|
399
397
|
this.result.udp = {
|
|
@@ -405,12 +403,12 @@ var ClusterReachability = exports.ClusterReachability = /*#__PURE__*/function (_
|
|
|
405
403
|
this.result.xtls = {
|
|
406
404
|
result: this.numXTlsUrls > 0 ? 'unreachable' : 'untested'
|
|
407
405
|
};
|
|
408
|
-
_context.prev =
|
|
409
|
-
_context.next =
|
|
406
|
+
_context.prev = 2;
|
|
407
|
+
_context.next = 3;
|
|
410
408
|
return this.pc.createOffer({
|
|
411
409
|
offerToReceiveAudio: true
|
|
412
410
|
});
|
|
413
|
-
case
|
|
411
|
+
case 3:
|
|
414
412
|
offer = _context.sent;
|
|
415
413
|
this.startTimestamp = performance.now();
|
|
416
414
|
|
|
@@ -418,22 +416,22 @@ var ClusterReachability = exports.ClusterReachability = /*#__PURE__*/function (_
|
|
|
418
416
|
gatherIceCandidatePromise = this.gatherIceCandidates(); // not awaiting the next call on purpose, because we're not sending the offer anywhere and there won't be any answer
|
|
419
417
|
// we just need to make this call to trigger the ICE gathering process
|
|
420
418
|
this.pc.setLocalDescription(offer);
|
|
421
|
-
_context.next =
|
|
419
|
+
_context.next = 4;
|
|
422
420
|
return gatherIceCandidatePromise;
|
|
423
|
-
case
|
|
424
|
-
_context.next =
|
|
421
|
+
case 4:
|
|
422
|
+
_context.next = 6;
|
|
425
423
|
break;
|
|
426
|
-
case
|
|
427
|
-
_context.prev =
|
|
428
|
-
|
|
429
|
-
_loggerProxy.default.logger.warn("Reachability:ClusterReachability#start --> Error: ",
|
|
430
|
-
case
|
|
424
|
+
case 5:
|
|
425
|
+
_context.prev = 5;
|
|
426
|
+
_t = _context["catch"](2);
|
|
427
|
+
_loggerProxy.default.logger.warn("Reachability:ClusterReachability#start --> Error: ", _t);
|
|
428
|
+
case 6:
|
|
431
429
|
return _context.abrupt("return", this.result);
|
|
432
|
-
case
|
|
430
|
+
case 7:
|
|
433
431
|
case "end":
|
|
434
432
|
return _context.stop();
|
|
435
433
|
}
|
|
436
|
-
}, _callee, this, [[
|
|
434
|
+
}, _callee, this, [[2, 5]]);
|
|
437
435
|
}));
|
|
438
436
|
function start() {
|
|
439
437
|
return _start.apply(this, arguments);
|
|
@@ -454,6 +452,5 @@ var ClusterReachability = exports.ClusterReachability = /*#__PURE__*/function (_
|
|
|
454
452
|
return this.defer.promise;
|
|
455
453
|
}
|
|
456
454
|
}]);
|
|
457
|
-
return ClusterReachability;
|
|
458
455
|
}(_eventsScope.default);
|
|
459
456
|
//# sourceMappingURL=clusterReachability.js.map
|