@webex/plugin-meetings 3.1.0 → 3.2.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 (205) hide show
  1. package/dist/breakouts/breakout.js +1 -1
  2. package/dist/breakouts/index.js +1 -1
  3. package/dist/common/errors/reconnection-not-started.js +46 -0
  4. package/dist/common/errors/reconnection-not-started.js.map +1 -0
  5. package/dist/constants.js +16 -5
  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/mediaQualityMetrics/config.js +10 -10
  18. package/dist/mediaQualityMetrics/config.js.map +1 -1
  19. package/dist/meeting/in-meeting-actions.js +6 -0
  20. package/dist/meeting/in-meeting-actions.js.map +1 -1
  21. package/dist/meeting/index.js +564 -475
  22. package/dist/meeting/index.js.map +1 -1
  23. package/dist/meeting/locusMediaRequest.js +27 -0
  24. package/dist/meeting/locusMediaRequest.js.map +1 -1
  25. package/dist/meeting/util.js +9 -16
  26. package/dist/meeting/util.js.map +1 -1
  27. package/dist/meeting/voicea-meeting.js +37 -49
  28. package/dist/meeting/voicea-meeting.js.map +1 -1
  29. package/dist/meeting-info/util.js +304 -267
  30. package/dist/meeting-info/util.js.map +1 -1
  31. package/dist/meeting-info/utilv2.js +334 -298
  32. package/dist/meeting-info/utilv2.js.map +1 -1
  33. package/dist/meetings/index.js +12 -28
  34. package/dist/meetings/index.js.map +1 -1
  35. package/dist/reachability/index.js +88 -9
  36. package/dist/reachability/index.js.map +1 -1
  37. package/dist/reconnection-manager/index.js +138 -109
  38. package/dist/reconnection-manager/index.js.map +1 -1
  39. package/dist/roap/request.js +3 -27
  40. package/dist/roap/request.js.map +1 -1
  41. package/dist/statsAnalyzer/index.js +8 -2
  42. package/dist/statsAnalyzer/index.js.map +1 -1
  43. package/dist/statsAnalyzer/mqaUtil.js +17 -0
  44. package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
  45. package/dist/types/annotation/annotation.types.d.ts +42 -0
  46. package/dist/types/annotation/constants.d.ts +31 -0
  47. package/dist/types/annotation/index.d.ts +117 -0
  48. package/dist/types/breakouts/breakout.d.ts +8 -0
  49. package/dist/types/breakouts/collection.d.ts +5 -0
  50. package/dist/types/breakouts/edit-lock-error.d.ts +15 -0
  51. package/dist/types/breakouts/events.d.ts +8 -0
  52. package/dist/types/breakouts/index.d.ts +5 -0
  53. package/dist/types/breakouts/request.d.ts +22 -0
  54. package/dist/types/breakouts/utils.d.ts +15 -0
  55. package/dist/types/common/browser-detection.d.ts +9 -0
  56. package/dist/types/common/collection.d.ts +48 -0
  57. package/dist/types/common/config.d.ts +2 -0
  58. package/dist/types/common/errors/captcha-error.d.ts +15 -0
  59. package/dist/types/common/errors/intent-to-join.d.ts +16 -0
  60. package/dist/types/common/errors/join-meeting.d.ts +17 -0
  61. package/dist/types/common/errors/media.d.ts +15 -0
  62. package/dist/types/common/errors/no-meeting-info.d.ts +14 -0
  63. package/dist/types/common/errors/parameter.d.ts +15 -0
  64. package/dist/types/common/errors/password-error.d.ts +15 -0
  65. package/dist/types/common/errors/permission.d.ts +14 -0
  66. package/dist/types/common/errors/reclaim-host-role-errors.d.ts +60 -0
  67. package/dist/types/common/errors/reconnection-not-started.d.ts +13 -0
  68. package/dist/types/common/errors/reconnection.d.ts +15 -0
  69. package/dist/types/common/errors/stats.d.ts +15 -0
  70. package/dist/types/common/errors/webex-errors.d.ts +93 -0
  71. package/dist/types/common/errors/webex-meetings-error.d.ts +20 -0
  72. package/dist/types/common/events/events-scope.d.ts +17 -0
  73. package/dist/types/common/events/events.d.ts +12 -0
  74. package/dist/types/common/events/trigger-proxy.d.ts +2 -0
  75. package/dist/types/common/events/util.d.ts +2 -0
  76. package/dist/types/common/logs/logger-config.d.ts +2 -0
  77. package/dist/types/common/logs/logger-proxy.d.ts +2 -0
  78. package/dist/types/common/logs/request.d.ts +36 -0
  79. package/dist/types/common/queue.d.ts +34 -0
  80. package/dist/types/config.d.ts +73 -0
  81. package/dist/types/constants.d.ts +1098 -0
  82. package/dist/types/controls-options-manager/constants.d.ts +4 -0
  83. package/dist/types/controls-options-manager/enums.d.ts +15 -0
  84. package/dist/types/controls-options-manager/index.d.ts +136 -0
  85. package/dist/types/controls-options-manager/types.d.ts +43 -0
  86. package/dist/types/controls-options-manager/util.d.ts +1 -0
  87. package/dist/types/index.d.ts +19 -0
  88. package/dist/types/interceptors/index.d.ts +2 -0
  89. package/dist/types/interceptors/locusRetry.d.ts +27 -0
  90. package/dist/types/interpretation/collection.d.ts +5 -0
  91. package/dist/types/interpretation/index.d.ts +5 -0
  92. package/dist/types/interpretation/siLanguage.d.ts +5 -0
  93. package/dist/types/locus-info/controlsUtils.d.ts +2 -0
  94. package/dist/types/locus-info/embeddedAppsUtils.d.ts +2 -0
  95. package/dist/types/locus-info/fullState.d.ts +2 -0
  96. package/dist/types/locus-info/hostUtils.d.ts +2 -0
  97. package/dist/types/locus-info/index.d.ts +322 -0
  98. package/dist/types/locus-info/infoUtils.d.ts +2 -0
  99. package/dist/types/locus-info/mediaSharesUtils.d.ts +2 -0
  100. package/dist/types/locus-info/parser.d.ts +272 -0
  101. package/dist/types/locus-info/selfUtils.d.ts +2 -0
  102. package/dist/types/media/MediaConnectionAwaiter.d.ts +61 -0
  103. package/dist/types/media/index.d.ts +34 -0
  104. package/dist/types/media/properties.d.ts +117 -0
  105. package/dist/types/media/util.d.ts +2 -0
  106. package/dist/types/mediaQualityMetrics/config.d.ts +247 -0
  107. package/dist/types/meeting/in-meeting-actions.d.ts +173 -0
  108. package/dist/types/meeting/index.d.ts +1832 -0
  109. package/dist/types/meeting/locusMediaRequest.d.ts +75 -0
  110. package/dist/types/meeting/muteState.d.ts +178 -0
  111. package/dist/types/meeting/request.d.ts +295 -0
  112. package/dist/types/meeting/request.type.d.ts +11 -0
  113. package/dist/types/meeting/state.d.ts +9 -0
  114. package/dist/types/meeting/util.d.ts +122 -0
  115. package/dist/types/meeting/voicea-meeting.d.ts +17 -0
  116. package/dist/types/meeting-info/collection.d.ts +20 -0
  117. package/dist/types/meeting-info/index.d.ts +69 -0
  118. package/dist/types/meeting-info/meeting-info-v2.d.ts +123 -0
  119. package/dist/types/meeting-info/request.d.ts +22 -0
  120. package/dist/types/meeting-info/util.d.ts +49 -0
  121. package/dist/types/meeting-info/utilv2.d.ts +65 -0
  122. package/dist/types/meetings/collection.d.ts +40 -0
  123. package/dist/types/meetings/index.d.ts +383 -0
  124. package/dist/types/meetings/meetings.types.d.ts +4 -0
  125. package/dist/types/meetings/request.d.ts +27 -0
  126. package/dist/types/meetings/util.d.ts +18 -0
  127. package/dist/types/member/index.d.ts +160 -0
  128. package/dist/types/member/types.d.ts +32 -0
  129. package/dist/types/member/util.d.ts +2 -0
  130. package/dist/types/members/collection.d.ts +29 -0
  131. package/dist/types/members/index.d.ts +353 -0
  132. package/dist/types/members/request.d.ts +114 -0
  133. package/dist/types/members/types.d.ts +25 -0
  134. package/dist/types/members/util.d.ts +215 -0
  135. package/dist/types/metrics/constants.d.ts +70 -0
  136. package/dist/types/metrics/index.d.ts +45 -0
  137. package/dist/types/multistream/mediaRequestManager.d.ts +119 -0
  138. package/dist/types/multistream/receiveSlot.d.ts +68 -0
  139. package/dist/types/multistream/receiveSlotManager.d.ts +56 -0
  140. package/dist/types/multistream/remoteMedia.d.ts +72 -0
  141. package/dist/types/multistream/remoteMediaGroup.d.ts +49 -0
  142. package/dist/types/multistream/remoteMediaManager.d.ts +300 -0
  143. package/dist/types/multistream/sendSlotManager.d.ts +69 -0
  144. package/dist/types/networkQualityMonitor/index.d.ts +70 -0
  145. package/dist/types/personal-meeting-room/index.d.ts +47 -0
  146. package/dist/types/personal-meeting-room/request.d.ts +14 -0
  147. package/dist/types/personal-meeting-room/util.d.ts +2 -0
  148. package/dist/types/reachability/clusterReachability.d.ts +110 -0
  149. package/dist/types/reachability/index.d.ts +120 -0
  150. package/dist/types/reachability/request.d.ts +39 -0
  151. package/dist/types/reachability/util.d.ts +15 -0
  152. package/dist/types/reactions/constants.d.ts +3 -0
  153. package/dist/types/reactions/reactions.d.ts +4 -0
  154. package/dist/types/reactions/reactions.type.d.ts +52 -0
  155. package/dist/types/reconnection-manager/index.d.ts +126 -0
  156. package/dist/types/recording-controller/enums.d.ts +7 -0
  157. package/dist/types/recording-controller/index.d.ts +207 -0
  158. package/dist/types/recording-controller/util.d.ts +14 -0
  159. package/dist/types/roap/index.d.ts +86 -0
  160. package/dist/types/roap/request.d.ts +39 -0
  161. package/dist/types/roap/turnDiscovery.d.ts +155 -0
  162. package/dist/types/rtcMetrics/constants.d.ts +4 -0
  163. package/dist/types/rtcMetrics/index.d.ts +61 -0
  164. package/dist/types/statsAnalyzer/global.d.ts +36 -0
  165. package/dist/types/statsAnalyzer/index.d.ts +217 -0
  166. package/dist/types/statsAnalyzer/mqaUtil.d.ts +48 -0
  167. package/dist/types/transcription/index.d.ts +64 -0
  168. package/dist/types/webinar/collection.d.ts +16 -0
  169. package/dist/types/webinar/index.d.ts +5 -0
  170. package/dist/webinar/index.js +1 -1
  171. package/package.json +22 -22
  172. package/src/common/errors/reconnection-not-started.ts +25 -0
  173. package/src/constants.ts +14 -5
  174. package/src/index.ts +30 -0
  175. package/src/locus-info/controlsUtils.ts +11 -0
  176. package/src/locus-info/index.ts +16 -0
  177. package/src/media/properties.ts +67 -15
  178. package/src/mediaQualityMetrics/config.ts +13 -7
  179. package/src/meeting/in-meeting-actions.ts +12 -0
  180. package/src/meeting/index.ts +144 -107
  181. package/src/meeting/locusMediaRequest.ts +31 -0
  182. package/src/meeting/util.ts +9 -16
  183. package/src/meeting/voicea-meeting.ts +44 -46
  184. package/src/meeting-info/util.ts +241 -233
  185. package/src/meeting-info/utilv2.ts +250 -244
  186. package/src/meetings/index.ts +15 -27
  187. package/src/reachability/index.ts +60 -0
  188. package/src/reconnection-manager/index.ts +128 -105
  189. package/src/roap/request.ts +1 -24
  190. package/src/statsAnalyzer/index.ts +10 -3
  191. package/src/statsAnalyzer/mqaUtil.ts +23 -0
  192. package/test/unit/spec/locus-info/controlsUtils.js +20 -0
  193. package/test/unit/spec/locus-info/index.js +21 -0
  194. package/test/unit/spec/media/properties.ts +145 -140
  195. package/test/unit/spec/meeting/in-meeting-actions.ts +6 -0
  196. package/test/unit/spec/meeting/index.js +271 -105
  197. package/test/unit/spec/meeting/locusMediaRequest.ts +49 -0
  198. package/test/unit/spec/meeting/utils.js +3 -10
  199. package/test/unit/spec/meeting/voicea-meeting.ts +5 -14
  200. package/test/unit/spec/meetings/index.js +59 -17
  201. package/test/unit/spec/reachability/index.ts +266 -0
  202. package/test/unit/spec/reconnection-manager/index.js +127 -39
  203. package/test/unit/spec/roap/request.ts +0 -37
  204. package/test/unit/spec/stats-analyzer/index.js +100 -8
  205. package/src/common/errors/reconnection-in-progress.ts +0 -8
