@webex/plugin-meetings 3.3.1-next.26 → 3.3.1-next.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/constants.js +12 -2
- package/dist/constants.js.map +1 -1
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/meeting/index.js +2 -2
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting-info/index.js +4 -4
- package/dist/meeting-info/index.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +2 -2
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meeting-info/util.js +17 -17
- package/dist/meeting-info/util.js.map +1 -1
- package/dist/meeting-info/utilv2.js +16 -16
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/collection.js +1 -1
- package/dist/meetings/collection.js.map +1 -1
- package/dist/meetings/index.js +37 -33
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/meetings.types.js +8 -0
- package/dist/meetings/meetings.types.js.map +1 -1
- package/dist/meetings/util.js +3 -2
- package/dist/meetings/util.js.map +1 -1
- package/dist/personal-meeting-room/index.js +1 -1
- package/dist/personal-meeting-room/index.js.map +1 -1
- package/dist/types/constants.d.ts +11 -0
- package/dist/types/meeting/index.d.ts +2 -2
- package/dist/types/meeting-info/index.d.ts +3 -2
- package/dist/types/meeting-info/meeting-info-v2.d.ts +3 -2
- package/dist/types/meeting-info/util.d.ts +5 -4
- package/dist/types/meeting-info/utilv2.d.ts +3 -2
- package/dist/types/meetings/collection.d.ts +3 -2
- package/dist/types/meetings/index.d.ts +4 -3
- package/dist/types/meetings/meetings.types.d.ts +9 -0
- package/dist/webinar/index.js +1 -1
- package/package.json +3 -3
- package/src/constants.ts +13 -0
- package/src/meeting/index.ts +6 -5
- package/src/meeting-info/index.ts +9 -6
- package/src/meeting-info/meeting-info-v2.ts +4 -4
- package/src/meeting-info/util.ts +23 -28
- package/src/meeting-info/utilv2.ts +18 -24
- package/src/meetings/collection.ts +3 -3
- package/src/meetings/index.ts +39 -40
- package/src/meetings/meetings.types.ts +11 -0
- package/src/meetings/util.ts +5 -4
- package/src/personal-meeting-room/index.ts +2 -2
- package/test/unit/spec/meeting/index.js +9 -10
- package/test/unit/spec/meeting-info/index.js +4 -4
- package/test/unit/spec/meeting-info/meetinginfov2.js +24 -28
- package/test/unit/spec/meeting-info/request.js +2 -2
- package/test/unit/spec/meeting-info/utilv2.js +41 -49
- package/test/unit/spec/meetings/index.js +14 -0
- package/test/unit/spec/personal-meeting-room/personal-meeting-room.js +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_constants","require","_loggerProxy","_interopRequireDefault","_triggerProxy","_constants2","_metrics","MeetingsUtil","getMeetingAddedType","type","_LOCUS_ID_","_INCOMING_","_CREATED_","handleRoapMercury","envelope","meetingCollection","data","eventType","LOCUSEVENT","MESSAGE_ROAP","meeting","getByKey","CORRELATION_ID","correlationId","_data$message","message","seq","messageType","tieBreaker","errorType","errorCause","Metrics","sendBehavioralMetric","BEHAVIORAL_METRICS","ROAP_MERCURY_EVENT_RECEIVED","correlation_id","message_type","error_type","error_cause","ROAP","ROAP_TYPES","TURN_DISCOVERY_RESPONSE","roap","turnDiscovery","handleTurnDiscoveryResponse","_data$message$sdps","roapMessage","sdp","sdps","length","undefined","roapMessageReceived","getMediaServer","mediaServer","split","find","line","startsWith","shift","replace","_unused","checkForCorrelationId","deviceUrl","locus","devices","self","foundDevice","device","url","parseDefaultSiteFromMeetingPreferences","userPreferences","_userPreferences$site","result","sites","defaultSite","site","default","siteUrl","hasH264Codec","_asyncToGenerator2","_regenerator","mark","_callee","hasCodec","pc","offer","wrap","_callee$","_context","prev","next","window","RTCPeerConnection","createOffer","offerToReceiveVideo","sent","match","close","t0","LoggerProxy","logger","warn","abrupt","stop","checkH264Support","_checkH264Support","_callee2","options","_this","_ref2","firstChecked","disableNotifications","delay","maxDuration","shouldTrigger","shouldStopChecking","_callee2$","_context2","_now","Trigger","trigger","file","function","EVENT_TRIGGERS","MEDIA_CODEC_LOADED","log","error","MEDIA_CODEC_MISSING","setTimeout","timestamp","call","_x","apply","arguments","getThisDevice","newLocus","_newLocus$self","_newLocus$self$device","joinedOnThisDevice","thisDevice","state","_JOINED_","_LEFT_","reason","_MOVED_","isBreakoutLocusDTO","_newLocus$controls","_newLocus$controls$br","controls","breakout","sessionType","BREAKOUTS","SESSION_TYPES","BREAKOUT","isValidBreakoutLocus","_locus$fullState","_locus$self","inActiveStatus","fullState","LOCUS","STATE","INACTIVE","isLocusAsBreakout","selfJoined","_default","exports"],"sources":["util.ts"],"sourcesContent":["/* globals window */\n\nimport {\n _CREATED_,\n _INCOMING_,\n _JOINED_,\n _LEFT_,\n _LOCUS_ID_,\n _MOVED_,\n BREAKOUTS,\n CORRELATION_ID,\n EVENT_TRIGGERS,\n LOCUS,\n LOCUSEVENT,\n ROAP,\n} from '../constants';\nimport LoggerProxy from '../common/logs/logger-proxy';\nimport Trigger from '../common/events/trigger-proxy';\nimport BEHAVIORAL_METRICS from '../metrics/constants';\nimport Metrics from '../metrics';\n\n/**\n * Meetings Media Codec Missing Event\n * Emitted when H.264 codec is not\n * found in the browser.\n * @event media:codec:missing\n * @instance\n * @memberof MeetingsUtil\n */\n\n/**\n * Meetings Media Codec Loaded Event\n * Emitted when H.264 codec has been\n * loaded in the browser.\n * @event media:codec:loaded\n * @instance\n * @memberof MeetingsUtil\n */\n\nconst MeetingsUtil: any = {};\n\nMeetingsUtil.getMeetingAddedType = (type) => (type === _LOCUS_ID_ ? _INCOMING_ : _CREATED_);\n\nMeetingsUtil.handleRoapMercury = (envelope, meetingCollection) => {\n const {data} = envelope;\n const {eventType} = data;\n\n if (eventType === LOCUSEVENT.MESSAGE_ROAP) {\n const meeting = meetingCollection.getByKey(CORRELATION_ID, data.correlationId);\n\n if (meeting) {\n const {seq, messageType, tieBreaker, errorType, errorCause} = data.message;\n\n Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.ROAP_MERCURY_EVENT_RECEIVED, {\n correlation_id: data.correlationId,\n seq,\n message_type: messageType,\n error_type: errorType,\n error_cause: errorCause,\n });\n\n if (messageType === ROAP.ROAP_TYPES.TURN_DISCOVERY_RESPONSE) {\n // turn discovery is not part of normal roap protocol and so we are not handling it\n // through the usual roap state machine\n meeting.roap.turnDiscovery.handleTurnDiscoveryResponse(data.message, 'from mercury');\n } else {\n const roapMessage = {\n seq,\n messageType,\n sdp: data.message.sdps?.length > 0 ? data.message.sdps[0] : undefined,\n tieBreaker,\n errorType,\n errorCause,\n };\n\n meeting.roapMessageReceived(roapMessage);\n }\n }\n }\n};\n\nMeetingsUtil.getMediaServer = (sdp) => {\n let mediaServer;\n\n // Attempt to collect the media server from the roap message.\n try {\n mediaServer = sdp\n .split('\\r\\n')\n .find((line) => line.startsWith('o='))\n .split(' ')\n .shift()\n .replace('o=', '');\n } catch {\n mediaServer = undefined;\n }\n\n return mediaServer;\n};\n\nMeetingsUtil.checkForCorrelationId = (deviceUrl, locus) => {\n let devices = [];\n\n if (locus) {\n if (locus && locus.self && locus.self.devices) {\n devices = locus.self.devices;\n }\n\n const foundDevice = devices.find((device) => device.url === deviceUrl);\n\n if (foundDevice && foundDevice.correlationId) {\n return foundDevice.correlationId;\n }\n }\n\n return false;\n};\n\nMeetingsUtil.parseDefaultSiteFromMeetingPreferences = (userPreferences) => {\n let result = '';\n\n if (userPreferences?.sites?.length) {\n const defaultSite = userPreferences.sites.find((site) => site.default);\n\n if (defaultSite) {\n result = defaultSite.siteUrl;\n } else {\n result = userPreferences.sites[0].siteUrl;\n }\n }\n\n return result;\n};\n\n/**\n * Will check to see if the H.264 media codec is supported.\n * @async\n * @private\n * @returns {Promise<boolean>}\n */\nMeetingsUtil.hasH264Codec = async () => {\n let hasCodec = false;\n\n try {\n const pc = new window.RTCPeerConnection();\n const offer = await pc.createOffer({offerToReceiveVideo: true});\n\n if (offer.sdp.match(/^a=rtpmap:\\d+\\s+H264\\/\\d+/m)) {\n hasCodec = true;\n }\n pc.close();\n } catch (error) {\n LoggerProxy.logger.warn(\n 'Meetings:util#hasH264Codec --> Error creating peerConnection for H.264 test.'\n );\n }\n\n return hasCodec;\n};\n\n/**\n * Notifies the user whether or not the H.264\n * codec is present. Will continuously check\n * until max duration.\n * @async\n * @private\n * @param {object} options\n * @param {Number} options.firstChecked Timestamp in milliseconds\n * @param {boolean} options.disableNotifications Default is false. Boolean to enable/disable notification and events\n * @returns {undefined}\n */\nMeetingsUtil.checkH264Support = async function checkH264Support(options: {\n firstChecked: number;\n disableNotifications: boolean;\n}) {\n const {hasH264Codec} = MeetingsUtil;\n const {firstChecked, disableNotifications} = options || {};\n const delay = 5e3; // ms\n const maxDuration = 3e5; // ms\n const shouldTrigger = firstChecked === undefined;\n const shouldStopChecking = firstChecked && Date.now() - firstChecked >= maxDuration;\n\n // Disable notifications and start H.264 download only\n if (disableNotifications) {\n hasH264Codec();\n\n return;\n }\n\n // Codec loaded trigger event notification\n if (await hasH264Codec()) {\n Trigger.trigger(\n this,\n {\n file: 'meetings/util',\n function: 'checkH264Support',\n },\n EVENT_TRIGGERS.MEDIA_CODEC_LOADED\n );\n LoggerProxy.logger.log('Meetings:util#checkH264Support --> H264 codec loaded successfully.');\n\n return;\n }\n\n // Stop checking if past the timelimit\n if (shouldStopChecking) {\n LoggerProxy.logger.error(\n 'Meetings:util#checkH264Support --> Timed out waiting for H264 codec to load.'\n );\n\n return;\n }\n\n // Trigger only once\n if (shouldTrigger) {\n Trigger.trigger(\n this,\n {\n file: 'meetings/util',\n function: 'checkH264Support',\n },\n EVENT_TRIGGERS.MEDIA_CODEC_MISSING\n );\n LoggerProxy.logger.log('Meetings:util#checkH264Support --> H264 codec is missing.');\n }\n\n // Keep checking in intervals to see if codec loaded\n window.setTimeout(() => {\n const timestamp = firstChecked || Date.now();\n\n MeetingsUtil.checkH264Support.call(this, {firstChecked: timestamp});\n }, delay);\n};\n\n/**\n * get device from locus data\n * @param {Object} newLocus new locus data\n * @param {String} deviceUrl current device url\n * @returns {Object}\n */\nMeetingsUtil.getThisDevice = (newLocus: any, deviceUrl: string) => {\n if (newLocus?.self?.devices?.length > 0) {\n return newLocus.self.devices.find((device) => device.url === deviceUrl);\n }\n\n return null;\n};\n\n/**\n * get self device joined status from locus data\n * @param {Object} meeting current meeting data\n * @param {Object} newLocus new locus data\n * @param {String} deviceUrl current device url\n * @returns {Object}\n */\nMeetingsUtil.joinedOnThisDevice = (meeting: any, newLocus: any, deviceUrl: string) => {\n const thisDevice = MeetingsUtil.getThisDevice(newLocus, deviceUrl);\n if (thisDevice) {\n if (!thisDevice.correlationId || meeting?.correlationId === thisDevice.correlationId) {\n return (\n thisDevice.state === _JOINED_ ||\n (thisDevice.state === _LEFT_ && thisDevice.reason === _MOVED_)\n );\n }\n }\n\n return false;\n};\n\n/**\n * check the new locus is breakout session's one or not\n * @param {Object} newLocus new locus data\n * @returns {boolean}\n * @private\n */\nMeetingsUtil.isBreakoutLocusDTO = (newLocus: any) => {\n return newLocus?.controls?.breakout?.sessionType === BREAKOUTS.SESSION_TYPES.BREAKOUT;\n};\n\n/**\n * check the locus is valid breakout locus or not\n * @param {Object} locus\n * @returns {boolean}\n * @private\n */\nMeetingsUtil.isValidBreakoutLocus = (locus: any) => {\n const inActiveStatus = locus?.fullState?.state === LOCUS.STATE.INACTIVE;\n const isLocusAsBreakout = MeetingsUtil.isBreakoutLocusDTO(locus);\n const selfJoined = locus.self?.state === _JOINED_;\n\n return isLocusAsBreakout && !inActiveStatus && selfJoined;\n};\nexport default MeetingsUtil;\n"],"mappings":";;;;;;;;;;;AAEA,IAAAA,UAAA,GAAAC,OAAA;AAcA,IAAAC,YAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,aAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,WAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK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AAKC,mBAAQ,IAC5BF,UAAU,CAACC,KAAK,KAAKE,iBAAM,IAAIH,UAAU,CAACI,MAAM,KAAKC,kBAAQ;IAElE;EACF;EAEA,OAAO,KAAK;AACd,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACAzI,YAAY,CAAC0I,kBAAkB,GAAG,UAACV,QAAa,EAAK;EAAA,IAAAW,kBAAA,EAAAC,qBAAA;EACnD,OAAO,CAAAZ,QAAQ,aAARA,QAAQ,wBAAAW,kBAAA,GAARX,QAAQ,CAAEa,QAAQ,cAAAF,kBAAA,wBAAAC,qBAAA,GAAlBD,kBAAA,CAAoBG,QAAQ,cAAAF,qBAAA,uBAA5BA,qBAAA,CAA8BG,WAAW,MAAKC,oBAAS,CAACC,aAAa,CAACC,QAAQ;AACvF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACAlJ,YAAY,CAACmJ,oBAAoB,GAAG,UAAC3F,KAAU,EAAK;EAAA,IAAA4F,gBAAA,EAAAC,WAAA;EAClD,IAAMC,cAAc,GAAG,CAAA9F,KAAK,aAALA,KAAK,wBAAA4F,gBAAA,GAAL5F,KAAK,CAAE+F,SAAS,cAAAH,gBAAA,uBAAhBA,gBAAA,CAAkBf,KAAK,MAAKmB,gBAAK,CAACC,KAAK,CAACC,QAAQ;EACvE,IAAMC,iBAAiB,GAAG3J,YAAY,CAAC0I,kBAAkB,CAAClF,KAAK,CAAC;EAChE,IAAMoG,UAAU,GAAG,EAAAP,WAAA,GAAA7F,KAAK,CAACE,IAAI,cAAA2F,WAAA,uBAAVA,WAAA,CAAYhB,KAAK,MAAKC,mBAAQ;EAEjD,OAAOqB,iBAAiB,IAAI,CAACL,cAAc,IAAIM,UAAU;AAC3D,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAzF,OAAA,GACarE,YAAY"}
|
|
1
|
+
{"version":3,"names":["_constants","require","_loggerProxy","_interopRequireDefault","_triggerProxy","_constants2","_metrics","_meetings","MeetingsUtil","getMeetingAddedType","type","DESTINATION_TYPE","LOCUS_ID","_INCOMING_","_CREATED_","handleRoapMercury","envelope","meetingCollection","data","eventType","LOCUSEVENT","MESSAGE_ROAP","meeting","getByKey","MEETING_KEY","CORRELATION_ID","correlationId","_data$message","message","seq","messageType","tieBreaker","errorType","errorCause","Metrics","sendBehavioralMetric","BEHAVIORAL_METRICS","ROAP_MERCURY_EVENT_RECEIVED","correlation_id","message_type","error_type","error_cause","ROAP","ROAP_TYPES","TURN_DISCOVERY_RESPONSE","roap","turnDiscovery","handleTurnDiscoveryResponse","_data$message$sdps","roapMessage","sdp","sdps","length","undefined","roapMessageReceived","getMediaServer","mediaServer","split","find","line","startsWith","shift","replace","_unused","checkForCorrelationId","deviceUrl","locus","devices","self","foundDevice","device","url","parseDefaultSiteFromMeetingPreferences","userPreferences","_userPreferences$site","result","sites","defaultSite","site","default","siteUrl","hasH264Codec","_asyncToGenerator2","_regenerator","mark","_callee","hasCodec","pc","offer","wrap","_callee$","_context","prev","next","window","RTCPeerConnection","createOffer","offerToReceiveVideo","sent","match","close","t0","LoggerProxy","logger","warn","abrupt","stop","checkH264Support","_checkH264Support","_callee2","options","_this","_ref2","firstChecked","disableNotifications","delay","maxDuration","shouldTrigger","shouldStopChecking","_callee2$","_context2","_now","Trigger","trigger","file","function","EVENT_TRIGGERS","MEDIA_CODEC_LOADED","log","error","MEDIA_CODEC_MISSING","setTimeout","timestamp","call","_x","apply","arguments","getThisDevice","newLocus","_newLocus$self","_newLocus$self$device","joinedOnThisDevice","thisDevice","state","_JOINED_","_LEFT_","reason","_MOVED_","isBreakoutLocusDTO","_newLocus$controls","_newLocus$controls$br","controls","breakout","sessionType","BREAKOUTS","SESSION_TYPES","BREAKOUT","isValidBreakoutLocus","_locus$fullState","_locus$self","inActiveStatus","fullState","LOCUS","STATE","INACTIVE","isLocusAsBreakout","selfJoined","_default","exports"],"sources":["util.ts"],"sourcesContent":["/* globals window */\n\nimport {\n _CREATED_,\n _INCOMING_,\n _JOINED_,\n _LEFT_,\n DESTINATION_TYPE,\n _MOVED_,\n BREAKOUTS,\n EVENT_TRIGGERS,\n LOCUS,\n LOCUSEVENT,\n ROAP,\n} from '../constants';\nimport LoggerProxy from '../common/logs/logger-proxy';\nimport Trigger from '../common/events/trigger-proxy';\nimport BEHAVIORAL_METRICS from '../metrics/constants';\nimport Metrics from '../metrics';\nimport {MEETING_KEY} from './meetings.types';\n\n/**\n * Meetings Media Codec Missing Event\n * Emitted when H.264 codec is not\n * found in the browser.\n * @event media:codec:missing\n * @instance\n * @memberof MeetingsUtil\n */\n\n/**\n * Meetings Media Codec Loaded Event\n * Emitted when H.264 codec has been\n * loaded in the browser.\n * @event media:codec:loaded\n * @instance\n * @memberof MeetingsUtil\n */\n\nconst MeetingsUtil: any = {};\n\nMeetingsUtil.getMeetingAddedType = (type: DESTINATION_TYPE) =>\n type === DESTINATION_TYPE.LOCUS_ID ? _INCOMING_ : _CREATED_;\n\nMeetingsUtil.handleRoapMercury = (envelope, meetingCollection) => {\n const {data} = envelope;\n const {eventType} = data;\n\n if (eventType === LOCUSEVENT.MESSAGE_ROAP) {\n const meeting = meetingCollection.getByKey(MEETING_KEY.CORRELATION_ID, data.correlationId);\n\n if (meeting) {\n const {seq, messageType, tieBreaker, errorType, errorCause} = data.message;\n\n Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.ROAP_MERCURY_EVENT_RECEIVED, {\n correlation_id: data.correlationId,\n seq,\n message_type: messageType,\n error_type: errorType,\n error_cause: errorCause,\n });\n\n if (messageType === ROAP.ROAP_TYPES.TURN_DISCOVERY_RESPONSE) {\n // turn discovery is not part of normal roap protocol and so we are not handling it\n // through the usual roap state machine\n meeting.roap.turnDiscovery.handleTurnDiscoveryResponse(data.message, 'from mercury');\n } else {\n const roapMessage = {\n seq,\n messageType,\n sdp: data.message.sdps?.length > 0 ? data.message.sdps[0] : undefined,\n tieBreaker,\n errorType,\n errorCause,\n };\n\n meeting.roapMessageReceived(roapMessage);\n }\n }\n }\n};\n\nMeetingsUtil.getMediaServer = (sdp) => {\n let mediaServer;\n\n // Attempt to collect the media server from the roap message.\n try {\n mediaServer = sdp\n .split('\\r\\n')\n .find((line) => line.startsWith('o='))\n .split(' ')\n .shift()\n .replace('o=', '');\n } catch {\n mediaServer = undefined;\n }\n\n return mediaServer;\n};\n\nMeetingsUtil.checkForCorrelationId = (deviceUrl, locus) => {\n let devices = [];\n\n if (locus) {\n if (locus && locus.self && locus.self.devices) {\n devices = locus.self.devices;\n }\n\n const foundDevice = devices.find((device) => device.url === deviceUrl);\n\n if (foundDevice && foundDevice.correlationId) {\n return foundDevice.correlationId;\n }\n }\n\n return false;\n};\n\nMeetingsUtil.parseDefaultSiteFromMeetingPreferences = (userPreferences) => {\n let result = '';\n\n if (userPreferences?.sites?.length) {\n const defaultSite = userPreferences.sites.find((site) => site.default);\n\n if (defaultSite) {\n result = defaultSite.siteUrl;\n } else {\n result = userPreferences.sites[0].siteUrl;\n }\n }\n\n return result;\n};\n\n/**\n * Will check to see if the H.264 media codec is supported.\n * @async\n * @private\n * @returns {Promise<boolean>}\n */\nMeetingsUtil.hasH264Codec = async () => {\n let hasCodec = false;\n\n try {\n const pc = new window.RTCPeerConnection();\n const offer = await pc.createOffer({offerToReceiveVideo: true});\n\n if (offer.sdp.match(/^a=rtpmap:\\d+\\s+H264\\/\\d+/m)) {\n hasCodec = true;\n }\n pc.close();\n } catch (error) {\n LoggerProxy.logger.warn(\n 'Meetings:util#hasH264Codec --> Error creating peerConnection for H.264 test.'\n );\n }\n\n return hasCodec;\n};\n\n/**\n * Notifies the user whether or not the H.264\n * codec is present. Will continuously check\n * until max duration.\n * @async\n * @private\n * @param {object} options\n * @param {Number} options.firstChecked Timestamp in milliseconds\n * @param {boolean} options.disableNotifications Default is false. Boolean to enable/disable notification and events\n * @returns {undefined}\n */\nMeetingsUtil.checkH264Support = async function checkH264Support(options: {\n firstChecked: number;\n disableNotifications: boolean;\n}) {\n const {hasH264Codec} = MeetingsUtil;\n const {firstChecked, disableNotifications} = options || {};\n const delay = 5e3; // ms\n const maxDuration = 3e5; // ms\n const shouldTrigger = firstChecked === undefined;\n const shouldStopChecking = firstChecked && Date.now() - firstChecked >= maxDuration;\n\n // Disable notifications and start H.264 download only\n if (disableNotifications) {\n hasH264Codec();\n\n return;\n }\n\n // Codec loaded trigger event notification\n if (await hasH264Codec()) {\n Trigger.trigger(\n this,\n {\n file: 'meetings/util',\n function: 'checkH264Support',\n },\n EVENT_TRIGGERS.MEDIA_CODEC_LOADED\n );\n LoggerProxy.logger.log('Meetings:util#checkH264Support --> H264 codec loaded successfully.');\n\n return;\n }\n\n // Stop checking if past the timelimit\n if (shouldStopChecking) {\n LoggerProxy.logger.error(\n 'Meetings:util#checkH264Support --> Timed out waiting for H264 codec to load.'\n );\n\n return;\n }\n\n // Trigger only once\n if (shouldTrigger) {\n Trigger.trigger(\n this,\n {\n file: 'meetings/util',\n function: 'checkH264Support',\n },\n EVENT_TRIGGERS.MEDIA_CODEC_MISSING\n );\n LoggerProxy.logger.log('Meetings:util#checkH264Support --> H264 codec is missing.');\n }\n\n // Keep checking in intervals to see if codec loaded\n window.setTimeout(() => {\n const timestamp = firstChecked || Date.now();\n\n MeetingsUtil.checkH264Support.call(this, {firstChecked: timestamp});\n }, delay);\n};\n\n/**\n * get device from locus data\n * @param {Object} newLocus new locus data\n * @param {String} deviceUrl current device url\n * @returns {Object}\n */\nMeetingsUtil.getThisDevice = (newLocus: any, deviceUrl: string) => {\n if (newLocus?.self?.devices?.length > 0) {\n return newLocus.self.devices.find((device) => device.url === deviceUrl);\n }\n\n return null;\n};\n\n/**\n * get self device joined status from locus data\n * @param {Object} meeting current meeting data\n * @param {Object} newLocus new locus data\n * @param {String} deviceUrl current device url\n * @returns {Object}\n */\nMeetingsUtil.joinedOnThisDevice = (meeting: any, newLocus: any, deviceUrl: string) => {\n const thisDevice = MeetingsUtil.getThisDevice(newLocus, deviceUrl);\n if (thisDevice) {\n if (!thisDevice.correlationId || meeting?.correlationId === thisDevice.correlationId) {\n return (\n thisDevice.state === _JOINED_ ||\n (thisDevice.state === _LEFT_ && thisDevice.reason === _MOVED_)\n );\n }\n }\n\n return false;\n};\n\n/**\n * check the new locus is breakout session's one or not\n * @param {Object} newLocus new locus data\n * @returns {boolean}\n * @private\n */\nMeetingsUtil.isBreakoutLocusDTO = (newLocus: any) => {\n return newLocus?.controls?.breakout?.sessionType === BREAKOUTS.SESSION_TYPES.BREAKOUT;\n};\n\n/**\n * check the locus is valid breakout locus or not\n * @param {Object} locus\n * @returns {boolean}\n * @private\n */\nMeetingsUtil.isValidBreakoutLocus = (locus: any) => {\n const inActiveStatus = locus?.fullState?.state === LOCUS.STATE.INACTIVE;\n const isLocusAsBreakout = MeetingsUtil.isBreakoutLocusDTO(locus);\n const selfJoined = locus.self?.state === _JOINED_;\n\n return isLocusAsBreakout && !inActiveStatus && selfJoined;\n};\nexport default MeetingsUtil;\n"],"mappings":";;;;;;;;;;;AAEA,IAAAA,UAAA,GAAAC,OAAA;AAaA,IAAAC,YAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,aAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,WAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,QAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,SAAA,GAAAN,OAAA;AAnBA;;AAqBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,IAAMO,YAAiB,GAAG,CAAC,CAAC;AAE5BA,YAAY,CAACC,mBAAmB,GAAG,UAACC,IAAsB;EAAA,OACxDA,IAAI,KAAKC,2BAAgB,CAACC,QAAQ,GAAGC,qBAAU,GAAGC,oBAAS;AAAA;AAE7DN,YAAY,CAACO,iBAAiB,GAAG,UAACC,QAAQ,EAAEC,iBAAiB,EAAK;EAChE,IAAOC,IAAI,GAAIF,QAAQ,CAAhBE,IAAI;EACX,IAAOC,SAAS,GA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qBAAA,uBAA5BA,qBAAA,CAA8BG,WAAW,MAAKC,oBAAS,CAACC,aAAa,CAACC,QAAQ;AACvF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACApJ,YAAY,CAACqJ,oBAAoB,GAAG,UAAC3F,KAAU,EAAK;EAAA,IAAA4F,gBAAA,EAAAC,WAAA;EAClD,IAAMC,cAAc,GAAG,CAAA9F,KAAK,aAALA,KAAK,wBAAA4F,gBAAA,GAAL5F,KAAK,CAAE+F,SAAS,cAAAH,gBAAA,uBAAhBA,gBAAA,CAAkBf,KAAK,MAAKmB,gBAAK,CAACC,KAAK,CAACC,QAAQ;EACvE,IAAMC,iBAAiB,GAAG7J,YAAY,CAAC4I,kBAAkB,CAAClF,KAAK,CAAC;EAChE,IAAMoG,UAAU,GAAG,EAAAP,WAAA,GAAA7F,KAAK,CAACE,IAAI,cAAA2F,WAAA,uBAAVA,WAAA,CAAYhB,KAAK,MAAKC,mBAAQ;EAEjD,OAAOqB,iBAAiB,IAAI,CAACL,cAAc,IAAIM,UAAU;AAC3D,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAzF,OAAA,GACavE,YAAY"}
|
|
@@ -166,7 +166,7 @@ var PersonalMeetingRoom = exports.default = /*#__PURE__*/function (_StatelessWeb
|
|
|
166
166
|
value: function get() {
|
|
167
167
|
var _this3 = this;
|
|
168
168
|
var options = {
|
|
169
|
-
type: _constants.
|
|
169
|
+
type: _constants.DESTINATION_TYPE.PERSONAL_ROOM
|
|
170
170
|
};
|
|
171
171
|
return this.meetingInfo.fetchMeetingInfo(options).then(function (pmr) {
|
|
172
172
|
if (pmr && pmr.body && pmr.body.isPmr) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_webexCore","require","_constants","_parameter","_interopRequireDefault","_request","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","default","result","NewTarget","constructor","_Reflect$construct","arguments","apply","_possibleConstructorReturn2","Reflect","sham","Proxy","Boolean","prototype","valueOf","call","e","PersonalMeetingRoom","exports","_StatelessWebexPlugin","_inherits2","_super","attrs","options","_this","_classCallCheck2","_defineProperty2","_assertThisInitialized2","MEETINGS","pmr","sipUri","link","userId","name","meetingInfo","personalMeetingRoomRequest","PersonalMeetingRoomRequest","_createClass2","key","value","claim","pin","_this2","preferred","length","undefined","webex","internal","device","passcode","meetingAddress","claimPmr","then","body","set","_promise","reject","ParameterError","sipMeetingUri","meetingLink","webExMeetingLink","owner","meetingName","number","meetingNumber","get","_this3","type","
|
|
1
|
+
{"version":3,"names":["_webexCore","require","_constants","_parameter","_interopRequireDefault","_request","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","default","result","NewTarget","constructor","_Reflect$construct","arguments","apply","_possibleConstructorReturn2","Reflect","sham","Proxy","Boolean","prototype","valueOf","call","e","PersonalMeetingRoom","exports","_StatelessWebexPlugin","_inherits2","_super","attrs","options","_this","_classCallCheck2","_defineProperty2","_assertThisInitialized2","MEETINGS","pmr","sipUri","link","userId","name","meetingInfo","personalMeetingRoomRequest","PersonalMeetingRoomRequest","_createClass2","key","value","claim","pin","_this2","preferred","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,aAAAC,OAAA,QAAAC,yBAAA,GAAAC,yBAAA,oBAAAC,qBAAA,QAAAC,KAAA,OAAAC,gBAAA,CAAAC,OAAA,EAAAN,OAAA,GAAAO,MAAA,MAAAN,yBAAA,QAAAO,SAAA,OAAAH,gBAAA,CAAAC,OAAA,QAAAG,WAAA,EAAAF,MAAA,GAAAG,kBAAA,CAAAN,KAAA,EAAAO,SAAA,EAAAH,SAAA,YAAAD,MAAA,GAAAH,KAAA,CAAAQ,KAAA,OAAAD,SAAA,gBAAAE,2BAAA,CAAAP,OAAA,QAAAC,MAAA;AAAA,SAAAL,0BAAA,eAAAY,OAAA,qBAAAJ,kBAAA,oBAAAA,kBAAA,CAAAK,IAAA,2BAAAC,KAAA,oCAAAC,OAAA,CAAAC,SAAA,CAAAC,OAAA,CAAAC,IAAA,CAAAV,kBAAA,CAAAO,OAAA,8CAAAI,CAAA,sBANnD;AAQA;AACA;AACA;AAFA,IAGqBC,mBAAmB,GAAAC,OAAA,CAA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AAC;EAAA,OAAApC,mBAAA;AAAA,EAhJ8CwD,+BAAoB"}
|
|
@@ -1096,3 +1096,14 @@ export type IP_VERSION = Enum<typeof IP_VERSION>;
|
|
|
1096
1096
|
export declare const MEETING_PERMISSION_TOKEN_REFRESH_THRESHOLD_IN_SEC = 30;
|
|
1097
1097
|
export declare const MEETING_PERMISSION_TOKEN_REFRESH_REASON = "ttl-join";
|
|
1098
1098
|
export declare const NAMED_MEDIA_GROUP_TYPE_AUDIO = 1;
|
|
1099
|
+
export declare const DESTINATION_TYPE: {
|
|
1100
|
+
readonly CONVERSATION_URL: "CONVERSATION_URL";
|
|
1101
|
+
readonly MEETING_LINK: "MEETING_LINK";
|
|
1102
|
+
readonly SIP_URI: "SIP_URI";
|
|
1103
|
+
readonly PERSONAL_ROOM: "PERSONAL_ROOM";
|
|
1104
|
+
readonly ONE_ON_ONE_CALL: "ONE_ON_ONE_CALL";
|
|
1105
|
+
readonly LOCUS_ID: "LOCUS_ID";
|
|
1106
|
+
readonly MEETING_ID: "MEETING_ID";
|
|
1107
|
+
readonly MEETING_UUID: "MEETING_UUID";
|
|
1108
|
+
};
|
|
1109
|
+
export type DESTINATION_TYPE = Enum<typeof DESTINATION_TYPE>;
|
|
@@ -12,7 +12,7 @@ import MediaProperties from '../media/properties';
|
|
|
12
12
|
import ReconnectionManager from '../reconnection-manager';
|
|
13
13
|
import MeetingRequest from './request';
|
|
14
14
|
import Members from '../members/index';
|
|
15
|
-
import { NETWORK_STATUS } from '../constants';
|
|
15
|
+
import { DESTINATION_TYPE, NETWORK_STATUS } from '../constants';
|
|
16
16
|
import { ReceiveSlotManager } from '../multistream/receiveSlotManager';
|
|
17
17
|
import { MediaRequestManager } from '../multistream/mediaRequestManager';
|
|
18
18
|
import { Configuration as RemoteMediaManagerConfiguration, RemoteMediaManager } from '../multistream/remoteMediaManager';
|
|
@@ -344,7 +344,7 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
|
344
344
|
conversationUrl: string;
|
|
345
345
|
callStateForMetrics: CallStateForMetrics;
|
|
346
346
|
destination: string;
|
|
347
|
-
destinationType:
|
|
347
|
+
destinationType: DESTINATION_TYPE;
|
|
348
348
|
deviceUrl: string;
|
|
349
349
|
hostId: string;
|
|
350
350
|
id: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
|
|
3
3
|
*/
|
|
4
|
+
import { DESTINATION_TYPE } from '../constants';
|
|
4
5
|
/**
|
|
5
6
|
* @class MeetingInfo
|
|
6
7
|
*/
|
|
@@ -48,7 +49,7 @@ export default class MeetingInfo {
|
|
|
48
49
|
/**
|
|
49
50
|
* Fetches meeting info from the server
|
|
50
51
|
* @param {String} destination one of many different types of destinations to look up info for
|
|
51
|
-
* @param {
|
|
52
|
+
* @param {DESTINATION_TYPE} [type] to match up with the destination value
|
|
52
53
|
* @param {String} [password] meeting password
|
|
53
54
|
* @param {Object} [captchaInfo] captcha code and id
|
|
54
55
|
* @param {String} [installedOrgID]
|
|
@@ -59,7 +60,7 @@ export default class MeetingInfo {
|
|
|
59
60
|
* @public
|
|
60
61
|
* @memberof MeetingInfo
|
|
61
62
|
*/
|
|
62
|
-
fetchMeetingInfo(destination: string, type?:
|
|
63
|
+
fetchMeetingInfo(destination: string, type?: DESTINATION_TYPE, password?: string, captchaInfo?: {
|
|
63
64
|
code: string;
|
|
64
65
|
id: string;
|
|
65
66
|
}, installedOrgID?: any, locusId?: any, extraParams?: object, options?: {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DESTINATION_TYPE } from '../constants';
|
|
1
2
|
/**
|
|
2
3
|
* Error to indicate that wbxappapi requires a password
|
|
3
4
|
*/
|
|
@@ -100,7 +101,7 @@ export default class MeetingInfoV2 {
|
|
|
100
101
|
/**
|
|
101
102
|
* Fetches meeting info from the server
|
|
102
103
|
* @param {String} destination one of many different types of destinations to look up info for
|
|
103
|
-
* @param {
|
|
104
|
+
* @param {DESTINATION_TYPE} [type] to match up with the destination value
|
|
104
105
|
* @param {String} password
|
|
105
106
|
* @param {Object} captchaInfo
|
|
106
107
|
* @param {String} captchaInfo.code
|
|
@@ -113,7 +114,7 @@ export default class MeetingInfoV2 {
|
|
|
113
114
|
* @public
|
|
114
115
|
* @memberof MeetingInfo
|
|
115
116
|
*/
|
|
116
|
-
fetchMeetingInfo(destination: string, type?:
|
|
117
|
+
fetchMeetingInfo(destination: string, type?: DESTINATION_TYPE, password?: string, captchaInfo?: {
|
|
117
118
|
code: string;
|
|
118
119
|
id: string;
|
|
119
120
|
}, installedOrgID?: any, locusId?: any, extraParams?: object, options?: {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import url from 'url';
|
|
3
|
+
import { DESTINATION_TYPE } from '../constants';
|
|
3
4
|
/**
|
|
4
5
|
* @class MeetingInfoUtil
|
|
5
6
|
*/
|
|
6
7
|
export default class MeetingInfoUtil {
|
|
7
|
-
static extractDestination(destination: any, type:
|
|
8
|
+
static extractDestination(destination: any, type: DESTINATION_TYPE): any;
|
|
8
9
|
static getParsedUrl(link: any): false | url.UrlWithStringQuery;
|
|
9
10
|
/**
|
|
10
11
|
* Helper function to check if a string matches a known meeting link pattern
|
|
@@ -36,14 +37,14 @@ export default class MeetingInfoUtil {
|
|
|
36
37
|
static generateOptions(from: any): Promise<any>;
|
|
37
38
|
/**
|
|
38
39
|
* Helper function to build up a correct locus url depending on the value passed
|
|
39
|
-
* @param {
|
|
40
|
+
* @param {DESTINATION_TYPE} type One of [SIP_URI, PERSONAL_ROOM, MEETING_ID, CONVERSATION_URL, LOCUS_ID, MEETING_LINK]
|
|
40
41
|
* @param {Object} value ?? value.value
|
|
41
42
|
* @returns {Object} returns an object with {resource, method}
|
|
42
43
|
*/
|
|
43
|
-
static getResourceUrl(type:
|
|
44
|
+
static getResourceUrl(type: DESTINATION_TYPE, value: any): {
|
|
44
45
|
uri: any;
|
|
45
46
|
resource: string;
|
|
46
47
|
method: string;
|
|
47
48
|
};
|
|
48
|
-
static getRequestParams(resourceOptions: any, type:
|
|
49
|
+
static getRequestParams(resourceOptions: any, type: DESTINATION_TYPE, value: any, api: any): any;
|
|
49
50
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import url from 'url';
|
|
3
|
+
import { DESTINATION_TYPE } from '../constants';
|
|
3
4
|
/**
|
|
4
5
|
* @class MeetingInfoUtil
|
|
5
6
|
*/
|
|
@@ -36,13 +37,13 @@ export default class MeetingInfoUtil {
|
|
|
36
37
|
/**
|
|
37
38
|
* Helper function to build up a correct locus url depending on the value passed
|
|
38
39
|
* @param {Object} options type and value to fetch meeting info
|
|
39
|
-
* @param {
|
|
40
|
+
* @param {DESTINATION_TYPE} options.type One of [SIP_URI, PERSONAL_ROOM, MEETING_ID, CONVERSATION_URL, LOCUS_ID, MEETING_LINK]
|
|
40
41
|
* @param {String} options.installedOrgID org ID of user's machine
|
|
41
42
|
* @param {Object} options.destination ?? value.value
|
|
42
43
|
* @returns {Object} returns an object with {resource, method}
|
|
43
44
|
*/
|
|
44
45
|
static getRequestBody(options: {
|
|
45
|
-
type:
|
|
46
|
+
type: DESTINATION_TYPE;
|
|
46
47
|
destination: object;
|
|
47
48
|
} | any): any;
|
|
48
49
|
/**
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import Collection from '../common/collection';
|
|
2
|
+
import { MEETING_KEY } from './meetings.types';
|
|
2
3
|
/**
|
|
3
4
|
* @export
|
|
4
5
|
* @class MeetingCollection
|
|
@@ -13,13 +14,13 @@ export default class MeetingCollection extends Collection {
|
|
|
13
14
|
set(meeting: any): any;
|
|
14
15
|
/**
|
|
15
16
|
* get a specific meeting searching for key
|
|
16
|
-
* @param {
|
|
17
|
+
* @param {MEETING_KEY} key
|
|
17
18
|
* @param {Any} value
|
|
18
19
|
* @returns {Meeting} if found, else returns null
|
|
19
20
|
* @public
|
|
20
21
|
* @memberof MeetingCollection
|
|
21
22
|
*/
|
|
22
|
-
getByKey(key:
|
|
23
|
+
getByKey(key: MEETING_KEY, value: any): any;
|
|
23
24
|
/**
|
|
24
25
|
* get a specific meeting searching for key
|
|
25
26
|
* @param {String} breakoutUrl
|
|
@@ -4,6 +4,7 @@ import '@webex/internal-plugin-metrics';
|
|
|
4
4
|
import { WebexPlugin } from '@webex/webex-core';
|
|
5
5
|
import * as mediaHelpersModule from '@webex/media-helpers';
|
|
6
6
|
import 'webrtc-adapter';
|
|
7
|
+
import { DESTINATION_TYPE } from '../constants';
|
|
7
8
|
import { CallStateForMetrics } from '../meeting';
|
|
8
9
|
import Reachability from '../reachability';
|
|
9
10
|
import { INoiseReductionEffect, IVirtualBackgroundEffect } from './meetings.types';
|
|
@@ -294,7 +295,7 @@ export default class Meetings extends WebexPlugin {
|
|
|
294
295
|
* When meeting info passed it should be complete, e.g.: fetched after password or captcha provided
|
|
295
296
|
*
|
|
296
297
|
* @param {string} destination - sipURL, phonenumber, or locus object}
|
|
297
|
-
* @param {
|
|
298
|
+
* @param {DESTINATION_TYPE} [type] - the optional specified type, such as locusId
|
|
298
299
|
* @param {Boolean} useRandomDelayForInfo - whether a random delay should be added to fetching meeting info
|
|
299
300
|
* @param {Object} infoExtraParams extra parameters to be provided when fetching meeting info
|
|
300
301
|
* @param {string} correlationId - the optional specified correlationId (callStateForMetrics.correlationId can be provided instead)
|
|
@@ -306,14 +307,14 @@ export default class Meetings extends WebexPlugin {
|
|
|
306
307
|
* @public
|
|
307
308
|
* @memberof Meetings
|
|
308
309
|
*/
|
|
309
|
-
create(destination: string, type?:
|
|
310
|
+
create(destination: string, type?: DESTINATION_TYPE, useRandomDelayForInfo?: boolean, infoExtraParams?: {}, correlationId?: string, failOnMissingMeetingInfo?: boolean, callStateForMetrics?: CallStateForMetrics, meetingInfo?: any, meetingLookupUrl?: any): any;
|
|
310
311
|
/**
|
|
311
312
|
* Create meeting
|
|
312
313
|
*
|
|
313
314
|
* When meeting info passed it should be complete, e.g.: fetched after password or captcha provided
|
|
314
315
|
*
|
|
315
316
|
* @param {String} destination see create()
|
|
316
|
-
* @param {
|
|
317
|
+
* @param {DESTINATION_TYPE} type see create()
|
|
317
318
|
* @param {Boolean} useRandomDelayForInfo whether a random delay should be added to fetching meeting info
|
|
318
319
|
* @param {Object} infoExtraParams extra parameters to be provided when fetching meeting info
|
|
319
320
|
* @param {CallStateForMetrics} callStateForMetrics - information about call state for metrics
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
import type { NoiseReductionEffectOptions, VirtualBackgroundEffectOptions } from '@webex/media-helpers';
|
|
2
|
+
import { Enum } from '../constants';
|
|
2
3
|
type INoiseReductionEffect = Omit<NoiseReductionEffectOptions, 'authToken' | 'workletProcessorUrl' | 'legacyProcessorUrl'>;
|
|
3
4
|
type IVirtualBackgroundEffect = Omit<VirtualBackgroundEffectOptions, 'authToken'>;
|
|
4
5
|
export type { INoiseReductionEffect, IVirtualBackgroundEffect };
|
|
6
|
+
export declare const MEETING_KEY: {
|
|
7
|
+
readonly CONVERSATION_URL: "conversationUrl";
|
|
8
|
+
readonly SIP_URI: "sipUri";
|
|
9
|
+
readonly LOCUS_URL: "locusUrl";
|
|
10
|
+
readonly MEETINGNUMBER: "meetingNumber";
|
|
11
|
+
readonly CORRELATION_ID: "correlationId";
|
|
12
|
+
};
|
|
13
|
+
export type MEETING_KEY = Enum<typeof MEETING_KEY>;
|
package/dist/webinar/index.js
CHANGED
|
@@ -62,7 +62,7 @@ var Webinar = _webexCore.WebexPlugin.extend({
|
|
|
62
62
|
updateCanManageWebcast: function updateCanManageWebcast(canManageWebcast) {
|
|
63
63
|
this.set('canManageWebcast', canManageWebcast);
|
|
64
64
|
},
|
|
65
|
-
version: "3.3.1-next.
|
|
65
|
+
version: "3.3.1-next.27"
|
|
66
66
|
});
|
|
67
67
|
var _default = exports.default = Webinar;
|
|
68
68
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@webex/eslint-config-legacy": "0.0.0",
|
|
44
44
|
"@webex/jest-config-legacy": "0.0.0",
|
|
45
45
|
"@webex/legacy-tools": "0.0.0",
|
|
46
|
-
"@webex/plugin-meetings": "3.3.1-next.
|
|
46
|
+
"@webex/plugin-meetings": "3.3.1-next.27",
|
|
47
47
|
"@webex/plugin-rooms": "3.3.1-next.6",
|
|
48
48
|
"@webex/test-helper-chai": "3.3.1-next.5",
|
|
49
49
|
"@webex/test-helper-mocha": "3.3.1-next.5",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"@webex/internal-plugin-metrics": "3.3.1-next.5",
|
|
71
71
|
"@webex/internal-plugin-support": "3.3.1-next.6",
|
|
72
72
|
"@webex/internal-plugin-user": "3.3.1-next.5",
|
|
73
|
-
"@webex/internal-plugin-voicea": "3.3.1-next.
|
|
73
|
+
"@webex/internal-plugin-voicea": "3.3.1-next.27",
|
|
74
74
|
"@webex/media-helpers": "3.3.1-next.10",
|
|
75
75
|
"@webex/plugin-people": "3.3.1-next.6",
|
|
76
76
|
"@webex/plugin-rooms": "3.3.1-next.6",
|
|
@@ -92,5 +92,5 @@
|
|
|
92
92
|
"//": [
|
|
93
93
|
"TODO: upgrade jwt-decode when moving to node 18"
|
|
94
94
|
],
|
|
95
|
-
"version": "3.3.1-next.
|
|
95
|
+
"version": "3.3.1-next.27"
|
|
96
96
|
}
|
package/src/constants.ts
CHANGED
|
@@ -1331,3 +1331,16 @@ export const MEETING_PERMISSION_TOKEN_REFRESH_REASON = 'ttl-join';
|
|
|
1331
1331
|
|
|
1332
1332
|
// constant for named media group type
|
|
1333
1333
|
export const NAMED_MEDIA_GROUP_TYPE_AUDIO = 1;
|
|
1334
|
+
|
|
1335
|
+
export const DESTINATION_TYPE = {
|
|
1336
|
+
CONVERSATION_URL: 'CONVERSATION_URL',
|
|
1337
|
+
MEETING_LINK: 'MEETING_LINK',
|
|
1338
|
+
SIP_URI: 'SIP_URI',
|
|
1339
|
+
PERSONAL_ROOM: 'PERSONAL_ROOM',
|
|
1340
|
+
ONE_ON_ONE_CALL: 'ONE_ON_ONE_CALL',
|
|
1341
|
+
LOCUS_ID: 'LOCUS_ID',
|
|
1342
|
+
MEETING_ID: 'MEETING_ID',
|
|
1343
|
+
MEETING_UUID: 'MEETING_UUID',
|
|
1344
|
+
} as const;
|
|
1345
|
+
|
|
1346
|
+
export type DESTINATION_TYPE = Enum<typeof DESTINATION_TYPE>;
|
package/src/meeting/index.ts
CHANGED
|
@@ -79,10 +79,9 @@ import {Reactions, SkinTones} from '../reactions/reactions';
|
|
|
79
79
|
import PasswordError from '../common/errors/password-error';
|
|
80
80
|
import CaptchaError from '../common/errors/captcha-error';
|
|
81
81
|
import {
|
|
82
|
-
|
|
82
|
+
DESTINATION_TYPE,
|
|
83
83
|
_INCOMING_,
|
|
84
84
|
_JOIN_,
|
|
85
|
-
_MEETING_LINK_,
|
|
86
85
|
AUDIO,
|
|
87
86
|
CONTENT,
|
|
88
87
|
DISPLAY_HINTS,
|
|
@@ -527,7 +526,7 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
|
527
526
|
conversationUrl: string;
|
|
528
527
|
callStateForMetrics: CallStateForMetrics;
|
|
529
528
|
destination: string;
|
|
530
|
-
destinationType:
|
|
529
|
+
destinationType: DESTINATION_TYPE;
|
|
531
530
|
deviceUrl: string;
|
|
532
531
|
hostId: string;
|
|
533
532
|
id: string;
|
|
@@ -1739,7 +1738,7 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
|
1739
1738
|
}
|
|
1740
1739
|
|
|
1741
1740
|
const isStartingSpaceInstantV2Meeting =
|
|
1742
|
-
this.destinationType ===
|
|
1741
|
+
this.destinationType === DESTINATION_TYPE.CONVERSATION_URL &&
|
|
1743
1742
|
// @ts-ignore - config coming from registerPlugin
|
|
1744
1743
|
this.config.experimental.enableAdhocMeetings &&
|
|
1745
1744
|
// @ts-ignore
|
|
@@ -1748,7 +1747,9 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
|
1748
1747
|
const destination = isStartingSpaceInstantV2Meeting
|
|
1749
1748
|
? this.meetingInfo.meetingJoinUrl
|
|
1750
1749
|
: this.destination;
|
|
1751
|
-
const destinationType = isStartingSpaceInstantV2Meeting
|
|
1750
|
+
const destinationType = isStartingSpaceInstantV2Meeting
|
|
1751
|
+
? DESTINATION_TYPE.MEETING_LINK
|
|
1752
|
+
: this.destinationType;
|
|
1752
1753
|
|
|
1753
1754
|
const permissionTokenExpiryInfo = this.getPermissionTokenExpiryInfo();
|
|
1754
1755
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import {DESTINATION_TYPE} from '../constants';
|
|
6
6
|
import LoggerProxy from '../common/logs/logger-proxy';
|
|
7
7
|
|
|
8
8
|
import MeetingInfoCollection from './collection';
|
|
@@ -157,7 +157,7 @@ export default class MeetingInfo {
|
|
|
157
157
|
/**
|
|
158
158
|
* Fetches meeting info from the server
|
|
159
159
|
* @param {String} destination one of many different types of destinations to look up info for
|
|
160
|
-
* @param {
|
|
160
|
+
* @param {DESTINATION_TYPE} [type] to match up with the destination value
|
|
161
161
|
* @param {String} [password] meeting password
|
|
162
162
|
* @param {Object} [captchaInfo] captcha code and id
|
|
163
163
|
* @param {String} [installedOrgID]
|
|
@@ -170,7 +170,7 @@ export default class MeetingInfo {
|
|
|
170
170
|
*/
|
|
171
171
|
public fetchMeetingInfo(
|
|
172
172
|
destination: string,
|
|
173
|
-
type:
|
|
173
|
+
type: DESTINATION_TYPE = null,
|
|
174
174
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
175
175
|
password: string = null,
|
|
176
176
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
@@ -186,7 +186,7 @@ export default class MeetingInfo {
|
|
|
186
186
|
extraParams: object = {},
|
|
187
187
|
options: {meetingId?: string; sendCAevents?: boolean} = {}
|
|
188
188
|
) {
|
|
189
|
-
if (type ===
|
|
189
|
+
if (type === DESTINATION_TYPE.PERSONAL_ROOM && !destination) {
|
|
190
190
|
destination = this.webex.internal.device.userId;
|
|
191
191
|
}
|
|
192
192
|
|
|
@@ -195,10 +195,13 @@ export default class MeetingInfo {
|
|
|
195
195
|
// fetch meeting info
|
|
196
196
|
this.requestFetchInfo({...infoOptions, ...options}).catch((error) => {
|
|
197
197
|
// if it failed the first time as meeting link
|
|
198
|
-
if (infoOptions.type ===
|
|
198
|
+
if (infoOptions.type === DESTINATION_TYPE.MEETING_LINK) {
|
|
199
199
|
// convert the meeting link to sip URI and retry
|
|
200
200
|
return this.requestFetchInfo({
|
|
201
|
-
...this.fetchInfoOptions(
|
|
201
|
+
...this.fetchInfoOptions(
|
|
202
|
+
MeetingInfoUtil.convertLinkToSip(destination),
|
|
203
|
+
DESTINATION_TYPE.SIP_URI
|
|
204
|
+
),
|
|
202
205
|
...options,
|
|
203
206
|
});
|
|
204
207
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import lodash from 'lodash';
|
|
2
2
|
import {
|
|
3
3
|
HTTP_VERBS,
|
|
4
|
-
|
|
4
|
+
DESTINATION_TYPE,
|
|
5
5
|
WBXAPPAPI_SERVICE,
|
|
6
6
|
DEFAULT_MEETING_INFO_REQUEST_BODY,
|
|
7
7
|
} from '../constants';
|
|
@@ -249,7 +249,7 @@ export default class MeetingInfoV2 {
|
|
|
249
249
|
/**
|
|
250
250
|
* Fetches meeting info from the server
|
|
251
251
|
* @param {String} destination one of many different types of destinations to look up info for
|
|
252
|
-
* @param {
|
|
252
|
+
* @param {DESTINATION_TYPE} [type] to match up with the destination value
|
|
253
253
|
* @param {String} password
|
|
254
254
|
* @param {Object} captchaInfo
|
|
255
255
|
* @param {String} captchaInfo.code
|
|
@@ -264,7 +264,7 @@ export default class MeetingInfoV2 {
|
|
|
264
264
|
*/
|
|
265
265
|
async fetchMeetingInfo(
|
|
266
266
|
destination: string,
|
|
267
|
-
type:
|
|
267
|
+
type: DESTINATION_TYPE = null,
|
|
268
268
|
password: string = null,
|
|
269
269
|
captchaInfo: {
|
|
270
270
|
code: string;
|
|
@@ -284,7 +284,7 @@ export default class MeetingInfoV2 {
|
|
|
284
284
|
});
|
|
285
285
|
|
|
286
286
|
if (
|
|
287
|
-
destinationType.type ===
|
|
287
|
+
destinationType.type === DESTINATION_TYPE.CONVERSATION_URL &&
|
|
288
288
|
this.webex.config.meetings.experimental.enableAdhocMeetings &&
|
|
289
289
|
this.webex.meetings.preferredWebexSite
|
|
290
290
|
) {
|