@webex/plugin-meetings 3.0.0-beta.14 → 3.0.0-beta.16

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 (311) hide show
  1. package/UPGRADING.md +9 -9
  2. package/browsers.js +19 -24
  3. package/dist/common/browser-detection.js +1 -20
  4. package/dist/common/browser-detection.js.map +1 -1
  5. package/dist/common/collection.js +5 -20
  6. package/dist/common/collection.js.map +1 -1
  7. package/dist/common/config.js +0 -7
  8. package/dist/common/config.js.map +1 -1
  9. package/dist/common/errors/captcha-error.js +5 -26
  10. package/dist/common/errors/captcha-error.js.map +1 -1
  11. package/dist/common/errors/intent-to-join.js +5 -26
  12. package/dist/common/errors/intent-to-join.js.map +1 -1
  13. package/dist/common/errors/join-meeting.js +6 -27
  14. package/dist/common/errors/join-meeting.js.map +1 -1
  15. package/dist/common/errors/media.js +5 -26
  16. package/dist/common/errors/media.js.map +1 -1
  17. package/dist/common/errors/parameter.js +5 -33
  18. package/dist/common/errors/parameter.js.map +1 -1
  19. package/dist/common/errors/password-error.js +5 -26
  20. package/dist/common/errors/password-error.js.map +1 -1
  21. package/dist/common/errors/permission.js +4 -25
  22. package/dist/common/errors/permission.js.map +1 -1
  23. package/dist/common/errors/reconnection-in-progress.js +0 -17
  24. package/dist/common/errors/reconnection-in-progress.js.map +1 -1
  25. package/dist/common/errors/reconnection.js +5 -26
  26. package/dist/common/errors/reconnection.js.map +1 -1
  27. package/dist/common/errors/stats.js +5 -26
  28. package/dist/common/errors/stats.js.map +1 -1
  29. package/dist/common/errors/webex-errors.js +6 -41
  30. package/dist/common/errors/webex-errors.js.map +1 -1
  31. package/dist/common/errors/webex-meetings-error.js +1 -24
  32. package/dist/common/errors/webex-meetings-error.js.map +1 -1
  33. package/dist/common/events/events-scope.js +0 -22
  34. package/dist/common/events/events-scope.js.map +1 -1
  35. package/dist/common/events/events.js +0 -23
  36. package/dist/common/events/events.js.map +1 -1
  37. package/dist/common/events/trigger-proxy.js +0 -12
  38. package/dist/common/events/trigger-proxy.js.map +1 -1
  39. package/dist/common/events/util.js +0 -15
  40. package/dist/common/events/util.js.map +1 -1
  41. package/dist/common/logs/logger-config.js +0 -4
  42. package/dist/common/logs/logger-config.js.map +1 -1
  43. package/dist/common/logs/logger-proxy.js +1 -8
  44. package/dist/common/logs/logger-proxy.js.map +1 -1
  45. package/dist/common/logs/request.js +35 -61
  46. package/dist/common/logs/request.js.map +1 -1
  47. package/dist/common/queue.js +4 -14
  48. package/dist/common/queue.js.map +1 -1
  49. package/dist/config.js +1 -5
  50. package/dist/config.js.map +1 -1
  51. package/dist/constants.js +45 -40
  52. package/dist/constants.js.map +1 -1
  53. package/dist/index.js +1 -17
  54. package/dist/index.js.map +1 -1
  55. package/dist/locus-info/controlsUtils.js +10 -28
  56. package/dist/locus-info/controlsUtils.js.map +1 -1
  57. package/dist/locus-info/embeddedAppsUtils.js +3 -26
  58. package/dist/locus-info/embeddedAppsUtils.js.map +1 -1
  59. package/dist/locus-info/fullState.js +0 -15
  60. package/dist/locus-info/fullState.js.map +1 -1
  61. package/dist/locus-info/hostUtils.js +4 -12
  62. package/dist/locus-info/hostUtils.js.map +1 -1
  63. package/dist/locus-info/index.js +101 -193
  64. package/dist/locus-info/index.js.map +1 -1
  65. package/dist/locus-info/infoUtils.js +0 -38
  66. package/dist/locus-info/infoUtils.js.map +1 -1
  67. package/dist/locus-info/mediaSharesUtils.js +12 -38
  68. package/dist/locus-info/mediaSharesUtils.js.map +1 -1
  69. package/dist/locus-info/parser.js +87 -123
  70. package/dist/locus-info/parser.js.map +1 -1
  71. package/dist/locus-info/selfUtils.js +16 -81
  72. package/dist/locus-info/selfUtils.js.map +1 -1
  73. package/dist/media/index.js +43 -97
  74. package/dist/media/index.js.map +1 -1
  75. package/dist/media/internal-media-core-wrapper.js +0 -4
  76. package/dist/media/internal-media-core-wrapper.js.map +1 -1
  77. package/dist/media/properties.js +64 -110
  78. package/dist/media/properties.js.map +1 -1
  79. package/dist/media/util.js +2 -9
  80. package/dist/media/util.js.map +1 -1
  81. package/dist/mediaQualityMetrics/config.js +10 -12
  82. package/dist/mediaQualityMetrics/config.js.map +1 -1
  83. package/dist/meeting/effectsState.js +120 -192
  84. package/dist/meeting/effectsState.js.map +1 -1
  85. package/dist/meeting/in-meeting-actions.js +0 -13
  86. package/dist/meeting/in-meeting-actions.js.map +1 -1
  87. package/dist/meeting/index.js +819 -1591
  88. package/dist/meeting/index.js.map +1 -1
  89. package/dist/meeting/muteState.js +31 -78
  90. package/dist/meeting/muteState.js.map +1 -1
  91. package/dist/meeting/request.js +160 -230
  92. package/dist/meeting/request.js.map +1 -1
  93. package/dist/meeting/request.type.js +0 -1
  94. package/dist/meeting/request.type.js.map +1 -1
  95. package/dist/meeting/state.js +21 -31
  96. package/dist/meeting/state.js.map +1 -1
  97. package/dist/meeting/util.js +19 -158
  98. package/dist/meeting/util.js.map +1 -1
  99. package/dist/meeting-info/collection.js +3 -25
  100. package/dist/meeting-info/collection.js.map +1 -1
  101. package/dist/meeting-info/index.js +10 -33
  102. package/dist/meeting-info/index.js.map +1 -1
  103. package/dist/meeting-info/meeting-info-v2.js +179 -268
  104. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  105. package/dist/meeting-info/request.js +1 -16
  106. package/dist/meeting-info/request.js.map +1 -1
  107. package/dist/meeting-info/util.js +98 -183
  108. package/dist/meeting-info/util.js.map +1 -1
  109. package/dist/meeting-info/utilv2.js +137 -228
  110. package/dist/meeting-info/utilv2.js.map +1 -1
  111. package/dist/meetings/collection.js +3 -21
  112. package/dist/meetings/collection.js.map +1 -1
  113. package/dist/meetings/index.js +450 -582
  114. package/dist/meetings/index.js.map +1 -1
  115. package/dist/meetings/request.js +7 -30
  116. package/dist/meetings/request.js.map +1 -1
  117. package/dist/meetings/util.js +99 -155
  118. package/dist/meetings/util.js.map +1 -1
  119. package/dist/member/index.js +49 -89
  120. package/dist/member/index.js.map +1 -1
  121. package/dist/member/util.js +17 -68
  122. package/dist/member/util.js.map +1 -1
  123. package/dist/members/collection.js +2 -12
  124. package/dist/members/collection.js.map +1 -1
  125. package/dist/members/index.js +72 -194
  126. package/dist/members/index.js.map +1 -1
  127. package/dist/members/request.js +21 -56
  128. package/dist/members/request.js.map +1 -1
  129. package/dist/members/util.js +9 -38
  130. package/dist/members/util.js.map +1 -1
  131. package/dist/metrics/config.js +0 -2
  132. package/dist/metrics/config.js.map +1 -1
  133. package/dist/metrics/constants.js +1 -2
  134. package/dist/metrics/constants.js.map +1 -1
  135. package/dist/metrics/index.js +48 -136
  136. package/dist/metrics/index.js.map +1 -1
  137. package/dist/multistream/mediaRequestManager.js +12 -28
  138. package/dist/multistream/mediaRequestManager.js.map +1 -1
  139. package/dist/multistream/multistreamMedia.js +11 -21
  140. package/dist/multistream/multistreamMedia.js.map +1 -1
  141. package/dist/multistream/receiveSlot.js +7 -47
  142. package/dist/multistream/receiveSlot.js.map +1 -1
  143. package/dist/multistream/receiveSlotManager.js +38 -77
  144. package/dist/multistream/receiveSlotManager.js.map +1 -1
  145. package/dist/multistream/remoteMedia.js +11 -56
  146. package/dist/multistream/remoteMedia.js.map +1 -1
  147. package/dist/multistream/remoteMediaGroup.js +6 -40
  148. package/dist/multistream/remoteMediaGroup.js.map +1 -1
  149. package/dist/multistream/remoteMediaManager.js +221 -380
  150. package/dist/multistream/remoteMediaManager.js.map +1 -1
  151. package/dist/networkQualityMonitor/index.js +28 -57
  152. package/dist/networkQualityMonitor/index.js.map +1 -1
  153. package/dist/personal-meeting-room/index.js +10 -45
  154. package/dist/personal-meeting-room/index.js.map +1 -1
  155. package/dist/personal-meeting-room/request.js +2 -33
  156. package/dist/personal-meeting-room/request.js.map +1 -1
  157. package/dist/personal-meeting-room/util.js +0 -13
  158. package/dist/personal-meeting-room/util.js.map +1 -1
  159. package/dist/reachability/index.js +100 -166
  160. package/dist/reachability/index.js.map +1 -1
  161. package/dist/reachability/request.js +2 -18
  162. package/dist/reachability/request.js.map +1 -1
  163. package/dist/reactions/reactions.js +0 -2
  164. package/dist/reactions/reactions.js.map +1 -1
  165. package/dist/reactions/reactions.type.js +2 -6
  166. package/dist/reactions/reactions.type.js.map +1 -1
  167. package/dist/reconnection-manager/index.js +294 -459
  168. package/dist/reconnection-manager/index.js.map +1 -1
  169. package/dist/roap/index.js +18 -53
  170. package/dist/roap/index.js.map +1 -1
  171. package/dist/roap/request.js +13 -55
  172. package/dist/roap/request.js.map +1 -1
  173. package/dist/roap/turnDiscovery.js +10 -52
  174. package/dist/roap/turnDiscovery.js.map +1 -1
  175. package/dist/statsAnalyzer/global.js +0 -2
  176. package/dist/statsAnalyzer/global.js.map +1 -1
  177. package/dist/statsAnalyzer/index.js +66 -174
  178. package/dist/statsAnalyzer/index.js.map +1 -1
  179. package/dist/statsAnalyzer/mqaUtil.js +54 -53
  180. package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
  181. package/dist/transcription/index.js +13 -45
  182. package/dist/transcription/index.js.map +1 -1
  183. package/internal-README.md +7 -6
  184. package/package.json +18 -18
  185. package/src/common/browser-detection.ts +9 -6
  186. package/src/common/collection.ts +3 -1
  187. package/src/common/errors/captcha-error.ts +6 -6
  188. package/src/common/errors/intent-to-join.ts +6 -6
  189. package/src/common/errors/join-meeting.ts +12 -8
  190. package/src/common/errors/media.ts +6 -6
  191. package/src/common/errors/parameter.ts +9 -6
  192. package/src/common/errors/password-error.ts +6 -6
  193. package/src/common/errors/permission.ts +5 -5
  194. package/src/common/errors/reconnection.ts +6 -6
  195. package/src/common/errors/stats.ts +6 -6
  196. package/src/common/errors/webex-errors.ts +7 -5
  197. package/src/common/errors/webex-meetings-error.ts +1 -1
  198. package/src/common/events/events-scope.ts +5 -1
  199. package/src/common/events/events.ts +5 -1
  200. package/src/common/events/trigger-proxy.ts +8 -3
  201. package/src/common/events/util.ts +1 -2
  202. package/src/common/logs/logger-proxy.ts +21 -10
  203. package/src/common/logs/request.ts +11 -8
  204. package/src/config.ts +11 -11
  205. package/src/constants.ts +1 -1
  206. package/src/index.js +1 -1
  207. package/src/locus-info/controlsUtils.ts +34 -24
  208. package/src/locus-info/fullState.ts +15 -11
  209. package/src/locus-info/hostUtils.ts +4 -3
  210. package/src/locus-info/index.ts +25 -34
  211. package/src/locus-info/infoUtils.ts +12 -4
  212. package/src/locus-info/mediaSharesUtils.ts +4 -4
  213. package/src/locus-info/parser.ts +45 -68
  214. package/src/locus-info/selfUtils.ts +106 -57
  215. package/src/media/index.ts +123 -135
  216. package/src/media/internal-media-core-wrapper.ts +2 -2
  217. package/src/media/properties.ts +30 -20
  218. package/src/media/util.ts +1 -1
  219. package/src/mediaQualityMetrics/config.ts +46 -46
  220. package/src/meeting/effectsState.ts +35 -35
  221. package/src/meeting/in-meeting-actions.ts +7 -3
  222. package/src/meeting/index.ts +1559 -1292
  223. package/src/meeting/muteState.ts +62 -31
  224. package/src/meeting/request.ts +155 -116
  225. package/src/meeting/request.type.ts +8 -8
  226. package/src/meeting/state.ts +45 -30
  227. package/src/meeting/util.ts +101 -70
  228. package/src/meeting-info/collection.ts +2 -1
  229. package/src/meeting-info/index.ts +32 -30
  230. package/src/meeting-info/meeting-info-v2.ts +106 -108
  231. package/src/meeting-info/request.ts +9 -3
  232. package/src/meeting-info/util.ts +54 -46
  233. package/src/meeting-info/utilv2.ts +59 -53
  234. package/src/meetings/collection.ts +1 -1
  235. package/src/meetings/index.ts +512 -440
  236. package/src/meetings/request.ts +26 -24
  237. package/src/meetings/util.ts +29 -29
  238. package/src/member/index.ts +55 -49
  239. package/src/member/util.ts +26 -13
  240. package/src/members/collection.ts +0 -1
  241. package/src/members/index.ts +182 -126
  242. package/src/members/request.ts +46 -14
  243. package/src/members/util.ts +44 -42
  244. package/src/metrics/config.ts +254 -81
  245. package/src/metrics/constants.ts +0 -2
  246. package/src/metrics/index.ts +84 -71
  247. package/src/multistream/multistreamMedia.ts +1 -0
  248. package/src/multistream/receiveSlot.ts +1 -0
  249. package/src/multistream/receiveSlotManager.ts +1 -0
  250. package/src/multistream/remoteMedia.ts +1 -1
  251. package/src/multistream/remoteMediaGroup.ts +2 -1
  252. package/src/multistream/remoteMediaManager.ts +3 -0
  253. package/src/networkQualityMonitor/index.ts +20 -23
  254. package/src/personal-meeting-room/index.ts +12 -16
  255. package/src/personal-meeting-room/request.ts +10 -3
  256. package/src/personal-meeting-room/util.ts +3 -3
  257. package/src/reachability/index.ts +61 -59
  258. package/src/reachability/request.ts +36 -32
  259. package/src/reactions/reactions.ts +4 -4
  260. package/src/reactions/reactions.type.ts +4 -3
  261. package/src/reconnection-manager/index.ts +139 -84
  262. package/src/roap/index.ts +46 -38
  263. package/src/roap/request.ts +44 -31
  264. package/src/roap/turnDiscovery.ts +59 -30
  265. package/src/statsAnalyzer/global.ts +30 -33
  266. package/src/statsAnalyzer/index.ts +432 -175
  267. package/src/statsAnalyzer/mqaUtil.ts +178 -72
  268. package/src/transcription/index.ts +34 -32
  269. package/test/integration/spec/journey.js +664 -463
  270. package/test/integration/spec/space-meeting.js +319 -204
  271. package/test/integration/spec/transcription.js +7 -8
  272. package/test/unit/spec/common/browser-detection.js +9 -28
  273. package/test/unit/spec/fixture/locus.js +92 -90
  274. package/test/unit/spec/locus-info/controlsUtils.js +5 -5
  275. package/test/unit/spec/locus-info/embeddedAppsUtils.js +8 -6
  276. package/test/unit/spec/locus-info/index.js +1 -2
  277. package/test/unit/spec/locus-info/infoUtils.js +26 -33
  278. package/test/unit/spec/locus-info/lib/BasicSeqCmp.json +88 -430
  279. package/test/unit/spec/locus-info/lib/SeqCmp.json +513 -685
  280. package/test/unit/spec/locus-info/parser.js +3 -9
  281. package/test/unit/spec/locus-info/selfConstant.js +72 -103
  282. package/test/unit/spec/locus-info/selfUtils.js +21 -12
  283. package/test/unit/spec/meeting/effectsState.js +36 -46
  284. package/test/unit/spec/meeting/in-meeting-actions.ts +2 -3
  285. package/test/unit/spec/meeting/index.js +1279 -685
  286. package/test/unit/spec/meeting/muteState.js +42 -33
  287. package/test/unit/spec/meeting/request.js +57 -46
  288. package/test/unit/spec/meeting/utils.js +78 -53
  289. package/test/unit/spec/meeting-info/meetinginfov2.js +100 -73
  290. package/test/unit/spec/meeting-info/request.js +7 -9
  291. package/test/unit/spec/meeting-info/util.js +11 -12
  292. package/test/unit/spec/meeting-info/utilv2.js +110 -74
  293. package/test/unit/spec/meetings/collection.js +1 -1
  294. package/test/unit/spec/meetings/index.js +438 -257
  295. package/test/unit/spec/meetings/utils.js +14 -12
  296. package/test/unit/spec/member/index.js +0 -1
  297. package/test/unit/spec/member/util.js +5 -6
  298. package/test/unit/spec/members/index.js +104 -54
  299. package/test/unit/spec/members/request.js +29 -20
  300. package/test/unit/spec/members/utils.js +8 -5
  301. package/test/unit/spec/metrics/index.js +16 -21
  302. package/test/unit/spec/networkQualityMonitor/index.js +21 -15
  303. package/test/unit/spec/personal-meeting-room/personal-meeting-room.js +2 -7
  304. package/test/unit/spec/reachability/index.ts +9 -11
  305. package/test/unit/spec/reconnection-manager/index.js +16 -18
  306. package/test/unit/spec/roap/turnDiscovery.ts +22 -19
  307. package/test/unit/spec/stats-analyzer/index.js +25 -20
  308. package/test/utils/cmr.js +44 -42
  309. package/test/utils/testUtils.js +83 -74
  310. package/test/utils/webex-config.js +18 -18
  311. package/test/utils/webex-test-users.js +53 -50
