@webex/plugin-meetings 3.0.0 → 3.1.0-next.2

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 (252) hide show
  1. package/dist/breakouts/breakout.js +1 -1
  2. package/dist/breakouts/index.js +1 -1
  3. package/dist/config.js +2 -1
  4. package/dist/config.js.map +1 -1
  5. package/dist/constants.js +8 -4
  6. package/dist/constants.js.map +1 -1
  7. package/dist/index.js +86 -0
  8. package/dist/index.js.map +1 -1
  9. package/dist/interpretation/index.js +16 -2
  10. package/dist/interpretation/index.js.map +1 -1
  11. package/dist/interpretation/siLanguage.js +1 -1
  12. package/dist/locus-info/mediaSharesUtils.js +15 -1
  13. package/dist/locus-info/mediaSharesUtils.js.map +1 -1
  14. package/dist/locus-info/selfUtils.js +5 -0
  15. package/dist/locus-info/selfUtils.js.map +1 -1
  16. package/dist/media/MediaConnectionAwaiter.js +163 -0
  17. package/dist/media/MediaConnectionAwaiter.js.map +1 -0
  18. package/dist/media/index.js +4 -1
  19. package/dist/media/index.js.map +1 -1
  20. package/dist/media/properties.js +4 -24
  21. package/dist/media/properties.js.map +1 -1
  22. package/dist/meeting/index.js +893 -677
  23. package/dist/meeting/index.js.map +1 -1
  24. package/dist/meeting/muteState.js +37 -25
  25. package/dist/meeting/muteState.js.map +1 -1
  26. package/dist/meeting/request.js +32 -23
  27. package/dist/meeting/request.js.map +1 -1
  28. package/dist/meeting/util.js +1 -0
  29. package/dist/meeting/util.js.map +1 -1
  30. package/dist/meeting-info/util.js +304 -267
  31. package/dist/meeting-info/util.js.map +1 -1
  32. package/dist/meeting-info/utilv2.js +334 -295
  33. package/dist/meeting-info/utilv2.js.map +1 -1
  34. package/dist/meetings/index.js +20 -0
  35. package/dist/meetings/index.js.map +1 -1
  36. package/dist/multistream/mediaRequestManager.js +1 -1
  37. package/dist/multistream/mediaRequestManager.js.map +1 -1
  38. package/dist/multistream/remoteMediaGroup.js +16 -2
  39. package/dist/multistream/remoteMediaGroup.js.map +1 -1
  40. package/dist/multistream/remoteMediaManager.js +179 -65
  41. package/dist/multistream/remoteMediaManager.js.map +1 -1
  42. package/dist/multistream/sendSlotManager.js +22 -0
  43. package/dist/multistream/sendSlotManager.js.map +1 -1
  44. package/dist/reachability/clusterReachability.js +29 -15
  45. package/dist/reachability/clusterReachability.js.map +1 -1
  46. package/dist/reachability/index.js +18 -2
  47. package/dist/reachability/index.js.map +1 -1
  48. package/dist/reachability/request.js +12 -10
  49. package/dist/reachability/request.js.map +1 -1
  50. package/dist/reachability/util.js +19 -0
  51. package/dist/reachability/util.js.map +1 -1
  52. package/dist/reconnection-manager/index.js +2 -1
  53. package/dist/reconnection-manager/index.js.map +1 -1
  54. package/dist/roap/index.js +15 -0
  55. package/dist/roap/index.js.map +1 -1
  56. package/dist/roap/request.js +3 -3
  57. package/dist/roap/request.js.map +1 -1
  58. package/dist/roap/turnDiscovery.js +307 -126
  59. package/dist/roap/turnDiscovery.js.map +1 -1
  60. package/dist/statsAnalyzer/index.js +53 -30
  61. package/dist/statsAnalyzer/index.js.map +1 -1
  62. package/dist/{config.d.ts → types/config.d.ts} +1 -0
  63. package/dist/{constants.d.ts → types/constants.d.ts} +5 -4
  64. package/dist/types/index.d.ts +19 -0
  65. package/dist/types/media/MediaConnectionAwaiter.d.ts +61 -0
  66. package/dist/{meeting → types/meeting}/index.d.ts +26 -7
  67. package/dist/{meeting → types/meeting}/muteState.d.ts +2 -8
  68. package/dist/{meeting → types/meeting}/request.d.ts +3 -0
  69. package/dist/{meeting-info → types/meeting-info}/index.d.ts +1 -1
  70. package/dist/{meeting-info → types/meeting-info}/meeting-info-v2.d.ts +1 -1
  71. package/dist/types/meeting-info/util.d.ts +49 -0
  72. package/dist/types/meeting-info/utilv2.d.ts +65 -0
  73. package/dist/{meetings → types/meetings}/index.d.ts +8 -0
  74. package/dist/{multistream → types/multistream}/mediaRequestManager.d.ts +2 -1
  75. package/dist/{multistream → types/multistream}/remoteMediaGroup.d.ts +2 -0
  76. package/dist/{multistream → types/multistream}/remoteMediaManager.d.ts +15 -0
  77. package/dist/{multistream → types/multistream}/sendSlotManager.d.ts +9 -1
  78. package/dist/{reachability → types/reachability}/clusterReachability.d.ts +1 -0
  79. package/dist/{reachability → types/reachability}/index.d.ts +4 -0
  80. package/dist/{reachability → types/reachability}/util.d.ts +7 -0
  81. package/dist/{roap → types/roap}/index.d.ts +10 -2
  82. package/dist/{roap → types/roap}/turnDiscovery.d.ts +64 -17
  83. package/dist/webinar/index.js +1 -1
  84. package/package.json +23 -23
  85. package/src/config.ts +1 -0
  86. package/src/constants.ts +7 -3
  87. package/src/index.ts +31 -0
  88. package/src/interpretation/index.ts +18 -1
  89. package/src/locus-info/mediaSharesUtils.ts +16 -0
  90. package/src/locus-info/selfUtils.ts +5 -0
  91. package/src/media/MediaConnectionAwaiter.ts +174 -0
  92. package/src/media/index.ts +3 -1
  93. package/src/media/properties.ts +6 -31
  94. package/src/meeting/index.ts +321 -106
  95. package/src/meeting/muteState.ts +34 -20
  96. package/src/meeting/request.ts +18 -2
  97. package/src/meeting/util.ts +1 -0
  98. package/src/meeting-info/util.ts +241 -233
  99. package/src/meeting-info/utilv2.ts +250 -243
  100. package/src/meetings/index.ts +18 -0
  101. package/src/multistream/mediaRequestManager.ts +4 -1
  102. package/src/multistream/remoteMediaGroup.ts +19 -0
  103. package/src/multistream/remoteMediaManager.ts +101 -16
  104. package/src/multistream/sendSlotManager.ts +28 -0
  105. package/src/reachability/clusterReachability.ts +20 -5
  106. package/src/reachability/index.ts +24 -1
  107. package/src/reachability/request.ts +15 -11
  108. package/src/reachability/util.ts +21 -0
  109. package/src/reconnection-manager/index.ts +1 -1
  110. package/src/roap/index.ts +25 -3
  111. package/src/roap/request.ts +3 -3
  112. package/src/roap/turnDiscovery.ts +244 -78
  113. package/src/statsAnalyzer/index.ts +63 -27
  114. package/test/integration/spec/journey.js +14 -14
  115. package/test/integration/spec/space-meeting.js +1 -1
  116. package/test/unit/spec/interpretation/index.ts +39 -3
  117. package/test/unit/spec/locus-info/index.js +28 -19
  118. package/test/unit/spec/locus-info/mediaSharesUtils.ts +9 -0
  119. package/test/unit/spec/locus-info/selfUtils.js +42 -12
  120. package/test/unit/spec/media/MediaConnectionAwaiter.ts +344 -0
  121. package/test/unit/spec/media/index.ts +89 -78
  122. package/test/unit/spec/media/properties.ts +16 -70
  123. package/test/unit/spec/meeting/index.js +638 -139
  124. package/test/unit/spec/meeting/muteState.js +219 -67
  125. package/test/unit/spec/meeting/request.js +21 -0
  126. package/test/unit/spec/meeting/utils.js +6 -1
  127. package/test/unit/spec/meeting-info/utilv2.js +6 -0
  128. package/test/unit/spec/meetings/index.js +40 -20
  129. package/test/unit/spec/multistream/mediaRequestManager.ts +20 -2
  130. package/test/unit/spec/multistream/remoteMediaGroup.ts +79 -1
  131. package/test/unit/spec/multistream/remoteMediaManager.ts +199 -1
  132. package/test/unit/spec/multistream/sendSlotManager.ts +50 -18
  133. package/test/unit/spec/reachability/clusterReachability.ts +86 -22
  134. package/test/unit/spec/reachability/index.ts +197 -60
  135. package/test/unit/spec/reachability/request.js +15 -7
  136. package/test/unit/spec/reachability/util.ts +32 -2
  137. package/test/unit/spec/reconnection-manager/index.js +28 -0
  138. package/test/unit/spec/roap/index.ts +61 -6
  139. package/test/unit/spec/roap/turnDiscovery.ts +298 -16
  140. package/test/unit/spec/stats-analyzer/index.js +179 -0
  141. package/dist/index.d.ts +0 -7
  142. package/dist/meeting-info/util.d.ts +0 -2
  143. package/dist/meeting-info/utilv2.d.ts +0 -2
  144. package/dist/member/member.types.d.ts +0 -11
  145. package/dist/member/member.types.js +0 -17
  146. package/dist/member/member.types.js.map +0 -1
  147. package/src/member/member.types.ts +0 -13
  148. /package/dist/{annotation → types/annotation}/annotation.types.d.ts +0 -0
  149. /package/dist/{annotation → types/annotation}/constants.d.ts +0 -0
  150. /package/dist/{annotation → types/annotation}/index.d.ts +0 -0
  151. /package/dist/{breakouts → types/breakouts}/breakout.d.ts +0 -0
  152. /package/dist/{breakouts → types/breakouts}/collection.d.ts +0 -0
  153. /package/dist/{breakouts → types/breakouts}/edit-lock-error.d.ts +0 -0
  154. /package/dist/{breakouts → types/breakouts}/events.d.ts +0 -0
  155. /package/dist/{breakouts → types/breakouts}/index.d.ts +0 -0
  156. /package/dist/{breakouts → types/breakouts}/request.d.ts +0 -0
  157. /package/dist/{breakouts → types/breakouts}/utils.d.ts +0 -0
  158. /package/dist/{common → types/common}/browser-detection.d.ts +0 -0
  159. /package/dist/{common → types/common}/collection.d.ts +0 -0
  160. /package/dist/{common → types/common}/config.d.ts +0 -0
  161. /package/dist/{common → types/common}/errors/captcha-error.d.ts +0 -0
  162. /package/dist/{common → types/common}/errors/intent-to-join.d.ts +0 -0
  163. /package/dist/{common → types/common}/errors/join-meeting.d.ts +0 -0
  164. /package/dist/{common → types/common}/errors/media.d.ts +0 -0
  165. /package/dist/{common → types/common}/errors/no-meeting-info.d.ts +0 -0
  166. /package/dist/{common → types/common}/errors/parameter.d.ts +0 -0
  167. /package/dist/{common → types/common}/errors/password-error.d.ts +0 -0
  168. /package/dist/{common → types/common}/errors/permission.d.ts +0 -0
  169. /package/dist/{common → types/common}/errors/reclaim-host-role-errors.d.ts +0 -0
  170. /package/dist/{common → types/common}/errors/reconnection-in-progress.d.ts +0 -0
  171. /package/dist/{common → types/common}/errors/reconnection.d.ts +0 -0
  172. /package/dist/{common → types/common}/errors/stats.d.ts +0 -0
  173. /package/dist/{common → types/common}/errors/webex-errors.d.ts +0 -0
  174. /package/dist/{common → types/common}/errors/webex-meetings-error.d.ts +0 -0
  175. /package/dist/{common → types/common}/events/events-scope.d.ts +0 -0
  176. /package/dist/{common → types/common}/events/events.d.ts +0 -0
  177. /package/dist/{common → types/common}/events/trigger-proxy.d.ts +0 -0
  178. /package/dist/{common → types/common}/events/util.d.ts +0 -0
  179. /package/dist/{common → types/common}/logs/logger-config.d.ts +0 -0
  180. /package/dist/{common → types/common}/logs/logger-proxy.d.ts +0 -0
  181. /package/dist/{common → types/common}/logs/request.d.ts +0 -0
  182. /package/dist/{common → types/common}/queue.d.ts +0 -0
  183. /package/dist/{controls-options-manager → types/controls-options-manager}/constants.d.ts +0 -0
  184. /package/dist/{controls-options-manager → types/controls-options-manager}/enums.d.ts +0 -0
  185. /package/dist/{controls-options-manager → types/controls-options-manager}/index.d.ts +0 -0
  186. /package/dist/{controls-options-manager → types/controls-options-manager}/types.d.ts +0 -0
  187. /package/dist/{controls-options-manager → types/controls-options-manager}/util.d.ts +0 -0
  188. /package/dist/{interceptors → types/interceptors}/index.d.ts +0 -0
  189. /package/dist/{interceptors → types/interceptors}/locusRetry.d.ts +0 -0
  190. /package/dist/{interpretation → types/interpretation}/collection.d.ts +0 -0
  191. /package/dist/{interpretation → types/interpretation}/index.d.ts +0 -0
  192. /package/dist/{interpretation → types/interpretation}/siLanguage.d.ts +0 -0
  193. /package/dist/{locus-info → types/locus-info}/controlsUtils.d.ts +0 -0
  194. /package/dist/{locus-info → types/locus-info}/embeddedAppsUtils.d.ts +0 -0
  195. /package/dist/{locus-info → types/locus-info}/fullState.d.ts +0 -0
  196. /package/dist/{locus-info → types/locus-info}/hostUtils.d.ts +0 -0
  197. /package/dist/{locus-info → types/locus-info}/index.d.ts +0 -0
  198. /package/dist/{locus-info → types/locus-info}/infoUtils.d.ts +0 -0
  199. /package/dist/{locus-info → types/locus-info}/mediaSharesUtils.d.ts +0 -0
  200. /package/dist/{locus-info → types/locus-info}/parser.d.ts +0 -0
  201. /package/dist/{locus-info → types/locus-info}/selfUtils.d.ts +0 -0
  202. /package/dist/{media → types/media}/index.d.ts +0 -0
  203. /package/dist/{media → types/media}/properties.d.ts +0 -0
  204. /package/dist/{media → types/media}/util.d.ts +0 -0
  205. /package/dist/{mediaQualityMetrics → types/mediaQualityMetrics}/config.d.ts +0 -0
  206. /package/dist/{meeting → types/meeting}/in-meeting-actions.d.ts +0 -0
  207. /package/dist/{meeting → types/meeting}/locusMediaRequest.d.ts +0 -0
  208. /package/dist/{meeting → types/meeting}/request.type.d.ts +0 -0
  209. /package/dist/{meeting → types/meeting}/state.d.ts +0 -0
  210. /package/dist/{meeting → types/meeting}/util.d.ts +0 -0
  211. /package/dist/{meeting → types/meeting}/voicea-meeting.d.ts +0 -0
  212. /package/dist/{meeting-info → types/meeting-info}/collection.d.ts +0 -0
  213. /package/dist/{meeting-info → types/meeting-info}/request.d.ts +0 -0
  214. /package/dist/{meetings → types/meetings}/collection.d.ts +0 -0
  215. /package/dist/{meetings → types/meetings}/meetings.types.d.ts +0 -0
  216. /package/dist/{meetings → types/meetings}/request.d.ts +0 -0
  217. /package/dist/{meetings → types/meetings}/util.d.ts +0 -0
  218. /package/dist/{member → types/member}/index.d.ts +0 -0
  219. /package/dist/{member → types/member}/types.d.ts +0 -0
  220. /package/dist/{member → types/member}/util.d.ts +0 -0
  221. /package/dist/{members → types/members}/collection.d.ts +0 -0
  222. /package/dist/{members → types/members}/index.d.ts +0 -0
  223. /package/dist/{members → types/members}/request.d.ts +0 -0
  224. /package/dist/{members → types/members}/types.d.ts +0 -0
  225. /package/dist/{members → types/members}/util.d.ts +0 -0
  226. /package/dist/{metrics → types/metrics}/constants.d.ts +0 -0
  227. /package/dist/{metrics → types/metrics}/index.d.ts +0 -0
  228. /package/dist/{multistream → types/multistream}/receiveSlot.d.ts +0 -0
  229. /package/dist/{multistream → types/multistream}/receiveSlotManager.d.ts +0 -0
  230. /package/dist/{multistream → types/multistream}/remoteMedia.d.ts +0 -0
  231. /package/dist/{networkQualityMonitor → types/networkQualityMonitor}/index.d.ts +0 -0
  232. /package/dist/{personal-meeting-room → types/personal-meeting-room}/index.d.ts +0 -0
  233. /package/dist/{personal-meeting-room → types/personal-meeting-room}/request.d.ts +0 -0
  234. /package/dist/{personal-meeting-room → types/personal-meeting-room}/util.d.ts +0 -0
  235. /package/dist/{reachability → types/reachability}/request.d.ts +0 -0
  236. /package/dist/{reactions → types/reactions}/constants.d.ts +0 -0
  237. /package/dist/{reactions → types/reactions}/reactions.d.ts +0 -0
  238. /package/dist/{reactions → types/reactions}/reactions.type.d.ts +0 -0
  239. /package/dist/{reconnection-manager → types/reconnection-manager}/index.d.ts +0 -0
  240. /package/dist/{recording-controller → types/recording-controller}/enums.d.ts +0 -0
  241. /package/dist/{recording-controller → types/recording-controller}/index.d.ts +0 -0
  242. /package/dist/{recording-controller → types/recording-controller}/util.d.ts +0 -0
  243. /package/dist/{roap → types/roap}/request.d.ts +0 -0
  244. /package/dist/{rtcMetrics → types/rtcMetrics}/constants.d.ts +0 -0
  245. /package/dist/{rtcMetrics → types/rtcMetrics}/index.d.ts +0 -0
  246. /package/dist/{statsAnalyzer → types/statsAnalyzer}/global.d.ts +0 -0
  247. /package/dist/{statsAnalyzer → types/statsAnalyzer}/index.d.ts +0 -0
  248. /package/dist/{statsAnalyzer → types/statsAnalyzer}/mqaUtil.d.ts +0 -0
  249. /package/dist/{transcription → types/transcription}/index.d.ts +0 -0
  250. /package/dist/{webinar → types/webinar}/collection.d.ts +0 -0
  251. /package/dist/{webinar → types/webinar}/index.d.ts +0 -0
  252. /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.
