@webex/plugin-meetings 3.10.0-next.1 → 3.10.0-next.11

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 (246) hide show
  1. package/dist/annotation/annotation.types.js.map +1 -1
  2. package/dist/annotation/constants.js.map +1 -1
  3. package/dist/annotation/index.js +19 -22
  4. package/dist/annotation/index.js.map +1 -1
  5. package/dist/breakouts/breakout.js +6 -6
  6. package/dist/breakouts/breakout.js.map +1 -1
  7. package/dist/breakouts/collection.js.map +1 -1
  8. package/dist/breakouts/edit-lock-error.js +9 -11
  9. package/dist/breakouts/edit-lock-error.js.map +1 -1
  10. package/dist/breakouts/events.js.map +1 -1
  11. package/dist/breakouts/index.js +126 -127
  12. package/dist/breakouts/index.js.map +1 -1
  13. package/dist/breakouts/request.js +6 -8
  14. package/dist/breakouts/request.js.map +1 -1
  15. package/dist/breakouts/utils.js.map +1 -1
  16. package/dist/common/browser-detection.js.map +1 -1
  17. package/dist/common/collection.js +1 -2
  18. package/dist/common/collection.js.map +1 -1
  19. package/dist/common/config.js.map +1 -1
  20. package/dist/common/errors/captcha-error.js +9 -11
  21. package/dist/common/errors/captcha-error.js.map +1 -1
  22. package/dist/common/errors/intent-to-join.js +10 -12
  23. package/dist/common/errors/intent-to-join.js.map +1 -1
  24. package/dist/common/errors/join-forbidden-error.js +10 -12
  25. package/dist/common/errors/join-forbidden-error.js.map +1 -1
  26. package/dist/common/errors/join-meeting.js +10 -12
  27. package/dist/common/errors/join-meeting.js.map +1 -1
  28. package/dist/common/errors/join-webinar-error.js +9 -11
  29. package/dist/common/errors/join-webinar-error.js.map +1 -1
  30. package/dist/common/errors/media.js +9 -11
  31. package/dist/common/errors/media.js.map +1 -1
  32. package/dist/common/errors/multistream-not-supported-error.js +9 -11
  33. package/dist/common/errors/multistream-not-supported-error.js.map +1 -1
  34. package/dist/common/errors/no-meeting-info.js +9 -11
  35. package/dist/common/errors/no-meeting-info.js.map +1 -1
  36. package/dist/common/errors/parameter.js +11 -14
  37. package/dist/common/errors/parameter.js.map +1 -1
  38. package/dist/common/errors/password-error.js +9 -11
  39. package/dist/common/errors/password-error.js.map +1 -1
  40. package/dist/common/errors/permission.js +9 -11
  41. package/dist/common/errors/permission.js.map +1 -1
  42. package/dist/common/errors/reclaim-host-role-errors.js +32 -38
  43. package/dist/common/errors/reclaim-host-role-errors.js.map +1 -1
  44. package/dist/common/errors/reconnection-not-started.js +5 -6
  45. package/dist/common/errors/reconnection-not-started.js.map +1 -1
  46. package/dist/common/errors/reconnection.js +9 -11
  47. package/dist/common/errors/reconnection.js.map +1 -1
  48. package/dist/common/errors/stats.js +9 -11
  49. package/dist/common/errors/stats.js.map +1 -1
  50. package/dist/common/errors/webex-errors.js +38 -27
  51. package/dist/common/errors/webex-errors.js.map +1 -1
  52. package/dist/common/errors/webex-meetings-error.js +9 -12
  53. package/dist/common/errors/webex-meetings-error.js.map +1 -1
  54. package/dist/common/events/events-scope.js +9 -10
  55. package/dist/common/events/events-scope.js.map +1 -1
  56. package/dist/common/events/events.js +9 -10
  57. package/dist/common/events/events.js.map +1 -1
  58. package/dist/common/events/trigger-proxy.js.map +1 -1
  59. package/dist/common/events/util.js.map +1 -1
  60. package/dist/common/logs/logger-config.js.map +1 -1
  61. package/dist/common/logs/logger-proxy.js.map +1 -1
  62. package/dist/common/logs/request.js +17 -17
  63. package/dist/common/logs/request.js.map +1 -1
  64. package/dist/common/queue.js +1 -2
  65. package/dist/common/queue.js.map +1 -1
  66. package/dist/config.js +0 -1
  67. package/dist/config.js.map +1 -1
  68. package/dist/constants.js +12 -8
  69. package/dist/constants.js.map +1 -1
  70. package/dist/controls-options-manager/constants.js.map +1 -1
  71. package/dist/controls-options-manager/enums.js.map +1 -1
  72. package/dist/controls-options-manager/index.js +1 -2
  73. package/dist/controls-options-manager/index.js.map +1 -1
  74. package/dist/controls-options-manager/types.js.map +1 -1
  75. package/dist/controls-options-manager/util.js +1 -2
  76. package/dist/controls-options-manager/util.js.map +1 -1
  77. package/dist/hashTree/hashTreeParser.js +165 -0
  78. package/dist/hashTree/hashTreeParser.js.map +1 -0
  79. package/dist/hashTree/types.js +15 -0
  80. package/dist/hashTree/types.js.map +1 -0
  81. package/dist/index.js +8 -2
  82. package/dist/index.js.map +1 -1
  83. package/dist/interceptors/index.js.map +1 -1
  84. package/dist/interceptors/locusRetry.js +6 -8
  85. package/dist/interceptors/locusRetry.js.map +1 -1
  86. package/dist/interceptors/locusRouteToken.js +6 -8
  87. package/dist/interceptors/locusRouteToken.js.map +1 -1
  88. package/dist/interpretation/collection.js.map +1 -1
  89. package/dist/interpretation/index.js +1 -2
  90. package/dist/interpretation/index.js.map +1 -1
  91. package/dist/interpretation/siLanguage.js +1 -1
  92. package/dist/interpretation/siLanguage.js.map +1 -1
  93. package/dist/locus-info/controlsUtils.js.map +1 -1
  94. package/dist/locus-info/embeddedAppsUtils.js.map +1 -1
  95. package/dist/locus-info/fullState.js.map +1 -1
  96. package/dist/locus-info/hostUtils.js.map +1 -1
  97. package/dist/locus-info/index.js +532 -94
  98. package/dist/locus-info/index.js.map +1 -1
  99. package/dist/locus-info/infoUtils.js.map +1 -1
  100. package/dist/locus-info/mediaSharesUtils.js.map +1 -1
  101. package/dist/locus-info/parser.js +3 -4
  102. package/dist/locus-info/parser.js.map +1 -1
  103. package/dist/locus-info/selfUtils.js.map +1 -1
  104. package/dist/locus-info/types.js +7 -0
  105. package/dist/locus-info/types.js.map +1 -0
  106. package/dist/media/MediaConnectionAwaiter.js +1 -2
  107. package/dist/media/MediaConnectionAwaiter.js.map +1 -1
  108. package/dist/media/index.js +5 -2
  109. package/dist/media/index.js.map +1 -1
  110. package/dist/media/properties.js +15 -17
  111. package/dist/media/properties.js.map +1 -1
  112. package/dist/media/util.js.map +1 -1
  113. package/dist/meeting/brbState.js +8 -9
  114. package/dist/meeting/brbState.js.map +1 -1
  115. package/dist/meeting/connectionStateHandler.js +10 -13
  116. package/dist/meeting/connectionStateHandler.js.map +1 -1
  117. package/dist/meeting/in-meeting-actions.js.map +1 -1
  118. package/dist/meeting/index.js +1556 -1528
  119. package/dist/meeting/index.js.map +1 -1
  120. package/dist/meeting/locusMediaRequest.js +13 -17
  121. package/dist/meeting/locusMediaRequest.js.map +1 -1
  122. package/dist/meeting/muteState.js +11 -12
  123. package/dist/meeting/muteState.js.map +1 -1
  124. package/dist/meeting/request.js +101 -104
  125. package/dist/meeting/request.js.map +1 -1
  126. package/dist/meeting/request.type.js.map +1 -1
  127. package/dist/meeting/state.js.map +1 -1
  128. package/dist/meeting/type.js.map +1 -1
  129. package/dist/meeting/util.js +24 -23
  130. package/dist/meeting/util.js.map +1 -1
  131. package/dist/meeting/voicea-meeting.js +3 -3
  132. package/dist/meeting/voicea-meeting.js.map +1 -1
  133. package/dist/meeting-info/collection.js +7 -10
  134. package/dist/meeting-info/collection.js.map +1 -1
  135. package/dist/meeting-info/index.js +1 -2
  136. package/dist/meeting-info/index.js.map +1 -1
  137. package/dist/meeting-info/meeting-info-v2.js +135 -146
  138. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  139. package/dist/meeting-info/request.js +1 -2
  140. package/dist/meeting-info/request.js.map +1 -1
  141. package/dist/meeting-info/util.js +36 -37
  142. package/dist/meeting-info/util.js.map +1 -1
  143. package/dist/meeting-info/utilv2.js +30 -31
  144. package/dist/meeting-info/utilv2.js.map +1 -1
  145. package/dist/meetings/collection.js +6 -8
  146. package/dist/meetings/collection.js.map +1 -1
  147. package/dist/meetings/index.js +179 -141
  148. package/dist/meetings/index.js.map +1 -1
  149. package/dist/meetings/meetings.types.js.map +1 -1
  150. package/dist/meetings/request.js +6 -8
  151. package/dist/meetings/request.js.map +1 -1
  152. package/dist/meetings/util.js +25 -23
  153. package/dist/meetings/util.js.map +1 -1
  154. package/dist/member/index.js +1 -2
  155. package/dist/member/index.js.map +1 -1
  156. package/dist/member/types.js +6 -3
  157. package/dist/member/types.js.map +1 -1
  158. package/dist/member/util.js.map +1 -1
  159. package/dist/members/collection.js +1 -2
  160. package/dist/members/collection.js.map +1 -1
  161. package/dist/members/index.js +18 -21
  162. package/dist/members/index.js.map +1 -1
  163. package/dist/members/request.js +8 -11
  164. package/dist/members/request.js.map +1 -1
  165. package/dist/members/types.js.map +1 -1
  166. package/dist/members/util.js.map +1 -1
  167. package/dist/metrics/constants.js +3 -1
  168. package/dist/metrics/constants.js.map +1 -1
  169. package/dist/metrics/index.js +3 -4
  170. package/dist/metrics/index.js.map +1 -1
  171. package/dist/multistream/mediaRequestManager.js +1 -2
  172. package/dist/multistream/mediaRequestManager.js.map +1 -1
  173. package/dist/multistream/receiveSlot.js +34 -45
  174. package/dist/multistream/receiveSlot.js.map +1 -1
  175. package/dist/multistream/receiveSlotManager.js +8 -9
  176. package/dist/multistream/receiveSlotManager.js.map +1 -1
  177. package/dist/multistream/remoteMedia.js +12 -15
  178. package/dist/multistream/remoteMedia.js.map +1 -1
  179. package/dist/multistream/remoteMediaGroup.js +1 -2
  180. package/dist/multistream/remoteMediaGroup.js.map +1 -1
  181. package/dist/multistream/remoteMediaManager.js +122 -123
  182. package/dist/multistream/remoteMediaManager.js.map +1 -1
  183. package/dist/multistream/sendSlotManager.js +29 -30
  184. package/dist/multistream/sendSlotManager.js.map +1 -1
  185. package/dist/personal-meeting-room/index.js +16 -19
  186. package/dist/personal-meeting-room/index.js.map +1 -1
  187. package/dist/personal-meeting-room/request.js +7 -10
  188. package/dist/personal-meeting-room/request.js.map +1 -1
  189. package/dist/personal-meeting-room/util.js.map +1 -1
  190. package/dist/reachability/clusterReachability.js +36 -39
  191. package/dist/reachability/clusterReachability.js.map +1 -1
  192. package/dist/reachability/index.js +203 -205
  193. package/dist/reachability/index.js.map +1 -1
  194. package/dist/reachability/reachability.types.js.map +1 -1
  195. package/dist/reachability/request.js.map +1 -1
  196. package/dist/reachability/util.js.map +1 -1
  197. package/dist/reactions/constants.js.map +1 -1
  198. package/dist/reactions/reactions.js.map +1 -1
  199. package/dist/reactions/reactions.type.js.map +1 -1
  200. package/dist/reconnection-manager/index.js +178 -176
  201. package/dist/reconnection-manager/index.js.map +1 -1
  202. package/dist/recording-controller/enums.js.map +1 -1
  203. package/dist/recording-controller/index.js +1 -2
  204. package/dist/recording-controller/index.js.map +1 -1
  205. package/dist/recording-controller/util.js.map +1 -1
  206. package/dist/roap/index.js +12 -15
  207. package/dist/roap/index.js.map +1 -1
  208. package/dist/roap/request.js +24 -26
  209. package/dist/roap/request.js.map +1 -1
  210. package/dist/roap/turnDiscovery.js +75 -76
  211. package/dist/roap/turnDiscovery.js.map +1 -1
  212. package/dist/roap/types.js.map +1 -1
  213. package/dist/transcription/index.js +4 -5
  214. package/dist/transcription/index.js.map +1 -1
  215. package/dist/types/common/errors/webex-errors.d.ts +12 -0
  216. package/dist/types/constants.d.ts +26 -21
  217. package/dist/types/hashTree/hashTreeParser.d.ts +109 -0
  218. package/dist/types/hashTree/types.d.ts +16 -0
  219. package/dist/types/index.d.ts +2 -1
  220. package/dist/types/locus-info/index.d.ts +91 -42
  221. package/dist/types/locus-info/types.d.ts +45 -0
  222. package/dist/types/meeting/index.d.ts +22 -9
  223. package/dist/types/meetings/index.d.ts +9 -2
  224. package/dist/types/metrics/constants.d.ts +2 -0
  225. package/dist/webinar/collection.js +1 -2
  226. package/dist/webinar/collection.js.map +1 -1
  227. package/dist/webinar/index.js +148 -158
  228. package/dist/webinar/index.js.map +1 -1
  229. package/package.json +16 -16
  230. package/src/common/errors/webex-errors.ts +19 -0
  231. package/src/constants.ts +14 -2
  232. package/src/hashTree/hashTreeParser.ts +146 -0
  233. package/src/hashTree/types.ts +20 -0
  234. package/src/index.ts +2 -0
  235. package/src/locus-info/index.ts +534 -85
  236. package/src/locus-info/types.ts +46 -0
  237. package/src/media/index.ts +6 -0
  238. package/src/meeting/index.ts +61 -27
  239. package/src/meeting/util.ts +1 -0
  240. package/src/meetings/index.ts +104 -51
  241. package/src/metrics/constants.ts +2 -0
  242. package/test/unit/spec/locus-info/index.js +576 -1
  243. package/test/unit/spec/media/index.ts +140 -9
  244. package/test/unit/spec/meeting/index.js +178 -94
  245. package/test/unit/spec/meeting/utils.js +77 -0
  246. package/test/unit/spec/meetings/index.js +71 -28
