@webex/plugin-meetings 3.1.0 → 3.3.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 (206) hide show
  1. package/dist/breakouts/breakout.js +1 -1
  2. package/dist/breakouts/index.js +1 -1
  3. package/dist/common/errors/{reconnection-in-progress.js → reconnection-not-started.js} +27 -15
  4. package/dist/common/errors/reconnection-not-started.js.map +1 -0
  5. package/dist/constants.js +12 -3
  6. package/dist/constants.js.map +1 -1
  7. package/dist/index.js +80 -0
  8. package/dist/index.js.map +1 -1
  9. package/dist/interpretation/index.js +1 -1
  10. package/dist/interpretation/siLanguage.js +1 -1
  11. package/dist/locus-info/controlsUtils.js +7 -1
  12. package/dist/locus-info/controlsUtils.js.map +1 -1
  13. package/dist/locus-info/index.js +10 -0
  14. package/dist/locus-info/index.js.map +1 -1
  15. package/dist/media/properties.js +102 -57
  16. package/dist/media/properties.js.map +1 -1
  17. package/dist/meeting/in-meeting-actions.js +6 -0
  18. package/dist/meeting/in-meeting-actions.js.map +1 -1
  19. package/dist/meeting/index.js +543 -467
  20. package/dist/meeting/index.js.map +1 -1
  21. package/dist/meeting/locusMediaRequest.js +27 -0
  22. package/dist/meeting/locusMediaRequest.js.map +1 -1
  23. package/dist/meeting/util.js +9 -16
  24. package/dist/meeting/util.js.map +1 -1
  25. package/dist/meeting/voicea-meeting.js +37 -49
  26. package/dist/meeting/voicea-meeting.js.map +1 -1
  27. package/dist/meeting-info/util.js +304 -267
  28. package/dist/meeting-info/util.js.map +1 -1
  29. package/dist/meeting-info/utilv2.js +334 -298
  30. package/dist/meeting-info/utilv2.js.map +1 -1
  31. package/dist/meetings/index.js +6 -27
  32. package/dist/meetings/index.js.map +1 -1
  33. package/dist/reachability/index.js +6 -0
  34. package/dist/reachability/index.js.map +1 -1
  35. package/dist/reconnection-manager/index.js +138 -109
  36. package/dist/reconnection-manager/index.js.map +1 -1
  37. package/dist/roap/request.js +3 -27
  38. package/dist/roap/request.js.map +1 -1
  39. package/dist/statsAnalyzer/index.js +4 -0
  40. package/dist/statsAnalyzer/index.js.map +1 -1
  41. package/dist/statsAnalyzer/mqaUtil.js +3 -0
  42. package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
  43. package/dist/types/common/errors/reconnection-not-started.d.ts +13 -0
  44. package/dist/{constants.d.ts → types/constants.d.ts} +11 -2
  45. package/dist/types/index.d.ts +19 -0
  46. package/dist/{media → types/media}/properties.d.ts +26 -2
  47. package/dist/{meeting → types/meeting}/in-meeting-actions.d.ts +6 -0
  48. package/dist/{meeting → types/meeting}/index.d.ts +5 -6
  49. package/dist/{meeting → types/meeting}/locusMediaRequest.d.ts +1 -0
  50. package/dist/{meeting → types/meeting}/util.d.ts +3 -0
  51. package/dist/{meeting → types/meeting}/voicea-meeting.d.ts +3 -2
  52. package/dist/{meeting-info → types/meeting-info}/index.d.ts +1 -1
  53. package/dist/{meeting-info → types/meeting-info}/meeting-info-v2.d.ts +1 -1
  54. package/dist/types/meeting-info/util.d.ts +49 -0
  55. package/dist/types/meeting-info/utilv2.d.ts +65 -0
  56. package/dist/{meetings → types/meetings}/index.d.ts +1 -16
  57. package/dist/{reconnection-manager → types/reconnection-manager}/index.d.ts +4 -14
  58. package/dist/webinar/index.js +1 -1
  59. package/package.json +22 -22
  60. package/src/common/errors/reconnection-not-started.ts +25 -0
  61. package/src/constants.ts +12 -4
  62. package/src/index.ts +30 -0
  63. package/src/locus-info/controlsUtils.ts +11 -0
  64. package/src/locus-info/index.ts +16 -0
  65. package/src/media/properties.ts +67 -15
  66. package/src/meeting/in-meeting-actions.ts +12 -0
  67. package/src/meeting/index.ts +121 -98
  68. package/src/meeting/locusMediaRequest.ts +31 -0
  69. package/src/meeting/util.ts +9 -16
  70. package/src/meeting/voicea-meeting.ts +44 -46
  71. package/src/meeting-info/util.ts +241 -233
  72. package/src/meeting-info/utilv2.ts +250 -244
  73. package/src/meetings/index.ts +8 -25
  74. package/src/reachability/index.ts +3 -0
  75. package/src/reconnection-manager/index.ts +128 -105
  76. package/src/roap/request.ts +1 -24
  77. package/src/statsAnalyzer/index.ts +4 -0
  78. package/src/statsAnalyzer/mqaUtil.ts +5 -0
  79. package/test/unit/spec/locus-info/controlsUtils.js +20 -0
  80. package/test/unit/spec/locus-info/index.js +21 -0
  81. package/test/unit/spec/media/properties.ts +145 -140
  82. package/test/unit/spec/meeting/in-meeting-actions.ts +6 -0
  83. package/test/unit/spec/meeting/index.js +243 -97
  84. package/test/unit/spec/meeting/locusMediaRequest.ts +49 -0
  85. package/test/unit/spec/meeting/utils.js +3 -10
  86. package/test/unit/spec/meeting/voicea-meeting.ts +5 -14
  87. package/test/unit/spec/meetings/index.js +27 -8
  88. package/test/unit/spec/reconnection-manager/index.js +127 -39
  89. package/test/unit/spec/roap/request.ts +0 -37
  90. package/test/unit/spec/stats-analyzer/index.js +11 -0
  91. package/dist/common/errors/reconnection-in-progress.d.ts +0 -9
  92. package/dist/common/errors/reconnection-in-progress.js.map +0 -1
  93. package/dist/index.d.ts +0 -7
  94. package/dist/meeting-info/util.d.ts +0 -2
  95. package/dist/meeting-info/utilv2.d.ts +0 -2
  96. package/src/common/errors/reconnection-in-progress.ts +0 -8
  97. /package/dist/{annotation → types/annotation}/annotation.types.d.ts +0 -0
  98. /package/dist/{annotation → types/annotation}/constants.d.ts +0 -0
  99. /package/dist/{annotation → types/annotation}/index.d.ts +0 -0
  100. /package/dist/{breakouts → types/breakouts}/breakout.d.ts +0 -0
  101. /package/dist/{breakouts → types/breakouts}/collection.d.ts +0 -0
  102. /package/dist/{breakouts → types/breakouts}/edit-lock-error.d.ts +0 -0
  103. /package/dist/{breakouts → types/breakouts}/events.d.ts +0 -0
  104. /package/dist/{breakouts → types/breakouts}/index.d.ts +0 -0
  105. /package/dist/{breakouts → types/breakouts}/request.d.ts +0 -0
  106. /package/dist/{breakouts → types/breakouts}/utils.d.ts +0 -0
  107. /package/dist/{common → types/common}/browser-detection.d.ts +0 -0
  108. /package/dist/{common → types/common}/collection.d.ts +0 -0
  109. /package/dist/{common → types/common}/config.d.ts +0 -0
  110. /package/dist/{common → types/common}/errors/captcha-error.d.ts +0 -0
  111. /package/dist/{common → types/common}/errors/intent-to-join.d.ts +0 -0
  112. /package/dist/{common → types/common}/errors/join-meeting.d.ts +0 -0
  113. /package/dist/{common → types/common}/errors/media.d.ts +0 -0
  114. /package/dist/{common → types/common}/errors/no-meeting-info.d.ts +0 -0
  115. /package/dist/{common → types/common}/errors/parameter.d.ts +0 -0
  116. /package/dist/{common → types/common}/errors/password-error.d.ts +0 -0
  117. /package/dist/{common → types/common}/errors/permission.d.ts +0 -0
  118. /package/dist/{common → types/common}/errors/reclaim-host-role-errors.d.ts +0 -0
  119. /package/dist/{common → types/common}/errors/reconnection.d.ts +0 -0
  120. /package/dist/{common → types/common}/errors/stats.d.ts +0 -0
  121. /package/dist/{common → types/common}/errors/webex-errors.d.ts +0 -0
  122. /package/dist/{common → types/common}/errors/webex-meetings-error.d.ts +0 -0
  123. /package/dist/{common → types/common}/events/events-scope.d.ts +0 -0
  124. /package/dist/{common → types/common}/events/events.d.ts +0 -0
  125. /package/dist/{common → types/common}/events/trigger-proxy.d.ts +0 -0
  126. /package/dist/{common → types/common}/events/util.d.ts +0 -0
  127. /package/dist/{common → types/common}/logs/logger-config.d.ts +0 -0
  128. /package/dist/{common → types/common}/logs/logger-proxy.d.ts +0 -0
  129. /package/dist/{common → types/common}/logs/request.d.ts +0 -0
  130. /package/dist/{common → types/common}/queue.d.ts +0 -0
  131. /package/dist/{config.d.ts → types/config.d.ts} +0 -0
  132. /package/dist/{controls-options-manager → types/controls-options-manager}/constants.d.ts +0 -0
  133. /package/dist/{controls-options-manager → types/controls-options-manager}/enums.d.ts +0 -0
  134. /package/dist/{controls-options-manager → types/controls-options-manager}/index.d.ts +0 -0
  135. /package/dist/{controls-options-manager → types/controls-options-manager}/types.d.ts +0 -0
  136. /package/dist/{controls-options-manager → types/controls-options-manager}/util.d.ts +0 -0
  137. /package/dist/{interceptors → types/interceptors}/index.d.ts +0 -0
  138. /package/dist/{interceptors → types/interceptors}/locusRetry.d.ts +0 -0
  139. /package/dist/{interpretation → types/interpretation}/collection.d.ts +0 -0
  140. /package/dist/{interpretation → types/interpretation}/index.d.ts +0 -0
  141. /package/dist/{interpretation → types/interpretation}/siLanguage.d.ts +0 -0
  142. /package/dist/{locus-info → types/locus-info}/controlsUtils.d.ts +0 -0
  143. /package/dist/{locus-info → types/locus-info}/embeddedAppsUtils.d.ts +0 -0
  144. /package/dist/{locus-info → types/locus-info}/fullState.d.ts +0 -0
  145. /package/dist/{locus-info → types/locus-info}/hostUtils.d.ts +0 -0
  146. /package/dist/{locus-info → types/locus-info}/index.d.ts +0 -0
  147. /package/dist/{locus-info → types/locus-info}/infoUtils.d.ts +0 -0
  148. /package/dist/{locus-info → types/locus-info}/mediaSharesUtils.d.ts +0 -0
  149. /package/dist/{locus-info → types/locus-info}/parser.d.ts +0 -0
  150. /package/dist/{locus-info → types/locus-info}/selfUtils.d.ts +0 -0
  151. /package/dist/{media → types/media}/MediaConnectionAwaiter.d.ts +0 -0
  152. /package/dist/{media → types/media}/index.d.ts +0 -0
  153. /package/dist/{media → types/media}/util.d.ts +0 -0
  154. /package/dist/{mediaQualityMetrics → types/mediaQualityMetrics}/config.d.ts +0 -0
  155. /package/dist/{meeting → types/meeting}/muteState.d.ts +0 -0
  156. /package/dist/{meeting → types/meeting}/request.d.ts +0 -0
  157. /package/dist/{meeting → types/meeting}/request.type.d.ts +0 -0
  158. /package/dist/{meeting → types/meeting}/state.d.ts +0 -0
  159. /package/dist/{meeting-info → types/meeting-info}/collection.d.ts +0 -0
  160. /package/dist/{meeting-info → types/meeting-info}/request.d.ts +0 -0
  161. /package/dist/{meetings → types/meetings}/collection.d.ts +0 -0
  162. /package/dist/{meetings → types/meetings}/meetings.types.d.ts +0 -0
  163. /package/dist/{meetings → types/meetings}/request.d.ts +0 -0
  164. /package/dist/{meetings → types/meetings}/util.d.ts +0 -0
  165. /package/dist/{member → types/member}/index.d.ts +0 -0
  166. /package/dist/{member → types/member}/types.d.ts +0 -0
  167. /package/dist/{member → types/member}/util.d.ts +0 -0
  168. /package/dist/{members → types/members}/collection.d.ts +0 -0
  169. /package/dist/{members → types/members}/index.d.ts +0 -0
  170. /package/dist/{members → types/members}/request.d.ts +0 -0
  171. /package/dist/{members → types/members}/types.d.ts +0 -0
  172. /package/dist/{members → types/members}/util.d.ts +0 -0
  173. /package/dist/{metrics → types/metrics}/constants.d.ts +0 -0
  174. /package/dist/{metrics → types/metrics}/index.d.ts +0 -0
  175. /package/dist/{multistream → types/multistream}/mediaRequestManager.d.ts +0 -0
  176. /package/dist/{multistream → types/multistream}/receiveSlot.d.ts +0 -0
  177. /package/dist/{multistream → types/multistream}/receiveSlotManager.d.ts +0 -0
  178. /package/dist/{multistream → types/multistream}/remoteMedia.d.ts +0 -0
  179. /package/dist/{multistream → types/multistream}/remoteMediaGroup.d.ts +0 -0
  180. /package/dist/{multistream → types/multistream}/remoteMediaManager.d.ts +0 -0
  181. /package/dist/{multistream → types/multistream}/sendSlotManager.d.ts +0 -0
  182. /package/dist/{networkQualityMonitor → types/networkQualityMonitor}/index.d.ts +0 -0
  183. /package/dist/{personal-meeting-room → types/personal-meeting-room}/index.d.ts +0 -0
  184. /package/dist/{personal-meeting-room → types/personal-meeting-room}/request.d.ts +0 -0
  185. /package/dist/{personal-meeting-room → types/personal-meeting-room}/util.d.ts +0 -0
  186. /package/dist/{reachability → types/reachability}/clusterReachability.d.ts +0 -0
  187. /package/dist/{reachability → types/reachability}/index.d.ts +0 -0
  188. /package/dist/{reachability → types/reachability}/request.d.ts +0 -0
  189. /package/dist/{reachability → types/reachability}/util.d.ts +0 -0
  190. /package/dist/{reactions → types/reactions}/constants.d.ts +0 -0
  191. /package/dist/{reactions → types/reactions}/reactions.d.ts +0 -0
  192. /package/dist/{reactions → types/reactions}/reactions.type.d.ts +0 -0
  193. /package/dist/{recording-controller → types/recording-controller}/enums.d.ts +0 -0
  194. /package/dist/{recording-controller → types/recording-controller}/index.d.ts +0 -0
  195. /package/dist/{recording-controller → types/recording-controller}/util.d.ts +0 -0
  196. /package/dist/{roap → types/roap}/index.d.ts +0 -0
  197. /package/dist/{roap → types/roap}/request.d.ts +0 -0
  198. /package/dist/{roap → types/roap}/turnDiscovery.d.ts +0 -0
  199. /package/dist/{rtcMetrics → types/rtcMetrics}/constants.d.ts +0 -0
  200. /package/dist/{rtcMetrics → types/rtcMetrics}/index.d.ts +0 -0
  201. /package/dist/{statsAnalyzer → types/statsAnalyzer}/global.d.ts +0 -0
  202. /package/dist/{statsAnalyzer → types/statsAnalyzer}/index.d.ts +0 -0
  203. /package/dist/{statsAnalyzer → types/statsAnalyzer}/mqaUtil.d.ts +0 -0
  204. /package/dist/{transcription → types/transcription}/index.d.ts +0 -0
  205. /package/dist/{webinar → types/webinar}/collection.d.ts +0 -0
  206. /package/dist/{webinar → types/webinar}/index.d.ts +0 -0
