@webex/plugin-meetings 3.9.0-webinar5k.1 → 3.10.0

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 (138) hide show
  1. package/dist/breakouts/breakout.js +1 -1
  2. package/dist/breakouts/index.js +1 -1
  3. package/dist/constants.js +24 -0
  4. package/dist/constants.js.map +1 -1
  5. package/dist/controls-options-manager/index.js +22 -5
  6. package/dist/controls-options-manager/index.js.map +1 -1
  7. package/dist/index.js +2 -1
  8. package/dist/index.js.map +1 -1
  9. package/dist/interceptors/index.js +7 -0
  10. package/dist/interceptors/index.js.map +1 -1
  11. package/dist/interceptors/locusRouteToken.js +116 -0
  12. package/dist/interceptors/locusRouteToken.js.map +1 -0
  13. package/dist/interpretation/index.js +1 -1
  14. package/dist/interpretation/siLanguage.js +1 -1
  15. package/dist/locus-info/controlsUtils.js +11 -2
  16. package/dist/locus-info/controlsUtils.js.map +1 -1
  17. package/dist/locus-info/index.js +76 -322
  18. package/dist/locus-info/index.js.map +1 -1
  19. package/dist/locus-info/parser.js +4 -1
  20. package/dist/locus-info/parser.js.map +1 -1
  21. package/dist/media/properties.js +53 -5
  22. package/dist/media/properties.js.map +1 -1
  23. package/dist/meeting/in-meeting-actions.js +14 -0
  24. package/dist/meeting/in-meeting-actions.js.map +1 -1
  25. package/dist/meeting/index.js +467 -277
  26. package/dist/meeting/index.js.map +1 -1
  27. package/dist/meeting/request.js +177 -14
  28. package/dist/meeting/request.js.map +1 -1
  29. package/dist/meeting/type.js +7 -0
  30. package/dist/meeting/type.js.map +1 -0
  31. package/dist/meeting/util.js +100 -3
  32. package/dist/meeting/util.js.map +1 -1
  33. package/dist/meeting-info/meeting-info-v2.js +29 -21
  34. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  35. package/dist/meetings/index.js +20 -16
  36. package/dist/meetings/index.js.map +1 -1
  37. package/dist/member/index.js +9 -0
  38. package/dist/member/index.js.map +1 -1
  39. package/dist/member/util.js +10 -0
  40. package/dist/member/util.js.map +1 -1
  41. package/dist/members/index.js +10 -7
  42. package/dist/members/index.js.map +1 -1
  43. package/dist/members/util.js +7 -2
  44. package/dist/members/util.js.map +1 -1
  45. package/dist/metrics/constants.js +2 -1
  46. package/dist/metrics/constants.js.map +1 -1
  47. package/dist/multistream/mediaRequestManager.js +1 -1
  48. package/dist/multistream/mediaRequestManager.js.map +1 -1
  49. package/dist/multistream/remoteMedia.js +34 -5
  50. package/dist/multistream/remoteMedia.js.map +1 -1
  51. package/dist/multistream/remoteMediaGroup.js +42 -2
  52. package/dist/multistream/remoteMediaGroup.js.map +1 -1
  53. package/dist/reachability/index.js +3 -3
  54. package/dist/reachability/index.js.map +1 -1
  55. package/dist/types/constants.d.ts +23 -0
  56. package/dist/types/controls-options-manager/index.d.ts +9 -1
  57. package/dist/types/interceptors/index.d.ts +2 -1
  58. package/dist/types/interceptors/locusRouteToken.d.ts +38 -0
  59. package/dist/types/locus-info/index.d.ts +9 -54
  60. package/dist/types/media/properties.d.ts +21 -0
  61. package/dist/types/meeting/in-meeting-actions.d.ts +14 -0
  62. package/dist/types/meeting/index.d.ts +64 -29
  63. package/dist/types/meeting/request.d.ts +42 -0
  64. package/dist/types/meeting/type.d.ts +9 -0
  65. package/dist/types/meeting/util.d.ts +13 -0
  66. package/dist/types/meeting-info/meeting-info-v2.d.ts +6 -3
  67. package/dist/types/meetings/index.d.ts +3 -1
  68. package/dist/types/member/index.d.ts +1 -0
  69. package/dist/types/member/util.d.ts +5 -0
  70. package/dist/types/members/index.d.ts +12 -11
  71. package/dist/types/members/util.d.ts +8 -4
  72. package/dist/types/metrics/constants.d.ts +1 -0
  73. package/dist/types/multistream/remoteMedia.d.ts +20 -1
  74. package/dist/types/multistream/remoteMediaGroup.d.ts +11 -0
  75. package/dist/webinar/index.js +1 -1
  76. package/package.json +25 -27
  77. package/src/constants.ts +26 -2
  78. package/src/controls-options-manager/index.ts +26 -5
  79. package/src/index.ts +2 -1
  80. package/src/interceptors/index.ts +2 -1
  81. package/src/interceptors/locusRouteToken.ts +80 -0
  82. package/src/locus-info/controlsUtils.ts +18 -0
  83. package/src/locus-info/index.ts +69 -357
  84. package/src/locus-info/parser.ts +5 -1
  85. package/src/media/properties.ts +43 -0
  86. package/src/meeting/in-meeting-actions.ts +29 -0
  87. package/src/meeting/index.ts +296 -87
  88. package/src/meeting/request.ts +141 -0
  89. package/src/meeting/type.ts +9 -0
  90. package/src/meeting/util.ts +107 -3
  91. package/src/meeting-info/meeting-info-v2.ts +24 -5
  92. package/src/meetings/index.ts +15 -22
  93. package/src/member/index.ts +10 -0
  94. package/src/member/util.ts +14 -0
  95. package/src/members/index.ts +20 -10
  96. package/src/members/util.ts +20 -3
  97. package/src/metrics/constants.ts +1 -0
  98. package/src/multistream/mediaRequestManager.ts +7 -7
  99. package/src/multistream/remoteMedia.ts +34 -4
  100. package/src/multistream/remoteMediaGroup.ts +37 -2
  101. package/src/reachability/index.ts +3 -3
  102. package/test/unit/spec/common/browser-detection.js +0 -24
  103. package/test/unit/spec/controls-options-manager/index.js +47 -0
  104. package/test/unit/spec/fixture/locus.js +1 -0
  105. package/test/unit/spec/interceptors/locusRouteToken.ts +87 -0
  106. package/test/unit/spec/locus-info/index.js +80 -361
  107. package/test/unit/spec/locus-info/parser.js +3 -2
  108. package/test/unit/spec/media/properties.ts +137 -0
  109. package/test/unit/spec/meeting/in-meeting-actions.ts +14 -0
  110. package/test/unit/spec/meeting/index.js +637 -53
  111. package/test/unit/spec/meeting/muteState.js +32 -6
  112. package/test/unit/spec/meeting/request.js +21 -0
  113. package/test/unit/spec/meeting/utils.js +171 -18
  114. package/test/unit/spec/meeting-info/meetinginfov2.js +8 -3
  115. package/test/unit/spec/meetings/index.js +12 -5
  116. package/test/unit/spec/member/util.js +24 -0
  117. package/test/unit/spec/members/collection.js +120 -0
  118. package/test/unit/spec/members/index.js +107 -2
  119. package/test/unit/spec/members/request.js +55 -0
  120. package/test/unit/spec/members/utils.js +116 -14
  121. package/test/unit/spec/multistream/mediaRequestManager.ts +19 -6
  122. package/test/unit/spec/multistream/remoteMedia.ts +66 -2
  123. package/test/unit/spec/reachability/index.ts +158 -3
  124. package/test/unit/spec/roap/turnDiscovery.ts +3 -3
  125. package/dist/hashTree/constants.js +0 -23
  126. package/dist/hashTree/constants.js.map +0 -1
  127. package/dist/hashTree/hashTree.js +0 -516
  128. package/dist/hashTree/hashTree.js.map +0 -1
  129. package/dist/hashTree/hashTreeParser.js +0 -521
  130. package/dist/hashTree/hashTreeParser.js.map +0 -1
  131. package/dist/types/hashTree/constants.d.ts +0 -8
  132. package/dist/types/hashTree/hashTree.d.ts +0 -128
  133. package/dist/types/hashTree/hashTreeParser.d.ts +0 -152
  134. package/src/hashTree/constants.ts +0 -12
  135. package/src/hashTree/hashTree.ts +0 -460
  136. package/src/hashTree/hashTreeParser.ts +0 -556
  137. package/test/unit/spec/hashTree/hashTree.ts +0 -394
  138. package/test/unit/spec/hashTree/hashTreeParser.ts +0 -156