@@ -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),
@@ -2,6 +2,7 @@
2
2
  /* eslint-disable require-jsdoc */
3
3
  /* eslint-disable import/prefer-default-export */
4
4
  import {forEach} from 'lodash';
5
+ import {NamedMediaGroup} from '@webex/internal-media-core';
5
6
  import LoggerProxy from '../common/logs/logger-proxy';
6
7
 
7
8
  import {getMaxFs, RemoteMedia, RemoteVideoResolution} from './remoteMedia';
@@ -11,6 +12,7 @@ import {CSI, ReceiveSlot} from './receiveSlot';
11
12
  type Options = {
12
13
  resolution?: RemoteVideoResolution; // applies only to groups of type MediaType.VideoMain and MediaType.VideoSlides
13
14
  preferLiveVideo?: boolean; // applies only to groups of type MediaType.VideoMain and MediaType.VideoSlides
15
+ namedMediaGroup?: NamedMediaGroup; // applies only to named media groups for audio
14
16
  };
15
17
 
16
18
  export class RemoteMediaGroup {
@@ -221,6 +223,9 @@ export class RemoteMediaGroup {
221
223
  crossPriorityDuplication: false,
222
224
  crossPolicyDuplication: false,
223
225
  preferLiveVideo: !!this.options?.preferLiveVideo,
226
+ namedMediaGroups: this.options.namedMediaGroup?.value
227
+ ? [this.options?.namedMediaGroup]
228
+ : undefined,
224
229
  },
225
230
  receiveSlots: this.unpinnedRemoteMedia.map((remoteMedia) =>
226
231
  remoteMedia.getUnderlyingReceiveSlot()
@@ -241,6 +246,20 @@ export class RemoteMediaGroup {
241
246
  }
242
247
  }
243
248
 
249
+ /**
250
+ * setNamedMediaGroup - sets named media group type and value
251
+ * @internal
252
+ */
253
+ public setNamedMediaGroup(namedMediaGroup: NamedMediaGroup, commit: boolean) {
254
+ if (
255
+ this.options.namedMediaGroup.value !== namedMediaGroup.value ||
256
+ this.options.namedMediaGroup.type !== namedMediaGroup.type
257
+ ) {
258
+ this.options.namedMediaGroup = namedMediaGroup;
259
+ this.sendActiveSpeakerMediaRequest(commit);
260
+ }
261
+ }
262
+
244
263
  /**
245
264
  * Invalidates the remote media group by clearing the references to the receive slots
246
265
  * used by all remote media from that group and cancelling all media requests.