@@ -1,7 +1,6 @@
1
1
  /*!
2
2
  * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
3
3
  */
4
- import { RECONNECTION_STATE } from '../constants';
5
4
  import Meeting from '../meeting';
6
5
  /**
7
6
  * @export
@@ -15,7 +14,6 @@ export default class ReconnectionManager {
15
14
  rejoinAttempts: any;
16
15
  shareStatus: any;
17
16
  status: any;
18
- tryCount: any;
19
17
  webex: any;
20
18
  /**
21
19
  * @param {Meeting} meeting
@@ -74,27 +72,19 @@ export default class ReconnectionManager {
74
72
  * @returns {Boolean} true if reconnection operation is in progress
75
73
  */
76
74
  isReconnectInProgress(): boolean;
77
- /**
78
- * Sets the reconnection status
79
- *
80
- * @public
81
- * @param {RECONNECTION_STATE} status
82
- * @memberof ReconnectionManager
83
- * @returns {undefined}
84
- */
85
- setStatus(status: RECONNECTION_STATE): void;
86
75
  /**
87
76
  * @returns {Boolean}
88
- * @throws {ReconnectionError}
77
+ * @throws {ReconnectInProgress, ReconnectionDisabled}
89
78
  * @private
90
79
  * @memberof ReconnectionManager
91
80
  */
