@webex/plugin-meetings 3.6.0 → 3.7.0-ipv6-multi-turn-urls.1

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 (332) hide show
  1. package/README.md +2 -1
  2. package/dist/breakouts/breakout.js +1 -1
  3. package/dist/breakouts/index.js +1 -1
  4. package/dist/common/errors/join-webinar-error.js +50 -0
  5. package/dist/common/errors/join-webinar-error.js.map +1 -0
  6. package/dist/config.js +4 -1
  7. package/dist/config.js.map +1 -1
  8. package/dist/constants.js +54 -4
  9. package/dist/constants.js.map +1 -1
  10. package/dist/controls-options-manager/enums.js +1 -0
  11. package/dist/controls-options-manager/enums.js.map +1 -1
  12. package/dist/controls-options-manager/index.js +10 -3
  13. package/dist/controls-options-manager/index.js.map +1 -1
  14. package/dist/controls-options-manager/types.js.map +1 -1
  15. package/dist/controls-options-manager/util.js +12 -0
  16. package/dist/controls-options-manager/util.js.map +1 -1
  17. package/dist/index.js +7 -0
  18. package/dist/index.js.map +1 -1
  19. package/dist/interpretation/index.js +1 -1
  20. package/dist/interpretation/siLanguage.js +1 -1
  21. package/dist/locus-info/controlsUtils.js +28 -4
  22. package/dist/locus-info/controlsUtils.js.map +1 -1
  23. package/dist/locus-info/fullState.js +2 -1
  24. package/dist/locus-info/fullState.js.map +1 -1
  25. package/dist/locus-info/index.js +61 -3
  26. package/dist/locus-info/index.js.map +1 -1
  27. package/dist/locus-info/parser.js +5 -1
  28. package/dist/locus-info/parser.js.map +1 -1
  29. package/dist/media/index.js +29 -1
  30. package/dist/media/index.js.map +1 -1
  31. package/dist/meeting/in-meeting-actions.js +29 -1
  32. package/dist/meeting/in-meeting-actions.js.map +1 -1
  33. package/dist/meeting/index.js +807 -540
  34. package/dist/meeting/index.js.map +1 -1
  35. package/dist/meeting/locusMediaRequest.js +2 -6
  36. package/dist/meeting/locusMediaRequest.js.map +1 -1
  37. package/dist/meeting/muteState.js +5 -2
  38. package/dist/meeting/muteState.js.map +1 -1
  39. package/dist/meeting/request.js +21 -29
  40. package/dist/meeting/request.js.map +1 -1
  41. package/dist/meeting/util.js +98 -61
  42. package/dist/meeting/util.js.map +1 -1
  43. package/dist/meeting-info/meeting-info-v2.js +80 -17
  44. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  45. package/dist/meetings/index.js +29 -2
  46. package/dist/meetings/index.js.map +1 -1
  47. package/dist/members/index.js +3 -2
  48. package/dist/members/index.js.map +1 -1
  49. package/dist/members/util.js +13 -7
  50. package/dist/members/util.js.map +1 -1
  51. package/dist/metrics/constants.js +4 -1
  52. package/dist/metrics/constants.js.map +1 -1
  53. package/dist/multistream/remoteMedia.js +34 -15
  54. package/dist/multistream/remoteMedia.js.map +1 -1
  55. package/dist/reachability/clusterReachability.js +12 -15
  56. package/dist/reachability/clusterReachability.js.map +1 -1
  57. package/dist/reachability/index.js +433 -136
  58. package/dist/reachability/index.js.map +1 -1
  59. package/dist/{rtcMetrics/constants.js → reachability/reachability.types.js} +1 -5
  60. package/dist/reachability/reachability.types.js.map +1 -0
  61. package/dist/reachability/request.js +23 -9
  62. package/dist/reachability/request.js.map +1 -1
  63. package/dist/recording-controller/enums.js +8 -4
  64. package/dist/recording-controller/enums.js.map +1 -1
  65. package/dist/recording-controller/index.js +18 -9
  66. package/dist/recording-controller/index.js.map +1 -1
  67. package/dist/recording-controller/util.js +13 -9
  68. package/dist/recording-controller/util.js.map +1 -1
  69. package/dist/roap/index.js +5 -7
  70. package/dist/roap/index.js.map +1 -1
  71. package/dist/roap/request.js +45 -79
  72. package/dist/roap/request.js.map +1 -1
  73. package/dist/roap/turnDiscovery.js +3 -6
  74. package/dist/roap/turnDiscovery.js.map +1 -1
  75. package/dist/{common/errors/parameter.d.ts → types/common/errors/join-webinar-error.d.ts} +4 -5
  76. package/dist/types/config.d.ts +3 -0
  77. package/dist/types/constants.d.ts +43 -0
  78. package/dist/types/controls-options-manager/enums.d.ts +2 -1
  79. package/dist/types/controls-options-manager/index.d.ts +2 -1
  80. package/dist/types/controls-options-manager/types.d.ts +2 -0
  81. package/dist/types/index.d.ts +2 -1
  82. package/dist/types/locus-info/index.d.ts +9 -0
  83. package/dist/types/meeting/in-meeting-actions.d.ts +28 -0
  84. package/dist/types/meeting/index.d.ts +34 -3
  85. package/dist/types/meeting/locusMediaRequest.d.ts +2 -3
  86. package/dist/types/meeting/muteState.d.ts +2 -1
  87. package/dist/types/meeting/request.d.ts +2 -2
  88. package/dist/types/meeting/util.d.ts +2 -2
  89. package/dist/types/meeting-info/meeting-info-v2.d.ts +23 -0
  90. package/dist/types/meetings/index.d.ts +13 -1
  91. package/dist/types/members/index.d.ts +2 -1
  92. package/dist/types/members/util.d.ts +5 -1
  93. package/dist/types/metrics/constants.d.ts +3 -0
  94. package/dist/types/multistream/remoteMedia.d.ts +1 -0
  95. package/dist/types/reachability/clusterReachability.d.ts +1 -10
  96. package/dist/types/reachability/index.d.ts +74 -35
  97. package/dist/types/reachability/reachability.types.d.ts +64 -0
  98. package/dist/types/reachability/request.d.ts +5 -1
  99. package/dist/types/recording-controller/enums.d.ts +5 -2
  100. package/dist/types/recording-controller/index.d.ts +1 -0
  101. package/dist/types/recording-controller/util.d.ts +2 -1
  102. package/dist/types/roap/request.d.ts +1 -13
  103. package/dist/webinar/index.js +382 -19
  104. package/dist/webinar/index.js.map +1 -1
  105. package/package.json +22 -22
  106. package/src/common/errors/join-webinar-error.ts +24 -0
  107. package/src/config.ts +3 -0
  108. package/src/constants.ts +52 -0
  109. package/src/controls-options-manager/enums.ts +1 -0
  110. package/src/controls-options-manager/index.ts +19 -2
  111. package/src/controls-options-manager/types.ts +2 -0
  112. package/src/controls-options-manager/util.ts +12 -0
  113. package/src/index.ts +2 -0
  114. package/src/locus-info/controlsUtils.ts +46 -2
  115. package/src/locus-info/fullState.ts +1 -0
  116. package/src/locus-info/index.ts +60 -0
  117. package/src/locus-info/parser.ts +8 -1
  118. package/src/media/index.ts +15 -0
  119. package/src/meeting/in-meeting-actions.ts +58 -0
  120. package/src/meeting/index.ts +268 -32
  121. package/src/meeting/locusMediaRequest.ts +4 -8
  122. package/src/meeting/muteState.ts +6 -2
  123. package/src/meeting/request.ts +4 -11
  124. package/src/meeting/util.ts +31 -6
  125. package/src/meeting-info/meeting-info-v2.ts +63 -0
  126. package/src/meetings/index.ts +74 -40
  127. package/src/members/index.ts +4 -2
  128. package/src/members/util.ts +4 -1
  129. package/src/metrics/constants.ts +3 -0
  130. package/src/multistream/remoteMedia.ts +33 -15
  131. package/src/reachability/clusterReachability.ts +5 -15
  132. package/src/reachability/index.ts +285 -77
  133. package/src/reachability/reachability.types.ts +85 -0
  134. package/src/reachability/request.ts +55 -30
  135. package/src/recording-controller/enums.ts +5 -2
  136. package/src/recording-controller/index.ts +17 -4
  137. package/src/recording-controller/util.ts +20 -5
  138. package/src/roap/index.ts +4 -5
  139. package/src/roap/request.ts +32 -44
  140. package/src/roap/turnDiscovery.ts +2 -4
  141. package/src/webinar/index.ts +223 -17
  142. package/test/unit/spec/controls-options-manager/index.js +56 -32
  143. package/test/unit/spec/controls-options-manager/util.js +44 -0
  144. package/test/unit/spec/locus-info/controlsUtils.js +80 -4
  145. package/test/unit/spec/locus-info/index.js +88 -2
  146. package/test/unit/spec/meeting/in-meeting-actions.ts +31 -1
  147. package/test/unit/spec/meeting/index.js +407 -82
  148. package/test/unit/spec/meeting/locusMediaRequest.ts +18 -11
  149. package/test/unit/spec/meeting/muteState.js +8 -4
  150. package/test/unit/spec/meeting/request.js +3 -26
  151. package/test/unit/spec/meeting/utils.js +71 -14
  152. package/test/unit/spec/meeting-info/meetinginfov2.js +42 -0
  153. package/test/unit/spec/meetings/index.js +41 -6
  154. package/test/unit/spec/members/index.js +25 -2
  155. package/test/unit/spec/members/request.js +37 -3
  156. package/test/unit/spec/members/utils.js +110 -1
  157. package/test/unit/spec/multistream/remoteMedia.ts +27 -9
  158. package/test/unit/spec/reachability/clusterReachability.ts +7 -0
  159. package/test/unit/spec/reachability/index.ts +265 -1
  160. package/test/unit/spec/reachability/request.js +56 -15
  161. package/test/unit/spec/recording-controller/index.js +61 -5
  162. package/test/unit/spec/recording-controller/util.js +39 -3
  163. package/test/unit/spec/roap/index.ts +1 -1
  164. package/test/unit/spec/roap/request.ts +51 -109
  165. package/test/unit/spec/roap/turnDiscovery.ts +202 -147
  166. package/test/unit/spec/webinar/index.ts +443 -14
  167. package/dist/annotation/annotation.types.d.ts +0 -42
  168. package/dist/annotation/constants.d.ts +0 -31
  169. package/dist/annotation/index.d.ts +0 -117
  170. package/dist/breakouts/breakout.d.ts +0 -8
  171. package/dist/breakouts/collection.d.ts +0 -5
  172. package/dist/breakouts/edit-lock-error.d.ts +0 -15
  173. package/dist/breakouts/events.d.ts +0 -8
  174. package/dist/breakouts/index.d.ts +0 -5
  175. package/dist/breakouts/request.d.ts +0 -22
  176. package/dist/breakouts/utils.d.ts +0 -15
  177. package/dist/common/browser-detection.d.ts +0 -9
  178. package/dist/common/collection.d.ts +0 -48
  179. package/dist/common/config.d.ts +0 -2
  180. package/dist/common/errors/captcha-error.d.ts +0 -15
  181. package/dist/common/errors/intent-to-join.d.ts +0 -16
  182. package/dist/common/errors/join-meeting.d.ts +0 -17
  183. package/dist/common/errors/media.d.ts +0 -15
  184. package/dist/common/errors/no-meeting-info.d.ts +0 -14
  185. package/dist/common/errors/password-error.d.ts +0 -15
  186. package/dist/common/errors/permission.d.ts +0 -14
  187. package/dist/common/errors/reclaim-host-role-error.js +0 -149
  188. package/dist/common/errors/reclaim-host-role-error.js.map +0 -1
  189. package/dist/common/errors/reclaim-host-role-errors.d.ts +0 -60
  190. package/dist/common/errors/reconnection-in-progress.d.ts +0 -9
  191. package/dist/common/errors/reconnection-in-progress.js +0 -33
  192. package/dist/common/errors/reconnection-in-progress.js.map +0 -1
  193. package/dist/common/errors/reconnection.d.ts +0 -15
  194. package/dist/common/errors/stats.d.ts +0 -15
  195. package/dist/common/errors/webex-errors.d.ts +0 -93
  196. package/dist/common/errors/webex-meetings-error.d.ts +0 -20
  197. package/dist/common/events/events-scope.d.ts +0 -17
  198. package/dist/common/events/events.d.ts +0 -12
  199. package/dist/common/events/trigger-proxy.d.ts +0 -2
  200. package/dist/common/events/util.d.ts +0 -2
  201. package/dist/common/logs/logger-config.d.ts +0 -2
  202. package/dist/common/logs/logger-proxy.d.ts +0 -2
  203. package/dist/common/logs/request.d.ts +0 -36
  204. package/dist/common/queue.d.ts +0 -34
  205. package/dist/config.d.ts +0 -72
  206. package/dist/constants.d.ts +0 -1088
  207. package/dist/controls-options-manager/constants.d.ts +0 -4
  208. package/dist/controls-options-manager/enums.d.ts +0 -15
  209. package/dist/controls-options-manager/index.d.ts +0 -136
  210. package/dist/controls-options-manager/types.d.ts +0 -43
  211. package/dist/controls-options-manager/util.d.ts +0 -1
  212. package/dist/index.d.ts +0 -7
  213. package/dist/interceptors/index.d.ts +0 -2
  214. package/dist/interceptors/locusRetry.d.ts +0 -27
  215. package/dist/interpretation/collection.d.ts +0 -5
  216. package/dist/interpretation/index.d.ts +0 -5
  217. package/dist/interpretation/siLanguage.d.ts +0 -5
  218. package/dist/locus-info/controlsUtils.d.ts +0 -2
  219. package/dist/locus-info/embeddedAppsUtils.d.ts +0 -2
  220. package/dist/locus-info/fullState.d.ts +0 -2
  221. package/dist/locus-info/hostUtils.d.ts +0 -2
  222. package/dist/locus-info/index.d.ts +0 -322
  223. package/dist/locus-info/infoUtils.d.ts +0 -2
  224. package/dist/locus-info/mediaSharesUtils.d.ts +0 -2
  225. package/dist/locus-info/parser.d.ts +0 -272
  226. package/dist/locus-info/selfUtils.d.ts +0 -2
  227. package/dist/media/index.d.ts +0 -34
  228. package/dist/media/properties.d.ts +0 -93
  229. package/dist/media/util.d.ts +0 -2
  230. package/dist/mediaQualityMetrics/config.d.ts +0 -241
  231. package/dist/mediaQualityMetrics/config.js +0 -502
  232. package/dist/mediaQualityMetrics/config.js.map +0 -1
  233. package/dist/meeting/effectsState.js +0 -260
  234. package/dist/meeting/effectsState.js.map +0 -1
  235. package/dist/meeting/in-meeting-actions.d.ts +0 -167
  236. package/dist/meeting/index.d.ts +0 -1825
  237. package/dist/meeting/locusMediaRequest.d.ts +0 -74
  238. package/dist/meeting/muteState.d.ts +0 -178
  239. package/dist/meeting/request.d.ts +0 -295
  240. package/dist/meeting/request.type.d.ts +0 -11
  241. package/dist/meeting/state.d.ts +0 -9
  242. package/dist/meeting/util.d.ts +0 -119
  243. package/dist/meeting/voicea-meeting.d.ts +0 -16
  244. package/dist/meeting-info/collection.d.ts +0 -20
  245. package/dist/meeting-info/index.d.ts +0 -69
  246. package/dist/meeting-info/meeting-info-v2.d.ts +0 -123
  247. package/dist/meeting-info/request.d.ts +0 -22
  248. package/dist/meeting-info/util.d.ts +0 -2
  249. package/dist/meeting-info/utilv2.d.ts +0 -2
  250. package/dist/meetings/collection.d.ts +0 -40
  251. package/dist/meetings/index.d.ts +0 -390
  252. package/dist/meetings/meetings.types.d.ts +0 -4
  253. package/dist/meetings/request.d.ts +0 -27
  254. package/dist/meetings/util.d.ts +0 -18
  255. package/dist/member/index.d.ts +0 -160
  256. package/dist/member/member.types.js +0 -17
  257. package/dist/member/member.types.js.map +0 -1
  258. package/dist/member/types.d.ts +0 -32
  259. package/dist/member/util.d.ts +0 -2
  260. package/dist/members/collection.d.ts +0 -29
  261. package/dist/members/index.d.ts +0 -353
  262. package/dist/members/request.d.ts +0 -114
  263. package/dist/members/types.d.ts +0 -25
  264. package/dist/members/util.d.ts +0 -215
  265. package/dist/metrics/config.js +0 -276
  266. package/dist/metrics/config.js.map +0 -1
  267. package/dist/metrics/constants.d.ts +0 -70
  268. package/dist/metrics/index.d.ts +0 -45
  269. package/dist/multistream/mediaRequestManager.d.ts +0 -119
  270. package/dist/multistream/receiveSlot.d.ts +0 -68
  271. package/dist/multistream/receiveSlotManager.d.ts +0 -56
  272. package/dist/multistream/remoteMedia.d.ts +0 -72
  273. package/dist/multistream/remoteMediaGroup.d.ts +0 -49
  274. package/dist/multistream/remoteMediaManager.d.ts +0 -300
  275. package/dist/multistream/sendSlotManager.d.ts +0 -69
  276. package/dist/networkQualityMonitor/index.d.ts +0 -70
  277. package/dist/networkQualityMonitor/index.js +0 -221
  278. package/dist/networkQualityMonitor/index.js.map +0 -1
  279. package/dist/peer-connection-manager/index.js +0 -671
  280. package/dist/peer-connection-manager/index.js.map +0 -1
  281. package/dist/peer-connection-manager/util.js +0 -109
  282. package/dist/peer-connection-manager/util.js.map +0 -1
  283. package/dist/personal-meeting-room/index.d.ts +0 -47
  284. package/dist/personal-meeting-room/request.d.ts +0 -14
  285. package/dist/personal-meeting-room/util.d.ts +0 -2
  286. package/dist/reachability/clusterReachability.d.ts +0 -109
  287. package/dist/reachability/index.d.ts +0 -105
  288. package/dist/reachability/request.d.ts +0 -39
  289. package/dist/reachability/util.d.ts +0 -8
  290. package/dist/reactions/constants.d.ts +0 -3
  291. package/dist/reactions/reactions.d.ts +0 -4
  292. package/dist/reactions/reactions.type.d.ts +0 -52
  293. package/dist/reconnection-manager/index.d.ts +0 -136
  294. package/dist/recording-controller/enums.d.ts +0 -7
  295. package/dist/recording-controller/index.d.ts +0 -207
  296. package/dist/recording-controller/util.d.ts +0 -14
  297. package/dist/roap/collection.js +0 -62
  298. package/dist/roap/collection.js.map +0 -1
  299. package/dist/roap/handler.js +0 -275
  300. package/dist/roap/handler.js.map +0 -1
  301. package/dist/roap/index.d.ts +0 -86
  302. package/dist/roap/request.d.ts +0 -39
  303. package/dist/roap/state.js +0 -126
  304. package/dist/roap/state.js.map +0 -1
  305. package/dist/roap/turnDiscovery.d.ts +0 -155
  306. package/dist/roap/util.js +0 -75
  307. package/dist/roap/util.js.map +0 -1
  308. package/dist/rtcMetrics/constants.d.ts +0 -4
  309. package/dist/rtcMetrics/constants.js.map +0 -1
  310. package/dist/rtcMetrics/index.d.ts +0 -61
  311. package/dist/rtcMetrics/index.js +0 -197
  312. package/dist/rtcMetrics/index.js.map +0 -1
  313. package/dist/statsAnalyzer/global.d.ts +0 -36
  314. package/dist/statsAnalyzer/global.js +0 -126
  315. package/dist/statsAnalyzer/global.js.map +0 -1
  316. package/dist/statsAnalyzer/index.d.ts +0 -217
  317. package/dist/statsAnalyzer/index.js +0 -1013
  318. package/dist/statsAnalyzer/index.js.map +0 -1
  319. package/dist/statsAnalyzer/mqaUtil.d.ts +0 -48
  320. package/dist/statsAnalyzer/mqaUtil.js +0 -179
  321. package/dist/statsAnalyzer/mqaUtil.js.map +0 -1
  322. package/dist/transcription/index.d.ts +0 -64
  323. package/dist/types/common/errors/reconnection-in-progress.d.ts +0 -9
  324. package/dist/types/mediaQualityMetrics/config.d.ts +0 -241
  325. package/dist/types/networkQualityMonitor/index.d.ts +0 -70
  326. package/dist/types/rtcMetrics/constants.d.ts +0 -4
  327. package/dist/types/rtcMetrics/index.d.ts +0 -71
  328. package/dist/types/statsAnalyzer/global.d.ts +0 -36
  329. package/dist/types/statsAnalyzer/index.d.ts +0 -217
  330. package/dist/types/statsAnalyzer/mqaUtil.d.ts +0 -48
  331. package/dist/webinar/collection.d.ts +0 -16
  332. package/dist/webinar/index.d.ts +0 -5