package/src/constants.ts CHANGED
@@ -347,7 +347,7 @@ export const EVENT_TRIGGERS = {
347
347
  MEETING_SELF_LEFT: 'meeting:self:left',
348
348
  NETWORK_QUALITY: 'network:quality',
349
349
  MEDIA_NEGOTIATED: 'media:negotiated',
350
- MEDIA_INBOUND_AUDIO_ISSUE_DETECTED: 'media:inboundAudio:issueDetected',
350
+ MEDIA_INBOUND_AUDIO_ISSUE_DETECTED: 'media:inboundAudio:issueDetected', // event.data: InboundAudioIssueEvent
351
351
  // the following events apply only to multistream media connections
352
352
  ACTIVE_SPEAKER_CHANGED: 'media:activeSpeakerChanged',
353
353
  REMOTE_VIDEO_SOURCE_COUNT_CHANGED: 'media:remoteVideoSourceCountChanged',
@@ -793,7 +793,19 @@ export const LOCUSEVENT = {
793
793
  RECORDING_STOPPED: 'locus.recording_stopped',
794
794
 
795
795
  SELF_CHANGED: 'locus.self_changed',
796
- };
796
+
797
+ HASH_TREE_DATA_UPDATED: 'locus.state_message',
798
+
799
+ // events generated internally by SDK
800
+ SDK_LOCUS_FROM_SYNC_MEETINGS: 'jsSdk.locus_from_sync_meetings', // generated for each meeting from response to GET /loci Locus API call
801
+ SDK_NO_EVENT: 'jsSdk.no_event', // used in cases where eventType is irrelevant
802
+ } as const;
803
+
804
+ export type LOCUSEVENT = Enum<typeof LOCUSEVENT>;
805
+
806
+ // HASH_TREE_DATA_UPDATED event can come over Mercury (so it's listed above with other Mercury events),
807
+ // but also over LLM as an event like this:
808
+ export const LOCUS_LLM_EVENT = `event:${LOCUSEVENT.HASH_TREE_DATA_UPDATED}`;
797
809
 
