@webex/plugin-meetings 3.7.0-wxcc.1 → 3.8.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 (220) hide show
  1. package/dist/annotation/annotation.types.d.ts +42 -0
  2. package/dist/annotation/constants.d.ts +31 -0
  3. package/dist/annotation/index.d.ts +117 -0
  4. package/dist/breakouts/breakout.d.ts +8 -0
  5. package/dist/breakouts/breakout.js +1 -1
  6. package/dist/breakouts/collection.d.ts +5 -0
  7. package/dist/breakouts/edit-lock-error.d.ts +15 -0
  8. package/dist/breakouts/events.d.ts +8 -0
  9. package/dist/breakouts/index.d.ts +5 -0
  10. package/dist/breakouts/index.js +1 -1
  11. package/dist/breakouts/request.d.ts +22 -0
  12. package/dist/breakouts/utils.d.ts +15 -0
  13. package/dist/common/browser-detection.d.ts +9 -0
  14. package/dist/common/collection.d.ts +48 -0
  15. package/dist/common/config.d.ts +2 -0
  16. package/dist/common/errors/captcha-error.d.ts +15 -0
  17. package/dist/common/errors/intent-to-join.d.ts +16 -0
  18. package/dist/common/errors/join-meeting.d.ts +17 -0
  19. package/dist/common/errors/media.d.ts +15 -0
  20. package/dist/common/errors/no-meeting-info.d.ts +14 -0
  21. package/dist/common/errors/parameter.d.ts +15 -0
  22. package/dist/common/errors/password-error.d.ts +15 -0
  23. package/dist/common/errors/permission.d.ts +14 -0
  24. package/dist/common/errors/reclaim-host-role-error.js +149 -0
  25. package/dist/common/errors/reclaim-host-role-error.js.map +1 -0
  26. package/dist/common/errors/reclaim-host-role-errors.d.ts +60 -0
  27. package/dist/common/errors/reconnection-in-progress.d.ts +9 -0
  28. package/dist/common/errors/reconnection-in-progress.js +33 -0
  29. package/dist/common/errors/reconnection-in-progress.js.map +1 -0
  30. package/dist/common/errors/reconnection.d.ts +15 -0
  31. package/dist/common/errors/stats.d.ts +15 -0
  32. package/dist/common/errors/webex-errors.d.ts +93 -0
  33. package/dist/common/errors/webex-meetings-error.d.ts +20 -0
  34. package/dist/common/events/events-scope.d.ts +17 -0
  35. package/dist/common/events/events.d.ts +12 -0
  36. package/dist/common/events/trigger-proxy.d.ts +2 -0
  37. package/dist/common/events/util.d.ts +2 -0
  38. package/dist/common/logs/logger-config.d.ts +2 -0
  39. package/dist/common/logs/logger-proxy.d.ts +2 -0
  40. package/dist/common/logs/request.d.ts +36 -0
  41. package/dist/common/queue.d.ts +34 -0
  42. package/dist/config.d.ts +72 -0
  43. package/dist/constants.d.ts +1088 -0
  44. package/dist/constants.js +15 -3
  45. package/dist/constants.js.map +1 -1
  46. package/dist/controls-options-manager/constants.d.ts +4 -0
  47. package/dist/controls-options-manager/enums.d.ts +15 -0
  48. package/dist/controls-options-manager/index.d.ts +136 -0
  49. package/dist/controls-options-manager/types.d.ts +43 -0
  50. package/dist/controls-options-manager/util.d.ts +1 -0
  51. package/dist/index.d.ts +7 -0
  52. package/dist/interceptors/index.d.ts +2 -0
  53. package/dist/interceptors/locusRetry.d.ts +27 -0
  54. package/dist/interpretation/collection.d.ts +5 -0
  55. package/dist/interpretation/index.d.ts +5 -0
  56. package/dist/interpretation/index.js +1 -1
  57. package/dist/interpretation/siLanguage.d.ts +5 -0
  58. package/dist/interpretation/siLanguage.js +1 -1
  59. package/dist/locus-info/controlsUtils.d.ts +2 -0
  60. package/dist/locus-info/embeddedAppsUtils.d.ts +2 -0
  61. package/dist/locus-info/fullState.d.ts +2 -0
  62. package/dist/locus-info/hostUtils.d.ts +2 -0
  63. package/dist/locus-info/index.d.ts +322 -0
  64. package/dist/locus-info/infoUtils.d.ts +2 -0
  65. package/dist/locus-info/mediaSharesUtils.d.ts +2 -0
  66. package/dist/locus-info/parser.d.ts +272 -0
  67. package/dist/locus-info/selfUtils.d.ts +2 -0
  68. package/dist/locus-info/selfUtils.js +5 -0
  69. package/dist/locus-info/selfUtils.js.map +1 -1
  70. package/dist/media/MediaConnectionAwaiter.js +1 -0
  71. package/dist/media/MediaConnectionAwaiter.js.map +1 -1
  72. package/dist/media/index.d.ts +34 -0
  73. package/dist/media/properties.d.ts +93 -0
  74. package/dist/media/properties.js +30 -16
  75. package/dist/media/properties.js.map +1 -1
  76. package/dist/media/util.d.ts +2 -0
  77. package/dist/mediaQualityMetrics/config.d.ts +241 -0
  78. package/dist/mediaQualityMetrics/config.js +502 -0
  79. package/dist/mediaQualityMetrics/config.js.map +1 -0
  80. package/dist/meeting/brbState.js +167 -0
  81. package/dist/meeting/brbState.js.map +1 -0
  82. package/dist/meeting/effectsState.js +260 -0
  83. package/dist/meeting/effectsState.js.map +1 -0
  84. package/dist/meeting/in-meeting-actions.d.ts +167 -0
  85. package/dist/meeting/index.d.ts +1825 -0
  86. package/dist/meeting/index.js +363 -295
  87. package/dist/meeting/index.js.map +1 -1
  88. package/dist/meeting/locusMediaRequest.d.ts +74 -0
  89. package/dist/meeting/muteState.d.ts +178 -0
  90. package/dist/meeting/muteState.js +1 -6
  91. package/dist/meeting/muteState.js.map +1 -1
  92. package/dist/meeting/request.d.ts +295 -0
  93. package/dist/meeting/request.type.d.ts +11 -0
  94. package/dist/meeting/state.d.ts +9 -0
  95. package/dist/meeting/util.d.ts +119 -0
  96. package/dist/meeting/voicea-meeting.d.ts +16 -0
  97. package/dist/meeting-info/collection.d.ts +20 -0
  98. package/dist/meeting-info/index.d.ts +69 -0
  99. package/dist/meeting-info/meeting-info-v2.d.ts +123 -0
  100. package/dist/meeting-info/meeting-info-v2.js +19 -12
  101. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  102. package/dist/meeting-info/request.d.ts +22 -0
  103. package/dist/meeting-info/util.d.ts +2 -0
  104. package/dist/meeting-info/utilv2.d.ts +2 -0
  105. package/dist/meeting-info/utilv2.js +5 -1
  106. package/dist/meeting-info/utilv2.js.map +1 -1
  107. package/dist/meetings/collection.d.ts +40 -0
  108. package/dist/meetings/index.d.ts +390 -0
  109. package/dist/meetings/meetings.types.d.ts +4 -0
  110. package/dist/meetings/request.d.ts +27 -0
  111. package/dist/meetings/util.d.ts +18 -0
  112. package/dist/member/index.d.ts +160 -0
  113. package/dist/member/member.types.js +17 -0
  114. package/dist/member/member.types.js.map +1 -0
  115. package/dist/member/types.d.ts +32 -0
  116. package/dist/member/util.d.ts +2 -0
  117. package/dist/members/collection.d.ts +29 -0
  118. package/dist/members/index.d.ts +353 -0
  119. package/dist/members/request.d.ts +114 -0
  120. package/dist/members/types.d.ts +25 -0
  121. package/dist/members/util.d.ts +215 -0
  122. package/dist/metrics/config.js +276 -0
  123. package/dist/metrics/config.js.map +1 -0
  124. package/dist/metrics/constants.d.ts +70 -0
  125. package/dist/metrics/constants.js +2 -0
  126. package/dist/metrics/constants.js.map +1 -1
  127. package/dist/metrics/index.d.ts +45 -0
  128. package/dist/multistream/mediaRequestManager.d.ts +119 -0
  129. package/dist/multistream/receiveSlot.d.ts +68 -0
  130. package/dist/multistream/receiveSlotManager.d.ts +56 -0
  131. package/dist/multistream/remoteMedia.d.ts +72 -0
  132. package/dist/multistream/remoteMediaGroup.d.ts +49 -0
  133. package/dist/multistream/remoteMediaManager.d.ts +300 -0
  134. package/dist/multistream/sendSlotManager.d.ts +69 -0
  135. package/dist/networkQualityMonitor/index.d.ts +70 -0
  136. package/dist/networkQualityMonitor/index.js +221 -0
  137. package/dist/networkQualityMonitor/index.js.map +1 -0
  138. package/dist/peer-connection-manager/index.js +671 -0
  139. package/dist/peer-connection-manager/index.js.map +1 -0
  140. package/dist/peer-connection-manager/util.js +109 -0
  141. package/dist/peer-connection-manager/util.js.map +1 -0
  142. package/dist/personal-meeting-room/index.d.ts +47 -0
  143. package/dist/personal-meeting-room/request.d.ts +14 -0
  144. package/dist/personal-meeting-room/util.d.ts +2 -0
  145. package/dist/reachability/clusterReachability.d.ts +109 -0
  146. package/dist/reachability/index.d.ts +105 -0
  147. package/dist/reachability/index.js +31 -3
  148. package/dist/reachability/index.js.map +1 -1
  149. package/dist/reachability/request.d.ts +39 -0
  150. package/dist/reachability/util.d.ts +8 -0
  151. package/dist/reactions/constants.d.ts +3 -0
  152. package/dist/reactions/reactions.d.ts +4 -0
  153. package/dist/reactions/reactions.type.d.ts +52 -0
  154. package/dist/reconnection-manager/index.d.ts +136 -0
  155. package/dist/recording-controller/enums.d.ts +7 -0
  156. package/dist/recording-controller/index.d.ts +207 -0
  157. package/dist/recording-controller/util.d.ts +14 -0
  158. package/dist/roap/collection.js +62 -0
  159. package/dist/roap/collection.js.map +1 -0
  160. package/dist/roap/handler.js +275 -0
  161. package/dist/roap/handler.js.map +1 -0
  162. package/dist/roap/index.d.ts +86 -0
  163. package/dist/roap/request.d.ts +39 -0
  164. package/dist/roap/state.js +126 -0
  165. package/dist/roap/state.js.map +1 -0
  166. package/dist/roap/turnDiscovery.d.ts +155 -0
  167. package/dist/roap/util.js +75 -0
  168. package/dist/roap/util.js.map +1 -0
  169. package/dist/rtcMetrics/constants.d.ts +4 -0
  170. package/dist/rtcMetrics/constants.js +11 -0
  171. package/dist/rtcMetrics/constants.js.map +1 -0
  172. package/dist/rtcMetrics/index.d.ts +61 -0
  173. package/dist/rtcMetrics/index.js +197 -0
  174. package/dist/rtcMetrics/index.js.map +1 -0
  175. package/dist/statsAnalyzer/global.d.ts +36 -0
  176. package/dist/statsAnalyzer/global.js +126 -0
  177. package/dist/statsAnalyzer/global.js.map +1 -0
  178. package/dist/statsAnalyzer/index.d.ts +217 -0
  179. package/dist/statsAnalyzer/index.js +1013 -0
  180. package/dist/statsAnalyzer/index.js.map +1 -0
  181. package/dist/statsAnalyzer/mqaUtil.d.ts +48 -0
  182. package/dist/statsAnalyzer/mqaUtil.js +179 -0
  183. package/dist/statsAnalyzer/mqaUtil.js.map +1 -0
  184. package/dist/transcription/index.d.ts +64 -0
  185. package/dist/types/common/errors/reconnection-in-progress.d.ts +9 -0
  186. package/dist/types/constants.d.ts +9 -2
  187. package/dist/types/mediaQualityMetrics/config.d.ts +241 -0
  188. package/dist/types/meeting/brbState.d.ts +54 -0
  189. package/dist/types/meeting/index.d.ts +23 -0
  190. package/dist/types/meeting-info/meeting-info-v2.d.ts +3 -1
  191. package/dist/types/metrics/constants.d.ts +2 -0
  192. package/dist/types/networkQualityMonitor/index.d.ts +70 -0
  193. package/dist/types/reachability/index.d.ts +9 -1
  194. package/dist/types/rtcMetrics/constants.d.ts +4 -0
  195. package/dist/types/rtcMetrics/index.d.ts +71 -0
  196. package/dist/types/statsAnalyzer/global.d.ts +36 -0
  197. package/dist/types/statsAnalyzer/index.d.ts +217 -0
  198. package/dist/types/statsAnalyzer/mqaUtil.d.ts +48 -0
  199. package/dist/webinar/collection.d.ts +16 -0
  200. package/dist/webinar/index.d.ts +5 -0
  201. package/dist/webinar/index.js +1 -1
  202. package/package.json +23 -23
  203. package/src/constants.ts +10 -2
  204. package/src/locus-info/selfUtils.ts +5 -0
  205. package/src/media/MediaConnectionAwaiter.ts +2 -0
  206. package/src/media/properties.ts +34 -13
  207. package/src/meeting/brbState.ts +169 -0
  208. package/src/meeting/index.ts +112 -26
  209. package/src/meeting/muteState.ts +1 -6
  210. package/src/meeting-info/meeting-info-v2.ts +9 -1
  211. package/src/meeting-info/utilv2.ts +14 -2
  212. package/src/metrics/constants.ts +2 -0
  213. package/src/reachability/index.ts +29 -1
  214. package/test/unit/spec/locus-info/selfUtils.js +10 -0
  215. package/test/unit/spec/media/properties.ts +15 -0
  216. package/test/unit/spec/meeting/brbState.ts +114 -0
  217. package/test/unit/spec/meeting/index.js +92 -30
  218. package/test/unit/spec/meeting/muteState.js +0 -24
  219. package/test/unit/spec/meeting-info/utilv2.js +9 -0
  220. package/test/unit/spec/reachability/index.ts +120 -10