92
- private validate;
81
+ private canStartReconnection;
93
82
  /**
94
83
  * Initiates a media reconnect for the active meeting
95
84
  * @param {Object} reconnectOptions
96
85
  * @param {boolean} [reconnectOptions.networkDisconnect=false] indicates if a network disconnect event happened
97
86
  * @param {boolean} [reconnectOptions.networkRetry=false] indicates if we are retrying the reconnect
87
+ * @param {Function} [completionCallback] callback that gets called when reconnection is started successfully
98
88
  * @returns {Promise}
99
89
  * @public
100
90
  * @memberof ReconnectionManager
@@ -102,7 +92,7 @@ export default class ReconnectionManager {
102
92
  reconnect({ networkDisconnect, networkRetry, }?: {
103
93
  networkDisconnect?: boolean;
104
94
  networkRetry?: boolean;
105
- }): any;
95
+ }, completionCallback?: (() => Promise<void>) | undefined): Promise<void>;
106
96
  /**
107
97
  * @param {Object} reconnectOptions
108
98
  * @param {boolean} [reconnectOptions.networkDisconnect=false] indicates if a network disconnect event happened
@@ -62,7 +62,7 @@ var Webinar = _webexCore.WebexPlugin.extend({
62
62
  updateCanManageWebcast: function updateCanManageWebcast(canManageWebcast) {
63
63
  this.set('canManageWebcast', canManageWebcast);
64
64
  },
65
- version: "3.1.0"
65
+ version: "3.3.0"
66
66
  });
67
67
  var _default = exports.default = Webinar;
68
68
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -28,7 +28,7 @@
28
28
  ]
29
29
  },
30
30
  "scripts": {
31
- "build": "yarn run -T tsc --declaration true --declarationDir ./dist",
31
+ "build": "yarn run -T tsc --declaration true --declarationDir ./dist/types",
32
32
  "build:src": "webex-legacy-tools build -dest \"./dist\" -src \"./src\" -js -ts -maps && yarn build",
33
33
  "deploy:npm": "yarn npm publish",
34
34
  "test:broken": "yarn test:style && yarn test:unit && yarn test:integration && yarn test:browser",
@@ -43,13 +43,13 @@
43
43
  "@webex/eslint-config-legacy": "0.0.0",
44
44
  "@webex/jest-config-legacy": "0.0.0",
45
45
  "@webex/legacy-tools": "0.0.0",
46
- "@webex/plugin-meetings": "3.1.0",
47
- "@webex/plugin-rooms": "3.1.0",
48
- "@webex/test-helper-chai": "3.1.0",
49
- "@webex/test-helper-mocha": "3.1.0",
50
- "@webex/test-helper-mock-webex": "3.1.0",
51
- "@webex/test-helper-retry": "3.1.0",
52
- "@webex/test-helper-test-users": "3.1.0",
46
+ "@webex/plugin-meetings": "3.3.0",
47
+ "@webex/plugin-rooms": "3.3.0",
48
+ "@webex/test-helper-chai": "3.3.0",
49
+ "@webex/test-helper-mocha": "3.3.0",
50
+ "@webex/test-helper-mock-webex": "3.3.0",
51
+ "@webex/test-helper-retry": "3.3.0",
52
+ "@webex/test-helper-test-users": "3.3.0",
53
53
  "chai": "^4.3.4",
54
54
  "chai-as-promised": "^7.1.1",
55
55
  "eslint": "^8.24.0",
@@ -61,20 +61,20 @@
61
61
  "typescript": "^4.7.4"
62
62
  },
63
63
  "dependencies": {
64
- "@webex/common": "3.1.0",
64
+ "@webex/common": "3.3.0",
65
65
  "@webex/internal-media-core": "2.5.0",
66
- "@webex/internal-plugin-conversation": "3.1.0",
67
- "@webex/internal-plugin-device": "3.1.0",
68
- "@webex/internal-plugin-llm": "3.1.0",
69
- "@webex/internal-plugin-mercury": "3.1.0",
70
- "@webex/internal-plugin-metrics": "3.1.0",
71
- "@webex/internal-plugin-support": "3.1.0",
72
- "@webex/internal-plugin-user": "3.1.0",
73
- "@webex/internal-plugin-voicea": "3.1.0",
74
- "@webex/media-helpers": "3.1.0",
75
- "@webex/plugin-people": "3.1.0",
76
- "@webex/plugin-rooms": "3.1.0",
77
- "@webex/webex-core": "3.1.0",
66
+ "@webex/internal-plugin-conversation": "3.3.0",
67
+ "@webex/internal-plugin-device": "3.3.0",
68
+ "@webex/internal-plugin-llm": "3.3.0",
69
+ "@webex/internal-plugin-mercury": "3.3.0",
70
+ "@webex/internal-plugin-metrics": "3.3.0",
71
+ "@webex/internal-plugin-support": "3.3.0",
72
+ "@webex/internal-plugin-user": "3.3.0",
73
+ "@webex/internal-plugin-voicea": "3.3.0",
74
+ "@webex/media-helpers": "3.3.0",
75
+ "@webex/plugin-people": "3.3.0",
76
+ "@webex/plugin-rooms": "3.3.0",
77
+ "@webex/webex-core": "3.3.0",
78
78
  "ampersand-collection": "^2.0.2",
79
79
  "bowser": "^2.11.0",
80
80
  "btoa": "^1.2.1",
@@ -91,5 +91,5 @@
91
91
  "//": [
92
92
  "TODO: upgrade jwt-decode when moving to node 18"
93
93
  ],
94
- "version": "3.1.0"
94
+ "version": "3.3.0"
95
95
  }
@@ -0,0 +1,25 @@
1
+ import {ERROR_DICTIONARY} from '../../constants';
2
+ import ReconnectionError from './reconnection';
3
+
4
+ /**
5
+ * Error object for cases when new reconnection cannot be started
6
+ */
7
+ export default class ReconnectionNotStartedError extends ReconnectionError {
8
+ /**
9
+ *
10
+ * @constructor
11
+ * @param {String} [message]
12
+ * @param {Object} [error]
13
+ */
14
+ constructor(
15
+ message: string = ERROR_DICTIONARY.RECONNECTION_NOT_STARTED.MESSAGE,
16
+ error: any = null
17
+ ) {
18
+ super(message, error);
19
+ this.name = ERROR_DICTIONARY.RECONNECTION_NOT_STARTED.NAME;
20
+ this.sdkMessage = ERROR_DICTIONARY.RECONNECTION_NOT_STARTED.MESSAGE;
21
+ this.error = error;
22
+ this.stack = error ? error.stack : new Error().stack;
23
+ this.code = ERROR_DICTIONARY.RECONNECTION_NOT_STARTED.CODE;
24
+ }
25
+ }
package/src/constants.ts CHANGED
@@ -100,7 +100,7 @@ export const _JOINED_ = 'JOINED';
100
100
  export const _LOCUS_ID_ = 'LOCUS_ID';
