@webex/plugin-meetings 3.0.0 → 3.1.0-next.10
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/common/errors/{reconnection-in-progress.js → reconnection-not-started.js} +27 -15
- package/dist/common/errors/reconnection-not-started.js.map +1 -0
- package/dist/config.js +2 -1
- package/dist/config.js.map +1 -1
- package/dist/constants.js +18 -6
- package/dist/constants.js.map +1 -1
- package/dist/index.js +86 -0
- package/dist/index.js.map +1 -1
- package/dist/interpretation/index.js +16 -2
- package/dist/interpretation/index.js.map +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/controlsUtils.js +7 -1
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/index.js +10 -0
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/mediaSharesUtils.js +15 -1
- package/dist/locus-info/mediaSharesUtils.js.map +1 -1
- package/dist/locus-info/selfUtils.js +5 -0
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/media/MediaConnectionAwaiter.js +163 -0
- package/dist/media/MediaConnectionAwaiter.js.map +1 -0
- package/dist/media/index.js +4 -1
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +106 -81
- package/dist/media/properties.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +6 -0
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +1010 -753
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/muteState.js +37 -25
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +32 -23
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/util.js +10 -0
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/util.js +304 -267
- package/dist/meeting-info/util.js.map +1 -1
- package/dist/meeting-info/utilv2.js +334 -295
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/index.js +21 -23
- package/dist/meetings/index.js.map +1 -1
- package/dist/multistream/mediaRequestManager.js +1 -1
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/remoteMediaGroup.js +16 -2
- package/dist/multistream/remoteMediaGroup.js.map +1 -1
- package/dist/multistream/remoteMediaManager.js +179 -65
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- package/dist/multistream/sendSlotManager.js +22 -0
- package/dist/multistream/sendSlotManager.js.map +1 -1
- package/dist/reachability/clusterReachability.js +29 -15
- package/dist/reachability/clusterReachability.js.map +1 -1
- package/dist/reachability/index.js +18 -2
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/request.js +12 -10
- package/dist/reachability/request.js.map +1 -1
- package/dist/reachability/util.js +19 -0
- package/dist/reachability/util.js.map +1 -1
- package/dist/reconnection-manager/index.js +140 -110
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/roap/index.js +15 -0
- package/dist/roap/index.js.map +1 -1
- package/dist/roap/request.js +3 -3
- package/dist/roap/request.js.map +1 -1
- package/dist/roap/turnDiscovery.js +307 -126
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/statsAnalyzer/index.js +57 -30
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/dist/statsAnalyzer/mqaUtil.js +3 -0
- package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
- package/dist/types/common/errors/reconnection-not-started.d.ts +13 -0
- package/dist/{config.d.ts → types/config.d.ts} +1 -0
- package/dist/{constants.d.ts → types/constants.d.ts} +15 -6
- package/dist/types/index.d.ts +19 -0
- package/dist/types/media/MediaConnectionAwaiter.d.ts +61 -0
- package/dist/{media → types/media}/properties.d.ts +26 -2
- package/dist/{meeting → types/meeting}/in-meeting-actions.d.ts +6 -0
- package/dist/{meeting → types/meeting}/index.d.ts +29 -12
- package/dist/{meeting → types/meeting}/muteState.d.ts +2 -8
- package/dist/{meeting → types/meeting}/request.d.ts +3 -0
- package/dist/{meeting → types/meeting}/util.d.ts +3 -0
- package/dist/{meeting-info → types/meeting-info}/index.d.ts +1 -1
- package/dist/{meeting-info → types/meeting-info}/meeting-info-v2.d.ts +1 -1
- package/dist/types/meeting-info/util.d.ts +49 -0
- package/dist/types/meeting-info/utilv2.d.ts +65 -0
- package/dist/{meetings → types/meetings}/index.d.ts +9 -16
- package/dist/{multistream → types/multistream}/mediaRequestManager.d.ts +2 -1
- package/dist/{multistream → types/multistream}/remoteMediaGroup.d.ts +2 -0
- package/dist/{multistream → types/multistream}/remoteMediaManager.d.ts +15 -0
- package/dist/{multistream → types/multistream}/sendSlotManager.d.ts +9 -1
- package/dist/{reachability → types/reachability}/clusterReachability.d.ts +1 -0
- package/dist/{reachability → types/reachability}/index.d.ts +4 -0
- package/dist/{reachability → types/reachability}/util.d.ts +7 -0
- package/dist/{reconnection-manager → types/reconnection-manager}/index.d.ts +4 -14
- package/dist/{roap → types/roap}/index.d.ts +10 -2
- package/dist/{roap → types/roap}/turnDiscovery.d.ts +64 -17
- package/dist/webinar/index.js +1 -1
- package/package.json +23 -23
- package/src/common/errors/reconnection-not-started.ts +25 -0
- package/src/config.ts +1 -0
- package/src/constants.ts +18 -6
- package/src/index.ts +31 -0
- package/src/interpretation/index.ts +18 -1
- package/src/locus-info/controlsUtils.ts +11 -0
- package/src/locus-info/index.ts +16 -0
- package/src/locus-info/mediaSharesUtils.ts +16 -0
- package/src/locus-info/selfUtils.ts +5 -0
- package/src/media/MediaConnectionAwaiter.ts +174 -0
- package/src/media/index.ts +3 -1
- package/src/media/properties.ts +73 -46
- package/src/meeting/in-meeting-actions.ts +12 -0
- package/src/meeting/index.ts +389 -180
- package/src/meeting/muteState.ts +34 -20
- package/src/meeting/request.ts +18 -2
- package/src/meeting/util.ts +9 -0
- package/src/meeting-info/util.ts +241 -233
- package/src/meeting-info/utilv2.ts +250 -243
- package/src/meetings/index.ts +20 -24
- package/src/multistream/mediaRequestManager.ts +4 -1
- package/src/multistream/remoteMediaGroup.ts +19 -0
- package/src/multistream/remoteMediaManager.ts +101 -16
- package/src/multistream/sendSlotManager.ts +28 -0
- package/src/reachability/clusterReachability.ts +20 -5
- package/src/reachability/index.ts +24 -1
- package/src/reachability/request.ts +15 -11
- package/src/reachability/util.ts +21 -0
- package/src/reconnection-manager/index.ts +129 -106
- package/src/roap/index.ts +25 -3
- package/src/roap/request.ts +3 -3
- package/src/roap/turnDiscovery.ts +244 -78
- package/src/statsAnalyzer/index.ts +67 -27
- package/src/statsAnalyzer/mqaUtil.ts +5 -0
- package/test/integration/spec/journey.js +14 -14
- package/test/integration/spec/space-meeting.js +1 -1
- package/test/unit/spec/interpretation/index.ts +39 -3
- package/test/unit/spec/locus-info/controlsUtils.js +20 -0
- package/test/unit/spec/locus-info/index.js +49 -19
- package/test/unit/spec/locus-info/mediaSharesUtils.ts +9 -0
- package/test/unit/spec/locus-info/selfUtils.js +42 -12
- package/test/unit/spec/media/MediaConnectionAwaiter.ts +344 -0
- package/test/unit/spec/media/index.ts +89 -78
- package/test/unit/spec/media/properties.ts +160 -209
- package/test/unit/spec/meeting/in-meeting-actions.ts +6 -0
- package/test/unit/spec/meeting/index.js +833 -205
- package/test/unit/spec/meeting/muteState.js +219 -67
- package/test/unit/spec/meeting/request.js +21 -0
- package/test/unit/spec/meeting/utils.js +9 -1
- package/test/unit/spec/meeting-info/utilv2.js +6 -0
- package/test/unit/spec/meetings/index.js +41 -26
- package/test/unit/spec/multistream/mediaRequestManager.ts +20 -2
- package/test/unit/spec/multistream/remoteMediaGroup.ts +79 -1
- package/test/unit/spec/multistream/remoteMediaManager.ts +199 -1
- package/test/unit/spec/multistream/sendSlotManager.ts +50 -18
- package/test/unit/spec/reachability/clusterReachability.ts +86 -22
- package/test/unit/spec/reachability/index.ts +197 -60
- package/test/unit/spec/reachability/request.js +15 -7
- package/test/unit/spec/reachability/util.ts +32 -2
- package/test/unit/spec/reconnection-manager/index.js +155 -39
- package/test/unit/spec/roap/index.ts +61 -6
- package/test/unit/spec/roap/turnDiscovery.ts +298 -16
- package/test/unit/spec/stats-analyzer/index.js +190 -0
- package/dist/common/errors/reconnection-in-progress.d.ts +0 -9
- package/dist/common/errors/reconnection-in-progress.js.map +0 -1
- package/dist/index.d.ts +0 -7
- package/dist/meeting-info/util.d.ts +0 -2
- package/dist/meeting-info/utilv2.d.ts +0 -2
- package/dist/member/member.types.d.ts +0 -11
- package/dist/member/member.types.js +0 -17
- package/dist/member/member.types.js.map +0 -1
- package/src/common/errors/reconnection-in-progress.ts +0 -8
- package/src/member/member.types.ts +0 -13
- /package/dist/{annotation → types/annotation}/annotation.types.d.ts +0 -0
- /package/dist/{annotation → types/annotation}/constants.d.ts +0 -0
- /package/dist/{annotation → types/annotation}/index.d.ts +0 -0
- /package/dist/{breakouts → types/breakouts}/breakout.d.ts +0 -0
- /package/dist/{breakouts → types/breakouts}/collection.d.ts +0 -0
- /package/dist/{breakouts → types/breakouts}/edit-lock-error.d.ts +0 -0
- /package/dist/{breakouts → types/breakouts}/events.d.ts +0 -0
- /package/dist/{breakouts → types/breakouts}/index.d.ts +0 -0
- /package/dist/{breakouts → types/breakouts}/request.d.ts +0 -0
- /package/dist/{breakouts → types/breakouts}/utils.d.ts +0 -0
- /package/dist/{common → types/common}/browser-detection.d.ts +0 -0
- /package/dist/{common → types/common}/collection.d.ts +0 -0
- /package/dist/{common → types/common}/config.d.ts +0 -0
- /package/dist/{common → types/common}/errors/captcha-error.d.ts +0 -0
- /package/dist/{common → types/common}/errors/intent-to-join.d.ts +0 -0
- /package/dist/{common → types/common}/errors/join-meeting.d.ts +0 -0
- /package/dist/{common → types/common}/errors/media.d.ts +0 -0
- /package/dist/{common → types/common}/errors/no-meeting-info.d.ts +0 -0
- /package/dist/{common → types/common}/errors/parameter.d.ts +0 -0
- /package/dist/{common → types/common}/errors/password-error.d.ts +0 -0
- /package/dist/{common → types/common}/errors/permission.d.ts +0 -0
- /package/dist/{common → types/common}/errors/reclaim-host-role-errors.d.ts +0 -0
- /package/dist/{common → types/common}/errors/reconnection.d.ts +0 -0
- /package/dist/{common → types/common}/errors/stats.d.ts +0 -0
- /package/dist/{common → types/common}/errors/webex-errors.d.ts +0 -0
- /package/dist/{common → types/common}/errors/webex-meetings-error.d.ts +0 -0
- /package/dist/{common → types/common}/events/events-scope.d.ts +0 -0
- /package/dist/{common → types/common}/events/events.d.ts +0 -0
- /package/dist/{common → types/common}/events/trigger-proxy.d.ts +0 -0
- /package/dist/{common → types/common}/events/util.d.ts +0 -0
- /package/dist/{common → types/common}/logs/logger-config.d.ts +0 -0
- /package/dist/{common → types/common}/logs/logger-proxy.d.ts +0 -0
- /package/dist/{common → types/common}/logs/request.d.ts +0 -0
- /package/dist/{common → types/common}/queue.d.ts +0 -0
- /package/dist/{controls-options-manager → types/controls-options-manager}/constants.d.ts +0 -0
- /package/dist/{controls-options-manager → types/controls-options-manager}/enums.d.ts +0 -0
- /package/dist/{controls-options-manager → types/controls-options-manager}/index.d.ts +0 -0
- /package/dist/{controls-options-manager → types/controls-options-manager}/types.d.ts +0 -0
- /package/dist/{controls-options-manager → types/controls-options-manager}/util.d.ts +0 -0
- /package/dist/{interceptors → types/interceptors}/index.d.ts +0 -0
- /package/dist/{interceptors → types/interceptors}/locusRetry.d.ts +0 -0
- /package/dist/{interpretation → types/interpretation}/collection.d.ts +0 -0
- /package/dist/{interpretation → types/interpretation}/index.d.ts +0 -0
- /package/dist/{interpretation → types/interpretation}/siLanguage.d.ts +0 -0
- /package/dist/{locus-info → types/locus-info}/controlsUtils.d.ts +0 -0
- /package/dist/{locus-info → types/locus-info}/embeddedAppsUtils.d.ts +0 -0
- /package/dist/{locus-info → types/locus-info}/fullState.d.ts +0 -0
- /package/dist/{locus-info → types/locus-info}/hostUtils.d.ts +0 -0
- /package/dist/{locus-info → types/locus-info}/index.d.ts +0 -0
- /package/dist/{locus-info → types/locus-info}/infoUtils.d.ts +0 -0
- /package/dist/{locus-info → types/locus-info}/mediaSharesUtils.d.ts +0 -0
- /package/dist/{locus-info → types/locus-info}/parser.d.ts +0 -0
- /package/dist/{locus-info → types/locus-info}/selfUtils.d.ts +0 -0
- /package/dist/{media → types/media}/index.d.ts +0 -0
- /package/dist/{media → types/media}/util.d.ts +0 -0
- /package/dist/{mediaQualityMetrics → types/mediaQualityMetrics}/config.d.ts +0 -0
- /package/dist/{meeting → types/meeting}/locusMediaRequest.d.ts +0 -0
- /package/dist/{meeting → types/meeting}/request.type.d.ts +0 -0
- /package/dist/{meeting → types/meeting}/state.d.ts +0 -0
- /package/dist/{meeting → types/meeting}/voicea-meeting.d.ts +0 -0
- /package/dist/{meeting-info → types/meeting-info}/collection.d.ts +0 -0
- /package/dist/{meeting-info → types/meeting-info}/request.d.ts +0 -0
- /package/dist/{meetings → types/meetings}/collection.d.ts +0 -0
- /package/dist/{meetings → types/meetings}/meetings.types.d.ts +0 -0
- /package/dist/{meetings → types/meetings}/request.d.ts +0 -0
- /package/dist/{meetings → types/meetings}/util.d.ts +0 -0
- /package/dist/{member → types/member}/index.d.ts +0 -0
- /package/dist/{member → types/member}/types.d.ts +0 -0
- /package/dist/{member → types/member}/util.d.ts +0 -0
- /package/dist/{members → types/members}/collection.d.ts +0 -0
- /package/dist/{members → types/members}/index.d.ts +0 -0
- /package/dist/{members → types/members}/request.d.ts +0 -0
- /package/dist/{members → types/members}/types.d.ts +0 -0
- /package/dist/{members → types/members}/util.d.ts +0 -0
- /package/dist/{metrics → types/metrics}/constants.d.ts +0 -0
- /package/dist/{metrics → types/metrics}/index.d.ts +0 -0
- /package/dist/{multistream → types/multistream}/receiveSlot.d.ts +0 -0
- /package/dist/{multistream → types/multistream}/receiveSlotManager.d.ts +0 -0
- /package/dist/{multistream → types/multistream}/remoteMedia.d.ts +0 -0
- /package/dist/{networkQualityMonitor → types/networkQualityMonitor}/index.d.ts +0 -0
- /package/dist/{personal-meeting-room → types/personal-meeting-room}/index.d.ts +0 -0
- /package/dist/{personal-meeting-room → types/personal-meeting-room}/request.d.ts +0 -0
- /package/dist/{personal-meeting-room → types/personal-meeting-room}/util.d.ts +0 -0
- /package/dist/{reachability → types/reachability}/request.d.ts +0 -0
- /package/dist/{reactions → types/reactions}/constants.d.ts +0 -0
- /package/dist/{reactions → types/reactions}/reactions.d.ts +0 -0
- /package/dist/{reactions → types/reactions}/reactions.type.d.ts +0 -0
- /package/dist/{recording-controller → types/recording-controller}/enums.d.ts +0 -0
- /package/dist/{recording-controller → types/recording-controller}/index.d.ts +0 -0
- /package/dist/{recording-controller → types/recording-controller}/util.d.ts +0 -0
- /package/dist/{roap → types/roap}/request.d.ts +0 -0
- /package/dist/{rtcMetrics → types/rtcMetrics}/constants.d.ts +0 -0
- /package/dist/{rtcMetrics → types/rtcMetrics}/index.d.ts +0 -0
- /package/dist/{statsAnalyzer → types/statsAnalyzer}/global.d.ts +0 -0
- /package/dist/{statsAnalyzer → types/statsAnalyzer}/index.d.ts +0 -0
- /package/dist/{statsAnalyzer → types/statsAnalyzer}/mqaUtil.d.ts +0 -0
- /package/dist/{transcription → types/transcription}/index.d.ts +0 -0
- /package/dist/{webinar → types/webinar}/collection.d.ts +0 -0
- /package/dist/{webinar → types/webinar}/index.d.ts +0 -0
- /package/test/unit/spec/locus-info/{lib/selfConstant.js → selfConstant.js} +0 -0
|
@@ -30,169 +30,176 @@ import ParameterError from '../common/errors/parameter';
|
|
|
30
30
|
import LoggerProxy from '../common/logs/logger-proxy';
|
|
31
31
|
import {SpaceIDDeprecatedError} from '../common/errors/webex-errors';
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
/**
|
|
34
|
+
* @class MeetingInfoUtil
|
|
35
|
+
*/
|
|
36
|
+
export default class MeetingInfoUtil {
|
|
37
|
+
static meetingInfoError =
|
|
38
|
+
'MeetingInfo is fetched with the meeting link, SIP URI, phone number, Hydra people ID, or a conversation URL.';
|
|
36
39
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
+
static getParsedUrl(link) {
|
|
41
|
+
try {
|
|
42
|
+
let parsedUrl = url.parse(link);
|
|
40
43
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
if (!parsedUrl) {
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
// hack for links such as <company>.webex.com/meet/<user> without a protocol
|
|
48
|
+
if (!parsedUrl.protocol) {
|
|
49
|
+
parsedUrl = url.parse(`${HTTPS_PROTOCOL}${link}`);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
return parsedUrl;
|
|
53
|
+
} catch (error) {
|
|
54
|
+
LoggerProxy.logger.warn(
|
|
55
|
+
`Meeting-info:util#getParsedUrl --> unable to parse the URL, error: ${error}`
|
|
56
|
+
);
|
|
57
|
+
|
|
58
|
+
return null;
|
|
47
59
|
}
|
|
60
|
+
}
|
|
48
61
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
62
|
+
/**
|
|
63
|
+
* Helper function to check if a string matches a known meeting link pattern
|
|
64
|
+
* @param {String} value string to parse and see if it matches a meeting link
|
|
65
|
+
* @returns {Boolean}
|
|
66
|
+
*/
|
|
67
|
+
static isMeetingLink(value: string) {
|
|
68
|
+
let hostNameBool;
|
|
69
|
+
let pathNameBool;
|
|
70
|
+
const parsedUrl = this.getParsedUrl(value);
|
|
71
|
+
if (parsedUrl) {
|
|
72
|
+
hostNameBool = parsedUrl.hostname && parsedUrl.hostname.includes(WEBEX_DOT_COM);
|
|
73
|
+
pathNameBool =
|
|
74
|
+
parsedUrl.pathname &&
|
|
75
|
+
(parsedUrl.pathname.includes(`/${MEET}`) ||
|
|
76
|
+
parsedUrl.pathname.includes(`/${MEET_M}`) ||
|
|
77
|
+
parsedUrl.pathname.includes(`/${MEET_CISCO}`) ||
|
|
78
|
+
parsedUrl.pathname.includes(`/${MEET_CO}`) ||
|
|
79
|
+
parsedUrl.pathname.includes(`/${JOIN}`));
|
|
80
|
+
}
|
|
54
81
|
|
|
55
|
-
return
|
|
82
|
+
return hostNameBool && pathNameBool;
|
|
56
83
|
}
|
|
57
|
-
};
|
|
58
84
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
const pathNameBool =
|
|
68
|
-
parsedUrl.pathname &&
|
|
69
|
-
(parsedUrl.pathname.includes(`/${MEET}`) ||
|
|
70
|
-
parsedUrl.pathname.includes(`/${MEET_M}`) ||
|
|
71
|
-
parsedUrl.pathname.includes(`/${MEET_CISCO}`) ||
|
|
72
|
-
parsedUrl.pathname.includes(`/${MEET_CO}`) ||
|
|
73
|
-
parsedUrl.pathname.includes(`/${JOIN}`));
|
|
74
|
-
|
|
75
|
-
return hostNameBool && pathNameBool;
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
MeetingInfoUtil.isConversationUrl = (value, webex) => {
|
|
79
|
-
const clusterId = webex.internal.services.getClusterId(value);
|
|
80
|
-
|
|
81
|
-
if (clusterId) {
|
|
82
|
-
return clusterId.endsWith(CONVERSATION_SERVICE);
|
|
85
|
+
static isConversationUrl(value, webex) {
|
|
86
|
+
const clusterId = webex.internal.services.getClusterId(value);
|
|
87
|
+
|
|
88
|
+
if (clusterId) {
|
|
89
|
+
return clusterId.endsWith(CONVERSATION_SERVICE);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
return false;
|
|
83
93
|
}
|
|
84
94
|
|
|
85
|
-
|
|
86
|
-
|
|
95
|
+
static isSipUri(sipString) {
|
|
96
|
+
// TODO: lets remove regex from this equation and user URI matchers and such
|
|
97
|
+
// have not found a great sip uri parser library as of now
|
|
98
|
+
const sipUri = DIALER_REGEX.SIP_ADDRESS.exec(sipString);
|
|
87
99
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
// have not found a great sip uri parser library as of now
|
|
91
|
-
const sipUri = DIALER_REGEX.SIP_ADDRESS.exec(sipString);
|
|
100
|
+
return sipUri;
|
|
101
|
+
}
|
|
92
102
|
|
|
93
|
-
|
|
94
|
-
|
|
103
|
+
static isPhoneNumber(phoneNumber) {
|
|
104
|
+
const isValidNumber = DIALER_REGEX.PHONE_NUMBER.test(phoneNumber);
|
|
95
105
|
|
|
96
|
-
|
|
97
|
-
|
|
106
|
+
return isValidNumber;
|
|
107
|
+
}
|
|
98
108
|
|
|
99
|
-
|
|
100
|
-
};
|
|
109
|
+
static getHydraId(destination) {
|
|
110
|
+
const {type, id, cluster} = deconstructHydraId(destination);
|
|
101
111
|
|
|
102
|
-
|
|
103
|
-
|
|
112
|
+
if (id && UUID_REG.test(id)) {
|
|
113
|
+
if (type === _ROOM_) {
|
|
114
|
+
return {room: true, destination: id, cluster};
|
|
115
|
+
}
|
|
116
|
+
if (type === _PEOPLE_) {
|
|
117
|
+
return {people: true, destination: id, cluster};
|
|
118
|
+
}
|
|
104
119
|
|
|
105
|
-
|
|
106
|
-
if (type === _ROOM_) {
|
|
107
|
-
return {room: true, destination: id, cluster};
|
|
108
|
-
}
|
|
109
|
-
if (type === _PEOPLE_) {
|
|
110
|
-
return {people: true, destination: id, cluster};
|
|
120
|
+
return {};
|
|
111
121
|
}
|
|
112
122
|
|
|
113
123
|
return {};
|
|
114
124
|
}
|
|
115
125
|
|
|
116
|
-
|
|
117
|
-
|
|
126
|
+
static getSipUriFromHydraPersonId(destination, webex) {
|
|
127
|
+
return webex.people
|
|
128
|
+
.get(destination)
|
|
129
|
+
.then((res) => {
|
|
130
|
+
if (res.emails && res.emails.length) {
|
|
131
|
+
return res.emails[0];
|
|
132
|
+
}
|
|
133
|
+
throw new ParameterError('Hydra Id Lookup was an invalid hydra person id.');
|
|
134
|
+
})
|
|
135
|
+
.catch((err) => {
|
|
136
|
+
LoggerProxy.logger.error(
|
|
137
|
+
`Meeting-info:util#MeetingInfoUtil.getSipUriFromHydraPersonId --> getSipUriFromHydraPersonId ${err} `
|
|
138
|
+
);
|
|
139
|
+
throw err;
|
|
140
|
+
});
|
|
141
|
+
}
|
|
118
142
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
143
|
+
static async getDestinationType(from) {
|
|
144
|
+
const {type, webex} = from;
|
|
145
|
+
let {destination} = from;
|
|
146
|
+
|
|
147
|
+
if (type === _PERSONAL_ROOM_) {
|
|
148
|
+
// this case checks if your type is personal room
|
|
149
|
+
if (!destination) {
|
|
150
|
+
// if we are not getting anything in desination we fetch org and user ids from webex instance
|
|
151
|
+
destination = {
|
|
152
|
+
userId: webex.internal.device.userId,
|
|
153
|
+
orgId: webex.internal.device.orgId,
|
|
154
|
+
};
|
|
155
|
+
} else {
|
|
156
|
+
const options = VALID_EMAIL_ADDRESS.test(destination)
|
|
157
|
+
? {email: destination}
|
|
158
|
+
: {id: destination}; // we are assuming userId as default
|
|
159
|
+
const res = await webex.people.list(options);
|
|
160
|
+
|
|
161
|
+
let {orgId, id: userId} = res.items[0];
|
|
162
|
+
|
|
163
|
+
userId = deconstructHydraId(userId).id;
|
|
164
|
+
orgId = deconstructHydraId(orgId).id;
|
|
165
|
+
destination = {userId, orgId};
|
|
125
166
|
}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
);
|
|
132
|
-
throw err;
|
|
133
|
-
});
|
|
134
|
-
|
|
135
|
-
MeetingInfoUtil.getDestinationType = async (from) => {
|
|
136
|
-
const {type, webex} = from;
|
|
137
|
-
let {destination} = from;
|
|
138
|
-
|
|
139
|
-
if (type === _PERSONAL_ROOM_) {
|
|
140
|
-
// this case checks if your type is personal room
|
|
141
|
-
if (!destination) {
|
|
142
|
-
// if we are not getting anything in desination we fetch org and user ids from webex instance
|
|
143
|
-
destination = {
|
|
144
|
-
userId: webex.internal.device.userId,
|
|
145
|
-
orgId: webex.internal.device.orgId,
|
|
167
|
+
}
|
|
168
|
+
if (type) {
|
|
169
|
+
return {
|
|
170
|
+
destination,
|
|
171
|
+
type,
|
|
146
172
|
};
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
: {id: destination}; // we are assuming userId as default
|
|
151
|
-
const res = await webex.people.list(options);
|
|
152
|
-
|
|
153
|
-
let {orgId, id: userId} = res.items[0];
|
|
173
|
+
}
|
|
174
|
+
const options: any = {};
|
|
175
|
+
let hydraId;
|
|
154
176
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
177
|
+
if (webex && webex.config && webex.config.meetings && webex.config.meetings.disableHydraId) {
|
|
178
|
+
hydraId = null;
|
|
179
|
+
} else {
|
|
180
|
+
hydraId = this.getHydraId(destination);
|
|
158
181
|
}
|
|
159
|
-
}
|
|
160
|
-
if (type) {
|
|
161
|
-
return {
|
|
162
|
-
destination,
|
|
163
|
-
type,
|
|
164
|
-
};
|
|
165
|
-
}
|
|
166
|
-
const options: any = {};
|
|
167
|
-
let hydraId;
|
|
168
182
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
}
|
|
183
|
+
if (this.isMeetingLink(destination)) {
|
|
184
|
+
LoggerProxy.logger.warn(
|
|
185
|
+
'Meeting-info:util#generateOptions --> WARN, use of Meeting Link is deprecated, please use a SIP URI instead'
|
|
186
|
+
);
|
|
174
187
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
options.destination = destination;
|
|
191
|
-
} else if (hydraId && hydraId.people) {
|
|
192
|
-
options.type = _SIP_URI_;
|
|
193
|
-
|
|
194
|
-
return MeetingInfoUtil.getSipUriFromHydraPersonId(hydraId && hydraId.destination, webex).then(
|
|
195
|
-
(res) => {
|
|
188
|
+
options.type = _MEETING_LINK_;
|
|
189
|
+
options.destination = destination;
|
|
190
|
+
} else if (this.isSipUri(destination)) {
|
|
191
|
+
options.type = _SIP_URI_;
|
|
192
|
+
options.destination = destination;
|
|
193
|
+
} else if (this.isPhoneNumber(destination)) {
|
|
194
|
+
options.type = _SIP_URI_;
|
|
195
|
+
options.destination = destination;
|
|
196
|
+
} else if (this.isConversationUrl(destination, webex)) {
|
|
197
|
+
options.type = _CONVERSATION_URL_;
|
|
198
|
+
options.destination = destination;
|
|
199
|
+
} else if (hydraId && hydraId.people) {
|
|
200
|
+
options.type = _SIP_URI_;
|
|
201
|
+
|
|
202
|
+
return this.getSipUriFromHydraPersonId(hydraId && hydraId.destination, webex).then((res) => {
|
|
196
203
|
options.destination = res;
|
|
197
204
|
|
|
198
205
|
// Since hydra person ids require a unique case in which they are
|
|
@@ -201,124 +208,124 @@ MeetingInfoUtil.getDestinationType = async (from) => {
|
|
|
201
208
|
options.wasHydraPerson = true;
|
|
202
209
|
|
|
203
210
|
return Promise.resolve(options);
|
|
204
|
-
}
|
|
205
|
-
)
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
211
|
+
});
|
|
212
|
+
} else if (hydraId.room) {
|
|
213
|
+
LoggerProxy.logger.error(
|
|
214
|
+
`Meeting-info:util#getDestinationType --> Using the space ID as a destination is no longer supported. Please refer to the [migration guide](https://github.com/webex/webex-js-sdk/wiki/Migration-to-Unified-Space-Meetings) to migrate to use the meeting ID or SIP address.`
|
|
215
|
+
);
|
|
216
|
+
// Error code 30105 added as Space ID deprecated as of beta, Please refer migration guide.
|
|
217
|
+
throw new SpaceIDDeprecatedError();
|
|
218
|
+
} else {
|
|
219
|
+
LoggerProxy.logger.warn(`Meeting-info:util#getDestinationType --> ${this.meetingInfoError}`);
|
|
220
|
+
throw new ParameterError(`${this.meetingInfoError}`);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
return Promise.resolve(options);
|
|
215
224
|
}
|
|
216
225
|
|
|
217
|
-
|
|
218
|
-
|
|
226
|
+
/**
|
|
227
|
+
* Helper function to build up a correct locus url depending on the value passed
|
|
228
|
+
* @param {Object} options type and value to fetch meeting info
|
|
229
|
+
* @param {String} options.type One of [SIP_URI, PERSONAL_ROOM, MEETING_ID, CONVERSATION_URL, LOCUS_ID, MEETING_LINK]
|
|
230
|
+
* @param {String} options.installedOrgID org ID of user's machine
|
|
231
|
+
* @param {Object} options.destination ?? value.value
|
|
232
|
+
* @returns {Object} returns an object with {resource, method}
|
|
233
|
+
*/
|
|
234
|
+
static getRequestBody(options: {type: string; destination: object} | any) {
|
|
235
|
+
const {type, destination, password, captchaInfo, installedOrgID, locusId, extraParams} =
|
|
236
|
+
options;
|
|
237
|
+
const body: any = {
|
|
238
|
+
...DEFAULT_MEETING_INFO_REQUEST_BODY,
|
|
239
|
+
...extraParams,
|
|
240
|
+
};
|
|
219
241
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
break;
|
|
249
|
-
case _LOCUS_ID_:
|
|
250
|
-
// use meetingID for the completer meeting info for the already started meeting
|
|
251
|
-
if (destination.info?.webExMeetingId) {
|
|
252
|
-
body.meetingKey = destination.info.webExMeetingId;
|
|
253
|
-
} else if (destination.info?.sipUri) {
|
|
254
|
-
body.sipUrl = destination.info.sipUri;
|
|
242
|
+
switch (type) {
|
|
243
|
+
case _SIP_URI_:
|
|
244
|
+
body.sipUrl = destination;
|
|
245
|
+
break;
|
|
246
|
+
case _PERSONAL_ROOM_:
|
|
247
|
+
body.userId = destination.userId;
|
|
248
|
+
body.orgId = destination.orgId;
|
|
249
|
+
break;
|
|
250
|
+
case _MEETING_ID_:
|
|
251
|
+
body.meetingKey = destination;
|
|
252
|
+
break;
|
|
253
|
+
case _CONVERSATION_URL_:
|
|
254
|
+
body.conversationUrl = destination;
|
|
255
|
+
break;
|
|
256
|
+
case _LOCUS_ID_:
|
|
257
|
+
// use meetingID for the completer meeting info for the already started meeting
|
|
258
|
+
if (destination.info?.webExMeetingId) {
|
|
259
|
+
body.meetingKey = destination.info.webExMeetingId;
|
|
260
|
+
} else if (destination.info?.sipUri) {
|
|
261
|
+
body.sipUrl = destination.info.sipUri;
|
|
262
|
+
}
|
|
263
|
+
break;
|
|
264
|
+
case _MEETING_LINK_:
|
|
265
|
+
body.meetingUrl = destination;
|
|
266
|
+
break;
|
|
267
|
+
case _MEETING_UUID_: {
|
|
268
|
+
body.meetingUUID = destination;
|
|
269
|
+
break;
|
|
255
270
|
}
|
|
256
|
-
|
|
257
|
-
case _MEETING_LINK_:
|
|
258
|
-
body.meetingUrl = destination;
|
|
259
|
-
break;
|
|
260
|
-
case _MEETING_UUID_: {
|
|
261
|
-
body.meetingUUID = destination;
|
|
262
|
-
break;
|
|
271
|
+
default:
|
|
263
272
|
}
|
|
264
|
-
default:
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
if (password) {
|
|
268
|
-
body.password = password;
|
|
269
|
-
}
|
|
270
273
|
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
if (installedOrgID) {
|
|
277
|
-
body.installedOrgID = installedOrgID;
|
|
278
|
-
}
|
|
274
|
+
if (password) {
|
|
275
|
+
body.password = password;
|
|
276
|
+
}
|
|
279
277
|
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
278
|
+
if (captchaInfo) {
|
|
279
|
+
body.captchaID = captchaInfo.id;
|
|
280
|
+
body.captchaVerifyCode = captchaInfo.code;
|
|
281
|
+
}
|
|
283
282
|
|
|
284
|
-
|
|
285
|
-
|
|
283
|
+
if (installedOrgID) {
|
|
284
|
+
body.installedOrgID = installedOrgID;
|
|
285
|
+
}
|
|
286
286
|
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
* @returns {String} the site/host part of the URI string (e.g. 'convergedats.webex.com')
|
|
291
|
-
*/
|
|
292
|
-
MeetingInfoUtil.getWebexSite = (uri: string) => {
|
|
293
|
-
const exceptedDomains = ['meet.webex.com', 'meetup.webex.com', 'ciscospark.com'];
|
|
294
|
-
const site = uri?.match(/.+@([^.]+\.[^.]+\.[^.]+)$/)?.[1];
|
|
287
|
+
if (locusId) {
|
|
288
|
+
body.locusId = locusId;
|
|
289
|
+
}
|
|
295
290
|
|
|
296
|
-
|
|
297
|
-
}
|
|
291
|
+
return body;
|
|
292
|
+
}
|
|
298
293
|
|
|
299
|
-
/**
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
switch (type) {
|
|
312
|
-
case _SIP_URI_:
|
|
313
|
-
preferredWebexSite = MeetingInfoUtil.getWebexSite(destination);
|
|
314
|
-
break;
|
|
315
|
-
case _LOCUS_ID_:
|
|
316
|
-
preferredWebexSite = destination.info?.webExSite;
|
|
317
|
-
break;
|
|
318
|
-
default:
|
|
294
|
+
/**
|
|
295
|
+
* Helper function to parse the webex site/host from a URI string.
|
|
296
|
+
* @param {String} uri string (e.g. '10019857020@convergedats.webex.com')
|
|
297
|
+
* @returns {String} the site/host part of the URI string (e.g. 'convergedats.webex.com')
|
|
298
|
+
*/
|
|
299
|
+
static getWebexSite(uri: string) {
|
|
300
|
+
const exceptedDomains = ['meet.webex.com', 'meetup.webex.com', 'ciscospark.com'];
|
|
301
|
+
const site = uri?.match(/.+@([^.]+\.[^.]+\.[^.]+)$/)?.[1];
|
|
302
|
+
const isExceptedDomain = !!site && exceptedDomains.some((domain) => site.includes(domain));
|
|
303
|
+
|
|
304
|
+
return isExceptedDomain ? null : site;
|
|
319
305
|
}
|
|
320
306
|
|
|
321
|
-
|
|
322
|
-
|
|
307
|
+
/**
|
|
308
|
+
* Helper function to return the direct URI for fetching meeting info (to avoid a redirect).
|
|
309
|
+
* @param {Object} options type and value to fetch meeting info
|
|
310
|
+
* @param {String} options.type One of [SIP_URI, PERSONAL_ROOM, MEETING_ID, CONVERSATION_URL, LOCUS_ID, MEETING_LINK]
|
|
311
|
+
* @param {Object} options.destination ?? value.value
|
|
312
|
+
* @returns {String} returns a URI string or null of there is no direct URI
|
|
313
|
+
*/
|
|
314
|
+
static getDirectMeetingInfoURI(options: {type: string; destination: any}) {
|
|
315
|
+
const {type, destination} = options;
|
|
316
|
+
|
|
317
|
+
let preferredWebexSite = null;
|
|
318
|
+
|
|
319
|
+
switch (type) {
|
|
320
|
+
case _SIP_URI_:
|
|
321
|
+
preferredWebexSite = this.getWebexSite(destination);
|
|
322
|
+
break;
|
|
323
|
+
case _LOCUS_ID_:
|
|
324
|
+
preferredWebexSite = destination.info?.webExSite;
|
|
325
|
+
break;
|
|
326
|
+
default:
|
|
327
|
+
}
|
|
323
328
|
|
|
324
|
-
|
|
329
|
+
return preferredWebexSite ? `https://${preferredWebexSite}/wbxappapi/v1/meetingInfo` : null;
|
|
330
|
+
}
|
|
331
|
+
}
|
package/src/meetings/index.ts
CHANGED
|
@@ -717,6 +717,24 @@ export default class Meetings extends WebexPlugin {
|
|
|
717
717
|
}
|
|
718
718
|
}
|
|
719
719
|
|
|
720
|
+
/**
|
|
721
|
+
* API to toggle TLS reachability, needs to be called before webex.meetings.register()
|
|
722
|
+
* @param {Boolean} newValue
|
|
723
|
+
* @private
|
|
724
|
+
* @memberof Meetings
|
|
725
|
+
* @returns {undefined}
|
|
726
|
+
*/
|
|
727
|
+
private _toggleTlsReachability(newValue: boolean) {
|
|
728
|
+
if (typeof newValue !== 'boolean') {
|
|
729
|
+
return;
|
|
730
|
+
}
|
|
731
|
+
// @ts-ignore
|
|
732
|
+
if (this.config.experimental.enableTlsReachability !== newValue) {
|
|
733
|
+
// @ts-ignore
|
|
734
|
+
this.config.experimental.enableTlsReachability = newValue;
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
|
|
720
738
|
/**
|
|
721
739
|
* Explicitly sets up the meetings plugin by registering
|
|
722
740
|
* the device, connecting to mercury, and listening for locus events.
|
|
@@ -1365,22 +1383,12 @@ export default class Meetings extends WebexPlugin {
|
|
|
1365
1383
|
|
|
1366
1384
|
/**
|
|
1367
1385
|
* Get all meetings.
|
|
1368
|
-
* @param {object} options
|
|
1369
|
-
* @param {object} options.startDate - get meetings after this start date
|
|
1370
|
-
* @param {object} options.endDate - get meetings before this end date
|
|
1371
1386
|
* @returns {Object} All currently active meetings.
|
|
1372
1387
|
* @public
|
|
1373
1388
|
* @memberof Meetings
|
|
1374
1389
|
*/
|
|
1375
|
-
public getAllMeetings(
|
|
1376
|
-
|
|
1377
|
-
startDate: object;
|
|
1378
|
-
endDate: object;
|
|
1379
|
-
} = {} as any
|
|
1380
|
-
) {
|
|
1381
|
-
// Options may include other parameters to filter this collection
|
|
1382
|
-
// of meetings.
|
|
1383
|
-
return this.meetingCollection.getAll(options);
|
|
1390
|
+
public getAllMeetings() {
|
|
1391
|
+
return this.meetingCollection.getAll();
|
|
1384
1392
|
}
|
|
1385
1393
|
|
|
1386
1394
|
/**
|
|
@@ -1506,18 +1514,6 @@ export default class Meetings extends WebexPlugin {
|
|
|
1506
1514
|
this.breakoutLocusForHandleLater.splice(existIndex, 1);
|
|
1507
1515
|
}
|
|
1508
1516
|
|
|
1509
|
-
/**
|
|
1510
|
-
* Get all scheduled meetings.
|
|
1511
|
-
* @param {object} options
|
|
1512
|
-
* @param {object} options.startDate - get meetings after this start date
|
|
1513
|
-
* @param {object} options.endDate - get meetings before this end date
|
|
1514
|
-
* @returns {Object} All scheduled meetings.
|
|
1515
|
-
* @memberof Meetings
|
|
1516
|
-
*/
|
|
1517
|
-
getScheduledMeetings() {
|
|
1518
|
-
return this.meetingCollection.getAll({scheduled: true});
|
|
1519
|
-
}
|
|
1520
|
-
|
|
1521
1517
|
/**
|
|
1522
1518
|
* Get the logger instance for plugin-meetings
|
|
1523
1519
|
* @returns {Logger}
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
H264Codec,
|
|
9
9
|
getRecommendedMaxBitrateForFrameSize,
|
|
10
10
|
RecommendedOpusBitrates,
|
|
11
|
+
NamedMediaGroup,
|
|
11
12
|
} from '@webex/internal-media-core';
|
|
12
13
|
import {cloneDeepWith, debounce, isEmpty} from 'lodash';
|
|
13
14
|
|
|
@@ -22,6 +23,7 @@ export interface ActiveSpeakerPolicyInfo {
|
|
|
22
23
|
crossPriorityDuplication: boolean;
|
|
23
24
|
crossPolicyDuplication: boolean;
|
|
24
25
|
preferLiveVideo: boolean;
|
|
26
|
+
namedMediaGroups?: NamedMediaGroup[];
|
|
25
27
|
}
|
|
26
28
|
|
|
27
29
|
export interface ReceiverSelectedPolicyInfo {
|
|
@@ -347,7 +349,8 @@ export class MediaRequestManager {
|
|
|
347
349
|
mr.policyInfo.priority,
|
|
348
350
|
mr.policyInfo.crossPriorityDuplication,
|
|
349
351
|
mr.policyInfo.crossPolicyDuplication,
|
|
350
|
-
mr.policyInfo.preferLiveVideo
|
|
352
|
+
mr.policyInfo.preferLiveVideo,
|
|
353
|
+
mr.policyInfo.namedMediaGroups
|
|
351
354
|
)
|
|
352
355
|
: new ReceiverSelectedInfo(mr.policyInfo.csi),
|
|
353
356
|
mr.receiveSlots.map((receiveSlot) => receiveSlot.wcmeReceiveSlot),
|