@@ -2,11 +2,7 @@
2
2
  import {StatelessWebexPlugin} from '@webex/webex-core';
3
3
 
4
4
  import LoggerProxy from '../common/logs/logger-proxy';
5
- import {
6
- HTTP_VERBS,
7
- API,
8
- RESOURCE
9
- } from '../constants';
5
+ import {HTTP_VERBS, API, RESOURCE} from '../constants';
10
6
 
11
7
  /**
12
8
  * @class MeetingRequest
@@ -15,16 +11,18 @@ export default class MeetingRequest extends StatelessWebexPlugin {
15
11
  /**
16
12
  * get all the active meetings for the user
17
13
  * @returns {Array} return locus array
18
- */
14
+ */
19
15
  getActiveMeetings() {
20
16
  // @ts-ignore
21
17
  return this.request({
22
18
  api: API.LOCUS,
23
- resource: RESOURCE.LOCI
19
+ resource: RESOURCE.LOCI,
24
20
  })
25
21
  .then((res) => this.determineRedirections(res.body))
26
22
  .catch((error) => {
27
- LoggerProxy.logger.error(`Meetings:request#getActiveMeetings --> failed to get locus details, ${error}`);
23
+ LoggerProxy.logger.error(
24
+ `Meetings:request#getActiveMeetings --> failed to get locus details, ${error}`
25
+ );
28
26
  });
29
27
  }