@@ -3,7 +3,7 @@ import 'jsdom-global/register';
3
3
  import EventEmitter from 'events';
4
4
 
5
5
  import {MediaType} from '@webex/internal-media-core';
6
- import {RemoteMedia, RemoteMediaEvents} from '@webex/plugin-meetings/src/multistream/remoteMedia';
6
+ import {RemoteMedia, RemoteMediaEvents, RemoteVideoResolution} from '@webex/plugin-meetings/src/multistream/remoteMedia';
7
7
  import {ReceiveSlotEvents} from '@webex/plugin-meetings/src/multistream/receiveSlot';
8
8
  import sinon from 'sinon';
9
9
  import {assert} from '@webex/test-helper-chai';
@@ -257,7 +257,9 @@ describe('RemoteMedia', () => {
257
257
  {height: 198, fs: 920}, // 360p
258
258
  {height: 360, fs: 920},
259
259
  {height: 395, fs: 920},
260
- {height: 396, fs: 3600}, // 720p
260
+ {height: 396, fs: 2040}, // 540p
261
+ {height: 540, fs: 2040},
262
+ {height: 610, fs: 3600}, // 720p
261
263
  {height: 720, fs: 3600},
262
264
  {height: 721, fs: 8192}, // 1080p
263
265
  {height: 1080, fs: 8192},
@@ -271,4 +273,66 @@ describe('RemoteMedia', () => {
271
273
  }
272
274
  );
273
275
  });