@@ -0,0 +1,217 @@
1
+ /// <reference types="node" />
2
+ import EventsScope from '../common/events/events-scope';
3
+ import { ReceiveSlot } from '../multistream/receiveSlot';
4
+ export declare const EVENTS: {
5
+ MEDIA_QUALITY: string;
6
+ LOCAL_MEDIA_STARTED: string;
7
+ LOCAL_MEDIA_STOPPED: string;
8
+ REMOTE_MEDIA_STARTED: string;
9
+ REMOTE_MEDIA_STOPPED: string;
10
+ };
11
+ type ReceiveSlotCallback = (csi: number) => ReceiveSlot | undefined;
12
+ type MediaStatus = {
13
+ actual?: any;
14
+ expected?: any;
15
+ };
16
+ /**
17
+ * Stats Analyzer class that will emit events based on detected quality
18
+ *
19
+ * @export
20
+ * @class StatsAnalyzer
21
+ * @extends {EventsScope}
22
+ */
23
+ export declare class StatsAnalyzer extends EventsScope {
24
+ config: any;
25
+ correlationId: any;
26
+ lastEmittedStartStopEvent: any;
27
+ lastMqaDataSent: any;
28
+ lastStatsResults: any;
29
+ meetingMediaStatus: any;
30
+ mqaInterval: NodeJS.Timeout;
31
+ mqaSentCount: any;
32
+ networkQualityMonitor: any;
33
+ mediaConnection: any;
34
+ statsInterval: NodeJS.Timeout;
35
+ statsResults: any;
36
+ statsStarted: any;
37
+ successfulCandidatePair: any;
38
+ localIpAddress: string;
39
+ receiveSlotCallback: ReceiveSlotCallback;
40
+ /**
41
+ * Creates a new instance of StatsAnalyzer
42
+ * @constructor
43
+ * @public
44
+ * @param {Object} config SDK Configuration Object
45
+ * @param {Function} receiveSlotCallback Callback used to access receive slots.
46
+ * @param {Object} networkQualityMonitor class for assessing network characteristics (jitter, packetLoss, latency)
47
+ * @param {Object} statsResults Default properties for stats
48
+ */
49
+ constructor(config: any, receiveSlotCallback?: ReceiveSlotCallback, networkQualityMonitor?: object, statsResults?: object);
50
+ /**
51
+ * Resets cumulative stats arrays.
52
+ *
53
+ * @public
54
+ * @memberof StatsAnalyzer
55
+ * @returns {void}
56
+ */
57
+ resetStatsResults(): void;
58
+ /**
59
+ * sets mediaStatus status for analyzing metrics
60
+ *
61
+ * @public
62
+ * @param {Object} status for the audio and video
63
+ * @memberof StatsAnalyzer
64
+ * @returns {void}
65
+ */
66
+ updateMediaStatus(status: MediaStatus): void;
67
+ /**
68
+ * captures MQA data from media connection
69
+ *
70
+ * @public
71
+ * @memberof StatsAnalyzer
72
+ * @returns {void}
73
+ */
74
+ sendMqaData(): void;
75
+ /**
76
+ * updated the media connection when changed
77
+ *
78
+ * @private
79
+ * @memberof StatsAnalyzer
80
+ * @param {RoapMediaConnection} mediaConnection
81
+ * @returns {void}
82
+ */
83
+ updateMediaConnection(mediaConnection: any): void;
84
+ /**
85
+ * Returns the local IP address for diagnostics.
86
+ * this is the local IP of the interface used for the current media connection
87
+ * a host can have many local Ip Addresses
88
+ * @returns {string | undefined} The local IP address.
89
+ */
90
+ getLocalIpAddress(): string;
91
+ /**
92
+ * Starts the stats analyzer on interval
93
+ *
94
+ * @public
95
+ * @memberof StatsAnalyzer
96
+ * @param {RoapMediaConnection} mediaConnection
97
+ * @returns {Promise}
98
+ */
99
+ startAnalyzer(mediaConnection: any): any;
100
+ /**
101
+ * Cleans up the analyzer when done
102
+ *
103
+ * @public
104
+ * @memberof StatsAnalyzer
105
+ * @returns {void}
106
+ */
107
+ stopAnalyzer(): any;
108
+ /**
109
+ * Parse a single result of get stats
110
+ *
111
+ * @private
112
+ * @param {*} getStatsResult
113
+ * @param {String} type
114
+ * @param {boolean} isSender
115
+ * @returns {void}
116
+ * @memberof StatsAnalyzer
117
+ */
118
+ private parseGetStatsResult;
119
+ /**
120
+ * Filters the get stats results for types
121
+ * @private
122
+ * @param {Array} statsItem
123
+ * @param {String} type
124
+ * @param {boolean} isSender
125
+ * @returns {void}
126
+ */
127
+ filterAndParseGetStatsResults(statsItem: any, type: string, isSender: boolean): void;
128
+ /**
129
+ * parse the audio
130
+ * @param {String} result
131
+ * @param {boolean} type
132
+ * @returns {void}
133
+ */
134
+ parseAudioSource(result: any, type: any): void;
135
+ /**
136
+ * emits started/stopped events for local/remote media by checking
137
+ * if given values are increasing or not. The previousValue, currentValue
138
+ * params can be any numerical value like number of receive packets or
139
+ * decoded frames, etc.
140
+ *
141
+ * @private
142
+ * @param {string} mediaType
143
+ * @param {number} previousValue - value to compare
144
+ * @param {number} currentValue - value to compare (must be same type of value as previousValue)
145
+ * @param {boolean} isLocal - true if stats are for local media being sent out, false for remote media being received
146
+ * @memberof StatsAnalyzer
147
+ * @returns {void}
148
+ */
149
+ emitStartStopEvents: (mediaType: string, previousValue: number, currentValue: number, isLocal: boolean) => void;
150
+ /**
151
+ * compares current and previous stats to check if packets are not sent
152
+ *
153
+ * @private
154
+ * @memberof StatsAnalyzer
155
+ * @returns {void}
156
+ */
157
+ private compareLastStatsResult;
158
+ /**
159
+ * Does a `getStats` on all the transceivers and parses the results
160
+ *
161
+ * @private
162
+ * @memberof StatsAnalyzer
163
+ * @returns {Promise}
164
+ */
165
+ private getStatsAndParse;
166
+ /**
167
+ * Processes OutboundRTP stats result and stores
168
+ * @private
169
+ * @param {*} result
170
+ * @param {*} mediaType
171
+ * @returns {void}
172
+ */
173
+ private processOutboundRTPResult;
174
+ /**
175
+ * Processes InboundRTP stats result and stores
176
+ * @private
177
+ * @param {*} result
178
+ * @param {*} mediaType
179
+ * @returns {void}
180
+ */
181
+ private processInboundRTPResult;
182
+ /**
183
+ * extracts the local Ip address from the statsResult object by looking at stats results candidates
184
+ * and matches that ID with the successful candidate pair. It looks at the type of local candidate it is
185
+ * and then extracts the IP address from the relatedAddress or address property based on conditions known in webrtc
186
+ * note, there are known incompatibilities and it is possible for this to set undefined, or for the IP address to be the public IP address
187
+ * for example, firefox does not set the relayProtocol, and if the user is behind a NAT it might be the public IP
188
+ * @private
189
+ * @param {string} successfulCandidatePairId - The ID of the successful candidate pair.
190
+ * @param {Object} candidates - the stats result candidates
191
+ * @returns {void}
192
+ */
193
+ extractAndSetLocalIpAddressInfoForDiagnostics: (successfulCandidatePairId: string, candidates: {
194
+ [key: string]: Record<string, unknown>;
195
+ }) => void;
196
+ /**
197
+ * Processes remote and local candidate result and stores
198
+ * @private
199
+ * @param {*} result
200
+ * @param {*} type
201
+ * @param {boolean} isSender
202
+ * @param {boolean} isRemote
203
+ *
204
+ * @returns {void}
205
+ */
206
+ parseCandidate: (result: any, type: any, isSender: boolean, isRemote: boolean) => void;
207
+ /**
208
+ *
209
+ * @private
210
+ * @param {*} result
211
+ * @param {*} type
212
+ * @returns {void}
213
+ * @memberof StatsAnalyzer
214
+ */
215
+ compareSentAndReceived(result: any, type: any): void;
216
+ }
217
+ export {};
@@ -0,0 +1,48 @@
1
+ export declare const getAudioReceiverMqa: ({ audioReceiver, statsResults, lastMqaDataSent, baseMediaType, }: {
2
+ audioReceiver: any;
3
+ statsResults: any;
4
+ lastMqaDataSent: any;
5
+ baseMediaType: any;
6
+ }) => void;
7
+ export declare const getAudioReceiverStreamMqa: ({ audioReceiverStream, statsResults, lastMqaDataSent, mediaType, }: {
8
+ audioReceiverStream: any;
9
+ statsResults: any;
10
+ lastMqaDataSent: any;
11
+ mediaType: any;
12
+ }) => void;
13
+ export declare const getAudioSenderMqa: ({ audioSender, statsResults, lastMqaDataSent, baseMediaType }: {
14
+ audioSender: any;
15
+ statsResults: any;
16
+ lastMqaDataSent: any;
17
+ baseMediaType: any;
18
+ }) => void;
19
+ export declare const getAudioSenderStreamMqa: ({ audioSenderStream, statsResults, lastMqaDataSent, mediaType, }: {
20
+ audioSenderStream: any;
21
+ statsResults: any;
22
+ lastMqaDataSent: any;
23
+ mediaType: any;
24
+ }) => void;
25
+ export declare const getVideoReceiverMqa: ({ videoReceiver, statsResults, lastMqaDataSent, baseMediaType, }: {
26
+ videoReceiver: any;
27
+ statsResults: any;
28
+ lastMqaDataSent: any;
29
+ baseMediaType: any;
30
+ }) => void;
31
+ export declare const getVideoReceiverStreamMqa: ({ videoReceiverStream, statsResults, lastMqaDataSent, mediaType, }: {
32
+ videoReceiverStream: any;
33
+ statsResults: any;
34
+ lastMqaDataSent: any;
35
+ mediaType: any;
36
+ }) => void;
37
+ export declare const getVideoSenderMqa: ({ videoSender, statsResults, lastMqaDataSent, baseMediaType }: {
38
+ videoSender: any;
39
+ statsResults: any;
40
+ lastMqaDataSent: any;
41
+ baseMediaType: any;
42
+ }) => void;
43
+ export declare const getVideoSenderStreamMqa: ({ videoSenderStream, statsResults, lastMqaDataSent, mediaType, }: {
44
+ videoSenderStream: any;
45
+ statsResults: any;
46
+ lastMqaDataSent: any;
47
+ mediaType: any;
48
+ }) => void;
@@ -0,0 +1,16 @@
1
+ /*!
2
+ * Copyright (c) 2015-2023 Cisco Systems, Inc. See LICENSE file.
3
+ */
4
+ declare class WebinarCollection {
5
+ webinarInfo: any;
6
+ namespace: string;
7
+ mainIndex: string;
8
+ constructor();
9
+ set(id: any, info: any): void;
10
+ /**
11
+ * @param {String} id
12
+ * @returns {Member}
13
+ */
14
+ get(id: string): any;
15
+ }
16
+ export default WebinarCollection;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @class Webinar
3
+ */
4
+ declare const Webinar: any;
5
+ export default Webinar;
@@ -458,7 +458,7 @@ var Webinar = _webexCore.WebexPlugin.extend({
458
458
  }, _callee7);
