@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.
Files changed (272) hide show
  1. package/dist/breakouts/breakout.js +1 -1
  2. package/dist/breakouts/index.js +1 -1
  3. package/dist/common/errors/{reconnection-in-progress.js → reconnection-not-started.js} +27 -15
  4. package/dist/common/errors/reconnection-not-started.js.map +1 -0
  5. package/dist/config.js +2 -1
  6. package/dist/config.js.map +1 -1
  7. package/dist/constants.js +18 -6
  8. package/dist/constants.js.map +1 -1
  9. package/dist/index.js +86 -0
  10. package/dist/index.js.map +1 -1
  11. package/dist/interpretation/index.js +16 -2
  12. package/dist/interpretation/index.js.map +1 -1
  13. package/dist/interpretation/siLanguage.js +1 -1
  14. package/dist/locus-info/controlsUtils.js +7 -1
  15. package/dist/locus-info/controlsUtils.js.map +1 -1
  16. package/dist/locus-info/index.js +10 -0
  17. package/dist/locus-info/index.js.map +1 -1
  18. package/dist/locus-info/mediaSharesUtils.js +15 -1
  19. package/dist/locus-info/mediaSharesUtils.js.map +1 -1
  20. package/dist/locus-info/selfUtils.js +5 -0
  21. package/dist/locus-info/selfUtils.js.map +1 -1
  22. package/dist/media/MediaConnectionAwaiter.js +163 -0
  23. package/dist/media/MediaConnectionAwaiter.js.map +1 -0
  24. package/dist/media/index.js +4 -1
  25. package/dist/media/index.js.map +1 -1
  26. package/dist/media/properties.js +106 -81
  27. package/dist/media/properties.js.map +1 -1
  28. package/dist/meeting/in-meeting-actions.js +6 -0
  29. package/dist/meeting/in-meeting-actions.js.map +1 -1
  30. package/dist/meeting/index.js +1010 -753
  31. package/dist/meeting/index.js.map +1 -1
  32. package/dist/meeting/muteState.js +37 -25
  33. package/dist/meeting/muteState.js.map +1 -1
  34. package/dist/meeting/request.js +32 -23
  35. package/dist/meeting/request.js.map +1 -1
  36. package/dist/meeting/util.js +10 -0
  37. package/dist/meeting/util.js.map +1 -1
  38. package/dist/meeting-info/util.js +304 -267
  39. package/dist/meeting-info/util.js.map +1 -1
  40. package/dist/meeting-info/utilv2.js +334 -295
  41. package/dist/meeting-info/utilv2.js.map +1 -1
  42. package/dist/meetings/index.js +21 -23
  43. package/dist/meetings/index.js.map +1 -1
  44. package/dist/multistream/mediaRequestManager.js +1 -1
  45. package/dist/multistream/mediaRequestManager.js.map +1 -1
  46. package/dist/multistream/remoteMediaGroup.js +16 -2
  47. package/dist/multistream/remoteMediaGroup.js.map +1 -1
  48. package/dist/multistream/remoteMediaManager.js +179 -65
  49. package/dist/multistream/remoteMediaManager.js.map +1 -1
  50. package/dist/multistream/sendSlotManager.js +22 -0
  51. package/dist/multistream/sendSlotManager.js.map +1 -1
  52. package/dist/reachability/clusterReachability.js +29 -15
  53. package/dist/reachability/clusterReachability.js.map +1 -1
  54. package/dist/reachability/index.js +18 -2
  55. package/dist/reachability/index.js.map +1 -1
  56. package/dist/reachability/request.js +12 -10
  57. package/dist/reachability/request.js.map +1 -1
  58. package/dist/reachability/util.js +19 -0
  59. package/dist/reachability/util.js.map +1 -1
  60. package/dist/reconnection-manager/index.js +140 -110
  61. package/dist/reconnection-manager/index.js.map +1 -1
  62. package/dist/roap/index.js +15 -0
  63. package/dist/roap/index.js.map +1 -1
  64. package/dist/roap/request.js +3 -3
  65. package/dist/roap/request.js.map +1 -1
  66. package/dist/roap/turnDiscovery.js +307 -126
  67. package/dist/roap/turnDiscovery.js.map +1 -1
  68. package/dist/statsAnalyzer/index.js +57 -30
  69. package/dist/statsAnalyzer/index.js.map +1 -1
  70. package/dist/statsAnalyzer/mqaUtil.js +3 -0
  71. package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
  72. package/dist/types/common/errors/reconnection-not-started.d.ts +13 -0
  73. package/dist/{config.d.ts → types/config.d.ts} +1 -0
  74. package/dist/{constants.d.ts → types/constants.d.ts} +15 -6
  75. package/dist/types/index.d.ts +19 -0
  76. package/dist/types/media/MediaConnectionAwaiter.d.ts +61 -0
  77. package/dist/{media → types/media}/properties.d.ts +26 -2
  78. package/dist/{meeting → types/meeting}/in-meeting-actions.d.ts +6 -0
  79. package/dist/{meeting → types/meeting}/index.d.ts +29 -12
  80. package/dist/{meeting → types/meeting}/muteState.d.ts +2 -8
  81. package/dist/{meeting → types/meeting}/request.d.ts +3 -0
  82. package/dist/{meeting → types/meeting}/util.d.ts +3 -0
  83. package/dist/{meeting-info → types/meeting-info}/index.d.ts +1 -1
  84. package/dist/{meeting-info → types/meeting-info}/meeting-info-v2.d.ts +1 -1
  85. package/dist/types/meeting-info/util.d.ts +49 -0
  86. package/dist/types/meeting-info/utilv2.d.ts +65 -0
  87. package/dist/{meetings → types/meetings}/index.d.ts +9 -16
  88. package/dist/{multistream → types/multistream}/mediaRequestManager.d.ts +2 -1
  89. package/dist/{multistream → types/multistream}/remoteMediaGroup.d.ts +2 -0
  90. package/dist/{multistream → types/multistream}/remoteMediaManager.d.ts +15 -0
  91. package/dist/{multistream → types/multistream}/sendSlotManager.d.ts +9 -1
  92. package/dist/{reachability → types/reachability}/clusterReachability.d.ts +1 -0
  93. package/dist/{reachability → types/reachability}/index.d.ts +4 -0
  94. package/dist/{reachability → types/reachability}/util.d.ts +7 -0
  95. package/dist/{reconnection-manager → types/reconnection-manager}/index.d.ts +4 -14
  96. package/dist/{roap → types/roap}/index.d.ts +10 -2
  97. package/dist/{roap → types/roap}/turnDiscovery.d.ts +64 -17
  98. package/dist/webinar/index.js +1 -1
  99. package/package.json +23 -23
  100. package/src/common/errors/reconnection-not-started.ts +25 -0
  101. package/src/config.ts +1 -0
  102. package/src/constants.ts +18 -6
  103. package/src/index.ts +31 -0
  104. package/src/interpretation/index.ts +18 -1
  105. package/src/locus-info/controlsUtils.ts +11 -0
  106. package/src/locus-info/index.ts +16 -0
  107. package/src/locus-info/mediaSharesUtils.ts +16 -0
  108. package/src/locus-info/selfUtils.ts +5 -0
  109. package/src/media/MediaConnectionAwaiter.ts +174 -0
  110. package/src/media/index.ts +3 -1
  111. package/src/media/properties.ts +73 -46
  112. package/src/meeting/in-meeting-actions.ts +12 -0
  113. package/src/meeting/index.ts +389 -180
  114. package/src/meeting/muteState.ts +34 -20
  115. package/src/meeting/request.ts +18 -2
  116. package/src/meeting/util.ts +9 -0
  117. package/src/meeting-info/util.ts +241 -233
  118. package/src/meeting-info/utilv2.ts +250 -243
  119. package/src/meetings/index.ts +20 -24
  120. package/src/multistream/mediaRequestManager.ts +4 -1
  121. package/src/multistream/remoteMediaGroup.ts +19 -0
  122. package/src/multistream/remoteMediaManager.ts +101 -16
  123. package/src/multistream/sendSlotManager.ts +28 -0
  124. package/src/reachability/clusterReachability.ts +20 -5
  125. package/src/reachability/index.ts +24 -1
  126. package/src/reachability/request.ts +15 -11
  127. package/src/reachability/util.ts +21 -0
  128. package/src/reconnection-manager/index.ts +129 -106
  129. package/src/roap/index.ts +25 -3
  130. package/src/roap/request.ts +3 -3
  131. package/src/roap/turnDiscovery.ts +244 -78
  132. package/src/statsAnalyzer/index.ts +67 -27
  133. package/src/statsAnalyzer/mqaUtil.ts +5 -0
  134. package/test/integration/spec/journey.js +14 -14
  135. package/test/integration/spec/space-meeting.js +1 -1
  136. package/test/unit/spec/interpretation/index.ts +39 -3
  137. package/test/unit/spec/locus-info/controlsUtils.js +20 -0
  138. package/test/unit/spec/locus-info/index.js +49 -19
  139. package/test/unit/spec/locus-info/mediaSharesUtils.ts +9 -0
  140. package/test/unit/spec/locus-info/selfUtils.js +42 -12
  141. package/test/unit/spec/media/MediaConnectionAwaiter.ts +344 -0
  142. package/test/unit/spec/media/index.ts +89 -78
  143. package/test/unit/spec/media/properties.ts +160 -209
  144. package/test/unit/spec/meeting/in-meeting-actions.ts +6 -0
  145. package/test/unit/spec/meeting/index.js +833 -205
  146. package/test/unit/spec/meeting/muteState.js +219 -67
  147. package/test/unit/spec/meeting/request.js +21 -0
  148. package/test/unit/spec/meeting/utils.js +9 -1
  149. package/test/unit/spec/meeting-info/utilv2.js +6 -0
  150. package/test/unit/spec/meetings/index.js +41 -26
  151. package/test/unit/spec/multistream/mediaRequestManager.ts +20 -2
  152. package/test/unit/spec/multistream/remoteMediaGroup.ts +79 -1
  153. package/test/unit/spec/multistream/remoteMediaManager.ts +199 -1
  154. package/test/unit/spec/multistream/sendSlotManager.ts +50 -18
  155. package/test/unit/spec/reachability/clusterReachability.ts +86 -22
  156. package/test/unit/spec/reachability/index.ts +197 -60
  157. package/test/unit/spec/reachability/request.js +15 -7
  158. package/test/unit/spec/reachability/util.ts +32 -2
  159. package/test/unit/spec/reconnection-manager/index.js +155 -39
  160. package/test/unit/spec/roap/index.ts +61 -6
  161. package/test/unit/spec/roap/turnDiscovery.ts +298 -16
  162. package/test/unit/spec/stats-analyzer/index.js +190 -0
  163. package/dist/common/errors/reconnection-in-progress.d.ts +0 -9
  164. package/dist/common/errors/reconnection-in-progress.js.map +0 -1
  165. package/dist/index.d.ts +0 -7
  166. package/dist/meeting-info/util.d.ts +0 -2
  167. package/dist/meeting-info/utilv2.d.ts +0 -2
  168. package/dist/member/member.types.d.ts +0 -11
  169. package/dist/member/member.types.js +0 -17
  170. package/dist/member/member.types.js.map +0 -1
  171. package/src/common/errors/reconnection-in-progress.ts +0 -8
  172. package/src/member/member.types.ts +0 -13
  173. /package/dist/{annotation → types/annotation}/annotation.types.d.ts +0 -0
  174. /package/dist/{annotation → types/annotation}/constants.d.ts +0 -0
  175. /package/dist/{annotation → types/annotation}/index.d.ts +0 -0
  176. /package/dist/{breakouts → types/breakouts}/breakout.d.ts +0 -0
  177. /package/dist/{breakouts → types/breakouts}/collection.d.ts +0 -0
  178. /package/dist/{breakouts → types/breakouts}/edit-lock-error.d.ts +0 -0
  179. /package/dist/{breakouts → types/breakouts}/events.d.ts +0 -0
  180. /package/dist/{breakouts → types/breakouts}/index.d.ts +0 -0
  181. /package/dist/{breakouts → types/breakouts}/request.d.ts +0 -0
  182. /package/dist/{breakouts → types/breakouts}/utils.d.ts +0 -0
  183. /package/dist/{common → types/common}/browser-detection.d.ts +0 -0
  184. /package/dist/{common → types/common}/collection.d.ts +0 -0
  185. /package/dist/{common → types/common}/config.d.ts +0 -0
  186. /package/dist/{common → types/common}/errors/captcha-error.d.ts +0 -0
  187. /package/dist/{common → types/common}/errors/intent-to-join.d.ts +0 -0
  188. /package/dist/{common → types/common}/errors/join-meeting.d.ts +0 -0
  189. /package/dist/{common → types/common}/errors/media.d.ts +0 -0
  190. /package/dist/{common → types/common}/errors/no-meeting-info.d.ts +0 -0
  191. /package/dist/{common → types/common}/errors/parameter.d.ts +0 -0
  192. /package/dist/{common → types/common}/errors/password-error.d.ts +0 -0
  193. /package/dist/{common → types/common}/errors/permission.d.ts +0 -0
  194. /package/dist/{common → types/common}/errors/reclaim-host-role-errors.d.ts +0 -0
  195. /package/dist/{common → types/common}/errors/reconnection.d.ts +0 -0
  196. /package/dist/{common → types/common}/errors/stats.d.ts +0 -0
  197. /package/dist/{common → types/common}/errors/webex-errors.d.ts +0 -0
  198. /package/dist/{common → types/common}/errors/webex-meetings-error.d.ts +0 -0
  199. /package/dist/{common → types/common}/events/events-scope.d.ts +0 -0
  200. /package/dist/{common → types/common}/events/events.d.ts +0 -0
  201. /package/dist/{common → types/common}/events/trigger-proxy.d.ts +0 -0
  202. /package/dist/{common → types/common}/events/util.d.ts +0 -0
  203. /package/dist/{common → types/common}/logs/logger-config.d.ts +0 -0
  204. /package/dist/{common → types/common}/logs/logger-proxy.d.ts +0 -0
  205. /package/dist/{common → types/common}/logs/request.d.ts +0 -0
  206. /package/dist/{common → types/common}/queue.d.ts +0 -0
  207. /package/dist/{controls-options-manager → types/controls-options-manager}/constants.d.ts +0 -0
  208. /package/dist/{controls-options-manager → types/controls-options-manager}/enums.d.ts +0 -0
  209. /package/dist/{controls-options-manager → types/controls-options-manager}/index.d.ts +0 -0
  210. /package/dist/{controls-options-manager → types/controls-options-manager}/types.d.ts +0 -0
  211. /package/dist/{controls-options-manager → types/controls-options-manager}/util.d.ts +0 -0
  212. /package/dist/{interceptors → types/interceptors}/index.d.ts +0 -0
  213. /package/dist/{interceptors → types/interceptors}/locusRetry.d.ts +0 -0
  214. /package/dist/{interpretation → types/interpretation}/collection.d.ts +0 -0
  215. /package/dist/{interpretation → types/interpretation}/index.d.ts +0 -0
  216. /package/dist/{interpretation → types/interpretation}/siLanguage.d.ts +0 -0
  217. /package/dist/{locus-info → types/locus-info}/controlsUtils.d.ts +0 -0
  218. /package/dist/{locus-info → types/locus-info}/embeddedAppsUtils.d.ts +0 -0
  219. /package/dist/{locus-info → types/locus-info}/fullState.d.ts +0 -0
  220. /package/dist/{locus-info → types/locus-info}/hostUtils.d.ts +0 -0
  221. /package/dist/{locus-info → types/locus-info}/index.d.ts +0 -0
  222. /package/dist/{locus-info → types/locus-info}/infoUtils.d.ts +0 -0
  223. /package/dist/{locus-info → types/locus-info}/mediaSharesUtils.d.ts +0 -0
  224. /package/dist/{locus-info → types/locus-info}/parser.d.ts +0 -0
  225. /package/dist/{locus-info → types/locus-info}/selfUtils.d.ts +0 -0
  226. /package/dist/{media → types/media}/index.d.ts +0 -0
  227. /package/dist/{media → types/media}/util.d.ts +0 -0
  228. /package/dist/{mediaQualityMetrics → types/mediaQualityMetrics}/config.d.ts +0 -0
  229. /package/dist/{meeting → types/meeting}/locusMediaRequest.d.ts +0 -0
  230. /package/dist/{meeting → types/meeting}/request.type.d.ts +0 -0
  231. /package/dist/{meeting → types/meeting}/state.d.ts +0 -0
  232. /package/dist/{meeting → types/meeting}/voicea-meeting.d.ts +0 -0
  233. /package/dist/{meeting-info → types/meeting-info}/collection.d.ts +0 -0
  234. /package/dist/{meeting-info → types/meeting-info}/request.d.ts +0 -0
  235. /package/dist/{meetings → types/meetings}/collection.d.ts +0 -0
  236. /package/dist/{meetings → types/meetings}/meetings.types.d.ts +0 -0
  237. /package/dist/{meetings → types/meetings}/request.d.ts +0 -0
  238. /package/dist/{meetings → types/meetings}/util.d.ts +0 -0
  239. /package/dist/{member → types/member}/index.d.ts +0 -0
  240. /package/dist/{member → types/member}/types.d.ts +0 -0
  241. /package/dist/{member → types/member}/util.d.ts +0 -0
  242. /package/dist/{members → types/members}/collection.d.ts +0 -0
  243. /package/dist/{members → types/members}/index.d.ts +0 -0
  244. /package/dist/{members → types/members}/request.d.ts +0 -0
  245. /package/dist/{members → types/members}/types.d.ts +0 -0
  246. /package/dist/{members → types/members}/util.d.ts +0 -0
  247. /package/dist/{metrics → types/metrics}/constants.d.ts +0 -0
  248. /package/dist/{metrics → types/metrics}/index.d.ts +0 -0
  249. /package/dist/{multistream → types/multistream}/receiveSlot.d.ts +0 -0
  250. /package/dist/{multistream → types/multistream}/receiveSlotManager.d.ts +0 -0
  251. /package/dist/{multistream → types/multistream}/remoteMedia.d.ts +0 -0
  252. /package/dist/{networkQualityMonitor → types/networkQualityMonitor}/index.d.ts +0 -0
  253. /package/dist/{personal-meeting-room → types/personal-meeting-room}/index.d.ts +0 -0
  254. /package/dist/{personal-meeting-room → types/personal-meeting-room}/request.d.ts +0 -0
  255. /package/dist/{personal-meeting-room → types/personal-meeting-room}/util.d.ts +0 -0
  256. /package/dist/{reachability → types/reachability}/request.d.ts +0 -0
  257. /package/dist/{reactions → types/reactions}/constants.d.ts +0 -0
  258. /package/dist/{reactions → types/reactions}/reactions.d.ts +0 -0
  259. /package/dist/{reactions → types/reactions}/reactions.type.d.ts +0 -0
  260. /package/dist/{recording-controller → types/recording-controller}/enums.d.ts +0 -0
  261. /package/dist/{recording-controller → types/recording-controller}/index.d.ts +0 -0
  262. /package/dist/{recording-controller → types/recording-controller}/util.d.ts +0 -0
  263. /package/dist/{roap → types/roap}/request.d.ts +0 -0
  264. /package/dist/{rtcMetrics → types/rtcMetrics}/constants.d.ts +0 -0
  265. /package/dist/{rtcMetrics → types/rtcMetrics}/index.d.ts +0 -0
  266. /package/dist/{statsAnalyzer → types/statsAnalyzer}/global.d.ts +0 -0
  267. /package/dist/{statsAnalyzer → types/statsAnalyzer}/index.d.ts +0 -0
  268. /package/dist/{statsAnalyzer → types/statsAnalyzer}/mqaUtil.d.ts +0 -0
  269. /package/dist/{transcription → types/transcription}/index.d.ts +0 -0
  270. /package/dist/{webinar → types/webinar}/collection.d.ts +0 -0
  271. /package/dist/{webinar → types/webinar}/index.d.ts +0 -0
  272. /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