@@ -89,8 +89,12 @@ const MeetingUtil = {
89
89
  getIpVersion(webex: any): IP_VERSION | undefined {
90
90
  const {supportsIpV4, supportsIpV6} = webex.internal.device.ipNetworkDetector;
91
91
 
92
- if (BrowserDetection().isBrowser('firefox')) {
93
- // our ipv6 solution relies on FQDN ICE candidates, but Firefox doesn't support them,
92
+ if (
93
+ !webex.config.meetings.backendIpv6NativeSupport &&
94
+ BrowserDetection().isBrowser('firefox')
95
+ ) {
96
+ // when backend doesn't support native ipv6,
97
+ // then our NAT64/DNS64 based solution relies on FQDN ICE candidates, but Firefox doesn't support them,
94
98
  // see https://bugzilla.mozilla.org/show_bug.cgi?id=1713128
95
99
  // so for Firefox we don't want the backend to activate the "ipv6 feature"
96
100
  return undefined;
@@ -111,7 +115,7 @@ const MeetingUtil = {
111
115
  return IP_VERSION.unknown;
112
116
  },
113
117
 
114
- joinMeeting: (meeting, options) => {
118
+ joinMeeting: async (meeting, options) => {
115
119
  if (!meeting) {
116
120
  return Promise.reject(new ParameterError('You need a meeting object.'));
117
121
  }
@@ -123,6 +127,27 @@ const MeetingUtil = {
123
127
  options: {meetingId: meeting.id},
124
128
  });
125
129
 
130
+ let reachability;
131
+ let clientMediaPreferences = {
132
+ // bare minimum fallback value that should allow us to join
133
+ ipver: IP_VERSION.unknown,
134
+ joinCookie: undefined,
135
+ preferTranscoding: !meeting.isMultistream,
136
+ };
137
+
138
+ try {
139
+ clientMediaPreferences = await webex.meetings.reachability.getClientMediaPreferences(
140
+ meeting.isMultistream,
141
+ MeetingUtil.getIpVersion(webex)
142
+ );
143
+ reachability = await webex.meetings.reachability.getReachabilityReportToAttachToRoap();
144
+ } catch (e) {
145
+ LoggerProxy.logger.error(
146
+ 'Meeting:util#joinMeeting --> Error getting reachability or clientMediaPreferences:',
147
+ e
148
+ );
149
+ }
150
+
126
151
  // eslint-disable-next-line no-warning-comments
127
152
  // TODO: check if the meeting is in JOINING state
128
153
  // if Joining state termintate the request as user might click multiple times
@@ -134,20 +159,19 @@ const MeetingUtil = {
134
159
  locusUrl: meeting.locusUrl,
135
160
  locusClusterUrl: meeting.meetingInfo?.locusClusterUrl,
136
161
  correlationId: meeting.correlationId,
137
- reachability: options.reachability,
162
+ reachability,
138
163
  roapMessage: options.roapMessage,
139
164
  permissionToken: meeting.permissionToken,
140
165
  resourceId: options.resourceId || null,
141
166
  moderator: options.moderator,
142
167
  pin: options.pin,
143
168
  moveToResource: options.moveToResource,
144
- preferTranscoding: !meeting.isMultistream,
145
169
  asResourceOccupant: options.asResourceOccupant,
146
170
  breakoutsSupported: options.breakoutsSupported,
147
171
  locale: options.locale,
148
172
  deviceCapabilities: options.deviceCapabilities,
149
173
  liveAnnotationSupported: options.liveAnnotationSupported,
150
- ipVersion: MeetingUtil.getIpVersion(meeting.getWebexObject()),
174
+ clientMediaPreferences,
151
175
  })
152
176
  .then((res) => {
153
177
  const parsed = MeetingUtil.parseLocusJoin(res);
@@ -173,6 +197,7 @@ const MeetingUtil = {
173
197
 
174
198
  cleanUp: (meeting) => {
175
199
  meeting.getWebexObject().internal.device.meetingEnded();
200
+ meeting.stopPeriodicLogUpload();
176
201
 
177
202
  meeting.breakouts.cleanUp();
178
203
  meeting.simultaneousInterpretation.cleanUp();
@@ -18,6 +18,19 @@ const ADHOC_MEETING_DEFAULT_ERROR =
18
18
  'Failed starting the adhoc meeting, Please contact support team ';
19
19
  const CAPTCHA_ERROR_REQUIRES_PASSWORD_CODES = [423005, 423006];
20
20
  const POLICY_ERROR_CODES = [403049, 403104, 403103, 403048, 403102, 403101];
21
+ /**
22
+ * 403021 - Meeting registration is required
23
+ * 403022 - Meeting registration is still pending
24
+ * 403024 - Meeting registration have been rejected
25
+ * 403137 - Registration ID verified failure
26
+ * 423007 - Registration ID input too many time,please input captcha code
27
+ * 403026 - Need to join meeting via webcast
28
+ * 403037 - Meeting join required registration ID
29
+ * 403137 - Registration ID verified failure
30
+ *
31
+ */
32
+ const JOIN_WEBINAR_ERROR_CODES = [403021, 403022, 403024, 403137, 423007, 403026, 403037, 403137];
33
+
21
34
  /**
22
35
  * Error to indicate that wbxappapi requires a password
23
36
  */
@@ -124,6 +137,31 @@ export class MeetingInfoV2CaptchaError extends Error {
124
137
  }
125
138
  }
126
139
 
140
+ /**
141
+ * Error preventing join because of a webinar have some error
142
+ */
143
+ export class MeetingInfoV2JoinWebinarError extends Error {
144
+ meetingInfo: any;
145
+ sdkMessage: any;
146
+ wbxAppApiCode: any;
147
+ body: any;
148
+ /**
149
+ *
150
+ * @constructor
151
+ * @param {Number} [wbxAppApiErrorCode]
152
+ * @param {Object} [meetingInfo]
153
+ * @param {String} [message]
154
+ */
155
+ constructor(wbxAppApiErrorCode?: number, meetingInfo?: object, message?: string) {
156
+ super(`${message}, code=${wbxAppApiErrorCode}`);
157
+ this.name = 'MeetingInfoV2JoinWebinarError';
158
+ this.sdkMessage = message;
159
+ this.stack = new Error().stack;
160
+ this.wbxAppApiCode = wbxAppApiErrorCode;
161
+ this.meetingInfo = meetingInfo;
162
+ }
163
+ }
164
+
127
165
  /**
128
166
  * @class MeetingInfo
129
167
  */
@@ -177,6 +215,29 @@ export default class MeetingInfoV2 {
177
215
  }
178
216
  };
179
217
 
218
+ /**
219
+ * Raises a handleJoinWebinarError for join webinar error codes
220
+ * @param {any} err the error from the request
221
+ * @returns {void}
222
+ */
223
+ handleJoinWebinarError = (err) => {
224
+ if (!err.body) {
225
+ return;
226
+ }
227
+
228
+ if (JOIN_WEBINAR_ERROR_CODES.includes(err.body?.code)) {
229
+ Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.JOIN_WEBINAR_ERROR, {
230
+ code: err.body?.code,
231
+ });
232
+
233
+ throw new MeetingInfoV2JoinWebinarError(
234
+ err.body?.code,
235
+ err.body?.data?.meetingInfo,
236
+ err.body?.message
237
+ );
238
+ }
239
+ };
240
+
180
241
  /**
181
242
  * Creates adhoc space meetings for a space by fetching the conversation infomation
182
243
  * @param {String} conversationUrl conversationUrl to start adhoc meeting on
@@ -237,6 +298,7 @@ export default class MeetingInfoV2 {
237
298
  })
238
299
  .catch((err) => {
239
300
  this.handlePolicyError(err);
301
+ this.handleJoinWebinarError(err);
240
302
 
241
303
  Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.ADHOC_MEETING_FAILURE, {
242
304
  reason: err.message,
@@ -391,6 +453,7 @@ export default class MeetingInfoV2 {
391
453
 
392
454
  if (err?.statusCode === 403) {
393
455
  this.handlePolicyError(err);
456
+ this.handleJoinWebinarError(err);
394
457
 
395
458
  Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.VERIFY_PASSWORD_ERROR, {
396
459
  reason: err.message,
@@ -56,6 +56,7 @@ import MeetingCollection from './collection';
56
56
  import {MEETING_KEY, INoiseReductionEffect, IVirtualBackgroundEffect} from './meetings.types';
57
57
  import MeetingsUtil from './util';
58
58
  import PermissionError from '../common/errors/permission';
59
+ import JoinWebinarError from '../common/errors/join-webinar-error';
59
60
  import {SpaceIDDeprecatedError} from '../common/errors/webex-errors';
60
61
  import NoMeetingInfoError from '../common/errors/no-meeting-info';
61
62
 
@@ -154,6 +155,9 @@ export type BasicMeetingInformation = {
154
155
  };
155
156
  meetingInfo: any;
156
157
  sessionCorrelationId: string;
158
+ roles: string[];
159
+ getCurUserType: () => string | null;
160
+ callStateForMetrics: CallStateForMetrics;
157
161
  };
158
162
 
159
163
  /**
@@ -762,6 +766,25 @@ export default class Meetings extends WebexPlugin {
762
766
  }
763
767
  }
764
768
 
769
+ /**
770
+ * API to toggle backend ipv6 native support config, needs to be called before webex.meetings.register()
771
+ *
772
+ * @param {Boolean} newValue
773
+ * @private
774
+ * @memberof Meetings
775
+ * @returns {undefined}
776
+ */
777
+ private _toggleIpv6BackendNativeSupport(newValue: boolean) {
778
+ if (typeof newValue !== 'boolean') {
779
+ return;
780
+ }
781
+ // @ts-ignore
782
+ if (this.config.backendIpv6NativeSupport !== newValue) {
783
+ // @ts-ignore
784
+ this.config.backendIpv6NativeSupport = newValue;
785
+ }
786
+ }
787
+
765
788
  /**
766
789
  * Explicitly sets up the meetings plugin by registering
767
790
  * the device, connecting to mercury, and listening for locus events.
@@ -1024,48 +1047,55 @@ export default class Meetings extends WebexPlugin {
1024
1047
  */
1025
1048
  fetchUserPreferredWebexSite() {
1026
1049
  // @ts-ignore
1027
- return this.webex.people._getMe().then((me) => {
1028
- const isGuestUser = me.type === 'appuser';
1029
- if (!isGuestUser) {
1030
- return this.request.getMeetingPreferences().then((res) => {
1031
- if (res) {
1032
- const preferredWebexSite = MeetingsUtil.parseDefaultSiteFromMeetingPreferences(res);
1033
- this.preferredWebexSite = preferredWebexSite;
1034
- // @ts-ignore
1035
- this.webex.internal.services._getCatalog().addAllowedDomains([preferredWebexSite]);
1036
- }
1050
+ return this.webex.people
1051
+ ._getMe()
1052
+ .then((me) => {
1053
+ const isGuestUser = me.type === 'appuser';
1054
+ if (!isGuestUser) {
1055
+ return this.request.getMeetingPreferences().then((res) => {
1056
+ if (res) {
1057
+ const preferredWebexSite = MeetingsUtil.parseDefaultSiteFromMeetingPreferences(res);
1058
+ this.preferredWebexSite = preferredWebexSite;
1059
+ // @ts-ignore
1060
+ this.webex.internal.services._getCatalog().addAllowedDomains([preferredWebexSite]);
1061
+ }
1037
1062
 
1038
- // fall back to getting the preferred site from the user information
1039
- if (!this.preferredWebexSite) {
1040
- // @ts-ignore
1041
- return this.webex.internal.user
1042
- .get()
1043
- .then((user) => {
1044
- const preferredWebexSite =
1045
- user?.userPreferences?.userPreferencesItems?.preferredWebExSite;
1046
- if (preferredWebexSite) {
1047
- this.preferredWebexSite = preferredWebexSite;
1048
- // @ts-ignore
1049
- this.webex.internal.services
1050
- ._getCatalog()
1051
- .addAllowedDomains([preferredWebexSite]);
1052
- } else {
1053
- throw new Error('site not found');
1054
- }
1055
- })
1056
- .catch(() => {
1057
- LoggerProxy.logger.error(
1058
- 'Failed to fetch preferred site from user - no site will be set'
1059
- );
1060
- });
1061
- }
1063
+ // fall back to getting the preferred site from the user information
1064
+ if (!this.preferredWebexSite) {
1065
+ // @ts-ignore
1066
+ return this.webex.internal.user
1067
+ .get()
1068
+ .then((user) => {
1069
+ const preferredWebexSite =
1070
+ user?.userPreferences?.userPreferencesItems?.preferredWebExSite;
1071
+ if (preferredWebexSite) {
1072
+ this.preferredWebexSite = preferredWebexSite;
1073
+ // @ts-ignore
1074
+ this.webex.internal.services
1075
+ ._getCatalog()
1076
+ .addAllowedDomains([preferredWebexSite]);
1077
+ } else {
1078
+ throw new Error('site not found');
1079
+ }
1080
+ })
1081
+ .catch(() => {
1082
+ LoggerProxy.logger.error(
1083
+ 'Failed to fetch preferred site from user - no site will be set'
1084
+ );
1085
+ });
1086
+ }
1062
1087
 
1063
- return Promise.resolve();
1064
- });
1065
- }
1088
+ return Promise.resolve();
1089
+ });
1090
+ }
1066
1091
 
1067
- return Promise.resolve();
1068
- });
1092
+ return Promise.resolve();
1093
+ })
1094
+ .catch(() => {
1095
+ LoggerProxy.logger.error(
1096
+ 'Failed to retrieve user information. No preferredWebexSite will be set'
1097
+ );
1098
+ });
1069
1099
  }
1070
1100
 
1071
1101
  /**
@@ -1116,6 +1146,9 @@ export default class Meetings extends WebexPlugin {
1116
1146
  sessionId: meeting.locusInfo?.fullState?.sessionId,
1117
1147
  },
1118
1148
  },
1149
+ roles: meeting.roles,
1150
+ callStateForMetrics: meeting.callStateForMetrics,
1151
+ getCurUserType: meeting.getCurUserType,
1119
1152
  });
1120
1153
  this.meetingCollection.delete(meeting.id);
1121
1154
  Trigger.trigger(
@@ -1378,7 +1411,8 @@ export default class Meetings extends WebexPlugin {
1378
1411
  if (
1379
1412
  !(err instanceof CaptchaError) &&
1380
1413
  !(err instanceof PasswordError) &&
1381
- !(err instanceof PermissionError)
1414
+ !(err instanceof PermissionError) &&
1415
+ !(err instanceof JoinWebinarError)
1382
1416
  ) {
1383
1417
  LoggerProxy.logger.info(
1384
1418
  `Meetings:index#createMeeting --> Info Unable to fetch meeting info for ${destination}.`
@@ -915,11 +915,12 @@ export default class Members extends StatelessWebexPlugin {
915
915
  /**
916
916
  * Lower all hands of members in a meeting
917
917
  * @param {String} requestingMemberId - id of the participant which requested the lower all hands
918
+ * @param {array} roles which should be lowered
918
919
  * @returns {Promise}
919
920
  * @public
920
921
  * @memberof Members
921
922
  */
922
- public lowerAllHands(requestingMemberId: string) {
923
+ public lowerAllHands(requestingMemberId: string, roles: Array<string>) {
923
924
  if (!this.locusUrl) {
924
925
  return Promise.reject(
925
926
  new ParameterError(
@@ -936,7 +937,8 @@ export default class Members extends StatelessWebexPlugin {
936
937
  }
937
938
  const options = MembersUtil.generateLowerAllHandsMemberOptions(
938
939
  requestingMemberId,
939
- this.locusUrl
940
+ this.locusUrl,
941
+ roles
940
942
  );
941
943
 
942
944
  return this.membersRequest.lowerAllHandsMember(options);
@@ -46,6 +46,7 @@ const MembersUtil = {
46
46
  {
47
47
  address:
48
48
  options.invitee.emailAddress || options.invitee.email || options.invitee.phoneNumber,
49
+ ...(options.invitee.roles ? {roles: options.invitee.roles} : {}),
49
50
  },
50
51
  ],
51
52
  alertIfActive: options.alertIfActive,
@@ -166,9 +167,10 @@ const MembersUtil = {
166
167
  locusUrl,
167
168
  }),
168
169
 
169
- generateLowerAllHandsMemberOptions: (requestingParticipantId, locusUrl) => ({
170
+ generateLowerAllHandsMemberOptions: (requestingParticipantId, locusUrl, roles) => ({
170
171
  requestingParticipantId,
171
172
  locusUrl,
173
+ ...(roles !== undefined && {roles}),
172
174
  }),
173
175
 
174
176
  /**
@@ -253,6 +255,7 @@ const MembersUtil = {
253
255
  const body = {
254
256
  hand: {
255
257
  raised: false,
258
+ ...(options.roles !== undefined && {roles: options.roles}),
256
259
  },
257
260
  requestingParticipantId: options.requestingParticipantId,
258
261
  };
@@ -70,6 +70,9 @@ const BEHAVIORAL_METRICS = {
70
70
  ROAP_HTTP_RESPONSE_MISSING: 'js_sdk_roap_http_response_missing',
71
71
  TURN_DISCOVERY_REQUIRES_OK: 'js_sdk_turn_discovery_requires_ok',
72
72
  REACHABILITY_COMPLETED: 'js_sdk_reachability_completed',
73
+ JOIN_WEBINAR_ERROR: 'js_sdk_join_webinar_error',
74
+ GUEST_ENTERED_LOBBY: 'js_sdk_guest_entered_lobby',
75
+ GUEST_EXITED_LOBBY: 'js_sdk_guest_exited_lobby',
73
76
  };
74
77
 
75
78
  export {BEHAVIORAL_METRICS as default};
@@ -19,6 +19,14 @@ export type RemoteVideoResolution =
19
19
  | 'large' // 1080p or less
20
20
  | 'best'; // highest possible resolution
21
21
 
22
+ const MAX_FS_VALUES = {
23
+ '90p': 60,
24
+ '180p': 240,
25
+ '360p': 920,
26
+ '720p': 3600,
27
+ '1080p': 8192,
28
+ };
29
+
22
30
  /**
23
31
  * Converts pane size into h264 maxFs
24
32
  * @param {PaneSize} paneSize
@@ -29,28 +37,28 @@ export function getMaxFs(paneSize: RemoteVideoResolution): number {
29
37
 
30
38
  switch (paneSize) {
31
39
  case 'thumbnail':
32
- maxFs = 60;
40
+ maxFs = MAX_FS_VALUES['90p'];
33
41
  break;
34
42
  case 'very small':
35
- maxFs = 240;
43
+ maxFs = MAX_FS_VALUES['180p'];
36
44
  break;
37
45
  case 'small':
38
- maxFs = 920;
46
+ maxFs = MAX_FS_VALUES['360p'];
39
47
  break;
40
48
  case 'medium':
41
- maxFs = 3600;
49
+ maxFs = MAX_FS_VALUES['720p'];
42
50
  break;
43
51
  case 'large':
44
- maxFs = 8192;
52
+ maxFs = MAX_FS_VALUES['1080p'];
45
53
  break;
46
54
  case 'best':
47
- maxFs = 8192; // for now 'best' is 1080p, so same as 'large'
55
+ maxFs = MAX_FS_VALUES['1080p']; // for now 'best' is 1080p, so same as 'large'
48
56
  break;
49
57
  default:
50
58
  LoggerProxy.logger.warn(
51
59
  `RemoteMedia#getMaxFs --> unsupported paneSize: ${paneSize}, using "medium" instead`
52
60
  );
53
- maxFs = 3600;
61
+ maxFs = MAX_FS_VALUES['720p'];
54
62
  }
55
63
 
56
64
  return maxFs;
@@ -107,21 +115,31 @@ export class RemoteMedia extends EventsScope {
107
115
  * to restrict the requested resolution to this size
108
116
  * @param width width of the video element
109
117
  * @param height height of the video element
118
+ * @note width/height of 0 will be ignored
110
119
  */
111
120
  public setSizeHint(width, height) {
112
121
  // only base on height for now
113
122
  let fs: number;
114
123
 
115
- if (height < 135) {
116
- fs = 60;
117
- } else if (height < 270) {
118
- fs = 240;
119
- } else if (height < 540) {
120
- fs = 920;
124
+ if (width === 0 || height === 0) {
125
+ return;
126
+ }
127
+
128
+ // we switch to the next resolution level when the height is 10% more than the current resolution height
129
+ // except for 1080p - we switch to it immediately when the height is more than 720p
130
+ const threshold = 1.1;
131
+ const getThresholdHeight = (h: number) => Math.round(h * threshold);
132
+
133
+ if (height < getThresholdHeight(90)) {
134
+ fs = MAX_FS_VALUES['90p'];
135
+ } else if (height < getThresholdHeight(180)) {
136
+ fs = MAX_FS_VALUES['180p'];
137
+ } else if (height < getThresholdHeight(360)) {
138
+ fs = MAX_FS_VALUES['360p'];
121
139
  } else if (height <= 720) {
122
- fs = 3600;
140
+ fs = MAX_FS_VALUES['720p'];
123
141
  } else {
124
- fs = 8192;
142
+ fs = MAX_FS_VALUES['1080p'];
125
143
  }
126
144
 
127
145
  this.receiveSlot?.setMaxFs(fs);
@@ -6,20 +6,7 @@ import {convertStunUrlToTurn, convertStunUrlToTurnTls} from './util';
6
6
  import EventsScope from '../common/events/events-scope';
7
7
 
8
8
  import {CONNECTION_STATE, Enum, ICE_GATHERING_STATE} from '../constants';
9
-
10
- // result for a specific transport protocol (like udp or tcp)
11
- export type TransportResult = {
12
- result: 'reachable' | 'unreachable' | 'untested';
13
- latencyInMilliseconds?: number; // amount of time it took to get the first ICE candidate
14
- clientMediaIPs?: string[];
15
- };
16
-
17
- // reachability result for a specific media cluster
18
- export type ClusterReachabilityResult = {
19
- udp: TransportResult;
20
- tcp: TransportResult;
21
- xtls: TransportResult;
22
- };
9
+ import {ClusterReachabilityResult} from './reachability.types';
23
10
 
24
11
  // data for the Events.resultReady event
25
12
  export type ResultEventData = {
@@ -370,11 +357,14 @@ export class ClusterReachability extends EventsScope {
370
357
 
371
358
  this.startTimestamp = performance.now();
372
359
 
360
+ // Set up the state change listeners before triggering the ICE gathering
361
+ const gatherIceCandidatePromise = this.gatherIceCandidates();
362
+
373
363
  // not awaiting the next call on purpose, because we're not sending the offer anywhere and there won't be any answer
374
364
  // we just need to make this call to trigger the ICE gathering process
375
365
  this.pc.setLocalDescription(offer);
376
366
 
377
- await this.gatherIceCandidates();
367
+ await gatherIceCandidatePromise;
378
368
  } catch (error) {
379
369
  LoggerProxy.logger.warn(`Reachability:ClusterReachability#start --> Error: `, error);
380
370
  }