459
459
  }))();
460
460
  },
461
- version: "3.7.0-wxcc.1"
461
+ version: "3.8.0"
462
462
  });
463
463
  var _default = exports.default = Webinar;
464
464
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -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.7.0-wxcc.1",
47
- "@webex/plugin-rooms": "3.7.0-wxcc.1",
48
- "@webex/test-helper-chai": "3.7.0-wxcc.1",
49
- "@webex/test-helper-mocha": "3.7.0-wxcc.1",
50
- "@webex/test-helper-mock-webex": "3.7.0-wxcc.1",
51
- "@webex/test-helper-retry": "3.7.0-wxcc.1",
52
- "@webex/test-helper-test-users": "3.7.0-wxcc.1",
46
+ "@webex/plugin-meetings": "3.8.0",
47
+ "@webex/plugin-rooms": "3.8.0",
48
+ "@webex/test-helper-chai": "3.8.0",
49
+ "@webex/test-helper-mocha": "3.8.0",
50
+ "@webex/test-helper-mock-webex": "3.8.0",
51
+ "@webex/test-helper-retry": "3.8.0",
52
+ "@webex/test-helper-test-users": "3.8.0",
53
53
  "chai": "^4.3.4",
54
54
  "chai-as-promised": "^7.1.1",
55
55
  "eslint": "^8.24.0",
