@webex/plugin-meetings 3.0.0-beta.13 → 3.0.0-beta.15

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/UPGRADING.md +9 -9
  2. package/browsers.js +19 -24
  3. package/dist/common/browser-detection.js +1 -0
  4. package/dist/common/browser-detection.js.map +1 -1
  5. package/dist/common/collection.js.map +1 -1
  6. package/dist/common/errors/captcha-error.js +5 -5
  7. package/dist/common/errors/captcha-error.js.map +1 -1
  8. package/dist/common/errors/intent-to-join.js +5 -5
  9. package/dist/common/errors/intent-to-join.js.map +1 -1
  10. package/dist/common/errors/join-meeting.js +6 -6
  11. package/dist/common/errors/join-meeting.js.map +1 -1
  12. package/dist/common/errors/media.js +5 -5
  13. package/dist/common/errors/media.js.map +1 -1
  14. package/dist/common/errors/parameter.js +5 -5
  15. package/dist/common/errors/parameter.js.map +1 -1
  16. package/dist/common/errors/password-error.js +5 -5
  17. package/dist/common/errors/password-error.js.map +1 -1
  18. package/dist/common/errors/permission.js +4 -4
  19. package/dist/common/errors/permission.js.map +1 -1
  20. package/dist/common/errors/reconnection.js +5 -5
  21. package/dist/common/errors/reconnection.js.map +1 -1
  22. package/dist/common/errors/stats.js +5 -5
  23. package/dist/common/errors/stats.js.map +1 -1
  24. package/dist/common/errors/webex-errors.js.map +1 -1
  25. package/dist/common/errors/webex-meetings-error.js.map +1 -1
  26. package/dist/common/events/events-scope.js.map +1 -1
  27. package/dist/common/events/events.js.map +1 -1
  28. package/dist/common/events/trigger-proxy.js.map +1 -1
  29. package/dist/common/events/util.js.map +1 -1
  30. package/dist/common/logs/logger-proxy.js.map +1 -1
  31. package/dist/common/logs/request.js.map +1 -1
  32. package/dist/config.js.map +1 -1
  33. package/dist/constants.js.map +1 -1
  34. package/dist/index.js.map +1 -1
  35. package/dist/locus-info/controlsUtils.js.map +1 -1
  36. package/dist/locus-info/fullState.js.map +1 -1
  37. package/dist/locus-info/hostUtils.js.map +1 -1
  38. package/dist/locus-info/index.js +11 -8
  39. package/dist/locus-info/index.js.map +1 -1
  40. package/dist/locus-info/infoUtils.js.map +1 -1
  41. package/dist/locus-info/mediaSharesUtils.js.map +1 -1
  42. package/dist/locus-info/parser.js +2 -1
  43. package/dist/locus-info/parser.js.map +1 -1
  44. package/dist/locus-info/selfUtils.js +2 -1
  45. package/dist/locus-info/selfUtils.js.map +1 -1
  46. package/dist/media/index.js.map +1 -1
  47. package/dist/media/internal-media-core-wrapper.js.map +1 -1
  48. package/dist/media/properties.js.map +1 -1
  49. package/dist/media/util.js +1 -1
  50. package/dist/media/util.js.map +1 -1
  51. package/dist/mediaQualityMetrics/config.js.map +1 -1
  52. package/dist/meeting/effectsState.js +1 -1
  53. package/dist/meeting/effectsState.js.map +1 -1
  54. package/dist/meeting/in-meeting-actions.js.map +1 -1
  55. package/dist/meeting/index.js +118 -89
  56. package/dist/meeting/index.js.map +1 -1
  57. package/dist/meeting/muteState.js +1 -1
  58. package/dist/meeting/muteState.js.map +1 -1
  59. package/dist/meeting/request.js +25 -0
  60. package/dist/meeting/request.js.map +1 -1
  61. package/dist/meeting/request.type.js +8 -0
  62. package/dist/meeting/request.type.js.map +1 -0
  63. package/dist/meeting/state.js +5 -5
  64. package/dist/meeting/state.js.map +1 -1
  65. package/dist/meeting/util.js.map +1 -1
  66. package/dist/meeting-info/collection.js.map +1 -1
  67. package/dist/meeting-info/index.js +2 -2
  68. package/dist/meeting-info/index.js.map +1 -1
  69. package/dist/meeting-info/meeting-info-v2.js +48 -48
  70. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  71. package/dist/meeting-info/request.js.map +1 -1
  72. package/dist/meeting-info/util.js.map +1 -1
  73. package/dist/meeting-info/utilv2.js +1 -1
  74. package/dist/meeting-info/utilv2.js.map +1 -1
  75. package/dist/meetings/collection.js.map +1 -1
  76. package/dist/meetings/index.js +251 -250
  77. package/dist/meetings/index.js.map +1 -1
  78. package/dist/meetings/request.js +2 -2
  79. package/dist/meetings/request.js.map +1 -1
  80. package/dist/meetings/util.js +14 -14
  81. package/dist/meetings/util.js.map +1 -1
  82. package/dist/member/index.js +31 -31
  83. package/dist/member/index.js.map +1 -1
  84. package/dist/member/util.js.map +1 -1
  85. package/dist/members/collection.js.map +1 -1
  86. package/dist/members/index.js +43 -43
  87. package/dist/members/index.js.map +1 -1
  88. package/dist/members/request.js.map +1 -1
  89. package/dist/members/util.js.map +1 -1
  90. package/dist/metrics/config.js.map +1 -1
  91. package/dist/metrics/constants.js.map +1 -1
  92. package/dist/metrics/index.js +23 -20
  93. package/dist/metrics/index.js.map +1 -1
  94. package/dist/multistream/multistreamMedia.js +2 -1
  95. package/dist/multistream/multistreamMedia.js.map +1 -1
  96. package/dist/multistream/receiveSlot.js.map +1 -1
  97. package/dist/multistream/receiveSlotManager.js +2 -0
  98. package/dist/multistream/receiveSlotManager.js.map +1 -1
  99. package/dist/multistream/remoteMedia.js.map +1 -1
  100. package/dist/multistream/remoteMediaGroup.js.map +1 -1
  101. package/dist/multistream/remoteMediaManager.js.map +1 -1
  102. package/dist/networkQualityMonitor/index.js +8 -8
  103. package/dist/networkQualityMonitor/index.js.map +1 -1
  104. package/dist/personal-meeting-room/index.js +7 -7
  105. package/dist/personal-meeting-room/index.js.map +1 -1
  106. package/dist/personal-meeting-room/request.js.map +1 -1
  107. package/dist/personal-meeting-room/util.js.map +1 -1
  108. package/dist/reachability/index.js.map +1 -1
  109. package/dist/reachability/request.js.map +1 -1
  110. package/dist/reactions/reactions.js.map +1 -1
  111. package/dist/reactions/reactions.type.js +3 -1
  112. package/dist/reactions/reactions.type.js.map +1 -1
  113. package/dist/reconnection-manager/index.js +4 -4
  114. package/dist/reconnection-manager/index.js.map +1 -1
  115. package/dist/roap/index.js +5 -5
  116. package/dist/roap/index.js.map +1 -1
  117. package/dist/roap/request.js.map +1 -1
  118. package/dist/roap/turnDiscovery.js.map +1 -1
  119. package/dist/statsAnalyzer/global.js.map +1 -1
  120. package/dist/statsAnalyzer/index.js.map +1 -1
  121. package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
  122. package/dist/transcription/index.js +4 -1
  123. package/dist/transcription/index.js.map +1 -1
  124. package/internal-README.md +7 -6
  125. package/package.json +18 -18
  126. package/src/common/browser-detection.ts +9 -6
  127. package/src/common/collection.ts +3 -1
  128. package/src/common/errors/captcha-error.ts +6 -6
  129. package/src/common/errors/intent-to-join.ts +6 -6
  130. package/src/common/errors/join-meeting.ts +12 -8
  131. package/src/common/errors/media.ts +6 -6
  132. package/src/common/errors/parameter.ts +9 -6
  133. package/src/common/errors/password-error.ts +6 -6
  134. package/src/common/errors/permission.ts +5 -5
  135. package/src/common/errors/reconnection.ts +6 -6
  136. package/src/common/errors/stats.ts +6 -6
  137. package/src/common/errors/webex-errors.ts +7 -5
  138. package/src/common/errors/webex-meetings-error.ts +1 -1
  139. package/src/common/events/events-scope.ts +5 -1
  140. package/src/common/events/events.ts +5 -1
  141. package/src/common/events/trigger-proxy.ts +8 -3
  142. package/src/common/events/util.ts +1 -2
  143. package/src/common/logs/logger-proxy.ts +21 -10
  144. package/src/common/logs/request.ts +11 -8
  145. package/src/config.ts +11 -11
  146. package/src/constants.ts +1 -1
  147. package/src/index.js +1 -1
  148. package/src/locus-info/controlsUtils.ts +34 -24
  149. package/src/locus-info/fullState.ts +15 -11
  150. package/src/locus-info/hostUtils.ts +4 -3
  151. package/src/locus-info/index.ts +25 -34
  152. package/src/locus-info/infoUtils.ts +12 -4
  153. package/src/locus-info/mediaSharesUtils.ts +4 -4
  154. package/src/locus-info/parser.ts +45 -68
  155. package/src/locus-info/selfUtils.ts +106 -57
  156. package/src/media/index.ts +123 -135
  157. package/src/media/internal-media-core-wrapper.ts +2 -2
  158. package/src/media/properties.ts +30 -20
  159. package/src/media/util.ts +1 -1
  160. package/src/mediaQualityMetrics/config.ts +46 -46
  161. package/src/meeting/effectsState.ts +35 -35
  162. package/src/meeting/in-meeting-actions.ts +7 -3
  163. package/src/meeting/index.ts +1576 -1291
  164. package/src/meeting/muteState.ts +62 -31
  165. package/src/meeting/request.ts +174 -113
  166. package/src/meeting/request.type.ts +11 -0
  167. package/src/meeting/state.ts +45 -30
  168. package/src/meeting/util.ts +101 -70
  169. package/src/meeting-info/collection.ts +2 -1
  170. package/src/meeting-info/index.ts +32 -30
  171. package/src/meeting-info/meeting-info-v2.ts +106 -108
  172. package/src/meeting-info/request.ts +9 -3
  173. package/src/meeting-info/util.ts +54 -46
  174. package/src/meeting-info/utilv2.ts +59 -53
  175. package/src/meetings/collection.ts +1 -1
  176. package/src/meetings/index.ts +512 -440
  177. package/src/meetings/request.ts +26 -24
  178. package/src/meetings/util.ts +29 -29
  179. package/src/member/index.ts +55 -49
  180. package/src/member/util.ts +26 -13
  181. package/src/members/collection.ts +0 -1
  182. package/src/members/index.ts +182 -126
  183. package/src/members/request.ts +46 -14
  184. package/src/members/util.ts +44 -42
  185. package/src/metrics/config.ts +254 -81
  186. package/src/metrics/constants.ts +0 -2
  187. package/src/metrics/index.ts +84 -71
  188. package/src/multistream/multistreamMedia.ts +1 -0
  189. package/src/multistream/receiveSlot.ts +1 -0
  190. package/src/multistream/receiveSlotManager.ts +1 -0
  191. package/src/multistream/remoteMedia.ts +1 -1
  192. package/src/multistream/remoteMediaGroup.ts +2 -1
  193. package/src/multistream/remoteMediaManager.ts +3 -0
  194. package/src/networkQualityMonitor/index.ts +20 -23
  195. package/src/personal-meeting-room/index.ts +12 -16
  196. package/src/personal-meeting-room/request.ts +10 -3
  197. package/src/personal-meeting-room/util.ts +3 -3
  198. package/src/reachability/index.ts +61 -59
  199. package/src/reachability/request.ts +36 -32
  200. package/src/reactions/reactions.ts +4 -4
  201. package/src/reactions/reactions.type.ts +4 -3
  202. package/src/reconnection-manager/index.ts +139 -84
  203. package/src/roap/index.ts +46 -38
  204. package/src/roap/request.ts +44 -31
  205. package/src/roap/turnDiscovery.ts +59 -30
  206. package/src/statsAnalyzer/global.ts +30 -33
  207. package/src/statsAnalyzer/index.ts +432 -175
  208. package/src/statsAnalyzer/mqaUtil.ts +178 -72
  209. package/src/transcription/index.ts +34 -32
  210. package/test/integration/spec/journey.js +663 -462
  211. package/test/integration/spec/space-meeting.js +318 -203
  212. package/test/integration/spec/transcription.js +6 -7
  213. package/test/unit/spec/common/browser-detection.js +9 -28
  214. package/test/unit/spec/fixture/locus.js +92 -90
  215. package/test/unit/spec/locus-info/controlsUtils.js +5 -5
  216. package/test/unit/spec/locus-info/embeddedAppsUtils.js +8 -6
  217. package/test/unit/spec/locus-info/index.js +1 -2
  218. package/test/unit/spec/locus-info/infoUtils.js +26 -33
  219. package/test/unit/spec/locus-info/lib/BasicSeqCmp.json +88 -430
  220. package/test/unit/spec/locus-info/lib/SeqCmp.json +513 -685
  221. package/test/unit/spec/locus-info/parser.js +3 -9
  222. package/test/unit/spec/locus-info/selfConstant.js +72 -103
  223. package/test/unit/spec/locus-info/selfUtils.js +21 -12
  224. package/test/unit/spec/meeting/effectsState.js +36 -46
  225. package/test/unit/spec/meeting/in-meeting-actions.ts +2 -3
  226. package/test/unit/spec/meeting/index.js +1342 -684
  227. package/test/unit/spec/meeting/muteState.js +42 -33
  228. package/test/unit/spec/meeting/request.js +75 -45
  229. package/test/unit/spec/meeting/utils.js +78 -53
  230. package/test/unit/spec/meeting-info/meetinginfov2.js +100 -73
  231. package/test/unit/spec/meeting-info/request.js +7 -9
  232. package/test/unit/spec/meeting-info/util.js +11 -12
  233. package/test/unit/spec/meeting-info/utilv2.js +110 -74
  234. package/test/unit/spec/meetings/collection.js +1 -1
  235. package/test/unit/spec/meetings/index.js +438 -257
  236. package/test/unit/spec/meetings/utils.js +14 -12
  237. package/test/unit/spec/member/index.js +0 -1
  238. package/test/unit/spec/member/util.js +5 -6
  239. package/test/unit/spec/members/index.js +104 -54
  240. package/test/unit/spec/members/request.js +29 -20
  241. package/test/unit/spec/members/utils.js +8 -5
  242. package/test/unit/spec/metrics/index.js +16 -21
  243. package/test/unit/spec/networkQualityMonitor/index.js +21 -15
  244. package/test/unit/spec/personal-meeting-room/personal-meeting-room.js +2 -7
  245. package/test/unit/spec/reachability/index.ts +9 -11
  246. package/test/unit/spec/reconnection-manager/index.js +16 -18
  247. package/test/unit/spec/roap/turnDiscovery.ts +22 -19
  248. package/test/unit/spec/stats-analyzer/index.js +25 -20
  249. package/test/utils/cmr.js +44 -42
  250. package/test/utils/testUtils.js +83 -74
  251. package/test/utils/webex-config.js +18 -18
  252. package/test/utils/webex-test-users.js +53 -50