101
101
  export const _LEFT_ = 'LEFT';
102
102
  export const _MOVED_ = 'MOVED';
103
-
103
+ export const _ON_HOLD_LOBBY_ = 'ON_HOLD_LOBBY';
104
104
  export const _MEETING_LINK_ = 'MEETING_LINK';
105
105
  export const _MEETING_UUID_ = 'MEETING_UUID';
106
106
  export const _MEETING_ = 'MEETING';
@@ -380,7 +380,7 @@ export const EVENT_TRIGGERS = {
380
380
  MEETING_TRANSCRIPTION_CONNECTED: 'meeting:transcription:connected',
381
381
  MEETING_STARTED_RECEIVING_TRANSCRIPTION: 'meeting:receiveTranscription:started',
382
382
  MEETING_STOPPED_RECEIVING_TRANSCRIPTION: 'meeting:receiveTranscription:stopped',
383
-
383
+ MEETING_MANUAL_CAPTION_UPDATED: 'meeting:manualCaptionControl:updated',
384
384
  MEETING_CAPTION_RECEIVED: 'meeting:caption-received',
385
385
  };
386
386
 
@@ -535,6 +535,12 @@ export const ERROR_DICTIONARY = {
535
535
  'Participant Having Host Role Already. Participant who sends request to reclaim host role has already a host role.',
536
536
  CODE: 14,
537
537
  },