276
+
277
+ describe('getEffectiveMaxFs()', () => {
278
+ it('returns maxFrameSize when it is greater than 0', () => {
279
+ remoteMedia.setSizeHint(960, 540);
280
+
281
+ const result = remoteMedia.getEffectiveMaxFs();
282
+
283
+ assert.strictEqual(result, 2040);
284
+ });
285
+
286
+ it('returns getMaxFs result when maxFrameSize is 0 and resolution is provided', () => {
287
+ remoteMedia.setSizeHint(0, 0);
288
+
289
+ // remoteMedia was created with {resolution: 'medium'} in beforeEach
290
+
291
+ const result = remoteMedia.getEffectiveMaxFs();
292
+
293
+ // 'medium' resolution should map to 720p which is 3600
294
+ assert.strictEqual(result, 3600);
295
+ });
296
+
297
+ it('returns undefined when maxFrameSize is 0 and no resolution is provided', () => {
298
+ remoteMedia.setSizeHint(0, 0);
299
+
300
+ // Create a new RemoteMedia without resolution option
301
+ const remoteMediaWithoutResolution = new RemoteMedia(fakeReceiveSlot, fakeMediaRequestManager);
302
+
303
+ const result = remoteMediaWithoutResolution.getEffectiveMaxFs();
304
+
305
+ assert.strictEqual(result, undefined);
306
+ });
307
+
308
+ it('prioritizes maxFrameSize over resolution option', () => {
309
+ remoteMedia.setSizeHint(640, 360);
310
+ // remoteMedia was created with {resolution: 'medium'} in beforeEach
311
+
312
+ const result = remoteMedia.getEffectiveMaxFs();
313
+
314
+ // Should return maxFrameSize (500) instead of resolution-based value (3600)
315
+ assert.strictEqual(result, 920);
316
+ });
317
+
318
+ it('works correctly with different resolution options', () => {
319
+ const testCases: Array<{ resolution: RemoteVideoResolution; expected: number }> = [
320
+ { resolution: 'thumbnail', expected: 60 },
321
+ { resolution: 'very small', expected: 240 },
322
+ { resolution: 'small', expected: 920 },
323
+ { resolution: 'medium', expected: 3600 },
324
+ { resolution: 'large', expected: 8192 },
325
+ { resolution: 'best', expected: 8192 },
326
+ ];
327
+
328
+ testCases.forEach(({ resolution, expected }) => {
329
+ const testRemoteMedia = new RemoteMedia(fakeReceiveSlot, fakeMediaRequestManager, { resolution });
330
+ testRemoteMedia.setSizeHint(0, 0); // Ensure maxFrameSize doesn't interfere
331
+
332
+ const result = testRemoteMedia.getEffectiveMaxFs();
333
+
334
+ assert.strictEqual(result, expected, `Failed for resolution: ${resolution}`);
335
+ });
336
+ });
337
+ });
274
338
  });