798
810
  export const MEDIA_TRACK_CONSTRAINT = {
799
811
  CURSOR: {
@@ -0,0 +1,146 @@
1
+ import {Enum} from '../constants';
2
+ import {ObjectType, HtMeta} from './types';
3
+ import {LocusDTO} from '../locus-info/types';
4
+
5
+ export interface DataSet {
6
+ url: string;
7
+ root: string;
8
+ version: number;
9
+ leafCount: number;
10
+ name: string;
11
+ idleMs: number;
12
+ backoff: {
13
+ maxMs: number;
14
+ exponent: number;
15
+ };
16
+ }
17
+
18
+ export interface HashTreeObject {
19
+ htMeta: HtMeta;
20
+ data: Record<string, any>;
21
+ }
22
+
23
+ export interface RootHashMessage {
24
+ dataSets: Array<DataSet>;
25
+ }
26
+ export interface HashTreeMessage {
27
+ dataSets: Array<DataSet>;
28
+ visibleDataSetsUrl: string; // url from which we can get more info about all data sets - now it seems to be visibleDataSetsUrl
29
+ locusStateElements?: Array<HashTreeObject>;
30
+ locusSessionId?: string;
31
+ locusUrl: string;
32
+ }
33
+
34
+ interface InternalDataSet extends DataSet {
35
+ // hashTree?: HashTree; // set only for visible data sets
36
+ timer?: ReturnType<typeof setTimeout>;
37
+ }
38
+
39
+ type WebexRequestMethod = (options: Record<string, any>) => Promise<any>;
40
+
41
+ export const LocusInfoUpdateType = {
42
+ OBJECTS_UPDATED: 'OBJECTS_UPDATED',
43
+ MEETING_ENDED: 'MEETING_ENDED',
44
+ } as const;
45
+
46
+ export type LocusInfoUpdateType = Enum<typeof LocusInfoUpdateType>;
47
+ export type LocusInfoUpdateCallback = (
48
+ updateType: LocusInfoUpdateType,
49
+ data?: {updatedObjects: HashTreeObject[]}
50
+ ) => void;
51
+
52
+ /**
53
+ * This error is thrown if we receive information that the meeting has ended while we're processing some hash messages.
54
+ * It's handled internally by HashTreeParser and results in MEETING_ENDED being sent up.
55
+ */
56
+ class MeetingEndedError extends Error {}
57
+
58
+ /**
59
+ * Checks if the given hash tree object is of type "self"
60
+ * @param {HashTreeObject} object object to check
61
+ * @returns {boolean} True if the object is of type "self", false otherwise
62
+ */
63
+ export function isSelf(object: HashTreeObject) {
64
+ return object.htMeta.elementId.type.toLowerCase() === ObjectType.self;
65
+ }
66
+
67
+ /**
68
+ * Parses hash tree eventing locus data
69
+ */
70
+ class HashTreeParser {
71
+ dataSets: Record<string, InternalDataSet> = {};
72
+ visibleDataSetsUrl: string; // url from which we can get info about all data sets
73
+ webexRequest: WebexRequestMethod;
74
+ locusInfoUpdateCallback: LocusInfoUpdateCallback;
75
+ visibleDataSets: string[];
76
+ debugId: string;
77
+
78
+ /**
79
+ * Constructor for HashTreeParser
80
+ * @param {Object} options
81
+ * @param {Object} options.initialLocus The initial locus data containing the hash tree information
82
+ */
83
+ constructor(options: {
84
+ initialLocus: {
85
+ dataSets: Array<DataSet>;
86
+ locus: any;
87
+ };
88
+ webexRequest: WebexRequestMethod;
89
+ locusInfoUpdateCallback: LocusInfoUpdateCallback;
90
+ debugId: string;
91
+ }) {
92
+ const {locus} = options.initialLocus;
93
+
94
+ this.debugId = options.debugId;
95
+ this.webexRequest = options.webexRequest;
96
+ this.locusInfoUpdateCallback = options.locusInfoUpdateCallback;
97
+ this.visibleDataSets = locus?.self?.visibleDataSets || [];
98
+ }
99
+
100
+ /**
101
+ * Initializes the hash tree parser from a message received from Locus.
102
+ *
103
+ * @param {HashTreeMessage} message - initial hash tree message received from Locus
104
+ * @returns {Promise}
105
+ */
106
+ async initializeFromMessage(message: HashTreeMessage) {
107
+ // todo
108
+ }
109
+
110
+ /**
111
+ * Initializes the hash tree parser from GET /loci API response by fetching all data sets metadata
112
+ * first and then doing an initialization sync on each data set
113
+ *
114
+ * This function requires that this.visibleDataSets have been already populated correctly by the constructor.
115
+ *
116
+ * @param {LocusDTO} locus - locus object received from GET /loci
117
+ * @returns {Promise}
118
+ */
119
+ async initializeFromGetLociResponse(locus: LocusDTO) {
120
+ // todo
121
+ }
122
+
123
+ /**
124
+ * This method should be called when we receive a partial locus DTO that contains dataSets and htMeta information
125
+ * It updates the hash trees with the new leaf data based on the received Locus
126
+ *
127
+ * @param {Object} update - The locus update containing data sets and locus information
128
+ * @returns {void}
129
+ */
130
+ handleLocusUpdate(update: {dataSets?: Array<DataSet>; locus: any}): void {
131
+ // todo
132
+ }
133
+
134
+ /**
135
+ * Handles incoming hash tree messages, updates the hash trees and calls locusInfoUpdateCallback
136
+ *
137
+ * @param {HashTreeMessage} message - The hash tree message containing data sets and objects to be processed
138
+ * @param {string} [debugText] - Optional debug text to include in logs
139
+ * @returns {void}
140
+ */
141
+ async handleMessage(message: HashTreeMessage, debugText?: string): Promise<void> {
142
+ // todo
143
+ }
144
+ }
145
+
146
+ export default HashTreeParser;
@@ -0,0 +1,20 @@
1
+ import {Enum} from '../constants';
2
+
3
+ // todo: Locus docs have now more types like CONTROL_ENTRY, EMBEDDED_APP, FULL_STATE, INFO, MEDIA_SHARE - need to add support for them once Locus implements them
4
+ export const ObjectType = {
5
+ participant: 'participant',
6
+ self: 'self',
7
+ locus: 'locus',
8
+ mediaShare: 'mediashare',
9
+ } as const;
10
+
11
+ export type ObjectType = Enum<typeof ObjectType>;
12
+
13
+ export interface HtMeta {
14
+ elementId: {
15
+ type: ObjectType;
16
+ id: number;
17
+ version: number;
18
+ };
19
+ dataSetNames: string[];
20
+ }
package/src/index.ts CHANGED
@@ -18,6 +18,7 @@ import {
18
18
  import Meeting from './meeting';
19
19
  import MeetingInfoUtil from './meeting-info/utilv2';
20
20
  import JoinMeetingError from './common/errors/join-meeting';
21
+ import {SdpResponseTimeoutError} from './common/errors/webex-errors';
21
22
 
22
23
  registerPlugin('meetings', Meetings, {
23
24
  config,
@@ -73,6 +74,7 @@ export {
73
74
  Meeting,
74
75
  MeetingInfoUtil,
75
76
  JoinWebinarError,
77
+ SdpResponseTimeoutError,
76
78
  };
77
79
 
78
80
  export {RemoteMedia} from './multistream/remoteMedia';