@@ -61,22 +61,22 @@
61
61
  "typescript": "^4.7.4"
62
62
  },
63
63
  "dependencies": {
64
- "@webex/common": "3.7.0-wxcc.1",
65
- "@webex/event-dictionary-ts": "^1.0.1643",
66
- "@webex/internal-media-core": "2.14.2",
67
- "@webex/internal-plugin-conversation": "3.7.0-wxcc.1",
68
- "@webex/internal-plugin-device": "3.7.0-wxcc.1",
69
- "@webex/internal-plugin-llm": "3.7.0-wxcc.1",
70
- "@webex/internal-plugin-mercury": "3.7.0-wxcc.1",
71
- "@webex/internal-plugin-metrics": "3.7.0-wxcc.1",
72
- "@webex/internal-plugin-support": "3.7.0-wxcc.1",
73
- "@webex/internal-plugin-user": "3.7.0-wxcc.1",
74
- "@webex/internal-plugin-voicea": "3.7.0-wxcc.1",
75
- "@webex/media-helpers": "3.7.0-wxcc.1",
76
- "@webex/plugin-people": "3.7.0-wxcc.1",
77
- "@webex/plugin-rooms": "3.7.0-wxcc.1",
64
+ "@webex/common": "3.8.0",
65
+ "@webex/event-dictionary-ts": "^1.0.1688",
66
+ "@webex/internal-media-core": "2.14.4",
67
+ "@webex/internal-plugin-conversation": "3.8.0",
68
+ "@webex/internal-plugin-device": "3.8.0",
69
+ "@webex/internal-plugin-llm": "3.8.0",
70
+ "@webex/internal-plugin-mercury": "3.8.0",
71
+ "@webex/internal-plugin-metrics": "3.8.0",
72
+ "@webex/internal-plugin-support": "3.8.0",
73
+ "@webex/internal-plugin-user": "3.8.0",
74
+ "@webex/internal-plugin-voicea": "3.8.0",
75
+ "@webex/media-helpers": "3.8.0",
76
+ "@webex/plugin-people": "3.8.0",
77
+ "@webex/plugin-rooms": "3.8.0",
78
78
  "@webex/web-capabilities": "^1.4.0",
79
- "@webex/webex-core": "3.7.0-wxcc.1",
79
+ "@webex/webex-core": "3.8.0",
80
80
  "ampersand-collection": "^2.0.2",
81
81
  "bowser": "^2.11.0",
82
82
  "btoa": "^1.2.1",
@@ -92,5 +92,5 @@
92
92
  "//": [
93
93
  "TODO: upgrade jwt-decode when moving to node 18"
94
94
  ],
95
- "version": "3.7.0-wxcc.1"
95
+ "version": "3.8.0"
96
96
  }
