@webex/plugin-meetings 3.0.0-beta.126 → 3.0.0-beta.129
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 +1 -1
- package/dist/constants.js.map +1 -1
- package/dist/locus-info/controlsUtils.js +14 -9
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/meeting/index.js +15 -10
- package/dist/meeting/index.js.map +1 -1
- package/dist/meetings/util.js +9 -0
- package/dist/meetings/util.js.map +1 -1
- package/dist/metrics/constants.js +1 -0
- package/dist/metrics/constants.js.map +1 -1
- package/dist/types/constants.d.ts +1 -1
- package/dist/types/metrics/constants.d.ts +1 -0
- package/package.json +19 -19
- package/src/constants.ts +1 -1
- package/src/locus-info/controlsUtils.ts +10 -16
- package/src/meeting/index.ts +26 -11
- package/src/meetings/util.ts +10 -0
- package/src/metrics/constants.ts +1 -0
- package/test/unit/spec/locus-info/controlsUtils.js +8 -0
- package/test/unit/spec/meeting/index.js +96 -1
- package/test/unit/spec/meetings/utils.js +57 -0
package/dist/meetings/util.js
CHANGED
|
@@ -12,6 +12,8 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs2/
|
|
|
12
12
|
var _constants = require("../constants");
|
|
13
13
|
var _loggerProxy = _interopRequireDefault(require("../common/logs/logger-proxy"));
|
|
14
14
|
var _triggerProxy = _interopRequireDefault(require("../common/events/trigger-proxy"));
|
|
15
|
+
var _constants2 = _interopRequireDefault(require("../metrics/constants"));
|
|
16
|
+
var _metrics = _interopRequireDefault(require("../metrics"));
|
|
15
17
|
/* globals window */
|
|
16
18
|
|
|
17
19
|
/**
|
|
@@ -48,6 +50,13 @@ MeetingsUtil.handleRoapMercury = function (envelope, meetingCollection) {
|
|
|
48
50
|
tieBreaker = _data$message.tieBreaker,
|
|
49
51
|
errorType = _data$message.errorType,
|
|
50
52
|
errorCause = _data$message.errorCause;
|
|
53
|
+
_metrics.default.sendBehavioralMetric(_constants2.default.ROAP_MERCURY_EVENT_RECEIVED, {
|
|
54
|
+
correlation_id: data.correlationId,
|
|
55
|
+
seq: seq,
|
|
56
|
+
message_type: messageType,
|
|
57
|
+
error_type: errorType,
|
|
58
|
+
error_cause: errorCause
|
|
59
|
+
});
|
|
51
60
|
if (messageType === _constants.ROAP.ROAP_TYPES.TURN_DISCOVERY_RESPONSE) {
|
|
52
61
|
// turn discovery is not part of normal roap protocol and so we are not handling it
|
|
53
62
|
// through the usual roap state machine
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["MeetingsUtil","getMeetingAddedType","type","_LOCUS_ID_","_INCOMING_","_CREATED_","handleRoapMercury","envelope","meetingCollection","data","eventType","LOCUSEVENT","MESSAGE_ROAP","meeting","getByKey","CORRELATION_ID","correlationId","message","seq","messageType","tieBreaker","errorType","errorCause","ROAP","ROAP_TYPES","TURN_DISCOVERY_RESPONSE","roap","turnDiscovery","handleTurnDiscoveryResponse","roapMessage","sdp","sdps","length","undefined","mediaServer","getMediaServer","mediaProperties","webrtcMediaConnection","roapMessageReceived","split","find","line","startsWith","shift","replace","checkForCorrelationId","deviceUrl","locus","devices","self","foundDevice","device","url","parseDefaultSiteFromMeetingPreferences","userPreferences","result","sites","defaultSite","site","default","siteUrl","hasH264Codec","hasCodec","pc","window","RTCPeerConnection","createOffer","offerToReceiveVideo","offer","match","close","LoggerProxy","logger","warn","checkH264Support","options","firstChecked","disableNotifications","delay","maxDuration","shouldTrigger","shouldStopChecking","Trigger","trigger","file","function","EVENT_TRIGGERS","MEDIA_CODEC_LOADED","log","error","MEDIA_CODEC_MISSING","setTimeout","timestamp","call","getThisDevice","newLocus","joinedOnThisDevice","thisDevice","state","_JOINED_","_LEFT_","reason","_MOVED_","isBreakoutLocusDTO","controls","breakout","sessionType","BREAKOUTS","SESSION_TYPES","BREAKOUT","isValidBreakoutLocus","inActiveStatus","fullState","LOCUS","STATE","INACTIVE","isLocusAsBreakout","selfJoined"],"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';\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 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);\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 const mediaServer = MeetingsUtil.getMediaServer(roapMessage.sdp);\n\n meeting.mediaProperties.webrtcMediaConnection.roapMessageReceived(roapMessage);\n\n if (mediaServer) {\n meeting.mediaProperties.webrtcMediaConnection.mediaServer = mediaServer;\n }\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;AAcA;AACA;AAjBA;;AAmBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,IAAMA,YAAiB,GAAG,CAAC,CAAC;AAE5BA,YAAY,CAACC,mBAAmB,GAAG,UAACC,IAAI;EAAA,OAAMA,IAAI,KAAKC,qBAAU,GAAGC,qBAAU,GAAGC,oBAAS;AAAA,CAAC;AAE3FL,YAAY,CAACM,iBAAiB,GAAG,UAACC,QAAQ,EAAEC,iBAAiB,EAAK;EAChE,IAAOC,IAAI,GAAIF,QAAQ,CAAhBE,IAAI;EACX,IAAOC,SAAS,GAAID,IAAI,CAAjBC,SAAS;EAEhB,IAAIA,SAAS,KAAKC,qBAAU,CAACC,YAAY,EAAE;IACzC,IAAMC,OAAO,GAAGL,iBAAiB,CAACM,QAAQ,CAACC,yBAAc,EAAEN,IAAI,CAACO,aAAa,CAAC;IAE9E,IAAIH,OAAO,EAAE;MACX,oBAA8DJ,IAAI,CAACQ,OAAO;QAAnEC,GAAG,iBAAHA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leRoapMercury","envelope","meetingCollection","data","eventType","LOCUSEVENT","MESSAGE_ROAP","meeting","getByKey","CORRELATION_ID","correlationId","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","roapMessage","sdp","sdps","length","undefined","mediaServer","getMediaServer","mediaProperties","webrtcMediaConnection","roapMessageReceived","split","find","line","startsWith","shift","replace","checkForCorrelationId","deviceUrl","locus","devices","self","foundDevice","device","url","parseDefaultSiteFromMeetingPreferences","userPreferences","result","sites","defaultSite","site","default","siteUrl","hasH264Codec","hasCodec","pc","window","RTCPeerConnection","createOffer","offerToReceiveVideo","offer","match","close","LoggerProxy","logger","warn","checkH264Support","options","firstChecked","disableNotifications","delay","maxDuration","shouldTrigger","shouldStopChecking","Trigger","trigger","file","function","EVENT_TRIGGERS","MEDIA_CODEC_LOADED","log","error","MEDIA_CODEC_MISSING","setTimeout","timestamp","call","getThisDevice","newLocus","joinedOnThisDevice","thisDevice","state","_JOINED_","_LEFT_","reason","_MOVED_","isBreakoutLocusDTO","controls","breakout","sessionType","BREAKOUTS","SESSION_TYPES","BREAKOUT","isValidBreakoutLocus","inActiveStatus","fullState","LOCUS","STATE","INACTIVE","isLocusAsBreakout","selfJoined"],"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);\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 const mediaServer = MeetingsUtil.getMediaServer(roapMessage.sdp);\n\n meeting.mediaProperties.webrtcMediaConnection.roapMessageReceived(roapMessage);\n\n if (mediaServer) {\n meeting.mediaProperties.webrtcMediaConnection.mediaServer = mediaServer;\n }\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;AAcA;AACA;AACA;AACA;AAnBA;;AAqBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,IAAMA,YAAiB,GAAG,CAAC,CAAC;AAE5BA,YAAY,CAACC,mBAAmB,GAAG,UAACC,IAAI;EAAA,OAAMA,IAAI,KAAKC,qBAAU,GAAGC,qBAAU,GAAGC,oBAAS;AAAA,CAAC;AAE3FL,YAAY,CAACM,iBAAiB,GAAG,UAACC,QAAQ,EAAEC,iBAAiB,EAAK;EAChE,IAAOC,IAAI,GAAIF,QAAQ,CAAhBE,IAAI;EACX,IAAOC,SAAS,GAAID,IAAI,CAAjBC,SAAS;EAEhB,IAAIA,SAAS,KAAKC,qBAAU,CAACC,YAAY,EAAE;IACzC,IAAMC,OAAO,GAAGL,iBAAiB,CAACM,QAAQ,CAACC,yBAAc,EAAEN,IAAI,CAACO,aAAa,CAAC;IAE9E,IAAIH,OAAO,EAAE;MACX,oBAA8DJ,IAAI,CAACQ,OAAO;QAAnEC,GAAG,iBAAHA,GAAG;QAAEC,WAAW,iBAAXA,WAAW;QAAEC,UAAU,iBAAVA,UAAU;QAAEC,SAAS,iBAATA,SAAS;QAAEC,UAAU,iBAAVA,UAAU;MAE1DC,gBAAO,CAACC,oBAAoB,CAACC,mBAAkB,CAACC,2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var BEHAVIORAL_METRICS = {
|
|
|
16
16
|
JOIN_FAILURE: 'js_sdk_join_failures',
|
|
17
17
|
ADD_MEDIA_SUCCESS: 'js_sdk_add_media_success',
|
|
18
18
|
ADD_MEDIA_FAILURE: 'js_sdk_add_media_failures',
|
|
19
|
+
ROAP_MERCURY_EVENT_RECEIVED: 'js_sdk_roap_mercury_received',
|
|
19
20
|
CONNECTION_SUCCESS: 'js_sdk_connection_success',
|
|
20
21
|
CONNECTION_FAILURE: 'js_sdk_connection_failures',
|
|
21
22
|
MEETING_LEAVE_FAILURE: 'js_sdk_meeting_leave_failure',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BEHAVIORAL_METRICS","MEETINGS_REGISTRATION_FAILED","MEETINGS_REGISTRATION_SUCCESS","MERCURY_CONNECTION_FAILURE","MERCURY_CONNECTION_RESTORED","JOIN_SUCCESS","JOIN_FAILURE","ADD_MEDIA_SUCCESS","ADD_MEDIA_FAILURE","CONNECTION_SUCCESS","CONNECTION_FAILURE","MEETING_LEAVE_FAILURE","MEETING_END_ALL_FAILURE","MEETING_END_ALL_INITIATED","GET_USER_MEDIA_FAILURE","GET_DISPLAY_MEDIA_FAILURE","JOIN_WITH_MEDIA_FAILURE","DISCONNECT_DUE_TO_INACTIVITY","MEETING_MEDIA_INACTIVE","MEETING_RECONNECT_FAILURE","MEETING_MAX_REJOIN_FAILURE","MEETING_SHARE_FAILURE","MEETING_START_WHITEBOARD_SHARE_FAILURE","MEETING_STOP_WHITEBOARD_SHARE_FAILURE","MUTE_AUDIO_FAILURE","MUTE_VIDEO_FAILURE","SET_MEETING_QUALITY_FAILURE","STOP_FLOOR_REQUEST_FAILURE","ADD_DIAL_IN_FAILURE","ADD_DIAL_OUT_FAILURE","UPDATE_MEDIA_FAILURE","UNMUTE_AUDIO_FAILURE","UNMUTE_VIDEO_FAILURE","ROAP_ANSWER_FAILURE","ROAP_GLARE_CONDITION","PEERCONNECTION_FAILURE","INVALID_ICE_CANDIDATE","UPLOAD_LOGS_FAILURE","RECEIVE_TRANSCRIPTION_FAILURE","FETCH_MEETING_INFO_V1_SUCCESS","FETCH_MEETING_INFO_V1_FAILURE","ADHOC_MEETING_SUCCESS","ADHOC_MEETING_FAILURE","VERIFY_PASSWORD_SUCCESS","VERIFY_PASSWORD_ERROR","VERIFY_CAPTCHA_ERROR","MOVE_TO_SUCCESS","MOVE_TO_FAILURE","MOVE_FROM_SUCCESS","MOVE_FROM_FAILURE","TURN_DISCOVERY_FAILURE","MEETING_INFO_POLICY_ERROR"],"sources":["constants.ts"],"sourcesContent":["// Metrics constants ----------------------------------------------------------\n\nconst BEHAVIORAL_METRICS = {\n MEETINGS_REGISTRATION_FAILED: 'js_sdk_meetings_registration_failed',\n MEETINGS_REGISTRATION_SUCCESS: 'js_sdk_meetings_registration_success',\n MERCURY_CONNECTION_FAILURE: 'js_sdk_mercury_connection_failure',\n MERCURY_CONNECTION_RESTORED: 'js_sdk_mercury_connection_restored',\n JOIN_SUCCESS: 'js_sdk_join_success',\n JOIN_FAILURE: 'js_sdk_join_failures',\n ADD_MEDIA_SUCCESS: 'js_sdk_add_media_success',\n ADD_MEDIA_FAILURE: 'js_sdk_add_media_failures',\n CONNECTION_SUCCESS: 'js_sdk_connection_success',\n CONNECTION_FAILURE: 'js_sdk_connection_failures',\n MEETING_LEAVE_FAILURE: 'js_sdk_meeting_leave_failure',\n MEETING_END_ALL_FAILURE: 'js_sdk_meeting_end_for_all_failure',\n MEETING_END_ALL_INITIATED: 'js_sdk_meeting_end_for_all_initiated',\n GET_USER_MEDIA_FAILURE: 'js_sdk_get_user_media_failures',\n GET_DISPLAY_MEDIA_FAILURE: 'js_sdk_get_display_media_failures',\n JOIN_WITH_MEDIA_FAILURE: 'js_sdk_join_with_media_failures',\n\n DISCONNECT_DUE_TO_INACTIVITY: 'js_sdk_disconnect_due_to_inactivity',\n MEETING_MEDIA_INACTIVE: 'js_sdk_meeting_media_inactive',\n MEETING_RECONNECT_FAILURE: 'js_sdk_meeting_reconnect_failures',\n MEETING_MAX_REJOIN_FAILURE: 'js_sdk_meeting_max_rejoin_failure',\n MEETING_SHARE_FAILURE: 'js_sdk_meeting_share_failures',\n MEETING_START_WHITEBOARD_SHARE_FAILURE: 'js_sdk_meeting_start_whiteboard_share_failures',\n MEETING_STOP_WHITEBOARD_SHARE_FAILURE: 'js_sdk_meeting_stop_whiteboard_share_failures',\n MUTE_AUDIO_FAILURE: 'js_sdk_mute_audio_failures',\n MUTE_VIDEO_FAILURE: 'js_sdk_mute_video_failures',\n SET_MEETING_QUALITY_FAILURE: 'js_sdk_set_meeting_quality_failures',\n STOP_FLOOR_REQUEST_FAILURE: 'js_sdk_stop_floor_request_failures',\n ADD_DIAL_IN_FAILURE: 'js_sdk_add_dial_in_failure',\n ADD_DIAL_OUT_FAILURE: 'js_sdk_add_dial_out_failure',\n UPDATE_MEDIA_FAILURE: 'js_sdk_update_media_failures',\n UNMUTE_AUDIO_FAILURE: 'js_sdk_unmute_audio_failures',\n UNMUTE_VIDEO_FAILURE: 'js_sdk_unmute_video_failures',\n ROAP_ANSWER_FAILURE: 'js_sdk_roap_answer_failures',\n ROAP_GLARE_CONDITION: 'js_sdk_roap_glar_condition',\n PEERCONNECTION_FAILURE: 'js_sdk_peerConnection_failures',\n INVALID_ICE_CANDIDATE: 'js_sdk_invalid_ice_candidate',\n UPLOAD_LOGS_FAILURE: 'js_sdk_upload_logs_failure',\n RECEIVE_TRANSCRIPTION_FAILURE: 'js_sdk_receive_transcription_failure',\n FETCH_MEETING_INFO_V1_SUCCESS: 'js_sdk_fetch_meeting_info_v1_success',\n FETCH_MEETING_INFO_V1_FAILURE: 'js_sdk_fetch_meeting_info_v1_failure',\n ADHOC_MEETING_SUCCESS: 'js_sdk_adhoc_meeting_success',\n ADHOC_MEETING_FAILURE: 'js_sdk_adhoc_meeting_failure',\n VERIFY_PASSWORD_SUCCESS: 'js_sdk_verify_password_success',\n VERIFY_PASSWORD_ERROR: 'js_sdk_verify_password_error',\n VERIFY_CAPTCHA_ERROR: 'js_sdk_verify_captcha_error',\n MOVE_TO_SUCCESS: 'js_sdk_move_to_success',\n MOVE_TO_FAILURE: 'js_sdk_move_to_failure',\n MOVE_FROM_SUCCESS: 'js_sdk_move_from_success',\n MOVE_FROM_FAILURE: 'js_sdk_move_from_failure',\n TURN_DISCOVERY_FAILURE: 'js_sdk_turn_discovery_failure',\n MEETING_INFO_POLICY_ERROR: 'js_sdk_meeting_info_policy_error',\n};\n\nexport {BEHAVIORAL_METRICS as default};\n"],"mappings":";;;;;;;AAAA;;AAEA,IAAMA,kBAAkB,GAAG;EACzBC,4BAA4B,EAAE,qCAAqC;EACnEC,6BAA6B,EAAE,sCAAsC;EACrEC,0BAA0B,EAAE,mCAAmC;EAC/DC,2BAA2B,EAAE,oCAAoC;EACjEC,YAAY,EAAE,qBAAqB;EACnCC,YAAY,EAAE,sBAAsB;EACpCC,iBAAiB,EAAE,0BAA0B;EAC7CC,iBAAiB,EAAE,2BAA2B;EAC9CC,kBAAkB,EAAE,2BAA2B;EAC/CC,kBAAkB,EAAE,4BAA4B;EAChDC,qBAAqB,EAAE,8BAA8B;EACrDC,uBAAuB,EAAE,oCAAoC;EAC7DC,yBAAyB,EAAE,sCAAsC;EACjEC,sBAAsB,EAAE,gCAAgC;EACxDC,yBAAyB,EAAE,mCAAmC;EAC9DC,uBAAuB,EAAE,iCAAiC;EAE1DC,4BAA4B,EAAE,qCAAqC;EACnEC,sBAAsB,EAAE,+BAA+B;EACvDC,yBAAyB,EAAE,mCAAmC;EAC9DC,0BAA0B,EAAE,mCAAmC;EAC/DC,qBAAqB,EAAE,+BAA+B;EACtDC,sCAAsC,EAAE,gDAAgD;EACxFC,qCAAqC,EAAE,+CAA+C;EACtFC,kBAAkB,EAAE,4BAA4B;EAChDC,kBAAkB,EAAE,4BAA4B;EAChDC,2BAA2B,EAAE,qCAAqC;EAClEC,0BAA0B,EAAE,oCAAoC;EAChEC,mBAAmB,EAAE,4BAA4B;EACjDC,oBAAoB,EAAE,6BAA6B;EACnDC,oBAAoB,EAAE,8BAA8B;EACpDC,oBAAoB,EAAE,8BAA8B;EACpDC,oBAAoB,EAAE,8BAA8B;EACpDC,mBAAmB,EAAE,6BAA6B;EAClDC,oBAAoB,EAAE,4BAA4B;EAClDC,sBAAsB,EAAE,gCAAgC;EACxDC,qBAAqB,EAAE,8BAA8B;EACrDC,mBAAmB,EAAE,4BAA4B;EACjDC,6BAA6B,EAAE,sCAAsC;EACrEC,6BAA6B,EAAE,sCAAsC;EACrEC,6BAA6B,EAAE,sCAAsC;EACrEC,qBAAqB,EAAE,8BAA8B;EACrDC,qBAAqB,EAAE,8BAA8B;EACrDC,uBAAuB,EAAE,gCAAgC;EACzDC,qBAAqB,EAAE,8BAA8B;EACrDC,oBAAoB,EAAE,6BAA6B;EACnDC,eAAe,EAAE,wBAAwB;EACzCC,eAAe,EAAE,wBAAwB;EACzCC,iBAAiB,EAAE,0BAA0B;EAC7CC,iBAAiB,EAAE,0BAA0B;EAC7CC,sBAAsB,EAAE,+BAA+B;EACvDC,yBAAyB,EAAE;AAC7B,CAAC;AAAC"}
|
|
1
|
+
{"version":3,"names":["BEHAVIORAL_METRICS","MEETINGS_REGISTRATION_FAILED","MEETINGS_REGISTRATION_SUCCESS","MERCURY_CONNECTION_FAILURE","MERCURY_CONNECTION_RESTORED","JOIN_SUCCESS","JOIN_FAILURE","ADD_MEDIA_SUCCESS","ADD_MEDIA_FAILURE","ROAP_MERCURY_EVENT_RECEIVED","CONNECTION_SUCCESS","CONNECTION_FAILURE","MEETING_LEAVE_FAILURE","MEETING_END_ALL_FAILURE","MEETING_END_ALL_INITIATED","GET_USER_MEDIA_FAILURE","GET_DISPLAY_MEDIA_FAILURE","JOIN_WITH_MEDIA_FAILURE","DISCONNECT_DUE_TO_INACTIVITY","MEETING_MEDIA_INACTIVE","MEETING_RECONNECT_FAILURE","MEETING_MAX_REJOIN_FAILURE","MEETING_SHARE_FAILURE","MEETING_START_WHITEBOARD_SHARE_FAILURE","MEETING_STOP_WHITEBOARD_SHARE_FAILURE","MUTE_AUDIO_FAILURE","MUTE_VIDEO_FAILURE","SET_MEETING_QUALITY_FAILURE","STOP_FLOOR_REQUEST_FAILURE","ADD_DIAL_IN_FAILURE","ADD_DIAL_OUT_FAILURE","UPDATE_MEDIA_FAILURE","UNMUTE_AUDIO_FAILURE","UNMUTE_VIDEO_FAILURE","ROAP_ANSWER_FAILURE","ROAP_GLARE_CONDITION","PEERCONNECTION_FAILURE","INVALID_ICE_CANDIDATE","UPLOAD_LOGS_FAILURE","RECEIVE_TRANSCRIPTION_FAILURE","FETCH_MEETING_INFO_V1_SUCCESS","FETCH_MEETING_INFO_V1_FAILURE","ADHOC_MEETING_SUCCESS","ADHOC_MEETING_FAILURE","VERIFY_PASSWORD_SUCCESS","VERIFY_PASSWORD_ERROR","VERIFY_CAPTCHA_ERROR","MOVE_TO_SUCCESS","MOVE_TO_FAILURE","MOVE_FROM_SUCCESS","MOVE_FROM_FAILURE","TURN_DISCOVERY_FAILURE","MEETING_INFO_POLICY_ERROR"],"sources":["constants.ts"],"sourcesContent":["// Metrics constants ----------------------------------------------------------\n\nconst BEHAVIORAL_METRICS = {\n MEETINGS_REGISTRATION_FAILED: 'js_sdk_meetings_registration_failed',\n MEETINGS_REGISTRATION_SUCCESS: 'js_sdk_meetings_registration_success',\n MERCURY_CONNECTION_FAILURE: 'js_sdk_mercury_connection_failure',\n MERCURY_CONNECTION_RESTORED: 'js_sdk_mercury_connection_restored',\n JOIN_SUCCESS: 'js_sdk_join_success',\n JOIN_FAILURE: 'js_sdk_join_failures',\n ADD_MEDIA_SUCCESS: 'js_sdk_add_media_success',\n ADD_MEDIA_FAILURE: 'js_sdk_add_media_failures',\n ROAP_MERCURY_EVENT_RECEIVED: 'js_sdk_roap_mercury_received',\n CONNECTION_SUCCESS: 'js_sdk_connection_success',\n CONNECTION_FAILURE: 'js_sdk_connection_failures',\n MEETING_LEAVE_FAILURE: 'js_sdk_meeting_leave_failure',\n MEETING_END_ALL_FAILURE: 'js_sdk_meeting_end_for_all_failure',\n MEETING_END_ALL_INITIATED: 'js_sdk_meeting_end_for_all_initiated',\n GET_USER_MEDIA_FAILURE: 'js_sdk_get_user_media_failures',\n GET_DISPLAY_MEDIA_FAILURE: 'js_sdk_get_display_media_failures',\n JOIN_WITH_MEDIA_FAILURE: 'js_sdk_join_with_media_failures',\n\n DISCONNECT_DUE_TO_INACTIVITY: 'js_sdk_disconnect_due_to_inactivity',\n MEETING_MEDIA_INACTIVE: 'js_sdk_meeting_media_inactive',\n MEETING_RECONNECT_FAILURE: 'js_sdk_meeting_reconnect_failures',\n MEETING_MAX_REJOIN_FAILURE: 'js_sdk_meeting_max_rejoin_failure',\n MEETING_SHARE_FAILURE: 'js_sdk_meeting_share_failures',\n MEETING_START_WHITEBOARD_SHARE_FAILURE: 'js_sdk_meeting_start_whiteboard_share_failures',\n MEETING_STOP_WHITEBOARD_SHARE_FAILURE: 'js_sdk_meeting_stop_whiteboard_share_failures',\n MUTE_AUDIO_FAILURE: 'js_sdk_mute_audio_failures',\n MUTE_VIDEO_FAILURE: 'js_sdk_mute_video_failures',\n SET_MEETING_QUALITY_FAILURE: 'js_sdk_set_meeting_quality_failures',\n STOP_FLOOR_REQUEST_FAILURE: 'js_sdk_stop_floor_request_failures',\n ADD_DIAL_IN_FAILURE: 'js_sdk_add_dial_in_failure',\n ADD_DIAL_OUT_FAILURE: 'js_sdk_add_dial_out_failure',\n UPDATE_MEDIA_FAILURE: 'js_sdk_update_media_failures',\n UNMUTE_AUDIO_FAILURE: 'js_sdk_unmute_audio_failures',\n UNMUTE_VIDEO_FAILURE: 'js_sdk_unmute_video_failures',\n ROAP_ANSWER_FAILURE: 'js_sdk_roap_answer_failures',\n ROAP_GLARE_CONDITION: 'js_sdk_roap_glar_condition',\n PEERCONNECTION_FAILURE: 'js_sdk_peerConnection_failures',\n INVALID_ICE_CANDIDATE: 'js_sdk_invalid_ice_candidate',\n UPLOAD_LOGS_FAILURE: 'js_sdk_upload_logs_failure',\n RECEIVE_TRANSCRIPTION_FAILURE: 'js_sdk_receive_transcription_failure',\n FETCH_MEETING_INFO_V1_SUCCESS: 'js_sdk_fetch_meeting_info_v1_success',\n FETCH_MEETING_INFO_V1_FAILURE: 'js_sdk_fetch_meeting_info_v1_failure',\n ADHOC_MEETING_SUCCESS: 'js_sdk_adhoc_meeting_success',\n ADHOC_MEETING_FAILURE: 'js_sdk_adhoc_meeting_failure',\n VERIFY_PASSWORD_SUCCESS: 'js_sdk_verify_password_success',\n VERIFY_PASSWORD_ERROR: 'js_sdk_verify_password_error',\n VERIFY_CAPTCHA_ERROR: 'js_sdk_verify_captcha_error',\n MOVE_TO_SUCCESS: 'js_sdk_move_to_success',\n MOVE_TO_FAILURE: 'js_sdk_move_to_failure',\n MOVE_FROM_SUCCESS: 'js_sdk_move_from_success',\n MOVE_FROM_FAILURE: 'js_sdk_move_from_failure',\n TURN_DISCOVERY_FAILURE: 'js_sdk_turn_discovery_failure',\n MEETING_INFO_POLICY_ERROR: 'js_sdk_meeting_info_policy_error',\n};\n\nexport {BEHAVIORAL_METRICS as default};\n"],"mappings":";;;;;;;AAAA;;AAEA,IAAMA,kBAAkB,GAAG;EACzBC,4BAA4B,EAAE,qCAAqC;EACnEC,6BAA6B,EAAE,sCAAsC;EACrEC,0BAA0B,EAAE,mCAAmC;EAC/DC,2BAA2B,EAAE,oCAAoC;EACjEC,YAAY,EAAE,qBAAqB;EACnCC,YAAY,EAAE,sBAAsB;EACpCC,iBAAiB,EAAE,0BAA0B;EAC7CC,iBAAiB,EAAE,2BAA2B;EAC9CC,2BAA2B,EAAE,8BAA8B;EAC3DC,kBAAkB,EAAE,2BAA2B;EAC/CC,kBAAkB,EAAE,4BAA4B;EAChDC,qBAAqB,EAAE,8BAA8B;EACrDC,uBAAuB,EAAE,oCAAoC;EAC7DC,yBAAyB,EAAE,sCAAsC;EACjEC,sBAAsB,EAAE,gCAAgC;EACxDC,yBAAyB,EAAE,mCAAmC;EAC9DC,uBAAuB,EAAE,iCAAiC;EAE1DC,4BAA4B,EAAE,qCAAqC;EACnEC,sBAAsB,EAAE,+BAA+B;EACvDC,yBAAyB,EAAE,mCAAmC;EAC9DC,0BAA0B,EAAE,mCAAmC;EAC/DC,qBAAqB,EAAE,+BAA+B;EACtDC,sCAAsC,EAAE,gDAAgD;EACxFC,qCAAqC,EAAE,+CAA+C;EACtFC,kBAAkB,EAAE,4BAA4B;EAChDC,kBAAkB,EAAE,4BAA4B;EAChDC,2BAA2B,EAAE,qCAAqC;EAClEC,0BAA0B,EAAE,oCAAoC;EAChEC,mBAAmB,EAAE,4BAA4B;EACjDC,oBAAoB,EAAE,6BAA6B;EACnDC,oBAAoB,EAAE,8BAA8B;EACpDC,oBAAoB,EAAE,8BAA8B;EACpDC,oBAAoB,EAAE,8BAA8B;EACpDC,mBAAmB,EAAE,6BAA6B;EAClDC,oBAAoB,EAAE,4BAA4B;EAClDC,sBAAsB,EAAE,gCAAgC;EACxDC,qBAAqB,EAAE,8BAA8B;EACrDC,mBAAmB,EAAE,4BAA4B;EACjDC,6BAA6B,EAAE,sCAAsC;EACrEC,6BAA6B,EAAE,sCAAsC;EACrEC,6BAA6B,EAAE,sCAAsC;EACrEC,qBAAqB,EAAE,8BAA8B;EACrDC,qBAAqB,EAAE,8BAA8B;EACrDC,uBAAuB,EAAE,gCAAgC;EACzDC,qBAAqB,EAAE,8BAA8B;EACrDC,oBAAoB,EAAE,6BAA6B;EACnDC,eAAe,EAAE,wBAAwB;EACzCC,eAAe,EAAE,wBAAwB;EACzCC,iBAAiB,EAAE,0BAA0B;EAC7CC,iBAAiB,EAAE,0BAA0B;EAC7CC,sBAAsB,EAAE,+BAA+B;EACvDC,yBAAyB,EAAE;AAC7B,CAAC;AAAC"}
|
|
@@ -131,7 +131,7 @@ export declare const INTENT_TO_JOIN: number[];
|
|
|
131
131
|
export declare const ICE_TIMEOUT = 2000;
|
|
132
132
|
export declare const ICE_FAIL_TIMEOUT = 3000;
|
|
133
133
|
export declare const RETRY_TIMEOUT = 3000;
|
|
134
|
-
export declare const PC_BAIL_TIMEOUT =
|
|
134
|
+
export declare const PC_BAIL_TIMEOUT = 15000;
|
|
135
135
|
export declare const DIALER_REGEX: {
|
|
136
136
|
SIP_ADDRESS: RegExp;
|
|
137
137
|
PHONE_NUMBER: RegExp;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webex/plugin-meetings",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.129",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "Cisco EULA (https://www.cisco.com/c/en/us/products/end-user-license-agreement.html)",
|
|
6
6
|
"contributors": [
|
|
@@ -32,12 +32,12 @@
|
|
|
32
32
|
"build": "yarn run -T tsc --declaration true --declarationDir ./dist/types"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@webex/plugin-meetings": "3.0.0-beta.
|
|
36
|
-
"@webex/test-helper-chai": "3.0.0-beta.
|
|
37
|
-
"@webex/test-helper-mocha": "3.0.0-beta.
|
|
38
|
-
"@webex/test-helper-mock-webex": "3.0.0-beta.
|
|
39
|
-
"@webex/test-helper-retry": "3.0.0-beta.
|
|
40
|
-
"@webex/test-helper-test-users": "3.0.0-beta.
|
|
35
|
+
"@webex/plugin-meetings": "3.0.0-beta.129",
|
|
36
|
+
"@webex/test-helper-chai": "3.0.0-beta.129",
|
|
37
|
+
"@webex/test-helper-mocha": "3.0.0-beta.129",
|
|
38
|
+
"@webex/test-helper-mock-webex": "3.0.0-beta.129",
|
|
39
|
+
"@webex/test-helper-retry": "3.0.0-beta.129",
|
|
40
|
+
"@webex/test-helper-test-users": "3.0.0-beta.129",
|
|
41
41
|
"chai": "^4.3.4",
|
|
42
42
|
"chai-as-promised": "^7.1.1",
|
|
43
43
|
"jsdom-global": "3.0.2",
|
|
@@ -46,19 +46,19 @@
|
|
|
46
46
|
"typescript": "^4.7.4"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@webex/common": "3.0.0-beta.
|
|
49
|
+
"@webex/common": "3.0.0-beta.129",
|
|
50
50
|
"@webex/internal-media-core": "1.38.2",
|
|
51
|
-
"@webex/internal-plugin-conversation": "3.0.0-beta.
|
|
52
|
-
"@webex/internal-plugin-device": "3.0.0-beta.
|
|
53
|
-
"@webex/internal-plugin-llm": "3.0.0-beta.
|
|
54
|
-
"@webex/internal-plugin-mercury": "3.0.0-beta.
|
|
55
|
-
"@webex/internal-plugin-metrics": "3.0.0-beta.
|
|
56
|
-
"@webex/internal-plugin-support": "3.0.0-beta.
|
|
57
|
-
"@webex/internal-plugin-user": "3.0.0-beta.
|
|
58
|
-
"@webex/media-helpers": "3.0.0-beta.
|
|
59
|
-
"@webex/plugin-people": "3.0.0-beta.
|
|
60
|
-
"@webex/plugin-rooms": "3.0.0-beta.
|
|
61
|
-
"@webex/webex-core": "3.0.0-beta.
|
|
51
|
+
"@webex/internal-plugin-conversation": "3.0.0-beta.129",
|
|
52
|
+
"@webex/internal-plugin-device": "3.0.0-beta.129",
|
|
53
|
+
"@webex/internal-plugin-llm": "3.0.0-beta.129",
|
|
54
|
+
"@webex/internal-plugin-mercury": "3.0.0-beta.129",
|
|
55
|
+
"@webex/internal-plugin-metrics": "3.0.0-beta.129",
|
|
56
|
+
"@webex/internal-plugin-support": "3.0.0-beta.129",
|
|
57
|
+
"@webex/internal-plugin-user": "3.0.0-beta.129",
|
|
58
|
+
"@webex/media-helpers": "3.0.0-beta.129",
|
|
59
|
+
"@webex/plugin-people": "3.0.0-beta.129",
|
|
60
|
+
"@webex/plugin-rooms": "3.0.0-beta.129",
|
|
61
|
+
"@webex/webex-core": "3.0.0-beta.129",
|
|
62
62
|
"ampersand-collection": "^2.0.2",
|
|
63
63
|
"bowser": "^2.11.0",
|
|
64
64
|
"btoa": "^1.2.1",
|
package/src/constants.ts
CHANGED
|
@@ -192,7 +192,7 @@ export const ICE_FAIL_TIMEOUT = 3000;
|
|
|
192
192
|
|
|
193
193
|
export const RETRY_TIMEOUT = 3000;
|
|
194
194
|
|
|
195
|
-
export const PC_BAIL_TIMEOUT =
|
|
195
|
+
export const PC_BAIL_TIMEOUT = 15000;
|
|
196
196
|
|
|
197
197
|
// ******************** REGEX **********************
|
|
198
198
|
// Please alphabetize
|
|
@@ -80,6 +80,10 @@ ControlsUtils.parse = (controls: any) => {
|
|
|
80
80
|
parsedControls.raiseHand = {enabled: controls.raiseHand.enabled};
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
+
if (controls?.video) {
|
|
84
|
+
parsedControls.video = {enabled: controls.video.enabled};
|
|
85
|
+
}
|
|
86
|
+
|
|
83
87
|
return parsedControls;
|
|
84
88
|
};
|
|
85
89
|
|
|
@@ -97,35 +101,25 @@ ControlsUtils.getControls = (oldControls: any, newControls: any) => {
|
|
|
97
101
|
previous,
|
|
98
102
|
current,
|
|
99
103
|
updates: {
|
|
100
|
-
hasMuteOnEntryChanged:
|
|
101
|
-
current?.muteOnEntry?.enabled &&
|
|
102
|
-
current?.muteOnEntry?.enabled !== previous?.muteOnEntry?.enabled,
|
|
104
|
+
hasMuteOnEntryChanged: current?.muteOnEntry?.enabled !== previous?.muteOnEntry?.enabled,
|
|
103
105
|
|
|
104
|
-
hasShareControlChanged:
|
|
105
|
-
current?.shareControl?.control &&
|
|
106
|
-
current?.shareControl?.control !== previous?.shareControl?.control,
|
|
106
|
+
hasShareControlChanged: current?.shareControl?.control !== previous?.shareControl?.control,
|
|
107
107
|
|
|
108
108
|
hasDisallowUnmuteChanged:
|
|
109
|
-
current?.disallowUnmute?.enabled &&
|
|
110
109
|
current?.disallowUnmute?.enabled !== previous?.disallowUnmute?.enabled,
|
|
111
110
|
|
|
112
|
-
hasReactionsChanged:
|
|
113
|
-
current?.reactions?.enabled && current?.reactions?.enabled !== previous?.reactions?.enabled,
|
|
111
|
+
hasReactionsChanged: current?.reactions?.enabled !== previous?.reactions?.enabled,
|
|
114
112
|
|
|
115
113
|
hasReactionDisplayNamesChanged:
|
|
116
|
-
current?.reactions?.showDisplayNameWithReactions &&
|
|
117
114
|
current?.reactions?.showDisplayNameWithReactions !==
|
|
118
|
-
|
|
115
|
+
previous?.reactions?.showDisplayNameWithReactions,
|
|
119
116
|
|
|
120
117
|
hasViewTheParticipantListChanged:
|
|
121
|
-
current?.viewTheParticipantList?.enabled &&
|
|
122
118
|
current?.viewTheParticipantList?.enabled !== previous?.viewTheParticipantList?.enabled,
|
|
123
119
|
|
|
124
|
-
hasRaiseHandChanged:
|
|
125
|
-
current?.raiseHand?.enabled && current?.raiseHand?.enabled !== previous?.raiseHand?.enabled,
|
|
120
|
+
hasRaiseHandChanged: current?.raiseHand?.enabled !== previous?.raiseHand?.enabled,
|
|
126
121
|
|
|
127
|
-
hasVideoChanged:
|
|
128
|
-
current?.video?.enabled && current?.video?.enabled !== previous?.video?.enabled,
|
|
122
|
+
hasVideoChanged: current?.video?.enabled !== previous?.video?.enabled,
|
|
129
123
|
|
|
130
124
|
hasRecordingPausedChanged:
|
|
131
125
|
current?.record &&
|
package/src/meeting/index.ts
CHANGED
|
@@ -5728,6 +5728,32 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
|
5728
5728
|
});
|
|
5729
5729
|
})
|
|
5730
5730
|
.catch((error) => {
|
|
5731
|
+
Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.ADD_MEDIA_FAILURE, {
|
|
5732
|
+
correlation_id: this.correlationId,
|
|
5733
|
+
locus_id: this.locusUrl.split('/').pop(),
|
|
5734
|
+
reason: error.message,
|
|
5735
|
+
stack: error.stack,
|
|
5736
|
+
code: error.code,
|
|
5737
|
+
turnDiscoverySkippedReason,
|
|
5738
|
+
turnServerUsed,
|
|
5739
|
+
isMultistream: this.isMultistream,
|
|
5740
|
+
signalingState:
|
|
5741
|
+
this.mediaProperties.webrtcMediaConnection?.multistreamConnection?.pc?.pc
|
|
5742
|
+
?.signalingState ||
|
|
5743
|
+
this.mediaProperties.webrtcMediaConnection?.mediaConnection?.pc?.signalingState ||
|
|
5744
|
+
'unknown',
|
|
5745
|
+
connectionState:
|
|
5746
|
+
this.mediaProperties.webrtcMediaConnection?.multistreamConnection?.pc?.pc
|
|
5747
|
+
?.connectionState ||
|
|
5748
|
+
this.mediaProperties.webrtcMediaConnection?.mediaConnection?.pc?.connectionState ||
|
|
5749
|
+
'unknown',
|
|
5750
|
+
iceConnectionState:
|
|
5751
|
+
this.mediaProperties.webrtcMediaConnection?.multistreamConnection?.pc?.pc
|
|
5752
|
+
?.iceConnectionState ||
|
|
5753
|
+
this.mediaProperties.webrtcMediaConnection?.mediaConnection?.pc?.iceConnectionState ||
|
|
5754
|
+
'unknown',
|
|
5755
|
+
});
|
|
5756
|
+
|
|
5731
5757
|
// Clean up stats analyzer, peer connection, and turn off listeners
|
|
5732
5758
|
const stopStatsAnalyzer = this.statsAnalyzer
|
|
5733
5759
|
? this.statsAnalyzer.stopAnalyzer()
|
|
@@ -5746,17 +5772,6 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
|
5746
5772
|
error
|
|
5747
5773
|
);
|
|
5748
5774
|
|
|
5749
|
-
Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.ADD_MEDIA_FAILURE, {
|
|
5750
|
-
correlation_id: this.correlationId,
|
|
5751
|
-
locus_id: this.locusUrl.split('/').pop(),
|
|
5752
|
-
reason: error.message,
|
|
5753
|
-
stack: error.stack,
|
|
5754
|
-
code: error.code,
|
|
5755
|
-
turnDiscoverySkippedReason,
|
|
5756
|
-
turnServerUsed,
|
|
5757
|
-
isMultistream: this.isMultistream,
|
|
5758
|
-
});
|
|
5759
|
-
|
|
5760
5775
|
// Upload logs on error while adding media
|
|
5761
5776
|
Trigger.trigger(
|
|
5762
5777
|
this,
|
package/src/meetings/util.ts
CHANGED
|
@@ -16,6 +16,8 @@ import {
|
|
|
16
16
|
} from '../constants';
|
|
17
17
|
import LoggerProxy from '../common/logs/logger-proxy';
|
|
18
18
|
import Trigger from '../common/events/trigger-proxy';
|
|
19
|
+
import BEHAVIORAL_METRICS from '../metrics/constants';
|
|
20
|
+
import Metrics from '../metrics';
|
|
19
21
|
|
|
20
22
|
/**
|
|
21
23
|
* Meetings Media Codec Missing Event
|
|
@@ -49,6 +51,14 @@ MeetingsUtil.handleRoapMercury = (envelope, meetingCollection) => {
|
|
|
49
51
|
if (meeting) {
|
|
50
52
|
const {seq, messageType, tieBreaker, errorType, errorCause} = data.message;
|
|
51
53
|
|
|
54
|
+
Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.ROAP_MERCURY_EVENT_RECEIVED, {
|
|
55
|
+
correlation_id: data.correlationId,
|
|
56
|
+
seq,
|
|
57
|
+
message_type: messageType,
|
|
58
|
+
error_type: errorType,
|
|
59
|
+
error_cause: errorCause,
|
|
60
|
+
});
|
|
61
|
+
|
|
52
62
|
if (messageType === ROAP.ROAP_TYPES.TURN_DISCOVERY_RESPONSE) {
|
|
53
63
|
// turn discovery is not part of normal roap protocol and so we are not handling it
|
|
54
64
|
// through the usual roap state machine
|
package/src/metrics/constants.ts
CHANGED
|
@@ -9,6 +9,7 @@ const BEHAVIORAL_METRICS = {
|
|
|
9
9
|
JOIN_FAILURE: 'js_sdk_join_failures',
|
|
10
10
|
ADD_MEDIA_SUCCESS: 'js_sdk_add_media_success',
|
|
11
11
|
ADD_MEDIA_FAILURE: 'js_sdk_add_media_failures',
|
|
12
|
+
ROAP_MERCURY_EVENT_RECEIVED: 'js_sdk_roap_mercury_received',
|
|
12
13
|
CONNECTION_SUCCESS: 'js_sdk_connection_success',
|
|
13
14
|
CONNECTION_FAILURE: 'js_sdk_connection_failures',
|
|
14
15
|
MEETING_LEAVE_FAILURE: 'js_sdk_meeting_leave_failure',
|
|
@@ -97,6 +97,14 @@ describe('plugin-meetings', () => {
|
|
|
97
97
|
assert.equal(parsedControls.raiseHand.enabled, newControls.raiseHand.enabled);
|
|
98
98
|
});
|
|
99
99
|
|
|
100
|
+
it('should parse the video control', () => {
|
|
101
|
+
const newControls = {video: {enabled: true}};
|
|
102
|
+
|
|
103
|
+
const parsedControls = ControlsUtils.parse(newControls);
|
|
104
|
+
|
|
105
|
+
assert.equal(parsedControls.video.enabled, newControls.video.enabled);
|
|
106
|
+
});
|
|
107
|
+
|
|
100
108
|
describe('videoEnabled', () => {
|
|
101
109
|
it('returns expected', () => {
|
|
102
110
|
const result = ControlsUtils.parse({video: {enabled: true}});
|
|
@@ -1229,6 +1229,9 @@ describe('plugin-meetings', () => {
|
|
|
1229
1229
|
turnDiscoverySkippedReason: undefined,
|
|
1230
1230
|
turnServerUsed: true,
|
|
1231
1231
|
isMultistream: false,
|
|
1232
|
+
signalingState: 'unknown',
|
|
1233
|
+
connectionState: 'unknown',
|
|
1234
|
+
iceConnectionState: 'unknown'
|
|
1232
1235
|
});
|
|
1233
1236
|
});
|
|
1234
1237
|
|
|
@@ -1248,6 +1251,9 @@ describe('plugin-meetings', () => {
|
|
|
1248
1251
|
turnDiscoverySkippedReason: 'config',
|
|
1249
1252
|
turnServerUsed: false,
|
|
1250
1253
|
isMultistream: false,
|
|
1254
|
+
signalingState: 'unknown',
|
|
1255
|
+
connectionState: 'unknown',
|
|
1256
|
+
iceConnectionState: 'unknown'
|
|
1251
1257
|
});
|
|
1252
1258
|
});
|
|
1253
1259
|
});
|
|
@@ -1261,22 +1267,111 @@ describe('plugin-meetings', () => {
|
|
|
1261
1267
|
});
|
|
1262
1268
|
const result = await assert.isRejected(meeting.addMedia());
|
|
1263
1269
|
|
|
1270
|
+
|
|
1271
|
+
assert(Metrics.sendBehavioralMetric.calledOnce);
|
|
1272
|
+
assert.calledWith(
|
|
1273
|
+
Metrics.sendBehavioralMetric,
|
|
1274
|
+
BEHAVIORAL_METRICS.ADD_MEDIA_FAILURE,
|
|
1275
|
+
sinon.match({
|
|
1276
|
+
correlation_id: meeting.correlationId,
|
|
1277
|
+
locus_id: meeting.locusUrl.split('/').pop(),
|
|
1278
|
+
reason: result.message,
|
|
1279
|
+
turnDiscoverySkippedReason: undefined,
|
|
1280
|
+
turnServerUsed: true,
|
|
1281
|
+
isMultistream: false,
|
|
1282
|
+
signalingState: 'unknown',
|
|
1283
|
+
connectionState: 'unknown',
|
|
1284
|
+
iceConnectionState: 'unknown'
|
|
1285
|
+
})
|
|
1286
|
+
);
|
|
1287
|
+
|
|
1264
1288
|
assert.instanceOf(result, Error);
|
|
1265
1289
|
assert.isNull(meeting.mediaProperties.webrtcMediaConnection);
|
|
1266
1290
|
|
|
1291
|
+
});
|
|
1292
|
+
|
|
1293
|
+
it('should include the peer connection properties correctly for multistream', async () => {
|
|
1294
|
+
meeting.meetingState = 'ACTIVE';
|
|
1295
|
+
// setup the mock to return an incomplete object - this will cause addMedia to fail
|
|
1296
|
+
// because some methods (like on() or initiateOffer()) are missing
|
|
1297
|
+
Media.createMediaConnection = sinon.stub().returns({
|
|
1298
|
+
close: sinon.stub(),
|
|
1299
|
+
multistreamConnection :{
|
|
1300
|
+
pc: {
|
|
1301
|
+
pc: {
|
|
1302
|
+
signalingState: 'have-local-offer',
|
|
1303
|
+
connectionState: 'connecting',
|
|
1304
|
+
iceConnectionState: 'checking',
|
|
1305
|
+
}
|
|
1306
|
+
}
|
|
1307
|
+
}
|
|
1308
|
+
});
|
|
1309
|
+
// set a statsAnalyzer on the meeting so that we can check that it gets reset to null
|
|
1310
|
+
meeting.statsAnalyzer = {stopAnalyzer: sinon.stub().resolves()};
|
|
1311
|
+
const error = await assert.isRejected(meeting.addMedia());
|
|
1312
|
+
|
|
1313
|
+
assert.calledWith(
|
|
1314
|
+
Metrics.sendBehavioralMetric,
|
|
1315
|
+
BEHAVIORAL_METRICS.ADD_MEDIA_FAILURE,
|
|
1316
|
+
sinon.match({
|
|
1317
|
+
correlation_id: meeting.correlationId,
|
|
1318
|
+
locus_id: meeting.locusUrl.split('/').pop(),
|
|
1319
|
+
reason: error.message,
|
|
1320
|
+
stack: error.stack,
|
|
1321
|
+
code: error.code,
|
|
1322
|
+
turnDiscoverySkippedReason: undefined,
|
|
1323
|
+
turnServerUsed: true,
|
|
1324
|
+
isMultistream: false,
|
|
1325
|
+
signalingState: 'have-local-offer',
|
|
1326
|
+
connectionState: 'connecting',
|
|
1327
|
+
iceConnectionState: 'checking'
|
|
1328
|
+
|
|
1329
|
+
})
|
|
1330
|
+
);
|
|
1331
|
+
|
|
1332
|
+
assert.isNull(meeting.statsAnalyzer);
|
|
1267
1333
|
assert(Metrics.sendBehavioralMetric.calledOnce);
|
|
1334
|
+
});
|
|
1335
|
+
|
|
1336
|
+
it('should include the peer connection properties correctly for transcoded', async () => {
|
|
1337
|
+
meeting.meetingState = 'ACTIVE';
|
|
1338
|
+
// setup the mock to return an incomplete object - this will cause addMedia to fail
|
|
1339
|
+
// because some methods (like on() or initiateOffer()) are missing
|
|
1340
|
+
Media.createMediaConnection = sinon.stub().returns({
|
|
1341
|
+
close: sinon.stub(),
|
|
1342
|
+
mediaConnection :{
|
|
1343
|
+
pc: {
|
|
1344
|
+
signalingState: 'have-local-offer',
|
|
1345
|
+
connectionState: 'connecting',
|
|
1346
|
+
iceConnectionState: 'checking',
|
|
1347
|
+
}
|
|
1348
|
+
}
|
|
1349
|
+
});
|
|
1350
|
+
// set a statsAnalyzer on the meeting so that we can check that it gets reset to null
|
|
1351
|
+
meeting.statsAnalyzer = {stopAnalyzer: sinon.stub().resolves()};
|
|
1352
|
+
const error = await assert.isRejected(meeting.addMedia());
|
|
1353
|
+
|
|
1268
1354
|
assert.calledWith(
|
|
1269
1355
|
Metrics.sendBehavioralMetric,
|
|
1270
1356
|
BEHAVIORAL_METRICS.ADD_MEDIA_FAILURE,
|
|
1271
1357
|
sinon.match({
|
|
1272
1358
|
correlation_id: meeting.correlationId,
|
|
1273
1359
|
locus_id: meeting.locusUrl.split('/').pop(),
|
|
1274
|
-
reason:
|
|
1360
|
+
reason: error.message,
|
|
1361
|
+
stack: error.stack,
|
|
1362
|
+
code: error.code,
|
|
1275
1363
|
turnDiscoverySkippedReason: undefined,
|
|
1276
1364
|
turnServerUsed: true,
|
|
1277
1365
|
isMultistream: false,
|
|
1366
|
+
signalingState: 'have-local-offer',
|
|
1367
|
+
connectionState: 'connecting',
|
|
1368
|
+
iceConnectionState: 'checking'
|
|
1369
|
+
|
|
1278
1370
|
})
|
|
1279
1371
|
);
|
|
1372
|
+
|
|
1373
|
+
assert.isNull(meeting.statsAnalyzer);
|
|
1374
|
+
assert(Metrics.sendBehavioralMetric.calledOnce);
|
|
1280
1375
|
});
|
|
1281
1376
|
|
|
1282
1377
|
it('should work the second time addMedia is called in case the first time fails', async () => {
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import {assert} from '@webex/test-helper-chai';
|
|
2
|
+
import sinon from 'sinon';
|
|
2
3
|
|
|
3
4
|
import MeetingsUtil from '@webex/plugin-meetings/src/meetings/util';
|
|
5
|
+
import Metrics from '@webex/plugin-meetings/src/metrics';
|
|
6
|
+
import BEHAVIORAL_METRICS from '@webex/plugin-meetings/src/metrics/constants';
|
|
4
7
|
|
|
5
8
|
describe('plugin-meetings', () => {
|
|
9
|
+
beforeEach(() => {
|
|
10
|
+
sinon.stub(Metrics, 'sendBehavioralMetric');
|
|
11
|
+
});
|
|
12
|
+
afterEach(() => {
|
|
13
|
+
sinon.restore();
|
|
14
|
+
});
|
|
6
15
|
describe('Meetings utils function', () => {
|
|
7
16
|
describe('#parseDefaultSiteFromMeetingPreferences', () => {
|
|
8
17
|
it('should return the default true site from user preferences', () => {
|
|
@@ -151,6 +160,54 @@ describe('plugin-meetings', () => {
|
|
|
151
160
|
assert.equal(MeetingsUtil.joinedOnThisDevice(meeting, newLocus, '123'), true);
|
|
152
161
|
});
|
|
153
162
|
});
|
|
163
|
+
|
|
164
|
+
describe("#handleRoapMercury", () => {
|
|
165
|
+
it('it sends the correct behaviour metric', () => {
|
|
166
|
+
const roapMessageReceived = sinon.stub();
|
|
167
|
+
const envelope = {
|
|
168
|
+
data: {
|
|
169
|
+
message:{
|
|
170
|
+
seq: "seq",
|
|
171
|
+
messageType: 'messageType',
|
|
172
|
+
tieBreaker: 'tieBreaker',
|
|
173
|
+
errorType: 'errorType',
|
|
174
|
+
errorCause: 'errorCause',
|
|
175
|
+
sdps: [{id:'sdp-1'}]
|
|
176
|
+
},
|
|
177
|
+
correlationId: 'correlationId',
|
|
178
|
+
eventType: 'locus.message.roap',
|
|
179
|
+
}
|
|
180
|
+
};
|
|
181
|
+
const meetingCollection = {
|
|
182
|
+
getByKey: () => ({
|
|
183
|
+
id: 'meeting-id',
|
|
184
|
+
mediaProperties: {
|
|
185
|
+
webrtcMediaConnection: {
|
|
186
|
+
roapMessageReceived
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
})
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
MeetingsUtil.handleRoapMercury(envelope, meetingCollection);
|
|
193
|
+
assert.calledWith(Metrics.sendBehavioralMetric, BEHAVIORAL_METRICS.ROAP_MERCURY_EVENT_RECEIVED, {
|
|
194
|
+
correlation_id: 'correlationId',
|
|
195
|
+
seq: "seq",
|
|
196
|
+
message_type: 'messageType',
|
|
197
|
+
error_type: 'errorType',
|
|
198
|
+
error_cause: 'errorCause',
|
|
199
|
+
})
|
|
200
|
+
assert.calledWith(roapMessageReceived, {
|
|
201
|
+
seq: "seq",
|
|
202
|
+
messageType: 'messageType',
|
|
203
|
+
errorType: 'errorType',
|
|
204
|
+
tieBreaker: 'tieBreaker',
|
|
205
|
+
errorCause: 'errorCause',
|
|
206
|
+
sdp: {id:'sdp-1'}
|
|
207
|
+
})
|
|
208
|
+
|
|
209
|
+
});
|
|
210
|
+
})
|
|
154
211
|
});
|
|
155
212
|
|
|
156
213
|
describe('#isValidBreakoutLocus', () => {
|