538
+ RECONNECTION_NOT_STARTED: {
539
+ NAME: 'ReconnectionNotStartedError',
540
+ MESSAGE:
541
+ 'Reconnection was not started, because there is one already in progress or reconnections are disabled in config.',
542
+ CODE: 15,
543
+ },
538
544
  };
539
545
 
540
546
  export const FLOOR_ACTION = {
@@ -671,6 +677,7 @@ export const LOCUSINFO = {
671
677
  CONTROLS_MEETING_LAYOUT_UPDATED: 'CONTROLS_MEETING_LAYOUT_UPDATED',
672
678
  CONTROLS_RECORDING_UPDATED: 'CONTROLS_RECORDING_UPDATED',
673
679
  CONTROLS_MEETING_TRANSCRIBE_UPDATED: 'CONTROLS_MEETING_TRANSCRIBE_UPDATED',
680
+ CONTROLS_MEETING_MANUAL_CAPTION_UPDATED: 'CONTROLS_MEETING_MANUAL_CAPTION_UPDATED',
674
681
  CONTROLS_MEETING_BREAKOUT_UPDATED: 'CONTROLS_MEETING_BREAKOUT_UPDATED',
675
682
  CONTROLS_MEETING_CONTAINER_UPDATED: 'CONTROLS_MEETING_CONTAINER_UPDATED',
676
683
  CONTROLS_MEETING_INTERPRETATION_UPDATED: 'CONTROLS_MEETING_INTERPRETATION_UPDATED',
@@ -909,6 +916,9 @@ export const DISPLAY_HINTS = {
909
916
  LEAVE_END_MEETING: 'LEAVE_END_MEETING',
910
917
  CAPTION_START: 'CAPTION_START',
911
918
  CAPTION_STATUS_ACTIVE: 'CAPTION_STATUS_ACTIVE',
919
+ MANUAL_CAPTION_START: 'MANUAL_CAPTION_START',
920
+ MANUAL_CAPTION_STOP: 'MANUAL_CAPTION_STOP',
921
+ MANUAL_CAPTION_STATUS_ACTIVE: 'MANUAL_CAPTION_STATUS_ACTIVE',
912
922
  DISPLAY_REAL_TIME_TRANSLATION: 'DISPLAY_REAL_TIME_TRANSLATION',
913
923
  ENABLE_CAPTION_PANEL: 'ENABLE_CAPTION_PANEL',
914
924
  DISPLAY_NON_ENGLISH_ASR: 'DISPLAY_NON_ENGLISH_ASR',
@@ -1043,9 +1053,7 @@ export const PEER_CONNECTION_STATE = {
1043
1053
  export const RECONNECTION = {
1044
1054
  STATE: {
1045
1055
  IN_PROGRESS: 'IN_PROGRESS',
1046
- COMPLETE: 'COMPLETE',
1047
1056
  FAILURE: 'FAILURE',
1048
- DEFAULT_TRY_COUNT: 0,
1049
1057
  DEFAULT_STATUS: '',
1050
1058
  },
1051
1059
  } as const;
package/src/index.ts CHANGED
@@ -4,6 +4,19 @@ import {registerPlugin} from '@webex/webex-core';
4
4
  import Meetings from './meetings';
5
5
  import config from './config';
6
6
  import {LocusRetryStatusInterceptor} from './interceptors';
7
+ import CaptchaError from './common/errors/captcha-error';
8
+ import IntentToJoinError from './common/errors/intent-to-join';
9
+ import PasswordError from './common/errors/password-error';
10
+ import PermissionError from './common/errors/permission';
11
+ import {
12
+ ReclaimHostEmptyWrongKeyError,
13
+ ReclaimHostIsHostAlreadyError,
14
+ ReclaimHostNotAllowedError,
15
+ ReclaimHostNotSupportedError,
16
+ } from './common/errors/reclaim-host-role-errors';
17
+ import Meeting from './meeting';
18
+ import MeetingInfoUtil from './meeting-info/utilv2';
19
+ import JoinMeetingError from './common/errors/join-meeting';
7
20
 
8
21
  registerPlugin('meetings', Meetings, {
9
22
  config,
@@ -39,6 +52,23 @@ export default Meetings;
39
52
 
40
53
  export * as CONSTANTS from './constants';
41
54
  export * as REACTIONS from './reactions/reactions';
55
+ export * as sdkAnnotationTypes from './annotation/annotation.types';
56
+ export * as MeetingInfoV2 from './meeting-info/meeting-info-v2';
57
+ export {type Reaction} from './reactions/reactions.type';
58
+
59
+ export {
60
+ CaptchaError,
61
+ IntentToJoinError,
62
+ JoinMeetingError,
63
+ PasswordError,
64
+ PermissionError,
65
+ ReclaimHostIsHostAlreadyError,
66
+ ReclaimHostNotAllowedError,
67
+ ReclaimHostNotSupportedError,
68
+ ReclaimHostEmptyWrongKeyError,
69
+ Meeting,
70
+ MeetingInfoUtil,
71
+ };
42
72
 
43
73
  export {RemoteMedia} from './multistream/remoteMedia';
44
74
 
@@ -43,6 +43,12 @@ ControlsUtils.parse = (controls: any) => {
43
43
  };
44
44
  }
45
45
 
46
+ if (controls && controls.manualCaptionControl) {
47
+ parsedControls.manualCaptionControl = {
48
+ enabled: controls.manualCaptionControl.enabled,
49
+ };
50
+ }
51
+
46
52
  if (controls && controls.entryExitTone) {
47
53
  parsedControls.entryExitTone = controls.entryExitTone.enabled
48
54
  ? controls.entryExitTone.mode
@@ -143,6 +149,11 @@ ControlsUtils.getControls = (oldControls: any, newControls: any) => {
143
149
  !isEqual(previous?.transcribe?.transcribing, current?.transcribe?.transcribing) && // upon first join, previous?.record?.recording = undefined; thus, never going to be equal and will always return true
144
150
  (previous?.transcribe?.transcribing || current?.transcribe?.transcribing), // therefore, condition added to prevent false firings of #meeting:recording:stopped upon first joining a meeting
145
151
 
152
+ hasManualCaptionChanged:
153
+ current?.manualCaptionControl &&
154
+ !isEqual(previous?.manualCaptionControl?.enabled, current?.manualCaptionControl?.enabled) &&
155
+ (previous?.manualCaptionControl?.enabled || current?.manualCaptionControl?.enabled),
156
+
146
157
  hasEntryExitToneChanged: !!(
147
158
  newControls.entryExitTone &&
148
159
  !isEqual(previous?.entryExitTone, current?.entryExitTone) &&
@@ -792,6 +792,7 @@ export default class LocusInfo extends EventsScope {
792
792
  hasRecordingPausedChanged,
793
793
  hasMeetingContainerChanged,
794
794
  hasTranscribeChanged,
795
+ hasManualCaptionChanged,
795
796
  hasEntryExitToneChanged,
796
797
  hasBreakoutChanged,
797
798
  hasVideoEnabledChanged,
@@ -923,6 +924,21 @@ export default class LocusInfo extends EventsScope {
923
924
  );
924
925
  }
925
926
 
927
+ if (hasManualCaptionChanged) {
928
+ const {enabled} = current.manualCaptionControl;
929
+
930
+ this.emitScoped(
931
+ {
932
+ file: 'locus-info',
933
+ function: 'updateControls',
934
+ },
935
+ LOCUSINFO.EVENTS.CONTROLS_MEETING_MANUAL_CAPTION_UPDATED,
936
+ {
937
+ enabled,
938
+ }
939
+ );
940
+ }
941
+
926
942
  if (hasBreakoutChanged) {
927
943
  const {breakout} = current;
928
944
  breakout.breakoutMoveId = SelfUtils.getReplacedBreakoutMoveId(
@@ -1,3 +1,4 @@
1
+ /* eslint-disable class-methods-use-this */
1
2
  import {
2
3
  LocalCameraStream,
3
4
  LocalMicrophoneStream,
@@ -182,25 +183,45 @@ export default class MediaProperties {
182
183
  }
183
184
 
184
185
  /**
185
- * Returns the type of a connection that has been established
186
+ * Returns ICE transport information:
187
+ * - selectedCandidatePairChanges - number of times the selected candidate pair was changed, it should be at least 1 for successful connections
188
+ * it will be -1 if browser doesn't supply this information
189
+ * - numTransports - number of transports (should be 1 if we're using bundle)
186
190
  *
187
- * @returns {Promise<'UDP' | 'TCP' | 'TURN-TLS' | 'TURN-TCP' | 'TURN-UDP' | 'unknown'>}
191
+ * @param {Array<any>} allStatsReports array of RTC stats reports
192
+ * @returns {Object}
188
193
  */
189
- async getCurrentConnectionType() {
190
- // we can only get the connection type after ICE connection has been established
191
- await this.waitForMediaConnectionConnected();
192
-
193
- const allStatsReports = [];
194
+ private getTransportInfo(allStatsReports: any[]): {
195
+ selectedCandidatePairChanges: number;
196
+ numTransports: number;
197
+ } {
198
+ const transports = allStatsReports.filter((report) => report.type === 'transport');
194
199
 
195
- try {
196
- const statsResult = await this.webrtcMediaConnection.getStats();
197
- statsResult.forEach((report) => allStatsReports.push(report));
198
- } catch (error) {
200
+ if (transports.length > 1) {
199
201
  LoggerProxy.logger.warn(
200
- `Media:properties#getCurrentConnectionType --> getStats() failed: ${error}`
202
+ `Media:properties#getSelectedCandidatePairChanges --> found more than 1 transport: ${transports.length}`
201
203
  );
202
204
  }
203
205
 
206
+ return {
207
+ selectedCandidatePairChanges:
208
+ transports.length > 0 && transports[0].selectedCandidatePairChanges !== undefined
209
+ ? transports[0].selectedCandidatePairChanges
210
+ : -1,
211
+ numTransports: transports.length,
212
+ };
213
+ }
214
+
215
+ /**
216
+ * Returns the type of a connection that has been established
217
+ * It should be 'UDP' | 'TCP' | 'TURN-TLS' | 'TURN-TCP' | 'TURN-UDP' | 'unknown'
218
+ *
219
+ * If connection was not established, it returns 'unknown'
220
+ *
221
+ * @param {Array<any>} allStatsReports array of RTC stats reports
222
+ * @returns {string}
223
+ */
224
+ private getConnectionType(allStatsReports: any[]) {
204
225
  const successfulCandidatePairs = allStatsReports.filter(
205
226
  (report) => report.type === 'candidate-pair' && report.state?.toLowerCase() === 'succeeded'
206
227
  );
@@ -215,7 +236,7 @@ export default class MediaProperties {
215
236
 
216
237
  if (localCandidate === undefined) {
217
238
  LoggerProxy.logger.warn(
218
- `Media:properties#getCurrentConnectionType --> failed to find local candidate "${pair.localCandidateId}" in getStats() results`
239
+ `Media:properties#getConnectionType --> failed to find local candidate "${pair.localCandidateId}" in getStats() results`
219
240
  );
220
241
 
221
242
  return false;
@@ -235,7 +256,7 @@ export default class MediaProperties {
235
256
  return true;
236
257
  }
237
258
  LoggerProxy.logger.warn(
238
- `Media:properties#getCurrentConnectionType --> missing localCandidate.protocol, candidateType=${localCandidate.candidateType}`
259
+ `Media:properties#getConnectionType --> missing localCandidate.protocol, candidateType=${localCandidate.candidateType}`
239
260
  );
240
261
 
241
262
  return false;
@@ -247,7 +268,7 @@ export default class MediaProperties {
247
268
  .map((report) => report.state);
248
269
 
249
270
  LoggerProxy.logger.warn(
250
- `Media:properties#getCurrentConnectionType --> all candidate pair states: ${JSON.stringify(
271
+ `Media:properties#getConnectionType --> all candidate pair states: ${JSON.stringify(
251
272
  candidatePairStates
252
273
  )}`
253
274
  );
@@ -255,4 +276,35 @@ export default class MediaProperties {
255
276
 
256
277
  return foundConnectionType;
257
278
  }
279
+
280
+ /**
281
+ * Returns information about current webrtc media connection
282
+ *
283
+ * @returns {Promise<Object>}
284
+ */
285
+ async getCurrentConnectionInfo(): Promise<{
286
+ connectionType: string;
287
+ selectedCandidatePairChanges: number;
288
+ numTransports: number;
289
+ }> {
290
+ const allStatsReports = [];
291
+
292
+ try {
293
+ const statsResult = await this.webrtcMediaConnection.getStats();
294
+ statsResult.forEach((report) => allStatsReports.push(report));
295
+ } catch (error) {
296
+ LoggerProxy.logger.warn(
297
+ `Media:properties#getCurrentConnectionInfo --> getStats() failed: ${error}`
298
+ );
299
+ }
300
+
301
+ const connectionType = this.getConnectionType(allStatsReports);
302
+ const {selectedCandidatePairChanges, numTransports} = this.getTransportInfo(allStatsReports);
303
+
304
+ return {
305
+ connectionType,
306
+ selectedCandidatePairChanges,
307
+ numTransports,
308
+ };
309
+ }
258
310
  }
@@ -34,6 +34,9 @@ interface IInMeetingActions {
34
34
  canStartTranscribing?: boolean;
35
35
  canStopTranscribing?: boolean;
36
36
  isClosedCaptionActive?: boolean;
37
+ canStartManualCaption?: boolean;
38
+ canStopManualCaption?: boolean;
39
+ isManualCaptionActive?: boolean;
37
40
  isSaveTranscriptsEnabled?: boolean;
38
41
  isWebexAssistantActive?: boolean;
39
42
  canViewCaptionPanel?: boolean;
@@ -137,6 +140,12 @@ export default class InMeetingActions implements IInMeetingActions {
137
140
 
138
141
  isClosedCaptionActive = null;
139
142
 
143
+ canStartManualCaption = null;
144
+
145
+ canStopManualCaption = null;
146
+
147
+ isManualCaptionActive = null;
148
+
140
149
  isSaveTranscriptsEnabled = null;
141
150
 
142
151
  isWebexAssistantActive = null;
@@ -257,6 +266,9 @@ export default class InMeetingActions implements IInMeetingActions {
257
266
  canStartTranscribing: this.canStartTranscribing,
258
267
  canStopTranscribing: this.canStopTranscribing,
259
268
  isClosedCaptionActive: this.isClosedCaptionActive,
269
+ canStartManualCaption: this.canStartManualCaption,
270
+ canStopManualCaption: this.canStopManualCaption,
271
+ isManualCaptionActive: this.isManualCaptionActive,
260
272
  isSaveTranscriptsEnabled: this.isSaveTranscriptsEnabled,
261
273
  isWebexAssistantActive: this.isWebexAssistantActive,
262
274
  canViewCaptionPanel: this.canViewCaptionPanel,