30
28
 
@@ -40,13 +38,12 @@ export default class MeetingRequest extends StatelessWebexPlugin {
40
38
  /**
41
39
  * get user meeting preference information
42
40
  * @returns {Promise<object>} getMeetingPreferences
43
- */
41
+ */
44
42
  getMeetingPreferences() {
45
43
  // @ts-ignore
46
44
  return this.webex.internal.services.getMeetingPreferences();
47
45
  }
48
46
 
49
-
50
47
  // locus federation, determines and populate locus if the responseBody has remote URLs to fetch locus details
51
48
 
52
49
  /**
@@ -57,21 +54,26 @@ export default class MeetingRequest extends StatelessWebexPlugin {
57
54
  determineRedirections(responseBody: any) {
58
55
  if (responseBody.remoteLocusClusterUrls && responseBody.remoteLocusClusterUrls.length) {
59
56
  // @ts-ignore
60
- return Promise.all(responseBody.remoteLocusClusterUrls.map((url) => this.request({
61
- method: HTTP_VERBS.GET,
62
- url,
63
- runWhitelistedDomains: true // allows auth token for whitelisted domain
64
- })
65
- .then((res) => {
66
- responseBody.loci = responseBody.loci.concat(res.body.loci);
67
- responseBody.locusUrls = responseBody.locusUrls.concat(res.body.locusUrls);
57
+ return Promise.all(
58
+ responseBody.remoteLocusClusterUrls.map((url) =>
59
+ this.request({
60
+ method: HTTP_VERBS.GET,
61
+ url,
62
+ runWhitelistedDomains: true, // allows auth token for whitelisted domain
63
+ })
64
+ .then((res) => {
65
+ responseBody.loci = responseBody.loci.concat(res.body.loci);
66
+ responseBody.locusUrls = responseBody.locusUrls.concat(res.body.locusUrls);
68
67
 
69
- return Promise.resolve(responseBody);
70
- })
71
- .catch((error) => {
72
- LoggerProxy.logger.error(`Meetings:request#determineRedirections --> failed to get locus details from url: ${url}, reason: ${error}`);
73
- })))
74
- .then(() => Promise.resolve(responseBody));
68
+ return Promise.resolve(responseBody);
69
+ })
70
+ .catch((error) => {
71
+ LoggerProxy.logger.error(
72
+ `Meetings:request#determineRedirections --> failed to get locus details from url: ${url}, reason: ${error}`
73
+ );
74
+ })
75
+ )
76
+ ).then(() => Promise.resolve(responseBody));
75
77
  }
76
78
 
77
79
  return Promise.resolve(responseBody);
@@ -7,28 +7,28 @@ import {
7
7
  LOCUSEVENT,
8
8
  CORRELATION_ID,
9
9
  EVENT_TRIGGERS,
10
- ROAP
10
+ ROAP,
11
11
  } from '../constants';
12
12
  import LoggerProxy from '../common/logs/logger-proxy';
13
13
  import Trigger from '../common/events/trigger-proxy';
14
14
 
15
15
  /**
16
- * Meetings Media Codec Missing Event
17
- * Emitted when H.264 codec is not
18
- * found in the browser.
19
- * @event media:codec:missing
20
- * @instance
21
- * @memberof MeetingsUtil
22
- */
16
+ * Meetings Media Codec Missing Event
17
+ * Emitted when H.264 codec is not
18
+ * found in the browser.
19
+ * @event media:codec:missing
20
+ * @instance
21
+ * @memberof MeetingsUtil
22
+ */
23
23
 
24
24
  /**
25
- * Meetings Media Codec Loaded Event
26
- * Emitted when H.264 codec has been
27
- * loaded in the browser.
28
- * @event media:codec:loaded
29
- * @instance
30
- * @memberof MeetingsUtil
31
- */
25
+ * Meetings Media Codec Loaded Event
26
+ * Emitted when H.264 codec has been
27
+ * loaded in the browser.
28
+ * @event media:codec:loaded
29
+ * @instance
30
+ * @memberof MeetingsUtil
31
+ */
32
32
 
33
33
  const MeetingsUtil: any = {};
34
34
 
@@ -42,23 +42,20 @@ MeetingsUtil.handleRoapMercury = (envelope, meetingCollection) => {
42
42
  const meeting = meetingCollection.getByKey(CORRELATION_ID, data.correlationId);
43
43
 
44
44
  if (meeting) {
45
- const {
46
- seq, messageType, tieBreaker, errorType, errorCause
47
- } = data.message;
45
+ const {seq, messageType, tieBreaker, errorType, errorCause} = data.message;
48
46
 
49
47
  if (messageType === ROAP.ROAP_TYPES.TURN_DISCOVERY_RESPONSE) {
50
48
  // turn discovery is not part of normal roap protocol and so we are not handling it
51
49
  // through the usual roap state machine
52
50
  meeting.roap.turnDiscovery.handleTurnDiscoveryResponse(data.message);
53
- }
54
- else {
51
+ } else {
55
52
  const roapMessage = {
56
53
  seq,
57
54
  messageType,
58
55
  sdp: data.message.sdps?.length > 0 ? data.message.sdps[0] : undefined,
59
56
  tieBreaker,
60
57
  errorType,
61
- errorCause
58
+ errorCause,
62
59
  };
63
60
 
64
61
  meeting.mediaProperties.webrtcMediaConnection.roapMessageReceived(roapMessage);
@@ -116,9 +113,10 @@ MeetingsUtil.hasH264Codec = async () => {
116
113
  hasCodec = true;
117
114
  }
118
115
  pc.close();
119
- }
120
- catch (error) {
121
- LoggerProxy.logger.warn('Meetings:util#hasH264Codec --> Error creating peerConnection for H.264 test.');
116
+ } catch (error) {
117
+ LoggerProxy.logger.warn(
118
+ 'Meetings:util#hasH264Codec --> Error creating peerConnection for H.264 test.'
119
+ );
122
120
  }
123
121
 
124
122
  return hasCodec;
@@ -143,8 +141,8 @@ MeetingsUtil.checkH264Support = async function checkH264Support(options: {
143
141
  const {firstChecked, disableNotifications} = options || {};
144
142
  const delay = 5e3; // ms
145
143
  const maxDuration = 3e5; // ms
146
- const shouldTrigger = (firstChecked === undefined);
147
- const shouldStopChecking = firstChecked && (Date.now() - firstChecked) >= maxDuration;
144
+ const shouldTrigger = firstChecked === undefined;
145
+ const shouldStopChecking = firstChecked && Date.now() - firstChecked >= maxDuration;
148
146
 
149
147
  // Disable notifications and start H.264 download only
150
148
  if (disableNotifications) {
@@ -159,7 +157,7 @@ MeetingsUtil.checkH264Support = async function checkH264Support(options: {
159
157
  this,
160
158
  {
161
159
  file: 'meetings/util',
162
- function: 'checkH264Support'
160
+ function: 'checkH264Support',
163
161
  },
164
162
  EVENT_TRIGGERS.MEDIA_CODEC_LOADED
165
163
  );
@@ -170,7 +168,9 @@ MeetingsUtil.checkH264Support = async function checkH264Support(options: {
170
168
 
171
169
  // Stop checking if past the timelimit
172
170
  if (shouldStopChecking) {
173
- LoggerProxy.logger.error('Meetings:util#checkH264Support --> Timed out waiting for H264 codec to load.');
171
+ LoggerProxy.logger.error(
172
+ 'Meetings:util#checkH264Support --> Timed out waiting for H264 codec to load.'
173
+ );
174
174
 
175
175
  return;
176
176
  }
@@ -181,7 +181,7 @@ MeetingsUtil.checkH264Support = async function checkH264Support(options: {
181
181
  this,
182
182
  {
183
183
  file: 'meetings/util',
184
- function: 'checkH264Support'
184
+ function: 'checkH264Support',
185
185
  },
186
186
  EVENT_TRIGGERS.MEDIA_CODEC_MISSING
187
187
  );
@@ -1,12 +1,7 @@
1
1
  /*!
2
2
  * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
3
3
  */
4
- import {
5
- MEETINGS,
6
- _IN_LOBBY_,
7
- _NOT_IN_MEETING_,
8
- _IN_MEETING_
9
- } from '../constants';
4
+ import {MEETINGS, _IN_LOBBY_, _NOT_IN_MEETING_, _IN_MEETING_} from '../constants';
10
5
 
11
6
  import MemberUtil from './util';
12
7
 
@@ -51,20 +46,22 @@ export default class Member {
51
46
  */
52
47
  constructor(
53
48
  participant: object,
54
- options: {
55
- selfId: string;
56
- hostId: string;
57
- contentSharingId: string;
58
- type: string;
59
- } | any = {}
49
+ options:
50
+ | {
51
+ selfId: string;
52
+ hostId: string;
53
+ contentSharingId: string;
54
+ type: string;
55
+ }
56
+ | any = {}
60
57
  ) {
61
- /**
58
+ /**
62
59
  * The server participant object
63
60
  * @instance
64
61
  * @type {Object}
65
62
  * @private
66
63
  * @memberof Member
67
- */
64
+ */
68
65
  this.participant = null;
69
66
  /**
70
67
  * The member id
@@ -72,7 +69,7 @@ export default class Member {
72
69
  * @type {String}
73
70
  * @public
74
71
  * @memberof Member
75
- */
72
+ */
76
73
  this.id = null;
77
74
  /**
78
75
  * The member name
@@ -80,34 +77,34 @@ export default class Member {
80
77
  * @type {String}
81
78
  * @public
82
79
  * @memberof Member
83
- */
80
+ */
84
81
  this.name = null;
85
82
  /**
86
83
  * @instance
87
84
  * @type {Boolean}
88
85
  * @public
89
86
  * @memberof Member
90
- */
87
+ */
91
88
  this.isAudioMuted = null;
92
89
  /**
93
90
  * @instance
94
91
  * @type {Boolean}
95
92
  * @public
96
93
  * @memberof Member
97
- */
94
+ */
98
95
  this.isVideoMuted = null;
99
96
  /**
100
97
  * @instance
101
98
  * @type {Boolean}
102
99
  * @public
103
100
  * @memberof Member
104
- */
101
+ */
105
102
  this.isHandRaised = null;
106
103
  /**
107
- * @instance
108
- * @type {Boolean}
109
- * @public
110
- * @memberof Member
104
+ * @instance
105
+ * @type {Boolean}
106
+ * @public
107
+ * @memberof Member
111
108
  */
112
109
  this.isSelf = null;
113
110
  /**
@@ -115,113 +112,113 @@ export default class Member {
115
112
  * @type {Boolean}
116
113
  * @public
117
114
  * @memberof Member
118
- */
115
+ */
119
116
  this.isHost = null;
120
117
  /**
121
118
  * @instance
122
119
  * @type {Boolean}
123
120
  * @public
124
121
  * @memberof Member
125
- */
122
+ */
126
123
  this.isGuest = null;
127
124
  /**
128
125
  * @instance
129
126
  * @type {Boolean}
130
127
  * @public
131
128
  * @memberof Member
132
- */
129
+ */
133
130
  this.isInLobby = null;
134
131
  /**
135
132
  * @instance
136
133
  * @type {Boolean}
137
134
  * @public
138
135
  * @memberof Member
139
- */
136
+ */
140
137
  this.isInMeeting = null;
141
138
  /**
142
139
  * @instance
143
140
  * @type {Boolean}
144
141
  * @public
145
142
  * @memberof Member
146
- */
143
+ */
147
144
  this.isNotAdmitted = null;
148
145
  /**
149
146
  * @instance
150
147
  * @type {Boolean}
151
148
  * @public
152
149
  * @memberof Member
153
- */
150
+ */
154
151
  this.isContentSharing = null;
155
152
  /**
156
153
  * @instance
157
154
  * @type {Boolean}
158
155
  * @public
159
156
  * @memberof Member
160
- */
157
+ */
161
158
  this.status = null;
162
159
  /**
163
160
  * @instance
164
161
  * @type {Boolean}
165
162
  * @public
166
163
  * @memberof Member
167
- */
164
+ */
168
165
  this.isDevice = null;
169
166
  /**
170
167
  * @instance
171
168
  * @type {Boolean}
172
169
  * @public
173
170
  * @memberof Member
174
- */
171
+ */
175
172
  this.isUser = null;
176
173
  /**
177
- * Is this member associated to another user by way of pairing (typical of devices)
174
+ * Is this member associated to another user by way of pairing (typical of devices)
178
175
  * @instance
179
176
  * @type {String}
180
177
  * @public
181
178
  * @memberof Member
182
- */
179
+ */
183
180
  this.associatedUser = null;
184
181
  /**
185
182
  * @instance
186
183
  * @type {Boolean}
187
184
  * @public
188
185
  * @memberof Member
189
- */
186
+ */
190
187
  this.isRecording = null;
191
188
  /**
192
189
  * @instance
193
190
  * @type {Boolean}
194
191
  * @public
195
192
  * @memberof Member
196
- */
193
+ */
197
194
  this.isMutable = null;
198
195
  /**
199
196
  * @instance
200
197
  * @type {Boolean}
201
198
  * @public
202
199
  * @memberof Member
203
- */
200
+ */
204
201
  this.isRemovable = null;
205
202
  /**
206
203
  * @instance
207
204
  * @type {String}
208
205
  * @private
209
206
  * @memberof Member
210
- */
207
+ */
211
208
  this.type = null;
212
209
  /**
213
210
  * @instance
214
211
  * @type {Boolean}
215
212
  * @public
216
213
  * @memberof Member
217
- */
214
+ */
218
215
  this.isModerator = null;
219
216
  /**
220
217
  * @instance
221
218
  * @type {Boolean}
222
219
  * @public
223
220
  * @memberof Member
224
- */
221
+ */
225
222
  this.isModeratorAssignmentProhibited = null;
226
223
  // TODO: more participant types
227
224
  // such as native client, web client, is a device, what type of phone, etc
@@ -249,7 +246,8 @@ export default class Member {
249
246
  this.isUser = MemberUtil.isUser(participant);
250
247
  this.isDevice = MemberUtil.isDevice(participant);
251
248
  this.isModerator = MemberUtil.isModerator(participant);
252
- this.isModeratorAssignmentProhibited = MemberUtil.isModeratorAssignmentProhibited(participant);
249
+ this.isModeratorAssignmentProhibited =
250
+ MemberUtil.isModeratorAssignmentProhibited(participant);
253
251
  this.processStatus(participant);
254
252
  // must be done last
255
253
  this.isNotAdmitted = MemberUtil.isNotAdmitted(participant, this.isGuest, this.status);
@@ -282,9 +280,20 @@ export default class Member {
282
280
  */
283
281
  private processMember() {
284
282
  // must occur after self, guest, meeting, and type properties are calculated
285
- this.isRemovable = MemberUtil.isRemovable(this.isSelf, this.isGuest, this.isInMeeting, this.type);
283
+ this.isRemovable = MemberUtil.isRemovable(
284
+ this.isSelf,
285
+ this.isGuest,
286
+ this.isInMeeting,
287
+ this.type
288
+ );
286
289
  // must occur after self, device, meeting, mute status, and type properties are calculated
287
- this.isMutable = MemberUtil.isMutable(this.isSelf, this.isDevice, this.isInMeeting, this.isAudioMuted, this.type);
290
+ this.isMutable = MemberUtil.isMutable(
291
+ this.isSelf,
292
+ this.isDevice,
293
+ this.isInMeeting,
294
+ this.isAudioMuted,
295
+ this.type
296
+ );
288
297
  }
289
298
 
290
299
  /**
@@ -359,8 +368,7 @@ export default class Member {
359
368
  public processIsContentSharing(participant: object, sharingId: string) {
360
369
  if (MemberUtil.isUser(participant)) {
361
370
  this.isContentSharing = MemberUtil.isSame(participant, sharingId);
362
- }
363
- else if (MemberUtil.isDevice(participant)) {
371
+ } else if (MemberUtil.isDevice(participant)) {
364
372
  this.isContentSharing = MemberUtil.isAssociatedSame(participant, sharingId);
365
373
  }
366
374
  }
@@ -388,8 +396,7 @@ export default class Member {
388
396
  private processIsSelf(participant: object, selfId: string) {
389
397
  if (MemberUtil.isUser(participant)) {
390
398
  this.isSelf = MemberUtil.isSame(participant, selfId);
391
- }
392
- else if (MemberUtil.isDevice(participant)) {
399
+ } else if (MemberUtil.isDevice(participant)) {
393
400
  this.isSelf = MemberUtil.isAssociatedSame(participant, selfId);
394
401
  this.associatedUser = selfId;
395
402
  }
@@ -406,8 +413,7 @@ export default class Member {
406
413
  private processIsHost(participant: object, hostId: string) {
407
414
  if (MemberUtil.isUser(participant)) {
408
415
  this.isHost = MemberUtil.isSame(participant, hostId);
409
- }
410
- else if (MemberUtil.isDevice(participant)) {
416
+ } else if (MemberUtil.isDevice(participant)) {
411
417
  this.isHost = MemberUtil.isAssociatedSame(participant, hostId);
412
418
  }
413
419
  }
@@ -13,7 +13,7 @@ import {
13
13
  VIDEO_STATUS,
14
14
  _SEND_RECEIVE_,
15
15
  _RECEIVE_ONLY_,
16
- _CALL_
16
+ _CALL_,
17
17
  } from '../constants';
18
18
  import ParameterError from '../common/errors/parameter';
19
19
 
@@ -39,7 +39,8 @@ MemberUtil.isGuest = (participant: any) => participant && participant.guest;
39
39
  */
40
40
  MemberUtil.isDevice = (participant: any) => participant && participant.type === _RESOURCE_ROOM_;
41
41
 
42
- MemberUtil.isModeratorAssignmentProhibited = (participant) => participant && participant.moderatorAssignmentNotAllowed;
42
+ MemberUtil.isModeratorAssignmentProhibited = (participant) =>
43
+ participant && participant.moderatorAssignmentNotAllowed;
43
44
 
44
45
  /**
45
46
  * checks to see if the participant id is the same as the passed id
@@ -48,8 +49,8 @@ MemberUtil.isModeratorAssignmentProhibited = (participant) => participant && par
48
49
  * @param {String} id
49
50
  * @returns {Boolean}
50
51
  */
51
- MemberUtil.isSame = (participant: any, id: string) => participant &&
52
- (participant.id === id || participant.person && participant.person.id === id);
52
+ MemberUtil.isSame = (participant: any, id: string) =>
53
+ participant && (participant.id === id || (participant.person && participant.person.id === id));
53
54
 
54
55
  /**
55
56
  * checks to see if the participant id is the same as the passed id for associated devices
@@ -58,9 +59,12 @@ MemberUtil.isSame = (participant: any, id: string) => participant &&
58
59
  * @param {String} id
59
60
  * @returns {Boolean}
60
61
  */
61
- MemberUtil.isAssociatedSame = (participant: any, id: string) => participant &&
62
- participant.associatedUsers &&
63
- participant.associatedUsers.some((user) => (user.id === id || user.person && user.person.id === id));
62
+ MemberUtil.isAssociatedSame = (participant: any, id: string) =>
63
+ participant &&
64
+ participant.associatedUsers &&
65
+ participant.associatedUsers.some(
66
+ (user) => user.id === id || (user.person && user.person.id === id)
67
+ );
64
68
 
65
69
  /**
66
70
  * @param {Object} participant the locus participant
@@ -68,11 +72,17 @@ participant.associatedUsers.some((user) => (user.id === id || user.person && use
68
72
  * @param {String} status
69
73
  * @returns {Boolean}
70
74
  */
71
- MemberUtil.isNotAdmitted = (participant: any, isGuest: boolean, status: string) => participant &&
72
- participant.guest && ((participant.devices && participant.devices[0] &&
73
- participant.devices[0].intent && participant.devices[0].intent.type === _WAIT_ &&
74
- // @ts-ignore
75
- isGuest && status === _IN_LOBBY_) || !status === _IN_MEETING_);
75
+ MemberUtil.isNotAdmitted = (participant: any, isGuest: boolean, status: string) =>
76
+ participant &&
77
+ participant.guest &&
78
+ ((participant.devices &&
79
+ participant.devices[0] &&
80
+ participant.devices[0].intent &&
81
+ participant.devices[0].intent.type === _WAIT_ &&
82
+ // @ts-ignore
83
+ isGuest &&
84
+ status === _IN_LOBBY_) ||
85
+ !status === _IN_MEETING_);
76
86
 
77
87
  /**
78
88
  * @param {Object} participant the locus participant
@@ -214,7 +224,10 @@ MemberUtil.extractStatus = (participant: any) => {
214
224
  }
215
225
  if (participant.state === _IDLE_) {
216
226
  if (participant.devices && participant.devices.length > 0) {
217
- const foundDevice = participant.devices.find((device) => device.intent && (device.intent.type === _WAIT_ || device.intent.type === _OBSERVE_));
227
+ const foundDevice = participant.devices.find(
228
+ (device) =>
229
+ device.intent && (device.intent.type === _WAIT_ || device.intent.type === _OBSERVE_)
230
+ );
218
231
 
219
232
  return foundDevice ? _IN_LOBBY_ : _NOT_IN_MEETING_;
220
233
  }
@@ -6,7 +6,6 @@ import {MEETINGS} from '../constants';
6
6
  export default class MembersCollection {
7
7
  members: any;
8
8
  namespace = MEETINGS;
9
-
10
9
  /**
11
10
  * @param {Object} locus
12
11
  * @memberof Members