@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,68 @@
1
+ import { MediaType, ReceiveSlot as WcmeReceiveSlot, StreamState } from '@webex/internal-media-core';
2
+ import EventsScope from '../common/events/events-scope';
3
+ export declare const ReceiveSlotEvents: {
4
+ SourceUpdate: string;
5
+ MaxFsUpdate: string;
6
+ };
7
+ export type { StreamState } from '@webex/internal-media-core';
8
+ export type CSI = number;
9
+ export type MemberId = string;
10
+ export type ReceiveSlotId = string;
11
+ export type FindMemberIdCallback = (csi: CSI) => MemberId | undefined;
12
+ /**
13
+ * Class representing a receive slot. A single receive slot is able to receive a single track
14
+ * for example some participant's main video or audio
15
+ */
16
+ export declare class ReceiveSlot extends EventsScope {
17
+ #private;
18
+ private readonly mcReceiveSlot;
19
+ private readonly findMemberIdCallback;
20
+ readonly id: ReceiveSlotId;
21
+ readonly mediaType: MediaType;
22
+ /**
23
+ * constructor - don't use it directly, you should always use meeting.receiveSlotManager.allocateSlot()
24
+ * to create any receive slots
25
+ *
26
+ * @param {MediaType} mediaType
27
+ * @param {ReceiveSlot} mcReceiveSlot
28
+ * @param {FindMemberIdCallback} findMemberIdCallback callback for finding memberId for given CSI
29
+ */
30
+ constructor(mediaType: MediaType, mcReceiveSlot: WcmeReceiveSlot, findMemberIdCallback: FindMemberIdCallback);
31
+ /**
32
+ * Getter for memberId
33
+ */
34
+ get memberId(): string;
35
+ /**
36
+ * Getter for csi
37
+ */
38
+ get csi(): number;
39
+ /**
40
+ * Set the max frame size for this slot
41
+ * @param newFs frame size
42
+ */
43
+ setMaxFs(newFs: any): void;
44
+ /**
45
+ * Getter for sourceState
46
+ */
47
+ get sourceState(): StreamState;
48
+ /**
49
+ * registers event handlers with the underlying ReceiveSlot
50
+ */
51
+ private setupEventListeners;
52
+ /** Tries to find the member id for this receive slot if it hasn't got one */
53
+ findMemberId(): void;
54
+ /**
55
+ * @returns {string} a log message used to identify the receive slot
56
+ */
57
+ get logString(): string;
58
+ /**
59
+ * The MediaStream object associated with this slot.
60
+ *
61
+ * @returns {MediaStream} The MediaStreamTrack.
62
+ */
63
+ get stream(): MediaStream;
64
+ /**
65
+ * The underlying WCME receive slot
66
+ */
67
+ get wcmeReceiveSlot(): WcmeReceiveSlot;
68
+ }
@@ -0,0 +1,56 @@
1
+ import { MediaType, ReceiveSlot as WcmeReceiveSlot } from '@webex/internal-media-core';
2
+ import { FindMemberIdCallback, ReceiveSlot } from './receiveSlot';
3
+ export type CreateSlotCallback = (mediaType: MediaType) => Promise<WcmeReceiveSlot>;
4
+ export type { CSI, FindMemberIdCallback } from './receiveSlot';
5
+ /**
6
+ * Manages all receive slots used by a meeting. WMCE receive slots cannot be ever deleted,
7
+ * so this manager has a pool in order to re-use the slots that were released earlier.
8
+ */
9
+ export declare class ReceiveSlotManager {
10
+ private allocatedSlots;
11
+ private freeSlots;
12
+ private createSlotCallback;
13
+ private findMemberIdByCsiCallback;
14
+ /**
15
+ * Constructor
16
+ * @param {Meeting} meeting
17
+ */
18
+ constructor(createSlotCallback: CreateSlotCallback, findMemberIdByCsiCallback: FindMemberIdCallback);
19
+ /**
20
+ * Creates a new receive slot or returns one from the existing pool of free slots
21
+ *
22
+ * @param {MediaType} mediaType
23
+ * @returns {Promise<ReceiveSlot>}
24
+ */
25
+ allocateSlot(mediaType: MediaType): Promise<ReceiveSlot>;
26
+ /**
27
+ * Releases the slot back to the pool so it can be re-used by others in the future
28
+ * @param {ReceiveSlot} slot
29
+ */
30
+ releaseSlot(slot: ReceiveSlot): void;
31
+ /**
32
+ * Resets the slot manager - this method should be called when the media connection is torn down
33
+ */
34
+ reset(): void;
35
+ /**
36
+ * Returns statistics about the managed slots
37
+ *
38
+ * @returns {Object}
39
+ */
40
+ getStats(): {
41
+ numAllocatedSlots: {};
42
+ numFreeSlots: {};
43
+ };
44
+ /**
45
+ * Tries to find the member id on all allocated receive slots
46
+ * This function should be called when new members are added to the meeting.
47
+ */
48
+ updateMemberIds(): void;
49
+ /**
50
+ * Find a receive slot by a ssrc.
51
+ *
52
+ * @param ssrc - The ssrc of the receive slot to find.
53
+ * @returns - The receive slot with this ssrc, undefined if not found.
54
+ */
55
+ findReceiveSlotBySsrc(ssrc: number): ReceiveSlot | undefined;
56
+ }
@@ -0,0 +1,72 @@
1
+ import { MediaType, StreamState } from '@webex/internal-media-core';
2
+ import EventsScope from '../common/events/events-scope';
3
+ import { MediaRequestManager } from './mediaRequestManager';
4
+ import { ReceiveSlot } from './receiveSlot';
5
+ export declare const RemoteMediaEvents: {
6
+ SourceUpdate: string;
7
+ Stopped: string;
8
+ };
9
+ export type RemoteVideoResolution = 'thumbnail' | 'very small' | 'small' | 'medium' | 'large' | 'best';
10
+ /**
11
+ * Converts pane size into h264 maxFs
12
+ * @param {PaneSize} paneSize
13
+ * @returns {number}
14
+ */
15
+ export declare function getMaxFs(paneSize: RemoteVideoResolution): number;
16
+ type Options = {
17
+ resolution?: RemoteVideoResolution;
18
+ };
19
+ export type RemoteMediaId = string;
20
+ /**
21
+ * Class representing a remote audio/video stream.
22
+ *
23
+ * Internally it is associated with a specific receive slot
24
+ * and a media request for it.
25
+ */
26
+ export declare class RemoteMedia extends EventsScope {
27
+ private receiveSlot?;
28
+ private readonly mediaRequestManager;
29
+ private readonly options;
30
+ private mediaRequestId?;
31
+ readonly id: RemoteMediaId;
32
+ /**
33
+ * Constructs RemoteMedia instance
34
+ *
35
+ * @param receiveSlot
36
+ * @param mediaRequestManager
37
+ * @param options
38
+ */
39
+ constructor(receiveSlot: ReceiveSlot, mediaRequestManager: MediaRequestManager, options?: Options);
40
+ /**
41
+ * Supply the width and height of the video element
42
+ * to restrict the requested resolution to this size
43
+ * @param width width of the video element
44
+ * @param height height of the video element
45
+ */
46
+ setSizeHint(width: any, height: any): void;
47
+ /**
48
+ * registers event listeners on the receive slot and forwards all the events
49
+ */
50
+ private setupEventListeners;
51
+ /**
52
+ * Getter for mediaType
53
+ */
54
+ get mediaType(): MediaType;
55
+ /**
56
+ * Getter for memberId
57
+ */
58
+ get memberId(): string;
59
+ /**
60
+ * Getter for csi
61
+ */
62
+ get csi(): number;
63
+ /**
64
+ * Getter for source state
65
+ */
66
+ get sourceState(): StreamState;
67
+ /**
68
+ * Getter for remote media stream
69
+ */
70
+ get stream(): MediaStream;
71
+ }
72
+ export {};
@@ -0,0 +1,49 @@
1
+ import { NamedMediaGroup } from '@webex/internal-media-core';
2
+ import { RemoteMedia, RemoteVideoResolution } from './remoteMedia';
3
+ import { MediaRequestManager } from './mediaRequestManager';
4
+ import { CSI, ReceiveSlot } from './receiveSlot';
5
+ type Options = {
6
+ resolution?: RemoteVideoResolution;
7
+ preferLiveVideo?: boolean;
8
+ namedMediaGroup?: NamedMediaGroup;
9
+ };
10
+ export declare class RemoteMediaGroup {
11
+ private mediaRequestManager;
12
+ private priority;
13
+ private options;
14
+ private unpinnedRemoteMedia;
15
+ private mediaRequestId?;
16
+ private pinnedRemoteMedia;
17
+ constructor(mediaRequestManager: MediaRequestManager, receiveSlots: ReceiveSlot[], priority: number, commitMediaRequest: boolean, options?: Options);
18
+ /**
19
+ * Gets the array of remote media elements from the group
20
+ *
21
+ * @param {string} filter - 'all' (default) returns both pinned and unpinned
22
+ * @returns {Array<RemoteMedia>}
23
+ */
24
+ getRemoteMedia(filter?: 'all' | 'pinned' | 'unpinned'): RemoteMedia[];
25
+ /**
26
+ * Pins a specific remote media instance to a specfic CSI, so the media will
27
+ * no longer come from active speaker, but from that CSI.
28
+ * If no CSI is given, the current CSI value is used.
29
+ *
30
+ */
31
+ pin(remoteMedia: RemoteMedia, csi?: CSI): void;
32
+ /**
33
+ * Unpins a remote media instance, so that it will again provide media from active speakers
34
+ *
35
+ */
36
+ unpin(remoteMedia: RemoteMedia): void;
37
+ isPinned(remoteMedia: RemoteMedia): boolean;
38
+ private sendActiveSpeakerMediaRequest;
39
+ private cancelActiveSpeakerMediaRequest;
40
+ /**
41
+ * Checks if a given RemoteMedia instance belongs to this group.
42
+ *
43
+ * @param remoteMedia RemoteMedia instance to check
44
+ * @param filter controls which remote media from the group to check
45
+ * @returns true if remote media is found
46
+ */
47
+ includes(remoteMedia: RemoteMedia, filter?: 'all' | 'pinned' | 'unpinned'): boolean;
48
+ }
49
+ export {};
@@ -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
+ }