package/src/constants.ts CHANGED
@@ -202,7 +202,7 @@ export const RETRY_TIMEOUT = 3000;
202
202
  export const ICE_AND_DTLS_CONNECTION_TIMEOUT = 20000;
203
203
  export const ROAP_OFFER_ANSWER_EXCHANGE_TIMEOUT = 35000;
204
204
  export const WEBINAR_ERROR_WEBCAST = [403026];
205
- export const WEBINAR_ERROR_REGISTRATIONID = [403037, 403137];
205
+ export const WEBINAR_ERROR_REGISTRATION_ID = [403037, 403137];
206
206
  export const JOIN_BEFORE_HOST = 403003;
207
207
 
208
208
  // ******************** REGEX **********************
@@ -1331,14 +1331,22 @@ export const PASSWORD_STATUS = {
1331
1331
  VERIFIED: 'VERIFIED', // client has already provided the password and it has been verified, client can proceed to call join()
1332
1332
  };
1333
1333
 
1334
+ export const REGISTRATION_ID_STATUS = {
1335
+ NOT_REQUIRED: 'NOT_REQUIRED', // registrationId is not required to join the meeting
1336
+ REQUIRED: 'REQUIRED', // client needs to provide the registrationId by calling verifyRegistrationId() before calling join()
1337
+ UNKNOWN: 'UNKNOWN', // we are waiting for information from the backend if registrationId is required or not
1338
+ VERIFIED: 'VERIFIED', // client has already provided the registrationId and it has been verified, client can proceed to call join()
1339
+ };
1340
+
1334
1341
  export const MEETING_INFO_FAILURE_REASON = {
1335
1342
  NONE: 'NONE', // meeting info was retrieved succesfully
1336
1343
  WRONG_PASSWORD: 'WRONG_PASSWORD', // meeting requires password and no password or wrong one was provided
1337
1344
  WRONG_CAPTCHA: 'WRONG_CAPTCHA', // wbxappapi requires a captcha code or a wrong captcha code was provided
1345
+ WRONG_REGISTRATION_ID: 'WRONG_REGISTRATION_ID', // meeting requires registrationId and no registrationId or wrong one was provided
1338
1346
  POLICY: 'POLICY', // meeting info request violates some meeting policy
1339
1347
  WEBINAR_REGISTRATION: 'WEBINAR_REGISTRATION', // webinar need registration
1340
1348
  NEED_JOIN_WITH_WEBCAST: 'NEED_JOIN_WITH_WEBCAST', // webinar need using webcast join
1341
- WEBINAR_NEED_REGISTRATIONID: 'WEBINAR_NEED_REGISTRATIONID', // webinar need registrationID
1349
+ WEBINAR_NEED_REGISTRATION_ID: 'WEBINAR_NEED_REGISTRATION_ID', // webinar need registrationID
1342
1350
  NOT_REACH_JBH: 'NOT_REACH_JBH', // Meeting is not allow to access since not reach JBH (join before host) time
1343
1351
  JOIN_FORBIDDEN: 'JOIN_FORBIDDEN', // meeting is not allow join
1344
1352
  OTHER: 'OTHER', // any other error (network, etc)
@@ -441,6 +441,11 @@ SelfUtils.mutedByOthersChanged = (oldSelf, changedSelf) => {
441
441
  return false;
442
442
  }
443
443
 
444
+ // there is no need to trigger user update if no one muted user
445
+ if (changedSelf.selfIdentity === changedSelf.modifiedBy) {
446
+ return false;
447
+ }
448
+
444
449
  return (
445
450
  changedSelf.remoteMuted !== null &&
446
451
  (oldSelf.remoteMuted !== changedSelf.remoteMuted ||
@@ -111,6 +111,8 @@ export default class MediaConnectionAwaiter {
111
111
 
112
112
  this.clearCallbacks();
113
113
 
114
+ LoggerProxy.logger.warn('Media:MediaConnectionAwaiter#connectionStateChange --> Resolving');
115
+
114
116
  this.defer.resolve();
115
117
  }
116
118
 
@@ -287,24 +287,45 @@ export default class MediaProperties {
287
287
  selectedCandidatePairChanges: number;
288
288
  numTransports: number;
289
289
  }> {
290
- const allStatsReports = [];
291
-
292
290
  try {
293
- const statsResult = await this.webrtcMediaConnection.getStats();
294
- statsResult.forEach((report) => allStatsReports.push(report));
291
+ const allStatsReports = [];
292
+
293
+ await new Promise((resolve, reject) => {
294
+ const timeout = setTimeout(() => {
295
+ reject(new Error('timed out'));
296
+ }, 1000);
297
+
298
+ this.webrtcMediaConnection
299
+ .getStats()
300
+ .then((statsResult) => {
301
+ clearTimeout(timeout);
302
+ statsResult.forEach((report) => allStatsReports.push(report));
303
+ resolve(allStatsReports);
304
+ })
305
+ .catch((error) => {
306
+ clearTimeout(timeout);
307
+ reject(error);
308
+ });
309
+ });
310
+
311
+ const connectionType = this.getConnectionType(allStatsReports);
312
+ const {selectedCandidatePairChanges, numTransports} = this.getTransportInfo(allStatsReports);
313
+
314
+ return {
315
+ connectionType,
316
+ selectedCandidatePairChanges,
317
+ numTransports,
318
+ };
295
319
  } catch (error) {
296
320
  LoggerProxy.logger.warn(
297
321
  `Media:properties#getCurrentConnectionInfo --> getStats() failed: ${error}`
298
322
  );
299
- }
300
-
301
- const connectionType = this.getConnectionType(allStatsReports);
302
- const {selectedCandidatePairChanges, numTransports} = this.getTransportInfo(allStatsReports);
303
323
 
304
- return {
305
- connectionType,
306
- selectedCandidatePairChanges,
307
- numTransports,
308
- };
324
+ return {
325
+ connectionType: 'unknown',
326
+ selectedCandidatePairChanges: -1,
327
+ numTransports: 0,
328
+ };
329
+ }
309
330
  }
310
331
  }
@@ -0,0 +1,169 @@
1
+ import {MediaType} from '@webex/internal-media-core';
2
+ import LoggerProxy from '../common/logs/logger-proxy';
3
+ import type Meeting from '.';
4
+ import SendSlotManager from '../multistream/sendSlotManager';
5
+
6
+ export const createBrbState = (meeting: Meeting, enabled: boolean) => {
7
+ LoggerProxy.logger.info(
8
+ `Meeting:brbState#createBrbState: creating BrbState for meeting id ${meeting?.id}`
9
+ );
10
+
11
+ const brbState = new BrbState(meeting, enabled);
12
+
13
+ return brbState;
14
+ };
15
+
16
+ /** The purpose of this class is to manage the local and remote brb state
17
+ * and make sure that the server state always matches the last requested state by the client.
18
+ */
19
+ export class BrbState {
20
+ state: {
21
+ client: {
22
+ enabled: boolean;
23
+ };
24
+ server: {
25
+ enabled: boolean;
26
+ };
27
+ syncToServerInProgress: boolean;
28
+ };
29
+
30
+ meeting: Meeting;
31
+
32
+ /**
33
+ * Constructor
34
+ *
35
+ * @param {Meeting} meeting - the meeting object
36
+ * @param {boolean} enabled - whether the client audio/video is enabled at all
37
+ */
38
+ constructor(meeting: Meeting, enabled: boolean) {
39
+ this.meeting = meeting;
40
+ this.state = {
41
+ client: {
42
+ enabled,
43
+ },
44
+ server: {
45
+ enabled: false,
46
+ },
47
+ syncToServerInProgress: false,
48
+ };
49
+ }
50
+
51
+ /**
52
+ * Enables/disables brb
53
+ *
54
+ * @param {boolean} enabled
55
+ * @param {SendSlotManager} sendSlotManager
56
+ * @returns {Promise}
57
+ */
58
+ public enable(enabled: boolean, sendSlotManager: SendSlotManager) {
59
+ this.state.client.enabled = enabled;
60
+
61
+ return this.applyClientStateToServer(sendSlotManager);
62
+ }
63
+
64
+ /**
65
+ * Updates the server local and remote brb values so that they match the current client desired state.
66
+ *
67
+ * @param {SendSlotManager} sendSlotManager
68
+ * @returns {Promise}
69
+ */
70
+ private applyClientStateToServer(sendSlotManager: SendSlotManager) {
71
+ if (this.state.syncToServerInProgress) {
72
+ LoggerProxy.logger.info(
73
+ `Meeting:brbState#applyClientStateToServer: request to server in progress, we need to wait for it to complete`
74
+ );
75
+
76
+ return Promise.resolve();
77
+ }
78
+
79
+ const remoteBrbRequiresSync = this.state.client.enabled !== this.state.server.enabled;
80
+
81
+ LoggerProxy.logger.info(
82
+ `Meeting:brbState#applyClientStateToServer: remoteBrbRequiresSync: ${remoteBrbRequiresSync}`
83
+ );
84
+
85
+ if (!remoteBrbRequiresSync) {
86
+ LoggerProxy.logger.info(
87
+ `Meeting:brbState#applyClientStateToServer: client state already matching server state, nothing to do`
88
+ );
89
+
90
+ return Promise.resolve();
91
+ }
92
+
93
+ this.state.syncToServerInProgress = true;
94
+
95
+ return this.sendLocalBrbStateToServer(sendSlotManager)
96
+ .then(() => {
97
+ this.state.syncToServerInProgress = false;
98
+ LoggerProxy.logger.info(
99
+ `Meeting:brbState#applyClientStateToServer: sync with server completed`
100
+ );
101
+
102
+ // need to check if a new sync is required, because this.state.client may have changed while we were doing the current sync
103
+ this.applyClientStateToServer(sendSlotManager);
104
+ })
105
+ .catch((e) => {
106
+ this.state.syncToServerInProgress = false;
107
+ LoggerProxy.logger.warn(`Meeting:brbState#applyClientStateToServer: error: ${e}`);
108
+ });
109
+ }
110
+
111
+ /**
112
+ * Send the local brb state to the server
113
+ *
114
+ * @param {SendSlotManager} sendSlotManager
115
+ * @returns {Promise}
116
+ */
117
+ private async sendLocalBrbStateToServer(sendSlotManager: SendSlotManager) {
118
+ const {enabled} = this.state.client;
119
+
120
+ if (!this.meeting.isMultistream) {
121
+ const errorMessage = 'Meeting:brbState#sendLocalBrbStateToServer: Not a multistream meeting';
122
+ const error = new Error(errorMessage);
123
+
124
+ LoggerProxy.logger.error(error);
125
+
126
+ return Promise.reject(error);
127
+ }
128
+
129
+ if (!this.meeting.mediaProperties.webrtcMediaConnection) {
130
+ const errorMessage =
131
+ 'Meeting:brbState#sendLocalBrbStateToServer: WebRTC media connection is not defined';
132
+ const error = new Error(errorMessage);
133
+
134
+ LoggerProxy.logger.error(error);
135
+
136
+ return Promise.reject(error);
137
+ }
138
+
139
+ // this logic should be applied only to multistream meetings
140
+ return this.meeting.meetingRequest
141
+ .setBrb({
142
+ enabled,
143
+ locusUrl: this.meeting.locusUrl,
144
+ deviceUrl: this.meeting.deviceUrl,
145
+ selfId: this.meeting.selfId,
146
+ })
147
+ .then(() => {
148
+ sendSlotManager.setSourceStateOverride(MediaType.VideoMain, enabled ? 'away' : null);
149
+ })
150
+ .catch((error) => {
151
+ LoggerProxy.logger.error('Meeting:brbState#sendLocalBrbStateToServer: Error ', error);
152
+
153
+ return Promise.reject(error);
154
+ });
155
+ }
156
+
157
+ /**
158
+ * This method should be called whenever the server brb state is changed
159
+ *
160
+ * @param {Boolean} [enabled] true if user has brb enabled, false otherwise
161
+ * @returns {undefined}
162
+ */
163
+ public handleServerBrbUpdate(enabled?: boolean) {
164
+ LoggerProxy.logger.info(
165
+ `Meeting:brbState#handleServerBrbUpdate: updating server brb to (${enabled})`
166
+ );
167
+ this.state.server.enabled = !!enabled;
168
+ }
169
+ }