@@ -10,7 +10,6 @@ import {assert} from '@webex/test-helper-chai';
10
10
 
11
11
  import metrics from '@webex/plugin-meetings/src/metrics';
12
12
 
13
-
14
13
  /**
15
14
  * Meeting can only run in a browser, so we can only send metrics for
16
15
  * browser usage.
@@ -23,7 +22,7 @@ browserOnly(describe)('Meeting metrics', () => {
23
22
  clientRegion: 'US-WEST',
24
23
  countryCode: 'US',
25
24
  regionCode: 'US-WEST',
26
- timezone: 'America/Los_Angeles'
25
+ timezone: 'America/Los_Angeles',
27
26
  };
28
27
 
29
28
  beforeEach(() => {
@@ -31,16 +30,16 @@ browserOnly(describe)('Meeting metrics', () => {
31
30
  mockSubmitMetric = sandbox.stub();
32
31
  webex = new MockWebex({
33
32
  children: {
34
- metrics: Metrics
35
- }
33
+ metrics: Metrics,
34
+ },
36
35
  });
37
36
 
38
37
  webex.version = '1.2.3';
39
38
  webex.credentials.getOrgId = sinon.fake.returns('7890');
40
39
  webex.credentials.config = {
41
40
  _values: {
42
- clientId: 'mock-client-id'
43
- }
41
+ clientId: 'mock-client-id',
42
+ },
44
43
  };
45
44
  webex.config.metrics.type = ['behavioral'];
46
45
  webex.internal.metrics.submitClientMetrics = mockSubmitMetric;
@@ -55,7 +54,7 @@ browserOnly(describe)('Meeting metrics', () => {
55
54
  it('should create payload with masked IPv4', () => {
56
55
  geoHintInfo.clientAddress = '128.0.0.1';
57
56
  webex.meetings = {
58
- geoHintInfo
57
+ geoHintInfo,
59
58
  };
60
59
  metrics.initialSetup({}, webex);
61
60
  const payload = metrics.initPayload('myMetric', {}, {clientType: 'TEAMS_CLIENT'});
@@ -71,7 +70,7 @@ browserOnly(describe)('Meeting metrics', () => {
71
70
  it('should create payload with masked IPv6', () => {
72
71
  geoHintInfo.clientAddress = '2001:0db8:0000:08d3:0000:0000:0070:0000';
73
72
  webex.meetings = {
74
- geoHintInfo
73
+ geoHintInfo,
75
74
  };
76
75
  metrics.initialSetup({}, webex);
77
76
  const payload = metrics.initPayload('myIPv6Metric', {}, {clientType: 'TEAMS_CLIENT'});
@@ -98,19 +97,15 @@ browserOnly(describe)('Meeting metrics', () => {
98
97
 
99
98
  metrics.sendBehavioralMetric('myMetric', fields, metricTags);
100
99
 
101
- assert.calledWithMatch(
102
- mockSubmitMetric,
103
- 'myMetric',
104
- {
105
- type: ['behavioral'],
106
- fields: {
107
- value: 567
108
- },
109
- tags: {
110
- test: true
111
- }
112
- }
113
- );
100
+ assert.calledWithMatch(mockSubmitMetric, 'myMetric', {
101
+ type: ['behavioral'],
102
+ fields: {
103
+ value: 567,
104
+ },
105
+ tags: {
106
+ test: true,
107
+ },
108
+ });
114
109
  });
115
110
  });
116
111
  });
@@ -20,7 +20,7 @@ describe('plugin-meetings', () => {
20
20
  const initialConfig = {
21
21
  videoPacketLossRatioThreshold: 9,
22
22
  rttThreshold: 500,
23
- jitterThreshold: 500
23
+ jitterThreshold: 500,
24
24
  };
25
25
 
26
26
  const configObject = {
@@ -39,20 +39,20 @@ describe('plugin-meetings', () => {
39
39
  roundTripTime: 0.648,
40
40
  fractionLost: 0,
41
41
  totalRoundTripTime: 3.554,
42
- roundTripTimeMeasurements: 14
42
+ roundTripTimeMeasurements: 14,
43
43
  },
44
44
  statsAnalyzerCurrentStats: {
45
45
  audio: {
46
46
  send: {
47
- currentPacketLossRatio: 8
48
- }
47
+ currentPacketLossRatio: 8,
48
+ },
49
49
  },
50
50
  video: {
51
51
  send: {
52
- currentPacketLossRatio: 10
53
- }
54
- }
55
- }
52
+ currentPacketLossRatio: 10,
53
+ },
54
+ },
55
+ },
56
56
  };
57
57
 
58
58
  const sandbox = sinon.createSandbox();
@@ -75,13 +75,19 @@ describe('plugin-meetings', () => {
75
75
 
76
76
  it('should emit a network quality judgement event with the proper payload', async () => {
77
77
  await networkQualityMonitor.determineUplinkNetworkQuality(configObject);
78
- assert(sandBoxEmitSpy.calledWith(sinon.match({
79
- file: 'networkQualityMonitor',
80
- function: 'emitNetworkQuality'
81
- }), sinon.match(EVENT_TRIGGERS.NETWORK_QUALITY), sinon.match({
82
- mediaType: 'video',
83
- networkQualityScore: 0
84
- })));
78
+ assert(
79
+ sandBoxEmitSpy.calledWith(
80
+ sinon.match({
81
+ file: 'networkQualityMonitor',
82
+ function: 'emitNetworkQuality',
83
+ }),
84
+ sinon.match(EVENT_TRIGGERS.NETWORK_QUALITY),
85
+ sinon.match({
86
+ mediaType: 'video',
87
+ networkQualityScore: 0,
88
+ })
89
+ )
90
+ );
85
91
  });
86
92
 
87
93
  it('should reset to default values after determineUplinkNetworkQuality call stack is complete', async () => {
@@ -5,9 +5,7 @@
5
5
  import 'jsdom-global/register';
6
6
  import {assert} from '@webex/test-helper-chai';
7
7
  import sinon from 'sinon';
8
- import {
9
- _PERSONAL_ROOM_
10
- } from '@webex/plugin-meetings/src/constants';
8
+ import {_PERSONAL_ROOM_} from '@webex/plugin-meetings/src/constants';
11
9
  import PersonalMeetingRoom from '@webex/plugin-meetings/src/personal-meeting-room';
12
10
 
13
11
  describe('personal-meeting-room', () => {
@@ -16,14 +14,11 @@ describe('personal-meeting-room', () => {
16
14
 
17
15
  beforeEach(() => {
18
16
  meetingInfo = {
19
- fetchMeetingInfo: sinon.stub().returns(Promise.resolve(
20
- {body: {isPmr: true}}
21
- ))
17
+ fetchMeetingInfo: sinon.stub().returns(Promise.resolve({body: {isPmr: true}})),
22
18
  };
23
19
  pmr = new PersonalMeetingRoom({meetingInfo}, {parent: {}});
24
20
  });
25
21
 
26
-
27
22
  describe('#get()', () => {
28
23
  it('returns personal meeting room info', async () => {
29
24
  await pmr.get();
@@ -10,43 +10,41 @@ describe('isAnyClusterReachable', () => {
10
10
  });
11
11
 
12
12
  afterEach(() => {
13
- window.localStorage.clear()
13
+ window.localStorage.clear();
14
14
  });
15
15
 
16
16
  const checkIsClusterReachable = (mockStorage: any, expectedValue: boolean) => {
17
-
18
17
  if (mockStorage) {
19
- window.localStorage.setItem('reachability.result', JSON.stringify(mockStorage))
18
+ window.localStorage.setItem('reachability.result', JSON.stringify(mockStorage));
20
19
  }
21
20
  const reachability = new Reachability({});
22
21
 
23
22
  const result = reachability.isAnyClusterReachable();
24
23
 
25
24
  assert.equal(result, expectedValue);
26
-
27
- }
25
+ };
28
26
 
29
27
  it('returns true when udp is reachable', () => {
30
- checkIsClusterReachable({x: {udp: {reachable: 'true'}, tcp: {reachable: 'false'}}}, true)
28
+ checkIsClusterReachable({x: {udp: {reachable: 'true'}, tcp: {reachable: 'false'}}}, true);
31
29
  });
32
30
 
33
31
  it('returns true when tcp is reachable', () => {
34
- checkIsClusterReachable({x: {udp: {reachable: 'false'}, tcp: {reachable: 'true'}}}, true)
32
+ checkIsClusterReachable({x: {udp: {reachable: 'false'}, tcp: {reachable: 'true'}}}, true);
35
33
  });
36
34
 
37
35
  it('returns true when both tcp and udp are reachable', () => {
38
- checkIsClusterReachable({x: {udp: {reachable: 'true'}, tcp: {reachable: 'true'}}}, true)
36
+ checkIsClusterReachable({x: {udp: {reachable: 'true'}, tcp: {reachable: 'true'}}}, true);
39
37
  });
40
38
 
41
39
  it('returns false when both tcp and udp are unreachable', () => {
42
- checkIsClusterReachable({x: {udp: {reachable: 'false'}, tcp: {reachable: 'false'}}}, false)
40
+ checkIsClusterReachable({x: {udp: {reachable: 'false'}, tcp: {reachable: 'false'}}}, false);
43
41
  });
44
42
 
45
43
  it('returns false when reachability result is empty', () => {
46
- checkIsClusterReachable({x: {}}, false)
44
+ checkIsClusterReachable({x: {}}, false);
47
45
  });
48
46
 
49
47
  it('returns false when reachability.result item is not there', () => {
50
- checkIsClusterReachable(undefined, false)
48
+ checkIsClusterReachable(undefined, false);
51
49
  });
52
50
  });
@@ -10,14 +10,13 @@ const {assert} = chai;
10
10
  chai.use(chaiAsPromised);
11
11
  sinon.assert.expose(chai.assert, {prefix: ''});
12
12
 
13
-
14
13
  describe('plugin-meetings', () => {
15
14
  describe('ReconnectionManager.reconnect', () => {
16
15
  it('uses correct TURN TLS information on the new connection', async () => {
17
16
  Metrics.postEvent = sinon.stub();
18
17
 
19
18
  const fakeMediaConnection = {
20
- initiateOffer: sinon.stub().resolves({})
19
+ initiateOffer: sinon.stub().resolves({}),
21
20
  };
22
21
  const fakeMeeting = {
23
22
  closePeerConnections: sinon.stub().resolves({}),
@@ -31,10 +30,10 @@ describe('plugin-meetings', () => {
31
30
  times: 2,
32
31
  backOff: {
33
32
  start: 1000,
34
- rate: 2
35
- }
36
- }
37
- }
33
+ rate: 2,
34
+ },
35
+ },
36
+ },
38
37
  },
39
38
  mediaProperties: {
40
39
  unsetPeerConnection: sinon.stub(),
@@ -46,8 +45,8 @@ describe('plugin-meetings', () => {
46
45
  username: 'fake_turn_username',
47
46
  password: 'fake_turn_password',
48
47
  },
49
- turnDiscoverySkippedReason: undefined
50
- })
48
+ turnDiscoverySkippedReason: undefined,
49
+ }),
51
50
  },
52
51
  statsAnalyzer: {
53
52
  updateMediaConnection: sinon.stub(),
@@ -55,9 +54,9 @@ describe('plugin-meetings', () => {
55
54
  webex: {
56
55
  meetings: {
57
56
  getMeetingByType: sinon.stub().returns(true),
58
- syncMeetings: sinon.stub().resolves({})
59
- }
60
- }
57
+ syncMeetings: sinon.stub().resolves({}),
58
+ },
59
+ },
61
60
  };
62
61
 
63
62
  const rm = new ReconnectionManager(fakeMeeting);
@@ -96,11 +95,11 @@ describe('plugin-meetings', () => {
96
95
  times: 2,
97
96
  backOff: {
98
97
  start: 1000,
99
- rate: 2
100
- }
101
- }
102
- }
103
- }
98
+ rate: 2,
99
+ },
100
+ },
101
+ },
102
+ },
104
103
  });
105
104
  });
106
105
 
@@ -119,8 +118,7 @@ describe('plugin-meetings', () => {
119
118
  });
120
119
 
121
120
  it('should resolve the deferred promise', () => {
122
- reconnectionManager.iceState.resolve =
123
- sinon.spy();
121
+ reconnectionManager.iceState.resolve = sinon.spy();
124
122
  const {resolve} = reconnectionManager.iceState;
125
123
 
126
124
  reconnectionManager.iceReconnected();
@@ -25,15 +25,15 @@ describe('TurnDiscovery', () => {
25
25
  sinon.stub(Metrics, 'sendBehavioralMetric');
26
26
 
27
27
  mockRoapRequest = {
28
- sendRoap: sinon.fake.resolves({mediaConnections: FAKE_MEDIA_CONNECTIONS_FROM_LOCUS})
28
+ sendRoap: sinon.fake.resolves({mediaConnections: FAKE_MEDIA_CONNECTIONS_FROM_LOCUS}),
29
29
  } as unknown as RoapRequest;
30
30
 
31
31
  testMeeting = {
32
32
  id: 'fake meeting id',
33
33
  config: {
34
34
  experimental: {
35
- enableTurnDiscovery: true
36
- }
35
+ enableTurnDiscovery: true,
36
+ },
37
37
  },
38
38
  correlationId: 'fake correlation id',
39
39
  selfUrl: 'fake self url',
@@ -46,7 +46,7 @@ describe('TurnDiscovery', () => {
46
46
  testMeeting.roapSeq = newSeq;
47
47
  }),
48
48
  updateMediaConnections: sinon.stub(),
49
- webex: {meetings: {reachability: {isAnyClusterReachable: () => false}}}
49
+ webex: {meetings: {reachability: {isAnyClusterReachable: () => false}}},
50
50
  };
51
51
  });
52
52
 
@@ -55,7 +55,11 @@ describe('TurnDiscovery', () => {
55
55
  sinon.restore();
56
56
  });
57
57
 
58
- const checkRoapMessageSent = async (messageType, expectedSeq, expectedMediaId = testMeeting.mediaId) => {
58
+ const checkRoapMessageSent = async (
59
+ messageType,
60
+ expectedSeq,
61
+ expectedMediaId = testMeeting.mediaId
62
+ ) => {
59
63
  await testUtils.flushPromises();
60
64
 
61
65
  assert.calledOnce(mockRoapRequest.sendRoap);
@@ -70,7 +74,7 @@ describe('TurnDiscovery', () => {
70
74
  mediaId: expectedMediaId,
71
75
  audioMuted: testMeeting.isAudioMuted(),
72
76
  videoMuted: testMeeting.isVideoMuted(),
73
- meetingId: testMeeting.id
77
+ meetingId: testMeeting.id,
74
78
  });
75
79
 
76
80
  if (messageType === 'TURN_DISCOVERY_REQUEST') {
@@ -109,7 +113,7 @@ describe('TurnDiscovery', () => {
109
113
  `x-cisco-turn-url=${FAKE_TURN_URL}`,
110
114
  `x-cisco-turn-username=${FAKE_TURN_USERNAME}`,
111
115
  `x-cisco-turn-password=${FAKE_TURN_PASSWORD}`,
112
- ]
116
+ ],
113
117
  });
114
118
 
115
119
  await testUtils.flushPromises();
@@ -122,7 +126,7 @@ describe('TurnDiscovery', () => {
122
126
  assert.deepEqual(turnServerInfo, {
123
127
  url: FAKE_TURN_URL,
124
128
  username: FAKE_TURN_USERNAME,
125
- password: FAKE_TURN_PASSWORD
129
+ password: FAKE_TURN_PASSWORD,
126
130
  });
127
131
 
128
132
  assert.isUndefined(turnDiscoverySkippedReason);
@@ -145,7 +149,7 @@ describe('TurnDiscovery', () => {
145
149
  `x-cisco-turn-url=${FAKE_TURN_URL}`,
146
150
  `x-cisco-turn-username=${FAKE_TURN_USERNAME}`,
147
151
  `x-cisco-turn-password=${FAKE_TURN_PASSWORD}`,
148
- ]
152
+ ],
149
153
  });
150
154
 
151
155
  await testUtils.flushPromises();
@@ -158,7 +162,7 @@ describe('TurnDiscovery', () => {
158
162
  assert.deepEqual(turnServerInfo, {
159
163
  url: FAKE_TURN_URL,
160
164
  username: FAKE_TURN_USERNAME,
161
- password: FAKE_TURN_PASSWORD
165
+ password: FAKE_TURN_PASSWORD,
162
166
  });
163
167
  assert.isUndefined(turnDiscoverySkippedReason);
164
168
  });
@@ -181,7 +185,7 @@ describe('TurnDiscovery', () => {
181
185
  `x-cisco-turn-username=${FAKE_TURN_USERNAME}`,
182
186
  `x-cisco-turn-password=${FAKE_TURN_PASSWORD}`,
183
187
  'another-header-at-the-end=12345',
184
- ]
188
+ ],
185
189
  });
186
190
 
187
191
  await testUtils.flushPromises();
@@ -193,7 +197,7 @@ describe('TurnDiscovery', () => {
193
197
  assert.deepEqual(turnServerInfo, {
194
198
  url: FAKE_TURN_URL,
195
199
  username: FAKE_TURN_USERNAME,
196
- password: FAKE_TURN_PASSWORD
200
+ password: FAKE_TURN_PASSWORD,
197
201
  });
198
202
  assert.isUndefined(turnDiscoverySkippedReason);
199
203
  });
@@ -242,10 +246,9 @@ describe('TurnDiscovery', () => {
242
246
  assert.notCalled(mockRoapRequest.sendRoap);
243
247
  assert.notCalled(Metrics.sendBehavioralMetric);
244
248
  testMeeting.webex.meetings.reachability.isAnyClusterReachable = prev;
245
-
246
249
  });
247
250
 
248
- it('resolves with undefined if we don\'t get a response within 10s', async () => {
251
+ it("resolves with undefined if we don't get a response within 10s", async () => {
249
252
  const td = new TurnDiscovery(mockRoapRequest);
250
253
 
251
254
  const promise = td.doTurnDiscovery(testMeeting, false);
@@ -269,7 +272,7 @@ describe('TurnDiscovery', () => {
269
272
  headers: [
270
273
  `x-cisco-turn-url=${FAKE_TURN_URL}`,
271
274
  `x-cisco-turn-username=${FAKE_TURN_USERNAME}`,
272
- ]
275
+ ],
273
276
  });
274
277
  await testUtils.flushPromises();
275
278
  const {turnServerInfo, turnDiscoverySkippedReason} = await turnDiscoveryPromise;
@@ -302,7 +305,7 @@ describe('TurnDiscovery', () => {
302
305
  td.handleTurnDiscoveryResponse({headers: []});
303
306
 
304
307
  await testUtils.flushPromises();
305
- const {turnServerInfo, turnDiscoverySkippedReason}= await turnDiscoveryPromise;
308
+ const {turnServerInfo, turnDiscoverySkippedReason} = await turnDiscoveryPromise;
306
309
 
307
310
  assert.isUndefined(turnServerInfo);
308
311
  assert.isUndefined(turnDiscoverySkippedReason);
@@ -328,7 +331,7 @@ describe('TurnDiscovery', () => {
328
331
  `x-cisco-turn-url=${FAKE_TURN_URL}`,
329
332
  `x-cisco-turn-username=${FAKE_TURN_USERNAME}`,
330
333
  `x-cisco-turn-password=${FAKE_TURN_PASSWORD}`,
331
- ]
334
+ ],
332
335
  });
333
336
 
334
337
  await testUtils.flushPromises();
@@ -345,7 +348,7 @@ describe('TurnDiscovery', () => {
345
348
  });
346
349
 
347
350
  describe('handleTurnDiscoveryResponse', () => {
348
- it('doesn\'t do anything if turn discovery was not started', () => {
351
+ it("doesn't do anything if turn discovery was not started", () => {
349
352
  const td = new TurnDiscovery(mockRoapRequest);
350
353
 
351
354
  // there is not much we can check, but we mainly want to make
@@ -355,7 +358,7 @@ describe('TurnDiscovery', () => {
355
358
  `x-cisco-turn-url=${FAKE_TURN_URL}`,
356
359
  `x-cisco-turn-username=${FAKE_TURN_USERNAME}`,
357
360
  `x-cisco-turn-password=${FAKE_TURN_PASSWORD}`,
358
- ]
361
+ ],
359
362
  });
360
363
 
361
364
  assert.notCalled(mockRoapRequest.sendRoap);
@@ -20,31 +20,31 @@ describe('plugin-meetings', () => {
20
20
  let sandBoxSpy;
21
21
 
22
22
  const initialConfig = {
23
- videoPacketLossRatioThreshold: 9
23
+ videoPacketLossRatioThreshold: 9,
24
24
  };
25
25
 
26
26
  const defaultStats = {
27
27
  internal: {
28
28
  video: {
29
29
  send: {
30
- totalPacketsLostOnReceiver: 10
31
- }
32
- }
30
+ totalPacketsLostOnReceiver: 10,
31
+ },
32
+ },
33
33
  },
34
34
  video: {
35
35
  send: {
36
36
  packetsSent: 2,
37
37
  meanRemoteJitter: [],
38
- meanRoundTripTime: []
39
- }
40
- }
38
+ meanRoundTripTime: [],
39
+ },
40
+ },
41
41
  };
42
42
 
43
43
  const statusResult = {
44
44
  type: 'remote-inbound-rtp',
45
45
  packetsLost: 11,
46
46
  rttThreshold: 501,
47
- jitterThreshold: 501
47
+ jitterThreshold: 501,
48
48
  };
49
49
 
50
50
  const sandbox = sinon.createSandbox();
@@ -54,7 +54,10 @@ describe('plugin-meetings', () => {
54
54
 
55
55
  statsAnalyzer = new StatsAnalyzer(initialConfig, networkQualityMonitor, defaultStats);
56
56
 
57
- sandBoxSpy = sandbox.spy(statsAnalyzer.networkQualityMonitor, 'determineUplinkNetworkQuality');
57
+ sandBoxSpy = sandbox.spy(
58
+ statsAnalyzer.networkQualityMonitor,
59
+ 'determineUplinkNetworkQuality'
60
+ );
58
61
  });
59
62
 
60
63
  afterEach(() => {
@@ -65,11 +68,13 @@ describe('plugin-meetings', () => {
65
68
  await statsAnalyzer.parseGetStatsResult(statusResult, 'video');
66
69
 
67
70
  assert.calledOnce(statsAnalyzer.networkQualityMonitor.determineUplinkNetworkQuality);
68
- assert(sandBoxSpy.calledWith({
69
- mediaType: 'video',
70
- remoteRtpResults: statusResult,
71
- statsAnalyzerCurrentStats: statsAnalyzer.statsResults
72
- }));
71
+ assert(
72
+ sandBoxSpy.calledWith({
73
+ mediaType: 'video',
74
+ remoteRtpResults: statusResult,
75
+ statsAnalyzerCurrentStats: statsAnalyzer.statsResults,
76
+ })
77
+ );
73
78
  });
74
79
  });
75
80
 
@@ -114,7 +119,7 @@ describe('plugin-meetings', () => {
114
119
  type: 'outbound-rtp',
115
120
  packetsSent: 0,
116
121
  bytesSent: 1,
117
- }
122
+ },
118
123
  },
119
124
  video: {
120
125
  receiver: {
@@ -126,8 +131,8 @@ describe('plugin-meetings', () => {
126
131
  type: 'outbound-rtp',
127
132
  framesSent: 0,
128
133
  bytesSent: 1,
129
- }
130
- }
134
+ },
135
+ },
131
136
  };
132
137
 
133
138
  pc = {
@@ -148,9 +153,9 @@ describe('plugin-meetings', () => {
148
153
  screenShareVideo: {
149
154
  sender: [],
150
155
  receiver: [],
151
- currentDirection: 'sendrecv'
152
- }
153
- })
156
+ currentDirection: 'sendrecv',
157
+ },
158
+ }),
154
159
  };
155
160
 
156
161
  networkQualityMonitor = new NetworkQualityMonitor(initialConfig);