@webex/plugin-meetings 3.0.0-beta.338 → 3.0.0-beta.339
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/config.js +2 -1
- package/dist/config.js.map +1 -1
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/reachability/clusterReachability.js +356 -0
- package/dist/reachability/clusterReachability.js.map +1 -0
- package/dist/reachability/index.js +167 -451
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/util.js +29 -0
- package/dist/reachability/util.js.map +1 -0
- package/dist/types/config.d.ts +1 -0
- package/dist/types/meetings/index.d.ts +1 -11
- package/dist/types/reachability/clusterReachability.d.ts +109 -0
- package/dist/types/reachability/index.d.ts +32 -121
- package/dist/types/reachability/util.d.ts +8 -0
- package/dist/webinar/index.js +1 -1
- package/package.json +20 -20
- package/src/config.ts +1 -0
- package/src/reachability/clusterReachability.ts +320 -0
- package/src/reachability/index.ts +124 -421
- package/src/reachability/util.ts +24 -0
- package/test/unit/spec/reachability/clusterReachability.ts +279 -0
- package/test/unit/spec/reachability/index.ts +159 -226
- package/test/unit/spec/reachability/util.ts +40 -0
- package/test/unit/spec/roap/request.ts +26 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["DEFAULT_TIMEOUT","VIDEO_MESH_TIMEOUT","Reachability","webex","REACHABILITY","namespace","reachabilityRequest","ReachabilityRequest","clusterLatencyResults","setup","boundedStorage","del","localStorageResult","localStorageJoinCookie","getClusters","MeetingUtil","getIpVersion","clusters","joinCookie","performReachabilityCheck","results","put","LoggerProxy","logger","log","error","stats","reachability_public_udp_success","reachability_public_udp_failed","reachability_public_tcp_success","reachability_public_tcp_failed","reachability_vmn_udp_success","reachability_vmn_udp_failed","reachability_vmn_tcp_success","reachability_vmn_tcp_failed","updateStats","clusterType","result","udp","reachable","outcome","tcp","get","resultsJson","internalResults","JSON","parse","forEach","isVideoMesh","warn","reachabilityResultsProps","catch","reachabilityData","reachabilityResults","some","e","cluster","iceServers","map","url","username","credential","urls","iceCandidatePoolSize","iceTransportPolicy","key","config","peerConnection","window","RTCPeerConnection","peerConnectionError","startTime","begin","clusterList","buildPeerConnectionConfig","createPeerConnection","createOffer","offerToReceiveAudio","description","setLocalDescription","iceGatheringState","iceGatheringStateError","all","then","parseIceResultsToInternalReachabilityResults","reachabilityLatencyResults","logUnreachableClusters","unreachableList","unreachable","push","onicegatheringstatechange","COMPLETE","ICE_GATHERING_STATE","iceConnectionState","elapsed","getElapsedTime","setLatencyAndClose","onicecandidate","SERVER_REFLEXIVE","candidate","String","type","toLowerCase","addPublicIP","address","ELAPSED","timeout","resolve","peerConnectionProxy","Proxy","target","property","targetMember","bind","set","value","clusterId","publicIPs","Reflect","handleIceGatheringStateChange","handleOnIceCandidate","setTimeout","CLOSED","CONNECTION_STATE","connectionState","list","getUnreachablClusters","iceResults","reachabilityMap","latencyResult","latencyInMilliseconds","toString","clientMediaIPs","untested","xtls","length","getLocalSDPForClusters","localSDPData","publicIP","modifiedPeerConnection","REACHABLE","UNREACHABLE","resultKey","intialState","close"],"sources":["index.ts"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n/* eslint-disable class-methods-use-this */\n/* globals window */\nimport {uniq, mapValues, pick} from 'lodash';\n\nimport LoggerProxy from '../common/logs/logger-proxy';\nimport MeetingUtil from '../meeting/util';\n\nimport {ICE_GATHERING_STATE, CONNECTION_STATE, REACHABILITY} from '../constants';\n\nimport ReachabilityRequest from './request';\n\nconst DEFAULT_TIMEOUT = 3000;\nconst VIDEO_MESH_TIMEOUT = 1000;\n\nexport type ReachabilityMetrics = {\n reachability_public_udp_success: number;\n reachability_public_udp_failed: number;\n reachability_public_tcp_success: number;\n reachability_public_tcp_failed: number;\n reachability_vmn_udp_success: number;\n reachability_vmn_udp_failed: number;\n reachability_vmn_tcp_success: number;\n reachability_vmn_tcp_failed: number;\n};\n\n// result for a specific transport protocol (like udp or tcp)\nexport type TransportResult = {\n reachable?: 'true' | 'false';\n latencyInMilliseconds?: string;\n clientMediaIPs?: string[];\n untested?: 'true';\n};\n\n// reachability result for a specifc media cluster\ntype ReachabilityResult = {\n udp: TransportResult;\n tcp: TransportResult;\n xtls: {\n untested: 'true';\n };\n};\n// this is the type that is required by the backend when we send them reachability results\nexport type ReachabilityResults = Record<string, ReachabilityResult>;\n\n// this is the type used by Reachability class internally and stored in local storage\ntype InternalReachabilityResults = Record<\n string,\n ReachabilityResult & {\n isVideoMesh?: boolean;\n }\n>;\n\nexport type ICECandidateResult = {\n clusterId: string;\n isVideoMesh: boolean;\n elapsed?: string | null;\n publicIPs?: string[];\n};\n/**\n * @class Reachability\n * @export\n */\nexport default class Reachability {\n namespace = REACHABILITY.namespace;\n webex: object;\n reachabilityRequest: any;\n clusterLatencyResults: any;\n\n /**\n * Creates an instance of Reachability.\n * @param {object} webex\n * @memberof Reachability\n */\n constructor(webex: object) {\n this.webex = webex;\n\n /**\n * internal request object for the server\n * @instance\n * @type {Array}\n * @private\n * @memberof Reachability\n */\n this.reachabilityRequest = new ReachabilityRequest(this.webex);\n\n /**\n * internal object of clusters latency results\n * @instance\n * @type {object}\n * @private\n * @memberof Reachability\n */\n this.clusterLatencyResults = {};\n }\n\n /**\n * fetches reachability data\n * @returns {Object} reachability data\n * @public\n * @async\n * @memberof Reachability\n */\n public async gatherReachability(): Promise<InternalReachabilityResults> {\n this.setup();\n\n // Remove stored reachability results to ensure no stale data\n // @ts-ignore\n await this.webex.boundedStorage.del(this.namespace, REACHABILITY.localStorageResult);\n // @ts-ignore\n await this.webex.boundedStorage.del(this.namespace, REACHABILITY.localStorageJoinCookie);\n\n // Fetch clusters and measure latency\n try {\n const {clusters, joinCookie} = await this.reachabilityRequest.getClusters(\n MeetingUtil.getIpVersion(this.webex)\n );\n\n // Perform Reachability Check\n const results = await this.performReachabilityCheck(clusters);\n\n // @ts-ignore\n await this.webex.boundedStorage.put(\n this.namespace,\n REACHABILITY.localStorageResult,\n JSON.stringify(results)\n );\n // @ts-ignore\n await this.webex.boundedStorage.put(\n this.namespace,\n REACHABILITY.localStorageJoinCookie,\n JSON.stringify(joinCookie)\n );\n\n LoggerProxy.logger.log(\n 'Reachability:index#gatherReachability --> Reachability checks completed'\n );\n\n return results;\n } catch (getClusterError) {\n LoggerProxy.logger.error(\n `Reachability:index#gatherReachability --> Error in calling getClusters(): ${getClusterError}`\n );\n\n return {};\n }\n }\n\n /**\n * Returns statistics about last reachability results. The returned value is an object\n * with a flat list of properties so that it can be easily sent with metrics\n *\n * @returns {Promise} Promise with metrics values, it never rejects/throws.\n */\n async getReachabilityMetrics(): Promise<ReachabilityMetrics> {\n const stats: ReachabilityMetrics = {\n reachability_public_udp_success: 0,\n reachability_public_udp_failed: 0,\n reachability_public_tcp_success: 0,\n reachability_public_tcp_failed: 0,\n reachability_vmn_udp_success: 0,\n reachability_vmn_udp_failed: 0,\n reachability_vmn_tcp_success: 0,\n reachability_vmn_tcp_failed: 0,\n };\n\n const updateStats = (clusterType: 'public' | 'vmn', result: ReachabilityResult) => {\n if (result.udp?.reachable) {\n const outcome = result.udp.reachable === 'true' ? 'success' : 'failed';\n stats[`reachability_${clusterType}_udp_${outcome}`] += 1;\n }\n if (result.tcp?.reachable) {\n const outcome = result.tcp.reachable === 'true' ? 'success' : 'failed';\n stats[`reachability_${clusterType}_tcp_${outcome}`] += 1;\n }\n };\n\n try {\n // @ts-ignore\n const resultsJson = await this.webex.boundedStorage.get(\n REACHABILITY.namespace,\n REACHABILITY.localStorageResult\n );\n\n const internalResults: InternalReachabilityResults = JSON.parse(resultsJson);\n\n Object.values(internalResults).forEach((result) => {\n updateStats(result.isVideoMesh ? 'vmn' : 'public', result);\n });\n } catch (e) {\n // empty storage, that's ok\n LoggerProxy.logger.warn(\n 'Roap:request#getReachabilityMetrics --> Error parsing reachability data: ',\n e\n );\n }\n\n return stats;\n }\n\n /**\n * Reachability results as an object in the format that backend expects\n *\n * @returns {any} reachability results that need to be sent to the backend\n */\n async getReachabilityResults(): Promise<ReachabilityResults | undefined> {\n let results: ReachabilityResults;\n\n // these are the only props that backend needs in the reachability results:\n const reachabilityResultsProps: Array<keyof ReachabilityResult> = ['udp', 'tcp', 'xtls'];\n\n try {\n // @ts-ignore\n const resultsJson = await this.webex.boundedStorage.get(\n REACHABILITY.namespace,\n REACHABILITY.localStorageResult\n );\n\n const internalResults: InternalReachabilityResults = JSON.parse(resultsJson);\n\n results = mapValues(internalResults, (result) => pick(result, reachabilityResultsProps));\n } catch (e) {\n // empty storage, that's ok\n LoggerProxy.logger.warn(\n 'Roap:request#attachReachabilityData --> Error parsing reachability data: ',\n e\n );\n }\n\n return results;\n }\n\n /**\n * fetches reachability data and checks for cluster reachability\n * @returns {boolean}\n * @public\n * @memberof Reachability\n */\n async isAnyPublicClusterReachable() {\n let reachable = false;\n // @ts-ignore\n const reachabilityData = await this.webex.boundedStorage\n .get(this.namespace, REACHABILITY.localStorageResult)\n .catch(() => {});\n\n if (reachabilityData) {\n try {\n const reachabilityResults: InternalReachabilityResults = JSON.parse(reachabilityData);\n\n reachable = Object.values(reachabilityResults).some(\n (result) =>\n !result.isVideoMesh &&\n (result.udp?.reachable === 'true' || result.tcp?.reachable === 'true')\n );\n } catch (e) {\n LoggerProxy.logger.error(\n `Roap:request#attachReachabilityData --> Error in parsing reachability data: ${e}`\n );\n }\n }\n\n return reachable;\n }\n\n /**\n * Generate peerConnection config settings\n * @param {object} cluster\n * @returns {object} peerConnectionConfig\n * @private\n * @memberof Reachability\n */\n private buildPeerConnectionConfig(cluster: any) {\n const iceServers = uniq(cluster.udp).map((url) => ({\n username: '',\n credential: '',\n urls: [url],\n }));\n\n return {\n iceServers: [...iceServers],\n iceCandidatePoolSize: '0',\n iceTransportPolicy: 'all',\n };\n }\n\n /**\n * Creates an RTCPeerConnection\n * @param {object} cluster\n * @returns {RTCPeerConnection} peerConnection\n * @private\n * @memberof Reachability\n */\n private createPeerConnection(cluster: any) {\n const {key, config} = cluster;\n\n try {\n const peerConnection = new window.RTCPeerConnection(config);\n\n // @ts-ignore\n peerConnection.key = key;\n\n return peerConnection;\n } catch (peerConnectionError) {\n LoggerProxy.logger.log(\n `Reachability:index#createPeerConnection --> Error creating peerConnection: ${peerConnectionError}`\n );\n\n return null;\n }\n }\n\n /**\n * Gets total elapsed time\n * @param {RTCPeerConnection} peerConnection\n * @returns {Number} Milliseconds\n * @private\n * @memberof Reachability\n */\n private getElapsedTime(peerConnection: any) {\n const startTime = peerConnection.begin;\n\n delete peerConnection.begin;\n\n return Date.now() - startTime;\n }\n\n /**\n * creates offer and generates localSDP\n * @param {object} clusterList cluster List\n * @returns {Promise} Reachability latency results\n * @private\n * @memberof Reachability\n */\n private getLocalSDPForClusters(clusterList: object): Promise<InternalReachabilityResults> {\n let clusters: any[] = [...Object.keys(clusterList)];\n\n clusters = clusters.map(async (key) => {\n const cluster = clusterList[key];\n const config = this.buildPeerConnectionConfig(cluster);\n const peerConnection = this.createPeerConnection({key, config});\n const description = await peerConnection.createOffer({offerToReceiveAudio: true});\n\n // @ts-ignore\n peerConnection.begin = Date.now();\n peerConnection.setLocalDescription(description);\n\n return this.iceGatheringState(peerConnection, cluster.isVideoMesh).catch(\n (iceGatheringStateError) => {\n LoggerProxy.logger.log(\n `Reachability:index#getLocalSDPForClusters --> Error in getLocalSDP : ${iceGatheringStateError}`\n );\n }\n );\n });\n\n return Promise.all(clusters)\n .then(this.parseIceResultsToInternalReachabilityResults)\n .then((reachabilityLatencyResults) => {\n this.logUnreachableClusters();\n\n // return results\n return reachabilityLatencyResults;\n });\n }\n\n /**\n * Get list of all unreachable clusters\n * @returns {array} Unreachable clusters\n * @private\n * @memberof Reachability\n */\n private getUnreachablClusters() {\n const unreachableList = [];\n const clusters = this.clusterLatencyResults;\n\n Object.keys(clusters).forEach((key) => {\n const cluster = clusters[key];\n\n if (cluster.unreachable && !cluster.reachable) {\n unreachableList.push(key);\n }\n });\n\n return unreachableList;\n }\n\n /**\n * Attach an event handler for the icegatheringstatechange\n * event and measure latency.\n * @param {RTCPeerConnection} peerConnection\n * @returns {undefined}\n * @private\n * @memberof Reachability\n */\n private handleIceGatheringStateChange(peerConnection: RTCPeerConnection) {\n peerConnection.onicegatheringstatechange = () => {\n const {COMPLETE} = ICE_GATHERING_STATE;\n\n if (peerConnection.iceConnectionState === COMPLETE) {\n const elapsed = this.getElapsedTime(peerConnection);\n\n // @ts-ignore\n LoggerProxy.logger.log(\n // @ts-ignore\n `Reachability:index#onIceGatheringStateChange --> Successfully pinged ${peerConnection.key}:`,\n elapsed\n );\n this.setLatencyAndClose(peerConnection, elapsed);\n }\n };\n }\n\n /**\n * Attach an event handler for the icecandidate\n * event and measure latency.\n * @param {RTCPeerConnection} peerConnection\n * @returns {undefined}\n * @private\n * @memberof Reachability\n */\n private handleOnIceCandidate(peerConnection: RTCPeerConnection) {\n peerConnection.onicecandidate = (e) => {\n const SERVER_REFLEXIVE = 'srflx';\n\n if (e.candidate && String(e.candidate.type).toLowerCase() === SERVER_REFLEXIVE) {\n const elapsed = this.getElapsedTime(peerConnection);\n\n LoggerProxy.logger.log(\n // @ts-ignore\n `Reachability:index#onIceCandidate --> Successfully pinged ${peerConnection.key}:`,\n elapsed\n );\n // order is important\n this.addPublicIP(peerConnection, e.candidate.address);\n this.setLatencyAndClose(peerConnection, elapsed);\n }\n };\n }\n\n /**\n * An event handler on an RTCPeerConnection when the state of the ICE\n * candidate gathering process changes. Used to measure connection\n * speed.\n * @private\n * @param {RTCPeerConnection} peerConnection\n * @param {boolean} isVideoMesh\n * @returns {Promise}\n */\n private iceGatheringState(peerConnection: RTCPeerConnection, isVideoMesh: boolean) {\n const ELAPSED = 'elapsed';\n\n const timeout = isVideoMesh ? VIDEO_MESH_TIMEOUT : DEFAULT_TIMEOUT;\n\n return new Promise<ICECandidateResult>((resolve) => {\n const peerConnectionProxy = new window.Proxy(peerConnection, {\n // eslint-disable-next-line require-jsdoc\n get(target, property) {\n const targetMember = target[property];\n\n if (typeof targetMember === 'function') {\n return targetMember.bind(target);\n }\n\n return targetMember;\n },\n set: (target, property, value) => {\n // only intercept elapsed property\n if (property === ELAPSED) {\n resolve({\n // @ts-ignore\n clusterId: peerConnection.key,\n isVideoMesh,\n // @ts-ignore\n publicIPs: target.publicIPs,\n elapsed: value,\n });\n\n return true;\n }\n\n // pass thru\n return window.Reflect.set(target, property, value);\n },\n });\n\n // Using peerConnection proxy so handle functions below\n // won't be coupled to our promise implementation\n this.handleIceGatheringStateChange(peerConnectionProxy);\n this.handleOnIceCandidate(peerConnectionProxy);\n\n // Set maximum timeout\n window.setTimeout(() => {\n const {CLOSED} = CONNECTION_STATE;\n\n // Close any open peerConnections\n if (peerConnectionProxy.connectionState !== CLOSED) {\n // order is important\n this.addPublicIP(peerConnectionProxy, null);\n this.setLatencyAndClose(peerConnectionProxy, null);\n }\n }, timeout);\n });\n }\n\n /**\n * Make a log of unreachable clusters.\n * @returns {undefined}\n * @private\n * @memberof Reachability\n */\n private logUnreachableClusters() {\n const list = this.getUnreachablClusters();\n\n list.forEach((cluster) => {\n LoggerProxy.logger.log(\n `Reachability:index#logUnreachableClusters --> No ice candidate for ${cluster}.`\n );\n });\n }\n\n /**\n * Calculates time to establish connection\n * @param {Array<ICECandidateResult>} iceResults iceResults\n * @returns {object} reachabilityMap\n * @protected\n * @memberof Reachability\n */\n protected parseIceResultsToInternalReachabilityResults(\n iceResults: Array<ICECandidateResult>\n ): InternalReachabilityResults {\n const reachabilityMap = {};\n\n iceResults.forEach(({clusterId, isVideoMesh, elapsed, publicIPs}) => {\n const latencyResult = {};\n\n if (!elapsed) {\n Object.assign(latencyResult, {reachable: 'false'});\n } else {\n Object.assign(latencyResult, {\n reachable: 'true',\n latencyInMilliseconds: elapsed.toString(),\n });\n }\n\n if (publicIPs) {\n Object.assign(latencyResult, {\n clientMediaIPs: publicIPs,\n });\n }\n\n reachabilityMap[clusterId] = {\n udp: latencyResult,\n tcp: {untested: 'true'},\n xtls: {untested: 'true'},\n isVideoMesh,\n };\n });\n\n return reachabilityMap;\n }\n\n /**\n * fetches reachability data\n * @param {object} clusterList\n * @returns {Promise<InternalReachabilityResults>} reachability check results\n * @private\n * @memberof Reachability\n */\n private performReachabilityCheck(clusterList: object): Promise<InternalReachabilityResults> {\n if (!clusterList || !Object.keys(clusterList).length) {\n return Promise.resolve({});\n }\n\n return new Promise((resolve) => {\n this.getLocalSDPForClusters(clusterList)\n .then((localSDPData) => {\n if (!localSDPData || !Object.keys(localSDPData).length) {\n // TODO: handle the error condition properly and try retry\n LoggerProxy.logger.log(\n 'Reachability:index#performReachabilityCheck --> Local SDP is empty or has missing elements..returning'\n );\n resolve({});\n } else {\n resolve(localSDPData);\n }\n })\n .catch((error) => {\n LoggerProxy.logger.error(\n `Reachability:index#performReachabilityCheck --> Error in getLocalSDPForClusters: ${error}`\n );\n resolve({});\n });\n });\n }\n\n /**\n * Adds public IP (client media IPs)\n * @param {RTCPeerConnection} peerConnection\n * @param {string} publicIP\n * @returns {void}\n */\n protected addPublicIP(peerConnection: RTCPeerConnection, publicIP?: string | null) {\n const modifiedPeerConnection: RTCPeerConnection & {publicIPs?: string[]} = peerConnection;\n const {CLOSED} = CONNECTION_STATE;\n\n if (modifiedPeerConnection.connectionState === CLOSED) {\n LoggerProxy.logger.log(\n `Reachability:index#addPublicIP --> Attempting to set publicIP of ${publicIP} on closed peerConnection.`\n );\n }\n\n if (publicIP) {\n if (modifiedPeerConnection.publicIPs) {\n modifiedPeerConnection.publicIPs.push(publicIP);\n } else {\n modifiedPeerConnection.publicIPs = [publicIP];\n }\n } else {\n modifiedPeerConnection.publicIPs = null;\n }\n }\n\n /**\n * Records latency and closes the peerConnection\n * @param {RTCPeerConnection} peerConnection\n * @param {number} elapsed Latency in milliseconds\n * @returns {undefined}\n * @private\n * @memberof Reachability\n */\n private setLatencyAndClose(peerConnection: RTCPeerConnection, elapsed: number) {\n const REACHABLE = 'reachable';\n const UNREACHABLE = 'unreachable';\n const {CLOSED} = CONNECTION_STATE;\n // @ts-ignore\n const {key} = peerConnection;\n const resultKey = elapsed === null ? UNREACHABLE : REACHABLE;\n const intialState = {[REACHABLE]: 0, [UNREACHABLE]: 0};\n\n if (peerConnection.connectionState === CLOSED) {\n LoggerProxy.logger.log(\n `Reachability:index#setLatencyAndClose --> Attempting to set latency of ${elapsed} on closed peerConnection.`\n );\n\n return;\n }\n\n this.clusterLatencyResults[key] = this.clusterLatencyResults[key] || intialState;\n this.clusterLatencyResults[key][resultKey] += 1;\n\n // Set to null in case this fired from\n // an event other than onIceCandidate\n peerConnection.onicecandidate = null;\n peerConnection.close();\n // @ts-ignore\n peerConnection.elapsed = elapsed;\n }\n\n /**\n * utility function\n * @returns {undefined}\n * @private\n * @memberof Reachability\n */\n private setup() {\n this.clusterLatencyResults = {};\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAQA;AACA;AAEA;AAEA;AAEA,IAAMA,eAAe,GAAG,IAAI;AAC5B,IAAMC,kBAAkB,GAAG,IAAI;AA8C/B;AACA;AACA;AACA;AAHA,IAIqBC,YAAY;EAM/B;AACF;AACA;AACA;AACA;EACE,sBAAYC,KAAa,EAAE;IAAA;IAAA,iDAVfC,uBAAY,CAACC,SAAS;IAAA;IAAA;IAAA;IAWhC,IAAI,CAACF,KAAK,GAAGA,KAAK;;IAElB;AACJ;AACA;AACA;AACA;AACA;AACA;IACI,IAAI,CAACG,mBAAmB,GAAG,IAAIC,gBAAmB,CAAC,IAAI,CAACJ,KAAK,CAAC;;IAE9D;AACJ;AACA;AACA;AACA;AACA;AACA;IACI,IAAI,CAACK,qBAAqB,GAAG,CAAC,CAAC;EACjC;;EAEA;AACF;AACA;AACA;AACA;AACA;AACA;EANE;IAAA;IAAA;MAAA,kGAOA;QAAA;QAAA;UAAA;YAAA;cACE,IAAI,CAACC,KAAK,EAAE;;cAEZ;cACA;cAAA;cAAA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KF,MAAM,EAAE;QAC7CpG,oBAAW,CAACC,MAAM,CAACC,GAAG,kFACsDsE,OAAO,gCAClF;QAED;MACF;MAEA,IAAI,CAACtF,qBAAqB,CAACyD,GAAG,CAAC,GAAG,IAAI,CAACzD,qBAAqB,CAACyD,GAAG,CAAC,IAAI8E,WAAW;MAChF,IAAI,CAACvI,qBAAqB,CAACyD,GAAG,CAAC,CAAC6E,SAAS,CAAC,IAAI,CAAC;;MAE/C;MACA;MACA3E,cAAc,CAAC8B,cAAc,GAAG,IAAI;MACpC9B,cAAc,CAAC6E,KAAK,EAAE;MACtB;MACA7E,cAAc,CAAC2B,OAAO,GAAGA,OAAO;IAClC;;IAEA;AACF;AACA;AACA;AACA;AACA;EALE;IAAA;IAAA,OAMA,iBAAgB;MACd,IAAI,CAACtF,qBAAqB,GAAG,CAAC,CAAC;IACjC;EAAC;EAAA;AAAA;AAAA"}
|
|
1
|
+
{"version":3,"names":["Reachability","webex","REACHABILITY","namespace","reachabilityRequest","ReachabilityRequest","clusterReachability","boundedStorage","del","localStorageResult","localStorageJoinCookie","getClusters","MeetingUtil","getIpVersion","clusters","joinCookie","performReachabilityChecks","results","put","LoggerProxy","logger","log","error","stats","reachability_public_udp_success","reachability_public_udp_failed","reachability_public_tcp_success","reachability_public_tcp_failed","reachability_vmn_udp_success","reachability_vmn_udp_failed","reachability_vmn_tcp_success","reachability_vmn_tcp_failed","updateStats","clusterType","result","udp","outcome","tcp","get","resultsJson","JSON","parse","forEach","isVideoMesh","warn","transportResult","output","key","value","reachable","untested","latencyInMilliseconds","toString","allClusterResults","clusterResult","mapTransportResultToBackendDataFormat","xtls","catch","reachabilityData","reachabilityResults","some","e","unreachableList","getResult","push","name","protocol","list","getUnreachableClusters","clusterList","length","resolve","includeTcpReachability","config","meetings","experimental","enableTcpReachability","clusterReachabilityChecks","map","cluster","ClusterReachability","start","then","all","logUnreachableClusters"],"sources":["index.ts"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n/* eslint-disable class-methods-use-this */\nimport {mapValues} from 'lodash';\n\nimport LoggerProxy from '../common/logs/logger-proxy';\nimport MeetingUtil from '../meeting/util';\n\nimport {REACHABILITY} from '../constants';\n\nimport ReachabilityRequest, {ClusterList} from './request';\nimport {\n ClusterReachability,\n ClusterReachabilityResult,\n TransportResult,\n} from './clusterReachability';\n\nexport type ReachabilityMetrics = {\n reachability_public_udp_success: number;\n reachability_public_udp_failed: number;\n reachability_public_tcp_success: number;\n reachability_public_tcp_failed: number;\n reachability_vmn_udp_success: number;\n reachability_vmn_udp_failed: number;\n reachability_vmn_tcp_success: number;\n reachability_vmn_tcp_failed: number;\n};\n\n/**\n * This is the type that matches what backend expects us to send to them. It is a bit weird, because\n * it uses strings instead of booleans and numbers, but that's what they require.\n */\nexport type TransportResultForBackend = {\n reachable?: 'true' | 'false';\n latencyInMilliseconds?: string;\n clientMediaIPs?: string[];\n untested?: 'true';\n};\n\nexport type ReachabilityResultForBackend = {\n udp: TransportResultForBackend;\n tcp: TransportResultForBackend;\n xtls: TransportResultForBackend;\n};\n\n// this is the type that is required by the backend when we send them reachability results\nexport type ReachabilityResultsForBackend = Record<string, ReachabilityResultForBackend>;\n\n// this is the type used by Reachability class internally and stored in local storage\nexport type ReachabilityResults = Record<\n string,\n ClusterReachabilityResult & {\n isVideoMesh?: boolean;\n }\n>;\n\n/**\n * @class Reachability\n * @export\n */\nexport default class Reachability {\n namespace = REACHABILITY.namespace;\n webex: object;\n reachabilityRequest: ReachabilityRequest;\n clusterReachability: {\n [key: string]: ClusterReachability;\n };\n\n /**\n * Creates an instance of Reachability.\n * @param {object} webex\n * @memberof Reachability\n */\n constructor(webex: object) {\n this.webex = webex;\n\n /**\n * internal request object for the server\n * @instance\n * @type {Array}\n * @private\n * @memberof Reachability\n */\n this.reachabilityRequest = new ReachabilityRequest(this.webex);\n\n this.clusterReachability = {};\n }\n\n /**\n * Gets a list of media clusters from the backend and performs reachability checks on all the clusters\n * @returns {Promise<ReachabilityResults>} reachability results\n * @public\n * @memberof Reachability\n */\n public async gatherReachability(): Promise<ReachabilityResults> {\n // Remove stored reachability results to ensure no stale data\n // @ts-ignore\n await this.webex.boundedStorage.del(this.namespace, REACHABILITY.localStorageResult);\n // @ts-ignore\n await this.webex.boundedStorage.del(this.namespace, REACHABILITY.localStorageJoinCookie);\n\n // Fetch clusters and measure latency\n try {\n const {clusters, joinCookie} = await this.reachabilityRequest.getClusters(\n MeetingUtil.getIpVersion(this.webex)\n );\n\n // Perform Reachability Check\n const results = await this.performReachabilityChecks(clusters);\n\n // @ts-ignore\n await this.webex.boundedStorage.put(\n this.namespace,\n REACHABILITY.localStorageResult,\n JSON.stringify(results)\n );\n // @ts-ignore\n await this.webex.boundedStorage.put(\n this.namespace,\n REACHABILITY.localStorageJoinCookie,\n JSON.stringify(joinCookie)\n );\n\n LoggerProxy.logger.log(\n 'Reachability:index#gatherReachability --> Reachability checks completed'\n );\n\n return results;\n } catch (error) {\n LoggerProxy.logger.error(`Reachability:index#gatherReachability --> Error:`, error);\n\n return {};\n }\n }\n\n /**\n * Returns statistics about last reachability results. The returned value is an object\n * with a flat list of properties so that it can be easily sent with metrics\n *\n * @returns {Promise} Promise with metrics values, it never rejects/throws.\n */\n async getReachabilityMetrics(): Promise<ReachabilityMetrics> {\n const stats: ReachabilityMetrics = {\n reachability_public_udp_success: 0,\n reachability_public_udp_failed: 0,\n reachability_public_tcp_success: 0,\n reachability_public_tcp_failed: 0,\n reachability_vmn_udp_success: 0,\n reachability_vmn_udp_failed: 0,\n reachability_vmn_tcp_success: 0,\n reachability_vmn_tcp_failed: 0,\n };\n\n const updateStats = (clusterType: 'public' | 'vmn', result: ClusterReachabilityResult) => {\n if (result.udp && result.udp.result !== 'untested') {\n const outcome = result.udp.result === 'reachable' ? 'success' : 'failed';\n stats[`reachability_${clusterType}_udp_${outcome}`] += 1;\n }\n if (result.tcp && result.tcp.result !== 'untested') {\n const outcome = result.tcp.result === 'reachable' ? 'success' : 'failed';\n stats[`reachability_${clusterType}_tcp_${outcome}`] += 1;\n }\n };\n\n try {\n // @ts-ignore\n const resultsJson = await this.webex.boundedStorage.get(\n REACHABILITY.namespace,\n REACHABILITY.localStorageResult\n );\n\n const results: ReachabilityResults = JSON.parse(resultsJson);\n\n Object.values(results).forEach((result) => {\n updateStats(result.isVideoMesh ? 'vmn' : 'public', result);\n });\n } catch (e) {\n // empty storage, that's ok\n LoggerProxy.logger.warn(\n 'Roap:request#getReachabilityMetrics --> Error parsing reachability data: ',\n e\n );\n }\n\n return stats;\n }\n\n /**\n * Maps our internal transport result to the format that backend expects\n * @param {TransportResult} transportResult\n * @returns {TransportResultForBackend}\n */\n private mapTransportResultToBackendDataFormat(\n transportResult: TransportResult\n ): TransportResultForBackend {\n const output: TransportResultForBackend = {};\n\n for (const [key, value] of Object.entries(transportResult)) {\n switch (key) {\n case 'result':\n switch (value) {\n case 'reachable':\n output.reachable = 'true';\n break;\n case 'unreachable':\n output.reachable = 'false';\n break;\n case 'untested':\n output.untested = 'true';\n break;\n }\n break;\n case 'latencyInMilliseconds':\n output.latencyInMilliseconds = value.toString();\n break;\n default:\n output[key] = value;\n }\n }\n\n return output;\n }\n\n /**\n * Reachability results as an object in the format that backend expects\n *\n * @returns {any} reachability results that need to be sent to the backend\n */\n async getReachabilityResults(): Promise<ReachabilityResultsForBackend | undefined> {\n let results: ReachabilityResultsForBackend;\n\n try {\n // @ts-ignore\n const resultsJson = await this.webex.boundedStorage.get(\n REACHABILITY.namespace,\n REACHABILITY.localStorageResult\n );\n\n const allClusterResults: ReachabilityResults = JSON.parse(resultsJson);\n\n results = mapValues(allClusterResults, (clusterResult) => ({\n udp: this.mapTransportResultToBackendDataFormat(clusterResult.udp || {result: 'untested'}),\n tcp: this.mapTransportResultToBackendDataFormat(clusterResult.tcp || {result: 'untested'}),\n xtls: this.mapTransportResultToBackendDataFormat(\n clusterResult.xtls || {result: 'untested'}\n ),\n }));\n } catch (e) {\n // empty storage, that's ok\n LoggerProxy.logger.warn(\n 'Roap:request#attachReachabilityData --> Error parsing reachability data: ',\n e\n );\n }\n\n return results;\n }\n\n /**\n * fetches reachability data and checks for cluster reachability\n * @returns {boolean}\n * @public\n * @memberof Reachability\n */\n async isAnyPublicClusterReachable() {\n let reachable = false;\n // @ts-ignore\n const reachabilityData = await this.webex.boundedStorage\n .get(this.namespace, REACHABILITY.localStorageResult)\n .catch(() => {});\n\n if (reachabilityData) {\n try {\n const reachabilityResults: ReachabilityResults = JSON.parse(reachabilityData);\n\n reachable = Object.values(reachabilityResults).some(\n (result) =>\n !result.isVideoMesh &&\n (result.udp?.result === 'reachable' || result.tcp?.result === 'reachable')\n );\n } catch (e) {\n LoggerProxy.logger.error(\n `Roap:request#attachReachabilityData --> Error in parsing reachability data: ${e}`\n );\n }\n }\n\n return reachable;\n }\n\n /**\n * Get list of all unreachable clusters\n * @returns {array} Unreachable clusters\n * @private\n * @memberof Reachability\n */\n private getUnreachableClusters(): Array<{name: string; protocol: string}> {\n const unreachableList = [];\n\n Object.entries(this.clusterReachability).forEach(([key, clusterReachability]) => {\n const result = clusterReachability.getResult();\n\n if (result.udp.result === 'unreachable') {\n unreachableList.push({name: key, protocol: 'udp'});\n }\n if (result.tcp.result === 'unreachable') {\n unreachableList.push({name: key, protocol: 'tcp'});\n }\n });\n\n return unreachableList;\n }\n\n /**\n * Make a log of unreachable clusters.\n * @returns {undefined}\n * @private\n * @memberof Reachability\n */\n private logUnreachableClusters() {\n const list = this.getUnreachableClusters();\n\n list.forEach(({name, protocol}) => {\n LoggerProxy.logger.log(\n `Reachability:index#logUnreachableClusters --> failed to reach ${name} over ${protocol}`\n );\n });\n }\n\n /**\n * Performs reachability checks for all clusters\n * @param {ClusterList} clusterList\n * @returns {Promise<ReachabilityResults>} reachability check results\n */\n private async performReachabilityChecks(clusterList: ClusterList): Promise<ReachabilityResults> {\n const results: ReachabilityResults = {};\n\n if (!clusterList || !Object.keys(clusterList).length) {\n return Promise.resolve(results);\n }\n\n // @ts-ignore\n const includeTcpReachability = this.webex.config.meetings.experimental.enableTcpReachability;\n\n LoggerProxy.logger.log(\n `Reachability:index#performReachabilityChecks --> doing UDP${\n includeTcpReachability ? ' and TCP' : ''\n } reachability checks`\n );\n\n const clusterReachabilityChecks = Object.keys(clusterList).map((key) => {\n const cluster = clusterList[key];\n\n if (!includeTcpReachability) {\n cluster.tcp = [];\n }\n\n this.clusterReachability[key] = new ClusterReachability(key, cluster);\n\n return this.clusterReachability[key].start().then((result) => {\n results[key] = result;\n results[key].isVideoMesh = cluster.isVideoMesh;\n });\n });\n\n await Promise.all(clusterReachabilityChecks);\n\n this.logUnreachableClusters();\n\n return results;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAOA;AACA;AAEA;AAEA;AACA;AA6CA;AACA;AACA;AACA;AAHA,IAIqBA,YAAY;EAQ/B;AACF;AACA;AACA;AACA;EACE,sBAAYC,KAAa,EAAE;IAAA;IAAA,iDAZfC,uBAAY,CAACC,SAAS;IAAA;IAAA;IAAA;IAahC,IAAI,CAACF,KAAK,GAAGA,KAAK;;IAElB;AACJ;AACA;AACA;AACA;AACA;AACA;IACI,IAAI,CAACG,mBAAmB,GAAG,IAAIC,gBAAmB,CAAC,IAAI,CAACJ,KAAK,CAAC;IAE9D,IAAI,CAACK,mBAAmB,GAAG,CAAC,CAAC;EAC/B;;EAEA;AACF;AACA;AACA;AACA;AACA;EALE;IAAA;IAAA;MAAA,kGAMA;QAAA;QAAA;UAAA;YAAA;cAAA;cAAA,OAGQ,IAAI,CAACL,KAAK,CAACM,cAAc,CAACC,GAAG,CAAC,IAAI,CAACL,SAAS,EAAED,uBAAY,CAACO,kBAAkB,CAAC;YAAA;cAAA;cAAA,OAE9E,IAAI,CAACR,KAAK,CAACM,cAAc,CAACC,GAAG,CAAC,IAAI,CAACL,SAAS,EAAED,uBAAY,CAACQ,sBAAsB,CAAC;YAAA;cAAA;cAAA;cAAA,OAIjD,IAAI,CAACN,mBAAmB,C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BAAYR,WAAW,CAAC,CAACS,GAAG,CAAC,UAAC/B,GAAG,EAAK;gBACtE,IAAMgC,OAAO,GAAGV,WAAW,CAACtB,GAAG,CAAC;gBAEhC,IAAI,CAACyB,sBAAsB,EAAE;kBAC3BO,OAAO,CAAC1C,GAAG,GAAG,EAAE;gBAClB;gBAEA,MAAI,CAAC/B,mBAAmB,CAACyC,GAAG,CAAC,GAAG,IAAIiC,wCAAmB,CAACjC,GAAG,EAAEgC,OAAO,CAAC;gBAErE,OAAO,MAAI,CAACzE,mBAAmB,CAACyC,GAAG,CAAC,CAACkC,KAAK,EAAE,CAACC,IAAI,CAAC,UAAChD,MAAM,EAAK;kBAC5DjB,OAAO,CAAC8B,GAAG,CAAC,GAAGb,MAAM;kBACrBjB,OAAO,CAAC8B,GAAG,CAAC,CAACJ,WAAW,GAAGoC,OAAO,CAACpC,WAAW;gBAChD,CAAC,CAAC;cACJ,CAAC,CAAC;cAAA;cAAA,OAEI,iBAAQwC,GAAG,CAACN,yBAAyB,CAAC;YAAA;cAE5C,IAAI,CAACO,sBAAsB,EAAE;cAAC,kCAEvBnE,OAAO;YAAA;YAAA;cAAA;UAAA;QAAA;MAAA,CACf;MAAA;QAAA;MAAA;MAAA;IAAA;EAAA;EAAA;AAAA;AAAA"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
|
|
4
|
+
_Object$defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.convertStunUrlToTurn = convertStunUrlToTurn;
|
|
8
|
+
/* eslint-disable import/prefer-default-export */
|
|
9
|
+
/**
|
|
10
|
+
* Converts a stun url to a turn url
|
|
11
|
+
*
|
|
12
|
+
* @param {string} stunUrl url of a stun server
|
|
13
|
+
* @param {'tcp'|'udp'} protocol what protocol to use for the turn server
|
|
14
|
+
* @returns {string} url of a turn server
|
|
15
|
+
*/
|
|
16
|
+
function convertStunUrlToTurn(stunUrl, protocol) {
|
|
17
|
+
// stunUrl looks like this: "stun:external-media91.public.wjfkm-a-10.prod.infra.webex.com:5004"
|
|
18
|
+
// and we need it to be like this: "turn:external-media91.public.wjfkm-a-10.prod.infra.webex.com:5004?transport=tcp"
|
|
19
|
+
var url = new URL(stunUrl);
|
|
20
|
+
if (url.protocol !== 'stun:') {
|
|
21
|
+
throw new Error("Not a STUN URL: ".concat(stunUrl));
|
|
22
|
+
}
|
|
23
|
+
url.protocol = 'turn:';
|
|
24
|
+
if (protocol === 'tcp') {
|
|
25
|
+
url.searchParams.append('transport', 'tcp');
|
|
26
|
+
}
|
|
27
|
+
return url.toString();
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=util.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["convertStunUrlToTurn","stunUrl","protocol","url","URL","Error","searchParams","append","toString"],"sources":["util.ts"],"sourcesContent":["/* eslint-disable import/prefer-default-export */\n/**\n * Converts a stun url to a turn url\n *\n * @param {string} stunUrl url of a stun server\n * @param {'tcp'|'udp'} protocol what protocol to use for the turn server\n * @returns {string} url of a turn server\n */\nexport function convertStunUrlToTurn(stunUrl: string, protocol: 'udp' | 'tcp') {\n // stunUrl looks like this: \"stun:external-media91.public.wjfkm-a-10.prod.infra.webex.com:5004\"\n // and we need it to be like this: \"turn:external-media91.public.wjfkm-a-10.prod.infra.webex.com:5004?transport=tcp\"\n const url = new URL(stunUrl);\n\n if (url.protocol !== 'stun:') {\n throw new Error(`Not a STUN URL: ${stunUrl}`);\n }\n\n url.protocol = 'turn:';\n if (protocol === 'tcp') {\n url.searchParams.append('transport', 'tcp');\n }\n\n return url.toString();\n}\n"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,oBAAoB,CAACC,OAAe,EAAEC,QAAuB,EAAE;EAC7E;EACA;EACA,IAAMC,GAAG,GAAG,IAAIC,GAAG,CAACH,OAAO,CAAC;EAE5B,IAAIE,GAAG,CAACD,QAAQ,KAAK,OAAO,EAAE;IAC5B,MAAM,IAAIG,KAAK,2BAAoBJ,OAAO,EAAG;EAC/C;EAEAE,GAAG,CAACD,QAAQ,GAAG,OAAO;EACtB,IAAIA,QAAQ,KAAK,KAAK,EAAE;IACtBC,GAAG,CAACG,YAAY,CAACC,MAAM,CAAC,WAAW,EAAE,KAAK,CAAC;EAC7C;EAEA,OAAOJ,GAAG,CAACK,QAAQ,EAAE;AACvB"}
|
package/dist/types/config.d.ts
CHANGED
|
@@ -239,17 +239,7 @@ export default class Meetings extends WebexPlugin {
|
|
|
239
239
|
* @public
|
|
240
240
|
* @memberof Meetings
|
|
241
241
|
*/
|
|
242
|
-
startReachability(): Promise<
|
|
243
|
-
[x: string]: {
|
|
244
|
-
udp: import("../reachability").TransportResult;
|
|
245
|
-
tcp: import("../reachability").TransportResult;
|
|
246
|
-
xtls: {
|
|
247
|
-
untested: "true";
|
|
248
|
-
};
|
|
249
|
-
} & {
|
|
250
|
-
isVideoMesh?: boolean;
|
|
251
|
-
};
|
|
252
|
-
}>;
|
|
242
|
+
startReachability(): Promise<import("../reachability").ReachabilityResults>;
|
|
253
243
|
/**
|
|
254
244
|
* Get geoHint for info for meetings
|
|
255
245
|
* @returns {Promise}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { ClusterNode } from './request';
|
|
2
|
+
export type TransportResult = {
|
|
3
|
+
result: 'reachable' | 'unreachable' | 'untested';
|
|
4
|
+
latencyInMilliseconds?: number;
|
|
5
|
+
clientMediaIPs?: string[];
|
|
6
|
+
};
|
|
7
|
+
export type ClusterReachabilityResult = {
|
|
8
|
+
udp: TransportResult;
|
|
9
|
+
tcp: TransportResult;
|
|
10
|
+
xtls: TransportResult;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* A class that handles reachability checks for a single cluster.
|
|
14
|
+
*/
|
|
15
|
+
export declare class ClusterReachability {
|
|
16
|
+
private numUdpUrls;
|
|
17
|
+
private numTcpUrls;
|
|
18
|
+
private result;
|
|
19
|
+
private pc?;
|
|
20
|
+
private defer;
|
|
21
|
+
private startTimestamp;
|
|
22
|
+
readonly isVideoMesh: boolean;
|
|
23
|
+
readonly name: any;
|
|
24
|
+
/**
|
|
25
|
+
* Constructor for ClusterReachability
|
|
26
|
+
* @param {string} name cluster name
|
|
27
|
+
* @param {ClusterNode} clusterInfo information about the media cluster
|
|
28
|
+
*/
|
|
29
|
+
constructor(name: string, clusterInfo: ClusterNode);
|
|
30
|
+
/**
|
|
31
|
+
* Gets total elapsed time, can be called only after start() is called
|
|
32
|
+
* @returns {Number} Milliseconds
|
|
33
|
+
*/
|
|
34
|
+
private getElapsedTime;
|
|
35
|
+
/**
|
|
36
|
+
* Generate peerConnection config settings
|
|
37
|
+
* @param {ClusterNode} cluster
|
|
38
|
+
* @returns {RTCConfiguration} peerConnectionConfig
|
|
39
|
+
*/
|
|
40
|
+
private buildPeerConnectionConfig;
|
|
41
|
+
/**
|
|
42
|
+
* Creates an RTCPeerConnection
|
|
43
|
+
* @param {ClusterNode} clusterInfo information about the media cluster
|
|
44
|
+
* @returns {RTCPeerConnection} peerConnection
|
|
45
|
+
*/
|
|
46
|
+
private createPeerConnection;
|
|
47
|
+
/**
|
|
48
|
+
* @returns {ClusterReachabilityResult} reachability result for this cluster
|
|
49
|
+
*/
|
|
50
|
+
getResult(): ClusterReachabilityResult;
|
|
51
|
+
/**
|
|
52
|
+
* Closes the peerConnection
|
|
53
|
+
*
|
|
54
|
+
* @returns {void}
|
|
55
|
+
*/
|
|
56
|
+
private closePeerConnection;
|
|
57
|
+
/**
|
|
58
|
+
* Resolves the defer, indicating that reachability checks for this cluster are completed
|
|
59
|
+
*
|
|
60
|
+
* @returns {void}
|
|
61
|
+
*/
|
|
62
|
+
private finishReachabilityCheck;
|
|
63
|
+
/**
|
|
64
|
+
* Adds public IP (client media IPs)
|
|
65
|
+
* @param {string} protocol
|
|
66
|
+
* @param {string} publicIP
|
|
67
|
+
* @returns {void}
|
|
68
|
+
*/
|
|
69
|
+
private addPublicIP;
|
|
70
|
+
/**
|
|
71
|
+
* Registers a listener for the iceGatheringStateChange event
|
|
72
|
+
*
|
|
73
|
+
* @returns {void}
|
|
74
|
+
*/
|
|
75
|
+
private registerIceGatheringStateChangeListener;
|
|
76
|
+
/**
|
|
77
|
+
* Checks if we have the results for all the protocols (UDP and TCP)
|
|
78
|
+
*
|
|
79
|
+
* @returns {boolean} true if we have all results, false otherwise
|
|
80
|
+
*/
|
|
81
|
+
private haveWeGotAllResults;
|
|
82
|
+
/**
|
|
83
|
+
* Stores the latency in the result for the given protocol and marks it as reachable
|
|
84
|
+
*
|
|
85
|
+
* @param {string} protocol
|
|
86
|
+
* @param {number} latency
|
|
87
|
+
* @returns {void}
|
|
88
|
+
*/
|
|
89
|
+
private storeLatencyResult;
|
|
90
|
+
/**
|
|
91
|
+
* Registers a listener for the icecandidate event
|
|
92
|
+
*
|
|
93
|
+
* @returns {void}
|
|
94
|
+
*/
|
|
95
|
+
private registerIceCandidateListener;
|
|
96
|
+
/**
|
|
97
|
+
* Starts the process of doing UDP and TCP reachability checks on the media cluster.
|
|
98
|
+
* XTLS reachability checking is not supported.
|
|
99
|
+
*
|
|
100
|
+
* @returns {Promise}
|
|
101
|
+
*/
|
|
102
|
+
start(): Promise<ClusterReachabilityResult>;
|
|
103
|
+
/**
|
|
104
|
+
* Starts the process of gathering ICE candidates
|
|
105
|
+
*
|
|
106
|
+
* @returns {Promise} promise that's resolved once reachability checks for this cluster are completed or timeout is reached
|
|
107
|
+
*/
|
|
108
|
+
private gatherIceCandidates;
|
|
109
|
+
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
|
|
3
3
|
*/
|
|
4
|
+
import ReachabilityRequest from './request';
|
|
5
|
+
import { ClusterReachability, ClusterReachabilityResult } from './clusterReachability';
|
|
4
6
|
export type ReachabilityMetrics = {
|
|
5
7
|
reachability_public_udp_success: number;
|
|
6
8
|
reachability_public_udp_failed: number;
|
|
@@ -11,29 +13,25 @@ export type ReachabilityMetrics = {
|
|
|
11
13
|
reachability_vmn_tcp_success: number;
|
|
12
14
|
reachability_vmn_tcp_failed: number;
|
|
13
15
|
};
|
|
14
|
-
|
|
16
|
+
/**
|
|
17
|
+
* This is the type that matches what backend expects us to send to them. It is a bit weird, because
|
|
18
|
+
* it uses strings instead of booleans and numbers, but that's what they require.
|
|
19
|
+
*/
|
|
20
|
+
export type TransportResultForBackend = {
|
|
15
21
|
reachable?: 'true' | 'false';
|
|
16
22
|
latencyInMilliseconds?: string;
|
|
17
23
|
clientMediaIPs?: string[];
|
|
18
24
|
untested?: 'true';
|
|
19
25
|
};
|
|
20
|
-
type
|
|
21
|
-
udp:
|
|
22
|
-
tcp:
|
|
23
|
-
xtls:
|
|
24
|
-
untested: 'true';
|
|
25
|
-
};
|
|
26
|
+
export type ReachabilityResultForBackend = {
|
|
27
|
+
udp: TransportResultForBackend;
|
|
28
|
+
tcp: TransportResultForBackend;
|
|
29
|
+
xtls: TransportResultForBackend;
|
|
26
30
|
};
|
|
27
|
-
export type
|
|
28
|
-
type
|
|
31
|
+
export type ReachabilityResultsForBackend = Record<string, ReachabilityResultForBackend>;
|
|
32
|
+
export type ReachabilityResults = Record<string, ClusterReachabilityResult & {
|
|
29
33
|
isVideoMesh?: boolean;
|
|
30
34
|
}>;
|
|
31
|
-
export type ICECandidateResult = {
|
|
32
|
-
clusterId: string;
|
|
33
|
-
isVideoMesh: boolean;
|
|
34
|
-
elapsed?: string | null;
|
|
35
|
-
publicIPs?: string[];
|
|
36
|
-
};
|
|
37
35
|
/**
|
|
38
36
|
* @class Reachability
|
|
39
37
|
* @export
|
|
@@ -41,8 +39,10 @@ export type ICECandidateResult = {
|
|
|
41
39
|
export default class Reachability {
|
|
42
40
|
namespace: string;
|
|
43
41
|
webex: object;
|
|
44
|
-
reachabilityRequest:
|
|
45
|
-
|
|
42
|
+
reachabilityRequest: ReachabilityRequest;
|
|
43
|
+
clusterReachability: {
|
|
44
|
+
[key: string]: ClusterReachability;
|
|
45
|
+
};
|
|
46
46
|
/**
|
|
47
47
|
* Creates an instance of Reachability.
|
|
48
48
|
* @param {object} webex
|
|
@@ -50,13 +50,12 @@ export default class Reachability {
|
|
|
50
50
|
*/
|
|
51
51
|
constructor(webex: object);
|
|
52
52
|
/**
|
|
53
|
-
*
|
|
54
|
-
* @returns {
|
|
53
|
+
* Gets a list of media clusters from the backend and performs reachability checks on all the clusters
|
|
54
|
+
* @returns {Promise<ReachabilityResults>} reachability results
|
|
55
55
|
* @public
|
|
56
|
-
* @async
|
|
57
56
|
* @memberof Reachability
|
|
58
57
|
*/
|
|
59
|
-
gatherReachability(): Promise<
|
|
58
|
+
gatherReachability(): Promise<ReachabilityResults>;
|
|
60
59
|
/**
|
|
61
60
|
* Returns statistics about last reachability results. The returned value is an object
|
|
62
61
|
* with a flat list of properties so that it can be easily sent with metrics
|
|
@@ -64,12 +63,18 @@ export default class Reachability {
|
|
|
64
63
|
* @returns {Promise} Promise with metrics values, it never rejects/throws.
|
|
65
64
|
*/
|
|
66
65
|
getReachabilityMetrics(): Promise<ReachabilityMetrics>;
|
|
66
|
+
/**
|
|
67
|
+
* Maps our internal transport result to the format that backend expects
|
|
68
|
+
* @param {TransportResult} transportResult
|
|
69
|
+
* @returns {TransportResultForBackend}
|
|
70
|
+
*/
|
|
71
|
+
private mapTransportResultToBackendDataFormat;
|
|
67
72
|
/**
|
|
68
73
|
* Reachability results as an object in the format that backend expects
|
|
69
74
|
*
|
|
70
75
|
* @returns {any} reachability results that need to be sent to the backend
|
|
71
76
|
*/
|
|
72
|
-
getReachabilityResults(): Promise<
|
|
77
|
+
getReachabilityResults(): Promise<ReachabilityResultsForBackend | undefined>;
|
|
73
78
|
/**
|
|
74
79
|
* fetches reachability data and checks for cluster reachability
|
|
75
80
|
* @returns {boolean}
|
|
@@ -77,73 +82,13 @@ export default class Reachability {
|
|
|
77
82
|
* @memberof Reachability
|
|
78
83
|
*/
|
|
79
84
|
isAnyPublicClusterReachable(): Promise<boolean>;
|
|
80
|
-
/**
|
|
81
|
-
* Generate peerConnection config settings
|
|
82
|
-
* @param {object} cluster
|
|
83
|
-
* @returns {object} peerConnectionConfig
|
|
84
|
-
* @private
|
|
85
|
-
* @memberof Reachability
|
|
86
|
-
*/
|
|
87
|
-
private buildPeerConnectionConfig;
|
|
88
|
-
/**
|
|
89
|
-
* Creates an RTCPeerConnection
|
|
90
|
-
* @param {object} cluster
|
|
91
|
-
* @returns {RTCPeerConnection} peerConnection
|
|
92
|
-
* @private
|
|
93
|
-
* @memberof Reachability
|
|
94
|
-
*/
|
|
95
|
-
private createPeerConnection;
|
|
96
|
-
/**
|
|
97
|
-
* Gets total elapsed time
|
|
98
|
-
* @param {RTCPeerConnection} peerConnection
|
|
99
|
-
* @returns {Number} Milliseconds
|
|
100
|
-
* @private
|
|
101
|
-
* @memberof Reachability
|
|
102
|
-
*/
|
|
103
|
-
private getElapsedTime;
|
|
104
|
-
/**
|
|
105
|
-
* creates offer and generates localSDP
|
|
106
|
-
* @param {object} clusterList cluster List
|
|
107
|
-
* @returns {Promise} Reachability latency results
|
|
108
|
-
* @private
|
|
109
|
-
* @memberof Reachability
|
|
110
|
-
*/
|
|
111
|
-
private getLocalSDPForClusters;
|
|
112
85
|
/**
|
|
113
86
|
* Get list of all unreachable clusters
|
|
114
87
|
* @returns {array} Unreachable clusters
|
|
115
88
|
* @private
|
|
116
89
|
* @memberof Reachability
|
|
117
90
|
*/
|
|
118
|
-
private
|
|
119
|
-
/**
|
|
120
|
-
* Attach an event handler for the icegatheringstatechange
|
|
121
|
-
* event and measure latency.
|
|
122
|
-
* @param {RTCPeerConnection} peerConnection
|
|
123
|
-
* @returns {undefined}
|
|
124
|
-
* @private
|
|
125
|
-
* @memberof Reachability
|
|
126
|
-
*/
|
|
127
|
-
private handleIceGatheringStateChange;
|
|
128
|
-
/**
|
|
129
|
-
* Attach an event handler for the icecandidate
|
|
130
|
-
* event and measure latency.
|
|
131
|
-
* @param {RTCPeerConnection} peerConnection
|
|
132
|
-
* @returns {undefined}
|
|
133
|
-
* @private
|
|
134
|
-
* @memberof Reachability
|
|
135
|
-
*/
|
|
136
|
-
private handleOnIceCandidate;
|
|
137
|
-
/**
|
|
138
|
-
* An event handler on an RTCPeerConnection when the state of the ICE
|
|
139
|
-
* candidate gathering process changes. Used to measure connection
|
|
140
|
-
* speed.
|
|
141
|
-
* @private
|
|
142
|
-
* @param {RTCPeerConnection} peerConnection
|
|
143
|
-
* @param {boolean} isVideoMesh
|
|
144
|
-
* @returns {Promise}
|
|
145
|
-
*/
|
|
146
|
-
private iceGatheringState;
|
|
91
|
+
private getUnreachableClusters;
|
|
147
92
|
/**
|
|
148
93
|
* Make a log of unreachable clusters.
|
|
149
94
|
* @returns {undefined}
|
|
@@ -152,43 +97,9 @@ export default class Reachability {
|
|
|
152
97
|
*/
|
|
153
98
|
private logUnreachableClusters;
|
|
154
99
|
/**
|
|
155
|
-
*
|
|
156
|
-
* @param {
|
|
157
|
-
* @returns {
|
|
158
|
-
* @protected
|
|
159
|
-
* @memberof Reachability
|
|
160
|
-
*/
|
|
161
|
-
protected parseIceResultsToInternalReachabilityResults(iceResults: Array<ICECandidateResult>): InternalReachabilityResults;
|
|
162
|
-
/**
|
|
163
|
-
* fetches reachability data
|
|
164
|
-
* @param {object} clusterList
|
|
165
|
-
* @returns {Promise<InternalReachabilityResults>} reachability check results
|
|
166
|
-
* @private
|
|
167
|
-
* @memberof Reachability
|
|
168
|
-
*/
|
|
169
|
-
private performReachabilityCheck;
|
|
170
|
-
/**
|
|
171
|
-
* Adds public IP (client media IPs)
|
|
172
|
-
* @param {RTCPeerConnection} peerConnection
|
|
173
|
-
* @param {string} publicIP
|
|
174
|
-
* @returns {void}
|
|
175
|
-
*/
|
|
176
|
-
protected addPublicIP(peerConnection: RTCPeerConnection, publicIP?: string | null): void;
|
|
177
|
-
/**
|
|
178
|
-
* Records latency and closes the peerConnection
|
|
179
|
-
* @param {RTCPeerConnection} peerConnection
|
|
180
|
-
* @param {number} elapsed Latency in milliseconds
|
|
181
|
-
* @returns {undefined}
|
|
182
|
-
* @private
|
|
183
|
-
* @memberof Reachability
|
|
184
|
-
*/
|
|
185
|
-
private setLatencyAndClose;
|
|
186
|
-
/**
|
|
187
|
-
* utility function
|
|
188
|
-
* @returns {undefined}
|
|
189
|
-
* @private
|
|
190
|
-
* @memberof Reachability
|
|
100
|
+
* Performs reachability checks for all clusters
|
|
101
|
+
* @param {ClusterList} clusterList
|
|
102
|
+
* @returns {Promise<ReachabilityResults>} reachability check results
|
|
191
103
|
*/
|
|
192
|
-
private
|
|
104
|
+
private performReachabilityChecks;
|
|
193
105
|
}
|
|
194
|
-
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converts a stun url to a turn url
|
|
3
|
+
*
|
|
4
|
+
* @param {string} stunUrl url of a stun server
|
|
5
|
+
* @param {'tcp'|'udp'} protocol what protocol to use for the turn server
|
|
6
|
+
* @returns {string} url of a turn server
|
|
7
|
+
*/
|
|
8
|
+
export declare function convertStunUrlToTurn(stunUrl: string, protocol: 'udp' | 'tcp'): string;
|
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.0.0-beta.
|
|
65
|
+
version: "3.0.0-beta.339"
|
|
66
66
|
});
|
|
67
67
|
var _default = Webinar;
|
|
68
68
|
exports.default = _default;
|
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.339",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "Cisco EULA (https://www.cisco.com/c/en/us/products/end-user-license-agreement.html)",
|
|
6
6
|
"contributors": [
|
|
@@ -33,12 +33,12 @@
|
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@peculiar/webcrypto": "^1.4.3",
|
|
36
|
-
"@webex/plugin-meetings": "3.0.0-beta.
|
|
37
|
-
"@webex/test-helper-chai": "3.0.0-beta.
|
|
38
|
-
"@webex/test-helper-mocha": "3.0.0-beta.
|
|
39
|
-
"@webex/test-helper-mock-webex": "3.0.0-beta.
|
|
40
|
-
"@webex/test-helper-retry": "3.0.0-beta.
|
|
41
|
-
"@webex/test-helper-test-users": "3.0.0-beta.
|
|
36
|
+
"@webex/plugin-meetings": "3.0.0-beta.339",
|
|
37
|
+
"@webex/test-helper-chai": "3.0.0-beta.339",
|
|
38
|
+
"@webex/test-helper-mocha": "3.0.0-beta.339",
|
|
39
|
+
"@webex/test-helper-mock-webex": "3.0.0-beta.339",
|
|
40
|
+
"@webex/test-helper-retry": "3.0.0-beta.339",
|
|
41
|
+
"@webex/test-helper-test-users": "3.0.0-beta.339",
|
|
42
42
|
"chai": "^4.3.4",
|
|
43
43
|
"chai-as-promised": "^7.1.1",
|
|
44
44
|
"jsdom-global": "3.0.2",
|
|
@@ -47,19 +47,19 @@
|
|
|
47
47
|
"typescript": "^4.7.4"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@webex/common": "3.0.0-beta.
|
|
51
|
-
"@webex/internal-media-core": "2.2.
|
|
52
|
-
"@webex/internal-plugin-conversation": "3.0.0-beta.
|
|
53
|
-
"@webex/internal-plugin-device": "3.0.0-beta.
|
|
54
|
-
"@webex/internal-plugin-llm": "3.0.0-beta.
|
|
55
|
-
"@webex/internal-plugin-mercury": "3.0.0-beta.
|
|
56
|
-
"@webex/internal-plugin-metrics": "3.0.0-beta.
|
|
57
|
-
"@webex/internal-plugin-support": "3.0.0-beta.
|
|
58
|
-
"@webex/internal-plugin-user": "3.0.0-beta.
|
|
59
|
-
"@webex/media-helpers": "3.0.0-beta.
|
|
60
|
-
"@webex/plugin-people": "3.0.0-beta.
|
|
61
|
-
"@webex/plugin-rooms": "3.0.0-beta.
|
|
62
|
-
"@webex/webex-core": "3.0.0-beta.
|
|
50
|
+
"@webex/common": "3.0.0-beta.339",
|
|
51
|
+
"@webex/internal-media-core": "2.2.4",
|
|
52
|
+
"@webex/internal-plugin-conversation": "3.0.0-beta.339",
|
|
53
|
+
"@webex/internal-plugin-device": "3.0.0-beta.339",
|
|
54
|
+
"@webex/internal-plugin-llm": "3.0.0-beta.339",
|
|
55
|
+
"@webex/internal-plugin-mercury": "3.0.0-beta.339",
|
|
56
|
+
"@webex/internal-plugin-metrics": "3.0.0-beta.339",
|
|
57
|
+
"@webex/internal-plugin-support": "3.0.0-beta.339",
|
|
58
|
+
"@webex/internal-plugin-user": "3.0.0-beta.339",
|
|
59
|
+
"@webex/media-helpers": "3.0.0-beta.339",
|
|
60
|
+
"@webex/plugin-people": "3.0.0-beta.339",
|
|
61
|
+
"@webex/plugin-rooms": "3.0.0-beta.339",
|
|
62
|
+
"@webex/webex-core": "3.0.0-beta.339",
|
|
63
63
|
"ampersand-collection": "^2.0.2",
|
|
64
64
|
"bowser": "^2.11.0",
|
|
65
65
|
"btoa": "^1.2.1",
|