@@ -3,15 +3,14 @@ import MockWebex from '@webex/test-helper-mock-webex';
3
3
  import sinon from 'sinon';
4
4
  import EventEmitter from 'events';
5
5
  import testUtils from '../../../utils/testUtils';
6
- import Reachability, {
7
- ReachabilityResultsForBackend,
8
- } from '@webex/plugin-meetings/src/reachability/';
6
+ import Reachability from '@webex/plugin-meetings/src/reachability/';
9
7
  import {ClusterNode} from '../../../../src/reachability/request';
10
8
  import MeetingUtil from '@webex/plugin-meetings/src/meeting/util';
11
9
  import * as ClusterReachabilityModule from '@webex/plugin-meetings/src/reachability/clusterReachability';
12
10
  import Metrics from '@webex/plugin-meetings/src/metrics';
13
11
 
14
12
  import {IP_VERSION} from '@webex/plugin-meetings/src/constants';
13
+ import { ReachabilityResultsForBackend } from '@webex/plugin-meetings/src/reachability/reachability.types';
15
14
 
16
15
  describe('isAnyPublicClusterReachable', () => {
17
16
  let webex;
@@ -836,6 +835,162 @@ describe('gatherReachability', () => {
836
835
  },
837
836
  },
838
837
  // ========================================================================
838
+ {
839
+ title: '2 clusters: one with multiple urls, reachability should resolve after the first result for each protocol is ready',
840
+ waitShortTimeout: false,
841
+ waitLongTimeout: false,
842
+ mockClusters: {
843
+ cluster1: {
844
+ udp: ['udp-url1-1', 'udp-url1-2'],
845
+ tcp: ['tcp-url1-1', 'tcp-url1-2'],
846
+ xtls: ['xtls-url1-1', 'xtls-url1-2'],
847
+ isVideoMesh: false,
848
+ },
849
+ cluster2: {
850
+ udp: ['udp-url2'],
851
+ tcp: ['tcp-url2'],
852
+ xtls: ['xtls-url2'],
853
+ isVideoMesh: false,
854
+ },
855
+ },
856
+ mockResultReadyEvents: [
857
+ // results are only for the first url for each protocol not the 2nd one
858
+ {
859
+ clusterId: 'cluster1',
860
+ protocol: 'udp',
861
+ result: {
862
+ result: 'reachable',
863
+ clientMediaIPs: ['1.2.3.4'],
864
+ latencyInMilliseconds: 10,
865
+ },
866
+ },
867
+ {
868
+ clusterId: 'cluster1',
869
+ protocol: 'tcp',
870
+ result: {
871
+ result: 'reachable',
872
+ latencyInMilliseconds: 100,
873
+ },
874
+ },
875
+ {
876
+ clusterId: 'cluster1',
877
+ protocol: 'xtls',
878
+ result: {
879
+ result: 'reachable',
880
+ latencyInMilliseconds: 200,
881
+ },
882
+ },
883
+ {
884
+ clusterId: 'cluster2',
885
+ protocol: 'udp',
886
+ result: {
887
+ result: 'reachable',
888
+ clientMediaIPs: ['1.2.3.4'],
889
+ latencyInMilliseconds: 20,
890
+ },
891
+ },
892
+ {
893
+ clusterId: 'cluster2',
894
+ protocol: 'tcp',
895
+ result: {
896
+ result: 'reachable',
897
+ latencyInMilliseconds: 110,
898
+ },
899
+ },
900
+ {
901
+ clusterId: 'cluster2',
902
+ protocol: 'xtls',
903
+ result: {
904
+ result: 'reachable',
905
+ latencyInMilliseconds: 220,
906
+ },
907
+ },
908
+ ],
909
+ expectedResults: {
910
+ cluster1: {
911
+ udp: {result: 'reachable', clientMediaIPs: ['1.2.3.4'], latencyInMilliseconds: 10},
912
+ tcp: {result: 'reachable', latencyInMilliseconds: 100},
913
+ xtls: {result: 'reachable', latencyInMilliseconds: 200},
914
+ isVideoMesh: false,
915
+ },
916
+ cluster2: {
917
+ udp: {result: 'reachable', clientMediaIPs: ['1.2.3.4'], latencyInMilliseconds: 20},
918
+ tcp: {result: 'reachable', latencyInMilliseconds: 110},
919
+ xtls: {result: 'reachable', latencyInMilliseconds: 220},
920
+ isVideoMesh: false,
921
+ },
922
+ },
923
+ expectedMetrics: {
924
+ vmn_udp_min: -1,
925
+ vmn_udp_max: -1,
926
+ vmn_udp_average: -1,
927
+ public_udp_min: 10,
928
+ public_udp_max: 20,
929
+ public_udp_average: 15,
930
+ public_tcp_min: 100,
931
+ public_tcp_max: 110,
932
+ public_tcp_average: 105,
933
+ public_xtls_min: 200,
934
+ public_xtls_max: 220,
935
+ public_xtls_average: 210,
936
+ },
937
+ },
938
+ // ========================================================================
939
+ {
940
+ title: '1 cluster with zero urls for TCP, reachability should resolve after the first result for each protocol is ready without waiting for TCP',
941
+ waitShortTimeout: false,
942
+ waitLongTimeout: false,
943
+ mockClusters: {
944
+ cluster1: {
945
+ udp: ['udp-url1'],
946
+ tcp: [],
947
+ xtls: ['xtls-url1'],
948
+ isVideoMesh: false,
949
+ },
950
+ },
951
+ mockResultReadyEvents: [
952
+ {
953
+ clusterId: 'cluster1',
954
+ protocol: 'udp',
955
+ result: {
956
+ result: 'reachable',
957
+ clientMediaIPs: ['1.2.3.4'],
958
+ latencyInMilliseconds: 10,
959
+ },
960
+ },
961
+ {
962
+ clusterId: 'cluster1',
963
+ protocol: 'xtls',
964
+ result: {
965
+ result: 'reachable',
966
+ latencyInMilliseconds: 200,
967
+ },
968
+ },
969
+ ],
970
+ expectedResults: {
971
+ cluster1: {
972
+ udp: {result: 'reachable', clientMediaIPs: ['1.2.3.4'], latencyInMilliseconds: 10},
973
+ tcp: {result: 'untested'},
974
+ xtls: {result: 'reachable', latencyInMilliseconds: 200},
975
+ isVideoMesh: false,
976
+ },
977
+ },
978
+ expectedMetrics: {
979
+ vmn_udp_min: -1,
980
+ vmn_udp_max: -1,
981
+ vmn_udp_average: -1,
982
+ public_udp_min: 10,
983
+ public_udp_max: 10,
984
+ public_udp_average: 10,
985
+ public_tcp_min: -1,
986
+ public_tcp_max: -1,
987
+ public_tcp_average: -1,
988
+ public_xtls_min: 200,
989
+ public_xtls_max: 200,
990
+ public_xtls_average: 200,
991
+ },
992
+ },
993
+ // ========================================================================
839
994
  {
840
995
  title: '2 clusters: both with no results at all',
841
996
  waitShortTimeout: 'public',
@@ -321,7 +321,7 @@ describe('TurnDiscovery', () => {
321
321
  result,
322
322
  undefined,
323
323
  undefined,
324
- 'failure: Unexpected token o in JSON at position 1'
324
+ `failure: Unexpected token 'o', "not a json" is not valid JSON`
325
325
  );
326
326
  checkFailureMetricsSent();
327
327
  });
@@ -568,7 +568,7 @@ describe('TurnDiscovery', () => {
568
568
  // @ts-ignore
569
569
  mockRoapRequest.sendRoap.resetHistory();
570
570
 
571
- // simulate the response with some empty urls, normally there would be just 1, but we put more just for the sake of testing
571
+ // simulate the response with some empty urls, normally there would be just 1, but we put more just for the sake of testing
572
572
  td.handleTurnDiscoveryResponse(
573
573
  {
574
574
  messageType: 'TURN_DISCOVERY_RESPONSE',
@@ -960,7 +960,7 @@ describe('TurnDiscovery', () => {
960
960
 
961
961
  assert.deepEqual(result, {
962
962
  turnServerInfo: undefined,
963
- turnDiscoverySkippedReason: 'failure: Unexpected token o in JSON at position 1',
963
+ turnDiscoverySkippedReason: `failure: Unexpected token 'o', "not a json" is not valid JSON`,
964
964
  });
965
965
  });
966
966
 
@@ -1,23 +0,0 @@
1
- "use strict";
2
-
3
- var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
4
- _Object$defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.EMPTY_HASH = exports.DataSetNames = void 0;
8
- // TODO: Consider moving these to the main meetings constants file at some point
9
- // Only worth doing so if they are used outside of the hash tree
10
-
11
- var EMPTY_HASH = exports.EMPTY_HASH = '99aa06d3014798d86001c324468d497f';
12
- var DataSetNames = exports.DataSetNames = {
13
- MAIN: 'main',
14
- // sent to web client, contains also panelists, over LLM
15
- ATTENDEES: 'attendees',
16
- // NOT SENT to web client, all the attendees in the locus
17
- ATD_ACTIVE: 'atd-active',
18
- // only sent to panelists, over LLM; the attendees that have their hands raised or are allowed to unmute themselves
19
- ATD_UNMUTED: 'atd-unmuted',
20
- // sent to web client, over LLM, not sent to panelists; the attendees that are unmuted
21
- SELF: 'self' // sent to web client, over Mercury
22
- };
23
- //# sourceMappingURL=constants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["EMPTY_HASH","exports","DataSetNames","MAIN","ATTENDEES","ATD_ACTIVE","ATD_UNMUTED","SELF"],"sources":["constants.ts"],"sourcesContent":["// TODO: Consider moving these to the main meetings constants file at some point\n// Only worth doing so if they are used outside of the hash tree\n\nexport const EMPTY_HASH = '99aa06d3014798d86001c324468d497f';\n\nexport const DataSetNames = {\n MAIN: 'main', // sent to web client, contains also panelists, over LLM\n ATTENDEES: 'attendees', // NOT SENT to web client, all the attendees in the locus\n ATD_ACTIVE: 'atd-active', // only sent to panelists, over LLM; the attendees that have their hands raised or are allowed to unmute themselves\n ATD_UNMUTED: 'atd-unmuted', // sent to web client, over LLM, not sent to panelists; the attendees that are unmuted\n SELF: 'self', // sent to web client, over Mercury\n};\n"],"mappings":";;;;;;;AAAA;AACA;;AAEO,IAAMA,UAAU,GAAAC,OAAA,CAAAD,UAAA,GAAG,kCAAkC;AAErD,IAAME,YAAY,GAAAD,OAAA,CAAAC,YAAA,GAAG;EAC1BC,IAAI,EAAE,MAAM;EAAE;EACdC,SAAS,EAAE,WAAW;EAAE;EACxBC,UAAU,EAAE,YAAY;EAAE;EAC1BC,WAAW,EAAE,aAAa;EAAE;EAC5BC,IAAI,EAAE,MAAM,CAAE;AAChB,CAAC"}