- const MeetingInfoUtil: any = {};
34
- const meetingInfoError =
35
- 'MeetingInfo is fetched with the meeting link, SIP URI, phone number, Hydra people ID, or a conversation URL.';
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
- MeetingInfoUtil.getParsedUrl = (link) => {
38
- try {
39
- let parsedUrl = url.parse(link);
40
+ static getParsedUrl(link) {
41
+ try {
42
+ let parsedUrl = url.parse(link);
40
43
 
41
- if (!parsedUrl) {
42
- return false;
43
- }
44
- // hack for links such as <company>.webex.com/meet/<user> without a protocol
45
- if (!parsedUrl.protocol) {
46
- parsedUrl = url.parse(`${HTTPS_PROTOCOL}${link}`);
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
- return parsedUrl;
50
- } catch (error) {
51
- LoggerProxy.logger.warn(
52
- `Meeting-info:util#getParsedUrl --> unable to parse the URL, error: ${error}`
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 null;
82
+ return hostNameBool && pathNameBool;
56
83
  }
57
- };
58
84
 
59
- /**
60
- * Helper function to check if a string matches a known meeting link pattern
61
- * @param {String} value string to parse and see if it matches a meeting link
62
- * @returns {Boolean}
63
- */
64
- MeetingInfoUtil.isMeetingLink = (value: string) => {
65
- const parsedUrl = MeetingInfoUtil.getParsedUrl(value);
66
- const hostNameBool = parsedUrl.hostname && parsedUrl.hostname.includes(WEBEX_DOT_COM);
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
- return false;
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
- MeetingInfoUtil.isSipUri = (sipString) => {
89
- // TODO: lets remove regex from this equation and user URI matchers and such
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
- return sipUri;
94
- };
103
+ static isPhoneNumber(phoneNumber) {
104
+ const isValidNumber = DIALER_REGEX.PHONE_NUMBER.test(phoneNumber);
95
105
 
96
- MeetingInfoUtil.isPhoneNumber = (phoneNumber) => {
97
- const isValidNumber = DIALER_REGEX.PHONE_NUMBER.test(phoneNumber);
106
+ return isValidNumber;
107
+ }
98
108
 
99
- return isValidNumber;
100
- };
109
+ static getHydraId(destination) {
110
+ const {type, id, cluster} = deconstructHydraId(destination);
101
111
 
102
- MeetingInfoUtil.getHydraId = (destination) => {
103
- const {type, id, cluster} = deconstructHydraId(destination);
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
- if (id && UUID_REG.test(id)) {
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
- return {};
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
- MeetingInfoUtil.getSipUriFromHydraPersonId = (destination, webex) =>
120
- webex.people
121
- .get(destination)
122
- .then((res) => {
123
- if (res.emails && res.emails.length) {
124
- return res.emails[0];
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
- throw new ParameterError('Hydra Id Lookup was an invalid hydra person id.');
127
- })
128
- .catch((err) => {
129
- LoggerProxy.logger.error(
130
- `Meeting-info:util#MeetingInfoUtil.getSipUriFromHydraPersonId --> getSipUriFromHydraPersonId ${err} `
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
- } else {
148
- const options = VALID_EMAIL_ADDRESS.test(destination)
149
- ? {email: destination}
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
- userId = deconstructHydraId(userId).id;
156
- orgId = deconstructHydraId(orgId).id;
157
- destination = {userId, orgId};
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
- if (webex && webex.config && webex.config.meetings && webex.config.meetings.disableHydraId) {
170
- hydraId = null;
171
- } else {
172
- hydraId = MeetingInfoUtil.getHydraId(destination);
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
- if (MeetingInfoUtil.isMeetingLink(destination)) {
176
- LoggerProxy.logger.warn(
177
- 'Meeting-info:util#generateOptions --> WARN, use of Meeting Link is deprecated, please use a SIP URI instead'
178
- );
179
-
180
- options.type = _MEETING_LINK_;
181
- options.destination = destination;
182
- } else if (MeetingInfoUtil.isSipUri(destination)) {
183
- options.type = _SIP_URI_;
184
- options.destination = destination;
185
- } else if (MeetingInfoUtil.isPhoneNumber(destination)) {
186
- options.type = _SIP_URI_;
187
- options.destination = destination;
188
- } else if (MeetingInfoUtil.isConversationUrl(destination, webex)) {
189
- options.type = _CONVERSATION_URL_;
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
- } else if (hydraId.room) {
207
- LoggerProxy.logger.error(
208
- `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.`
209
- );
210
- // Error code 30105 added as Space ID deprecated as of beta, Please refer migration guide.
211
- throw new SpaceIDDeprecatedError();
212
- } else {
213
- LoggerProxy.logger.warn(`Meeting-info:util#getDestinationType --> ${meetingInfoError}`);
214
- throw new ParameterError(`${meetingInfoError}`);
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
- return Promise.resolve(options);
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
- * Helper function to build up a correct locus url depending on the value passed
222
- * @param {Object} options type and value to fetch meeting info
223
- * @param {String} options.type One of [SIP_URI, PERSONAL_ROOM, MEETING_ID, CONVERSATION_URL, LOCUS_ID, MEETING_LINK]
224
- * @param {String} options.installedOrgID org ID of user's machine
225
- * @param {Object} options.destination ?? value.value
226
- * @returns {Object} returns an object with {resource, method}
227
- */
228
- MeetingInfoUtil.getRequestBody = (options: {type: string; destination: object} | any) => {
229
- const {type, destination, password, captchaInfo, installedOrgID, locusId, extraParams} = options;
230
- const body: any = {
231
- ...DEFAULT_MEETING_INFO_REQUEST_BODY,
232
- ...extraParams,
233
- };
234
-
235
- switch (type) {
236
- case _SIP_URI_:
237
- body.sipUrl = destination;
238
- break;
239
- case _PERSONAL_ROOM_:
240
- body.userId = destination.userId;
241
- body.orgId = destination.orgId;
242
- break;
243
- case _MEETING_ID_:
244
- body.meetingKey = destination;
245
- break;
246
- case _CONVERSATION_URL_:
247
- body.conversationUrl = destination;
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
- break;
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
- if (captchaInfo) {
272
- body.captchaID = captchaInfo.id;
273
- body.captchaVerifyCode = captchaInfo.code;
274
- }
275
-
276
- if (installedOrgID) {
277
- body.installedOrgID = installedOrgID;
278
- }
274
+ if (password) {
275
+ body.password = password;
276
+ }
279
277
 
280
- if (locusId) {
281
- body.locusId = locusId;
282
- }
278
+ if (captchaInfo) {
279
+ body.captchaID = captchaInfo.id;
280
+ body.captchaVerifyCode = captchaInfo.code;
281
+ }
283
282
 
284
- return body;
285
- };
283
+ if (installedOrgID) {
284
+ body.installedOrgID = installedOrgID;
285
+ }
286
286
 
287
- /**
288
- * Helper function to parse the webex site/host from a URI string.
289
- * @param {String} uri string (e.g. '10019857020@convergedats.webex.com')
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
- return exceptedDomains.includes(site) ? null : site;
297
- };
291
+ return body;
292
+ }
298
293
 
299
- /**
300
- * Helper function to return the direct URI for fetching meeting info (to avoid a redirect).
301
- * @param {Object} options type and value to fetch meeting info
302
- * @param {String} options.type One of [SIP_URI, PERSONAL_ROOM, MEETING_ID, CONVERSATION_URL, LOCUS_ID, MEETING_LINK]
303
- * @param {Object} options.destination ?? value.value
304
- * @returns {String} returns a URI string or null of there is no direct URI
305
- */
306
- MeetingInfoUtil.getDirectMeetingInfoURI = (options: {type: string; destination: any}) => {
307
- const {type, destination} = options;
308
-
309
- let preferredWebexSite = null;
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
- return preferredWebexSite ? `https://${preferredWebexSite}/wbxappapi/v1/meetingInfo` : null;
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
- export default MeetingInfoUtil;
329
+ return preferredWebexSite ? `https://${preferredWebexSite}/wbxappapi/v1/meetingInfo` : null;
330
+ }
331
+ }
@@ -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
- options: {
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),