@@ -0,0 +1,300 @@
1
+ import { EventMap } from 'typed-emitter';
2
+ import { MediaType, NamedMediaGroup } from '@webex/internal-media-core';
3
+ import EventsScope from '../common/events/events-scope';
4
+ import { RemoteMedia, RemoteVideoResolution } from './remoteMedia';
5
+ import { CSI } from './receiveSlot';
6
+ import { ReceiveSlotManager } from './receiveSlotManager';
7
+ import { RemoteMediaGroup } from './remoteMediaGroup';
8
+ import { MediaRequestManager } from './mediaRequestManager';
9
+ export type PaneSize = RemoteVideoResolution;
10
+ export type LayoutId = string;
11
+ export type PaneId = string;
12
+ export type PaneGroupId = string;
13
+ export interface ActiveSpeakerVideoPaneGroup {
14
+ id: PaneGroupId;
15
+ numPanes: number;
16
+ size: PaneSize;
17
+ priority: number;
18
+ }
19
+ export interface MemberVideoPane {
20
+ id: PaneId;
21
+ size: PaneSize;
22
+ csi?: CSI;
23
+ }
24
+ export interface VideoLayout {
25
+ screenShareVideo?: {
26
+ size: PaneSize;
27
+ };
28
+ activeSpeakerVideoPaneGroups?: ActiveSpeakerVideoPaneGroup[];
29
+ memberVideoPanes?: MemberVideoPane[];
30
+ }
31
+ export interface Configuration {
32
+ audio: {
33
+ numOfActiveSpeakerStreams: number;
34
+ numOfScreenShareStreams: number;
35
+ };
36
+ video: {
37
+ preferLiveVideo: boolean;
38
+ initialLayoutId: LayoutId;
39
+ layouts: {
40
+ [key: LayoutId]: VideoLayout;
41
+ };
42
+ };
43
+ namedMediaGroup?: NamedMediaGroup;
44
+ }
45
+ /**
46
+ * Default configuration:
47
+ * - uses 3 audio streams
48
+ * - prefers active speakers with live video (e.g. are not audio only or video muted) over active speakers without live video
49
+ * - has a few layouts defined, including 1 that contains remote screen share (ScreenShareView)
50
+ */
51
+ export declare const DefaultConfiguration: Configuration;
52
+ export declare enum Event {
53
+ AudioCreated = "AudioCreated",
54
+ InterpretationAudioCreated = "InterpretationAudioCreated",
55
+ ScreenShareAudioCreated = "ScreenShareAudioCreated",
56
+ VideoLayoutChanged = "VideoLayoutChanged"
57
+ }
58
+ export interface VideoLayoutChangedEventData {
59
+ layoutId: LayoutId;
60
+ activeSpeakerVideoPanes: {
61
+ [key: PaneGroupId]: RemoteMediaGroup;
62
+ };
63
+ memberVideoPanes: {
64
+ [key: PaneId]: RemoteMedia;
65
+ };
66
+ screenShareVideo?: RemoteMedia;
67
+ }
68
+ export interface Events extends EventMap {
69
+ [Event.AudioCreated]: (audio: RemoteMediaGroup) => void;
70
+ [Event.ScreenShareAudioCreated]: (screenShareAudio: RemoteMediaGroup) => void;
71
+ [Event.VideoLayoutChanged]: (data: VideoLayoutChangedEventData) => void;
72
+ }
73
+ /**
74
+ * A helper class that manages all remote audio/video streams in order to achieve a predefined set of layouts.
75
+ * It also creates a fixed number of audio streams and these don't change during the meeting.
76
+ *
77
+ * Things that RemoteMediaManager does:
78
+ * - owns the receive slots (creates them when needed, and re-uses them when switching layouts)
79
+ * - constructs appropriate RemoteMedia and RemoteMediaGroup objects and sends appropriate mediaRequests
80
+ */
81
+ export declare class RemoteMediaManager extends EventsScope {
82
+ private config;
83
+ private started;
84
+ private receiveSlotManager;
85
+ private mediaRequestManagers;
86
+ private currentLayout?;
87
+ private slots;
88
+ private media;
89
+ private receiveSlotAllocations;
90
+ private currentLayoutId?;
91
+ /**
92
+ * Constructor
93
+ *
94
+ * @param {ReceiveSlotManager} receiveSlotManager
95
+ * @param {{audio: MediaRequestManager, video: mediaRequestManagers}} mediaRequestManagers
96
+ * @param {Configuration} config Configuration describing what video layouts to use during the meeting
97
+ */
98
+ constructor(receiveSlotManager: ReceiveSlotManager, mediaRequestManagers: {
99
+ audio: MediaRequestManager;
100
+ video: MediaRequestManager;
101
+ screenShareAudio: MediaRequestManager;
102
+ screenShareVideo: MediaRequestManager;
103
+ }, config?: Configuration);
104
+ /**
105
+ * Checks if configuration is valid, throws an error if it's not
106
+ */
107
+ private checkConfigValidity;
108
+ /**
109
+ * Starts the RemoteMediaManager.
110
+ *
111
+ * @returns {Promise}
112
+ */
113
+ start(): Promise<void>;
114
+ /**
115
+ * Releases all the used resources (like allocated receive slots). This function needs
116
+ * to be called when we leave the meeting, etc.
117
+ */
118
+ stop(): void;
119
+ /**
120
+ * Returns the total number of main video panes required for a given layout
121
+ *
122
+ * @param {VideoLayout} layout
123
+ * @returns {number}
124
+ */
125
+ private getRequiredNumVideoSlotsForLayout;
126
+ /**
127
+ * Allocates the maximum number of panes that any of the configured layouts will require.
128
+ * We do this at the beginning, because it's more efficient (much faster) then allocating receive slots
129
+ * later, after the SDP exchange was done.
130
+ */
131
+ private preallocateVideoReceiveSlots;
132
+ /**
133
+ * Changes the layout (triggers Event.VideoLayoutChanged)
134
+ *
135
+ * @param {LayoutId} layoutId new layout id
136
+ * @returns {Promise}
137
+ */
138
+ setLayout(layoutId: LayoutId): Promise<void>;
139
+ /**
140
+ * Returns the currently selected layout id
141
+ *
142
+ * @returns {LayoutId}
143
+ */
144
+ getLayoutId(): LayoutId | undefined;
145
+ /**
146
+ * sets the preferLiveVideo
147
+ */
148
+ setPreferLiveVideo(preferLiveVideo: boolean): void;
149
+ /**
150
+ * Sets CSIs for multiple RemoteMedia instances belonging to RemoteMediaGroup.
151
+ * For each entry in the remoteMediaCsis array:
152
+ * - if csi is specified, the RemoteMedia instance is pinned to that CSI
153
+ * - if csi is undefined, the RemoteMedia instance is unpinned
154
+ */
155
+ setActiveSpeakerCsis(remoteMediaCsis: {
156
+ remoteMedia: RemoteMedia;
157
+ csi?: number;
158
+ }[]): void;
159
+ /**
160
+ * Sets which named media group need receiving
161
+ * @param {MediaType} mediaType of the stream
162
+ * @param {number} languageCode of the stream. If the languageId is 0, the named media group request will be canceled,
163
+ * and only receive the main audio stream.
164
+ * @returns {void}
165
+ */
166
+ setReceiveNamedMediaGroup(mediaType: MediaType, languageId: number): Promise<void>;
167
+ /**
168
+ * Creates the audio slots
169
+ */
170
+ private createAudioMedia;
171
+ /**
172
+ * Creates the audio slots for named media
173
+ */
174
+ private createInterpretationAudioMedia;
175
+ /**
176
+ * Creates receive slots required for receiving screen share audio and video
177
+ */
178
+ private createScreenShareReceiveSlots;
179
+ /**
180
+ * Creates RemoteMedia objects for screen share
181
+ */
182
+ private createScreenShareAudioMedia;
183
+ /**
184
+ * Goes over all receiver-selected slots and keeps only the ones that are required by a given layout,
185
+ * the rest are all moved to the "unused" list
186
+ */
187
+ private trimReceiverSelectedSlots;
188
+ /**
189
+ * Releases all the "unused" video slots.
190
+ */
191
+ private releaseUnusedVideoSlots;
192
+ /**
193
+ * Allocates receive slots to all active speaker video panes
194
+ * in the current selected layout.
195
+ *
196
+ * Allocation tries to keep the same order of the slots between the previous
197
+ * layout and the new one. Sorting helps making sure that highest priority slots
198
+ * go in the same order in the new layout.
199
+ */
200
+ private allocateSlotsToActiveSpeakerPaneGroups;
201
+ /**
202
+ * Allocates receive slots to all receiver selected video panes
203
+ * in the current selected layout
204
+ */
205
+ private allocateSlotsToReceiverSelectedVideoPaneGroups;
206
+ /**
207
+ * Ensures that we have enough slots for the current layout.
208
+ */
209
+ private refillRequiredSlotsIfNeeded;
210
+ /**
211
+ * Move all active speaker slots to "unused"
212
+ */
213
+ private trimActiveSpeakerSlots;
214
+ /**
215
+ * Logs the state of the receive slots
216
+ */
217
+ private logMainVideoReceiveSlots;
218
+ /** logs main audio slots */
219
+ private logMainAudioReceiveSlots;
220
+ /** logs slides video slots */
221
+ private logSlidesVideoReceiveSlots;
222
+ /** logs slides audio slots */
223
+ private logSlidesAudioReceiveSlots;
224
+ /** Logs all current receive slots */
225
+ logAllReceiveSlots(): void;
226
+ /**
227
+ * Makes sure we have the right number of receive slots created for the current layout
228
+ * and allocates them to the right video panes / pane groups
229
+ *
230
+ * @returns {Promise}
231
+ */
232
+ private updateVideoReceiveSlots;
233
+ /**
234
+ * Creates new RemoteMedia and RemoteMediaGroup objects for the current layout
235
+ * and sends the media requests for all of them.
236
+ */
237
+ private updateVideoRemoteMediaObjects;
238
+ /**
239
+ * Checks if current layout requires a screen share.
240
+ * If it does, it creates new RemoteMediaGroup object for screen share
241
+ * and sends the media requests for it.
242
+ * If it doesn't, it makes sure we clean up any RemoteMediaGroup objects
243
+ * created earlier for screen share (for previous layout).
244
+ */
245
+ private updateScreenShareVideoRemoteMediaObject;
246
+ /**
247
+ * Invalidates all remote media objects belonging to currently selected layout
248
+ */
249
+ private invalidateCurrentRemoteMedia;
250
+ /** emits Event.VideoLayoutChanged */
251
+ private emitVideoLayoutChangedEvent;
252
+ /**
253
+ * Sets a new CSI on a given remote media object
254
+ *
255
+ * @param {RemoteMedia} remoteMedia remote Media object to modify
256
+ * @param {CSI} csi new CSI value, can be null if we want to stop receiving media
257
+ */
258
+ setRemoteVideoCsi(remoteMedia: RemoteMedia, csi: CSI | null): void;
259
+ /**
260
+ * Adds a new member video pane to the currently selected layout.
261
+ *
262
+ * Changes to the layout are lost after a layout change.
263
+ *
264
+ * @param {MemberVideoPane} newPane
265
+ * @returns {Promise<RemoteMedia>}
266
+ */
267
+ addMemberVideoPane(newPane: MemberVideoPane): Promise<RemoteMedia>;
268
+ /**
269
+ * Removes a member video pane from the currently selected layout.
270
+ *
271
+ * Changes to the layout are lost after a layout change.
272
+ *
273
+ * @param {PaneId} paneId pane id of the pane to remove
274
+ * @returns {Promise<void>}
275
+ */
276
+ removeMemberVideoPane(paneId: PaneId): Promise<void>;
277
+ /**
278
+ * Pins an active speaker remote media object to the given CSI value. From that moment
279
+ * onwards the remote media will only play audio/video from that specific CSI until
280
+ * unpinActiveSpeakerVideoPane() is called or current layout is changed.
281
+ *
282
+ * @param {RemoteMedia} remoteMedia remote media object reference
283
+ * @param {CSI} csi CSI value to pin to, if undefined, then current CSI value is used
284
+ */
285
+ pinActiveSpeakerVideoPane(remoteMedia: RemoteMedia, csi?: CSI): void;
286
+ /**
287
+ * Unpins a remote media object from the fixed CSI value it was pinned to.
288
+ *
289
+ * @param {RemoteMedia} remoteMedia remote media object reference
290
+ */
291
+ unpinActiveSpeakerVideoPane(remoteMedia: RemoteMedia): void;
292
+ /**
293
+ * Returns true if a given remote media object belongs to an active speaker group and has been pinned.
294
+ * Throws an error if the remote media object doesn't belong to any active speaker remote media group.
295
+ *
296
+ * @param {RemoteMedia} remoteMedia remote media object
297
+ * @returns {boolean}
298
+ */
299
+ isPinned(remoteMedia: RemoteMedia): boolean;
300
+ }
@@ -0,0 +1,69 @@
1
+ import { SendSlot, MediaType, LocalStream, MultistreamRoapMediaConnection, NamedMediaGroup } from '@webex/internal-media-core';
2
+ export default class SendSlotManager {
3
+ private readonly slots;
4
+ private readonly LoggerProxy;
5
+ constructor(LoggerProxy: any);
6
+ /**
7
+ * This method is used to create a sendSlot for the given mediaType and returns the created sendSlot
8
+ * @param {MultistreamRoapMediaConnection} mediaConnection MultistreamRoapMediaConnection for which a sendSlot needs to be created
9
+ * @param {MediaType} mediaType MediaType for which a sendSlot needs to be created (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)
10
+ * @param {boolean} active This is optional boolean to set the active state of the sendSlot. Default is true
11
+ * @returns {SendSlot} slot The created sendSlot
12
+ */
13
+ createSlot(mediaConnection: MultistreamRoapMediaConnection, mediaType: MediaType, active?: boolean): SendSlot;
14
+ /**
15
+ * This method is used to retrieve the sendSlot for the given mediaType
16
+ * @param {MediaType} mediaType of which the slot needs to be retrieved
17
+ * @returns {SendSlot}
18
+ */
19
+ getSlot(mediaType: MediaType): SendSlot;
20
+ /**
21
+ * Allow users to specify 'namedMediaGroups' to indicate which named media group its audio should be sent to.
22
+ * @param {MediaType} mediaType MediaType of the sendSlot to which the audio stream needs to be send to the media group
23
+ * @param {[]}namedMediaGroups - Allow users to specify 'namedMediaGroups'.If the value of 'namedMediaGroups' is zero,
24
+ * named media group will be canceled and the audio stream will be sent to the floor.
25
+ * @returns {void}
26
+ */
27
+ setNamedMediaGroups(mediaType: MediaType, namedMediaGroups: NamedMediaGroup[]): void;
28
+ /**
29
+ * This method publishes the given stream to the sendSlot for the given mediaType
30
+ * @param {MediaType} mediaType MediaType of the sendSlot to which a stream needs to be published (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)
31
+ * @param {LocalStream} stream LocalStream to be published
32
+ * @returns {Promise<void>}
33
+ */
34
+ publishStream(mediaType: MediaType, stream: LocalStream): Promise<void>;
35
+ /**
36
+ * This method unpublishes the stream from the sendSlot of the given mediaType
37
+ * @param {MediaType} mediaType MediaType of the sendSlot from which a stream needs to be unpublished (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)
38
+ * @returns {Promise<void>}
39
+ */
40
+ unpublishStream(mediaType: MediaType): Promise<void>;
41
+ /**
42
+ * This method is used to set the active state of the sendSlot for the given mediaType
43
+ * @param {MediaType} mediaType The MediaType of the sendSlot for which the active state needs to be set (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)
44
+ * @param {boolean} active The boolean to set the active state of the sendSlot. Default is true
45
+ * @returns {void}
46
+ */
47
+ setActive(mediaType: MediaType, active?: boolean): void;
48
+ /**
49
+ * This method is used to set the codec parameters for the sendSlot of the given mediaType
50
+ * @param {MediaType} mediaType MediaType of the sendSlot for which the codec parameters needs to be set (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)
51
+ * @param {Object} codecParameters
52
+ * @returns {Promise<void>}
53
+ */
54
+ setCodecParameters(mediaType: MediaType, codecParameters: {
55
+ [key: string]: string | undefined;
56
+ }): Promise<void>;
57
+ /**
58
+ * This method is used to delete the codec parameters for the sendSlot of the given mediaType
59
+ * @param {MediaType} mediaType MediaType of the sendSlot for which the codec parameters needs to be deleted (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)
60
+ * @param {Array<String>} parameters Array of keys of the codec parameters to be deleted
61
+ * @returns {Promise<void>}
62
+ */
63
+ deleteCodecParameters(mediaType: MediaType, parameters: string[]): Promise<void>;
64
+ /**
65
+ * This method is used to reset the SendSlotsManager by deleting all the sendSlots
66
+ * @returns {undefined}
67
+ */
68
+ reset(): void;
69
+ }
@@ -0,0 +1,70 @@
1
+ import EventsScope from '../common/events/events-scope';
2
+ /**
3
+ * Meeting - network quality event
4
+ * Emitted on each interval of retrieving stats Analyzer data
5
+ * @event network:quality
6
+ * @type {Object}
7
+ * @property {string} mediaType {video|audio}
8
+ * @property {number} networkQualityScore - value determined in determineUplinkNetworkQuality
9
+ * @memberof NetworkQualityMonitor
10
+ */
11
+ /**
12
+ * NetworkQualityMonitor class that will emit events based on detected quality
13
+ *
14
+ * @class NetworkQualityMonitor
15
+ * @extends {EventsScope}
16
+ */
17
+ export default class NetworkQualityMonitor extends EventsScope {
18
+ config: any;
19
+ frequencyTypes: any;
20
+ indicatorTypes: any;
21
+ mediaType: any;
22
+ networkQualityScore: any;
23
+ networkQualityStatus: any;
24
+ /**
25
+ * Creates a new instance of NetworkQualityMonitor
26
+ * @constructor
27
+ * @public
28
+ * @param {Object} config
29
+ * @property {Object} indicatorTypes - network properties used to evaluate network quality used as constants
30
+ * @property {Object} frequencyTypes - frequency properties used as constants {uplink|send} {downlink|receive}
31
+ * @property {number} networkQualityScore - 0|1 1 is acceptable 0 is bad/unknown
32
+ * @property {Object} networkQualityStatus - hash object based on indicatorTypes and frequencyTypes
33
+ * @property {string} mediaType - audio|video
34
+ */
35
+ constructor(config: any);
36
+ /**
37
+ * emits NETWORK_QUALITY event on meeting with payload of media type and uplinkNetworkQuality score
38
+ *
39
+ * @memberof NetworkQualityMonitor
40
+ * @returns {void}
41
+ */
42
+ emitNetworkQuality(): void;
43
+ /**
44
+ * invokes emitNetworkQuality method resets values back to default
45
+ * @returns {void}
46
+ * @memberof NetworkQualityMonitor
47
+ */
48
+ updateNetworkQualityStatus(): void;
49
+ /**
50
+ * filter data to determine uplink network quality, invoked on same interval as stats analyzer remote-inbout-rtp
51
+ * @param {Object} configObj
52
+ * @param {string} configObj.mediaType {audio|video}
53
+ * @param {RTCStats} configObj.remoteRtpResults RTC stats remote obj
54
+ * @param {Object} configObj.statsAnalyzerCurrentStats statsResults
55
+ * @returns {void}
56
+ * @public
57
+ * @memberof NetworkQualityMonitor
58
+ */
59
+ determineUplinkNetworkQuality({ mediaType, remoteRtpResults, statsAnalyzerCurrentStats, }: {
60
+ mediaType: string;
61
+ remoteRtpResults: any;
62
+ statsAnalyzerCurrentStats: object;
63
+ }): void;
64
+ /**
65
+ * Get the current status of network quaility object - networkQualityStatus
66
+ * @returns {Object}
67
+ * @public
68
+ */
69
+ get networkQualityStats(): any;
70
+ }
@@ -0,0 +1,47 @@
1
+ import { StatelessWebexPlugin } from '@webex/webex-core';
2
+ /**
3
+ * @class PersonalMeetingRoom
4
+ */
5
+ export default class PersonalMeetingRoom extends StatelessWebexPlugin {
6
+ link: any;
7
+ meetingInfo: any;
8
+ name: any;
9
+ personalMeetingRoomRequest: any;
10
+ pmr: any;
11
+ sipUri: any;
12
+ userId: any;
13
+ meetingLink: any;
14
+ number: any;
15
+ namespace: string;
16
+ /**
17
+ *
18
+ * @param {Object} attrs
19
+ * @param {Object} options
20
+ */
21
+ constructor(attrs: any, options: any);
22
+ /**
23
+ * claims a pmr and updates the cached PMR values
24
+ * @param {String} link
25
+ * @param {String} pin
26
+ * @param {Boolean} [preferred] defaults to true to set this claimed PMR as the preferred
27
+ * @returns {Promise}
28
+ * @public
29
+ * @memberof PersonalMeetingRoom
30
+ */
31
+ claim(link: string, pin: string, preferred?: boolean): any;
32
+ /**
33
+ * @param {Object} body the response body from meeting info request
34
+ * @returns {undefined}
35
+ * @private
36
+ * @memberof PersonalMeetingRoom
37
+ */
38
+ private set;
39
+ /**
40
+ * TODO: implement TTL for syncing and caching so to not request again and again
41
+ * @param {Object} options
42
+ * @returns {Promise}
43
+ * @public
44
+ * @memberof PersonalMeetingRoom
45
+ */
46
+ get(): any;
47
+ }
@@ -0,0 +1,14 @@
1
+ import { StatelessWebexPlugin } from '@webex/webex-core';
2
+ /**
3
+ * @class MeetingInfoRequest
4
+ */
5
+ export default class PersonalMeetingRoomRequest extends StatelessWebexPlugin {
6
+ namespace: string;
7
+ /**
8
+ *
9
+ * @param {Object} options with format of {userId, passcode, meetingAddress, preferred}
10
+ * @returns {Promise} returns a promise that resolves/rejects the result of the request
11
+ * @memberof PersonalMeetingRoomRequest
12
+ */
13
+ claimPmr(options: any): any;
14
+ }
@@ -0,0 +1,2 @@
1
+ declare const PersonalMeetingRoomUtil: any;
2
+ export default PersonalMeetingRoomUtil;
@@ -0,0 +1,110 @@
1
+ import { ClusterNode } from './request';
2
+ export type TransportResult = {
3
+ result: 'reachable' | 'unreachable' | 'untested';
4
+ latencyInMilliseconds?: number;
5
+ clientMediaIPs?: string[];
6
+ };
7
+ export type ClusterReachabilityResult = {
8
+ udp: TransportResult;
9
+ tcp: TransportResult;
10
+ xtls: TransportResult;
11
+ };
12
+ /**
13
+ * A class that handles reachability checks for a single cluster.
14
+ */
15
+ export declare class ClusterReachability {
16
+ private numUdpUrls;
17
+ private numTcpUrls;
18
+ private numXTlsUrls;
19
+ private result;
20
+ private pc?;
21
+ private defer;
22
+ private startTimestamp;
23
+ readonly isVideoMesh: boolean;
24
+ readonly name: any;
25
+ /**
26
+ * Constructor for ClusterReachability
27
+ * @param {string} name cluster name
28
+ * @param {ClusterNode} clusterInfo information about the media cluster
29
+ */
30
+ constructor(name: string, clusterInfo: ClusterNode);
31
+ /**
32
+ * Gets total elapsed time, can be called only after start() is called
33
+ * @returns {Number} Milliseconds
34
+ */
35
+ private getElapsedTime;
36
+ /**
37
+ * Generate peerConnection config settings
38
+ * @param {ClusterNode} cluster
39
+ * @returns {RTCConfiguration} peerConnectionConfig
40
+ */
41
+ private buildPeerConnectionConfig;
42
+ /**
43
+ * Creates an RTCPeerConnection
44
+ * @param {ClusterNode} clusterInfo information about the media cluster
45
+ * @returns {RTCPeerConnection} peerConnection
46
+ */
47
+ private createPeerConnection;
48
+ /**
49
+ * @returns {ClusterReachabilityResult} reachability result for this cluster
50
+ */
51
+ getResult(): ClusterReachabilityResult;
52
+ /**
53
+ * Closes the peerConnection
54
+ *
55
+ * @returns {void}
56
+ */
57
+ private closePeerConnection;
58
+ /**
59
+ * Resolves the defer, indicating that reachability checks for this cluster are completed
60
+ *
61
+ * @returns {void}
62
+ */
63
+ private finishReachabilityCheck;
64
+ /**
65
+ * Adds public IP (client media IPs)
66
+ * @param {string} protocol
67
+ * @param {string} publicIP
68
+ * @returns {void}
69
+ */
70
+ private addPublicIP;
71
+ /**
72
+ * Registers a listener for the iceGatheringStateChange event
73
+ *
74
+ * @returns {void}
75
+ */
76
+ private registerIceGatheringStateChangeListener;
77
+ /**
78
+ * Checks if we have the results for all the protocols (UDP and TCP)
79
+ *
80
+ * @returns {boolean} true if we have all results, false otherwise
81
+ */
82
+ private haveWeGotAllResults;
83
+ /**
84
+ * Stores the latency in the result for the given protocol and marks it as reachable
85
+ *
86
+ * @param {string} protocol
87
+ * @param {number} latency
88
+ * @returns {void}
89
+ */
90
+ private storeLatencyResult;
91
+ /**
92
+ * Registers a listener for the icecandidate event
93
+ *
94
+ * @returns {void}
95
+ */
96
+ private registerIceCandidateListener;
97
+ /**
98
+ * Starts the process of doing UDP and TCP reachability checks on the media cluster.
99
+ * XTLS reachability checking is not supported.
100
+ *
101
+ * @returns {Promise}
102
+ */
103
+ start(): Promise<ClusterReachabilityResult>;
104
+ /**
105
+ * Starts the process of gathering ICE candidates
106
+ *
107
+ * @returns {Promise} promise that's resolved once reachability checks for this cluster are completed or timeout is reached
108
+ */
109
+ private gatherIceCandidates;
110
+ }