@webex/plugin-meetings 3.12.0-task-refactor.1 → 3.12.0-webex-services-ready.1

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 (302) hide show
  1. package/AGENTS.md +9 -0
  2. package/dist/aiEnableRequest/index.js +197 -0
  3. package/dist/aiEnableRequest/index.js.map +1 -0
  4. package/dist/aiEnableRequest/utils.js +36 -0
  5. package/dist/aiEnableRequest/utils.js.map +1 -0
  6. package/dist/annotation/index.js +14 -5
  7. package/dist/annotation/index.js.map +1 -1
  8. package/dist/breakouts/breakout.js +8 -3
  9. package/dist/breakouts/breakout.js.map +1 -1
  10. package/dist/breakouts/index.js +26 -2
  11. package/dist/breakouts/index.js.map +1 -1
  12. package/dist/common/errors/webex-errors.js +49 -5
  13. package/dist/common/errors/webex-errors.js.map +1 -1
  14. package/dist/config.js +9 -3
  15. package/dist/config.js.map +1 -1
  16. package/dist/constants.js +59 -10
  17. package/dist/constants.js.map +1 -1
  18. package/dist/controls-options-manager/constants.js +11 -1
  19. package/dist/controls-options-manager/constants.js.map +1 -1
  20. package/dist/controls-options-manager/index.js +67 -29
  21. package/dist/controls-options-manager/index.js.map +1 -1
  22. package/dist/controls-options-manager/util.js +91 -0
  23. package/dist/controls-options-manager/util.js.map +1 -1
  24. package/dist/hashTree/constants.js +34 -0
  25. package/dist/hashTree/constants.js.map +1 -0
  26. package/dist/hashTree/hashTree.js +533 -0
  27. package/dist/hashTree/hashTree.js.map +1 -0
  28. package/dist/hashTree/hashTreeParser.js +2068 -36
  29. package/dist/hashTree/hashTreeParser.js.map +1 -1
  30. package/dist/hashTree/types.js +13 -3
  31. package/dist/hashTree/types.js.map +1 -1
  32. package/dist/hashTree/utils.js +111 -0
  33. package/dist/hashTree/utils.js.map +1 -0
  34. package/dist/index.js +18 -2
  35. package/dist/index.js.map +1 -1
  36. package/dist/interceptors/constant.js +12 -0
  37. package/dist/interceptors/constant.js.map +1 -0
  38. package/dist/interceptors/dataChannelAuthToken.js +350 -0
  39. package/dist/interceptors/dataChannelAuthToken.js.map +1 -0
  40. package/dist/interceptors/index.js +7 -0
  41. package/dist/interceptors/index.js.map +1 -1
  42. package/dist/interceptors/locusRetry.js +23 -8
  43. package/dist/interceptors/locusRetry.js.map +1 -1
  44. package/dist/interceptors/locusRouteToken.js +27 -5
  45. package/dist/interceptors/locusRouteToken.js.map +1 -1
  46. package/dist/interceptors/utils.js +27 -0
  47. package/dist/interceptors/utils.js.map +1 -0
  48. package/dist/interpretation/index.js +11 -2
  49. package/dist/interpretation/index.js.map +1 -1
  50. package/dist/interpretation/interpretation.types.js +7 -0
  51. package/dist/interpretation/interpretation.types.js.map +1 -0
  52. package/dist/interpretation/siLanguage.js +1 -1
  53. package/dist/locus-info/controlsUtils.js +11 -4
  54. package/dist/locus-info/controlsUtils.js.map +1 -1
  55. package/dist/locus-info/index.js +896 -277
  56. package/dist/locus-info/index.js.map +1 -1
  57. package/dist/locus-info/infoUtils.js +36 -5
  58. package/dist/locus-info/infoUtils.js.map +1 -1
  59. package/dist/locus-info/selfUtils.js +1 -0
  60. package/dist/locus-info/selfUtils.js.map +1 -1
  61. package/dist/locus-info/types.js +19 -0
  62. package/dist/locus-info/types.js.map +1 -1
  63. package/dist/media/MediaConnectionAwaiter.js +72 -3
  64. package/dist/media/MediaConnectionAwaiter.js.map +1 -1
  65. package/dist/media/index.js +8 -2
  66. package/dist/media/index.js.map +1 -1
  67. package/dist/media/properties.js +5 -2
  68. package/dist/media/properties.js.map +1 -1
  69. package/dist/meeting/in-meeting-actions.js +11 -1
  70. package/dist/meeting/in-meeting-actions.js.map +1 -1
  71. package/dist/meeting/index.js +2075 -1096
  72. package/dist/meeting/index.js.map +1 -1
  73. package/dist/meeting/locusMediaRequest.js +229 -82
  74. package/dist/meeting/locusMediaRequest.js.map +1 -1
  75. package/dist/meeting/muteState.js +10 -1
  76. package/dist/meeting/muteState.js.map +1 -1
  77. package/dist/meeting/request.js +55 -2
  78. package/dist/meeting/request.js.map +1 -1
  79. package/dist/meeting/request.type.js.map +1 -1
  80. package/dist/meeting/util.js +168 -5
  81. package/dist/meeting/util.js.map +1 -1
  82. package/dist/meeting-info/meeting-info-v2.js +2 -2
  83. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  84. package/dist/meetings/index.js +369 -173
  85. package/dist/meetings/index.js.map +1 -1
  86. package/dist/meetings/meetings.types.js +6 -1
  87. package/dist/meetings/meetings.types.js.map +1 -1
  88. package/dist/meetings/request.js +39 -0
  89. package/dist/meetings/request.js.map +1 -1
  90. package/dist/meetings/util.js +127 -25
  91. package/dist/meetings/util.js.map +1 -1
  92. package/dist/member/index.js +20 -0
  93. package/dist/member/index.js.map +1 -1
  94. package/dist/member/types.js.map +1 -1
  95. package/dist/member/util.js +40 -0
  96. package/dist/member/util.js.map +1 -1
  97. package/dist/members/index.js +101 -43
  98. package/dist/members/index.js.map +1 -1
  99. package/dist/members/util.js +8 -1
  100. package/dist/members/util.js.map +1 -1
  101. package/dist/metrics/constants.js +11 -1
  102. package/dist/metrics/constants.js.map +1 -1
  103. package/dist/multistream/codec/constants.js +63 -0
  104. package/dist/multistream/codec/constants.js.map +1 -0
  105. package/dist/multistream/mediaRequestManager.js +64 -68
  106. package/dist/multistream/mediaRequestManager.js.map +1 -1
  107. package/dist/multistream/receiveSlot.js +9 -0
  108. package/dist/multistream/receiveSlot.js.map +1 -1
  109. package/dist/multistream/remoteMediaManager.js +11 -0
  110. package/dist/multistream/remoteMediaManager.js.map +1 -1
  111. package/dist/multistream/sendSlotManager.js +116 -2
  112. package/dist/multistream/sendSlotManager.js.map +1 -1
  113. package/dist/reachability/clusterReachability.js +171 -18
  114. package/dist/reachability/clusterReachability.js.map +1 -1
  115. package/dist/reachability/index.js +142 -94
  116. package/dist/reachability/index.js.map +1 -1
  117. package/dist/reachability/reachability.types.js +2 -0
  118. package/dist/reachability/reachability.types.js.map +1 -1
  119. package/dist/reachability/reachabilityPeerConnection.js +1 -1
  120. package/dist/reachability/reachabilityPeerConnection.js.map +1 -1
  121. package/dist/reachability/util.js +45 -0
  122. package/dist/reachability/util.js.map +1 -1
  123. package/dist/reactions/reactions.type.js.map +1 -1
  124. package/dist/reconnection-manager/index.js +0 -1
  125. package/dist/reconnection-manager/index.js.map +1 -1
  126. package/dist/recording-controller/index.js +1 -3
  127. package/dist/recording-controller/index.js.map +1 -1
  128. package/dist/types/aiEnableRequest/index.d.ts +5 -0
  129. package/dist/types/aiEnableRequest/utils.d.ts +2 -0
  130. package/dist/types/common/browser-detection.d.ts +1 -0
  131. package/dist/types/common/errors/webex-errors.d.ts +32 -2
  132. package/dist/types/common/events/events-scope.d.ts +1 -0
  133. package/dist/types/common/events/events.d.ts +1 -0
  134. package/dist/types/config.d.ts +7 -2
  135. package/dist/types/constants.d.ts +35 -1
  136. package/dist/types/controls-options-manager/constants.d.ts +6 -1
  137. package/dist/types/controls-options-manager/index.d.ts +16 -0
  138. package/dist/types/hashTree/constants.d.ts +11 -0
  139. package/dist/types/hashTree/hashTree.d.ts +136 -0
  140. package/dist/types/hashTree/hashTreeParser.d.ts +392 -14
  141. package/dist/types/hashTree/types.d.ts +20 -0
  142. package/dist/types/hashTree/utils.d.ts +40 -0
  143. package/dist/types/index.d.ts +4 -0
  144. package/dist/types/interceptors/constant.d.ts +5 -0
  145. package/dist/types/interceptors/dataChannelAuthToken.d.ts +43 -0
  146. package/dist/types/interceptors/index.d.ts +2 -1
  147. package/dist/types/interceptors/locusRetry.d.ts +4 -4
  148. package/dist/types/interceptors/locusRouteToken.d.ts +2 -0
  149. package/dist/types/interceptors/utils.d.ts +1 -0
  150. package/dist/types/interpretation/interpretation.types.d.ts +10 -0
  151. package/dist/types/locus-info/index.d.ts +116 -51
  152. package/dist/types/locus-info/infoUtils.d.ts +8 -0
  153. package/dist/types/locus-info/types.d.ts +48 -12
  154. package/dist/types/media/MediaConnectionAwaiter.d.ts +20 -2
  155. package/dist/types/media/properties.d.ts +3 -1
  156. package/dist/types/meeting/in-meeting-actions.d.ts +10 -0
  157. package/dist/types/meeting/index.d.ts +196 -15
  158. package/dist/types/meeting/locusMediaRequest.d.ts +12 -0
  159. package/dist/types/meeting/request.d.ts +17 -1
  160. package/dist/types/meeting/request.type.d.ts +5 -0
  161. package/dist/types/meeting/util.d.ts +40 -0
  162. package/dist/types/meeting-info/util.d.ts +1 -0
  163. package/dist/types/meeting-info/utilv2.d.ts +1 -0
  164. package/dist/types/meetings/index.d.ts +34 -20
  165. package/dist/types/meetings/meetings.types.d.ts +15 -0
  166. package/dist/types/meetings/request.d.ts +14 -0
  167. package/dist/types/member/index.d.ts +2 -0
  168. package/dist/types/member/types.d.ts +5 -4
  169. package/dist/types/member/util.d.ts +14 -0
  170. package/dist/types/members/index.d.ts +15 -2
  171. package/dist/types/members/util.d.ts +1 -5
  172. package/dist/types/metrics/constants.d.ts +10 -0
  173. package/dist/types/multistream/codec/constants.d.ts +7 -0
  174. package/dist/types/multistream/mediaRequestManager.d.ts +20 -26
  175. package/dist/types/multistream/sendSlotManager.d.ts +23 -1
  176. package/dist/types/reachability/clusterReachability.d.ts +33 -6
  177. package/dist/types/reachability/index.d.ts +10 -3
  178. package/dist/types/reachability/reachability.types.d.ts +7 -0
  179. package/dist/types/reachability/util.d.ts +17 -0
  180. package/dist/types/reactions/reactions.type.d.ts +4 -0
  181. package/dist/types/recording-controller/util.d.ts +5 -5
  182. package/dist/types/roap/index.d.ts +1 -1
  183. package/dist/types/webinar/utils.d.ts +6 -0
  184. package/dist/webinar/index.js +585 -164
  185. package/dist/webinar/index.js.map +1 -1
  186. package/dist/webinar/utils.js +25 -0
  187. package/dist/webinar/utils.js.map +1 -0
  188. package/package.json +26 -24
  189. package/src/aiEnableRequest/README.md +84 -0
  190. package/src/aiEnableRequest/index.ts +186 -0
  191. package/src/aiEnableRequest/utils.ts +25 -0
  192. package/src/annotation/index.ts +27 -7
  193. package/src/breakouts/breakout.ts +3 -1
  194. package/src/breakouts/index.ts +31 -0
  195. package/src/common/errors/webex-errors.ts +50 -3
  196. package/src/config.ts +7 -2
  197. package/src/constants.ts +49 -3
  198. package/src/controls-options-manager/constants.ts +14 -1
  199. package/src/controls-options-manager/index.ts +87 -28
  200. package/src/controls-options-manager/util.ts +81 -1
  201. package/src/hashTree/constants.ts +26 -0
  202. package/src/hashTree/hashTree.ts +480 -0
  203. package/src/hashTree/hashTreeParser.ts +1911 -29
  204. package/src/hashTree/types.ts +24 -1
  205. package/src/hashTree/utils.ts +98 -0
  206. package/src/index.ts +14 -1
  207. package/src/interceptors/constant.ts +6 -0
  208. package/src/interceptors/dataChannelAuthToken.ts +246 -0
  209. package/src/interceptors/index.ts +2 -1
  210. package/src/interceptors/locusRetry.ts +25 -4
  211. package/src/interceptors/locusRouteToken.ts +22 -5
  212. package/src/interceptors/utils.ts +16 -0
  213. package/src/interpretation/index.ts +29 -11
  214. package/src/interpretation/interpretation.types.ts +11 -0
  215. package/src/locus-info/controlsUtils.ts +20 -1
  216. package/src/locus-info/index.ts +958 -250
  217. package/src/locus-info/infoUtils.ts +41 -6
  218. package/src/locus-info/selfUtils.ts +1 -0
  219. package/src/locus-info/types.ts +51 -12
  220. package/src/media/MediaConnectionAwaiter.ts +62 -5
  221. package/src/media/index.ts +10 -1
  222. package/src/media/properties.ts +4 -1
  223. package/src/meeting/in-meeting-actions.ts +20 -0
  224. package/src/meeting/index.ts +1025 -146
  225. package/src/meeting/locusMediaRequest.ts +106 -6
  226. package/src/meeting/muteState.ts +10 -1
  227. package/src/meeting/request.ts +53 -0
  228. package/src/meeting/request.type.ts +6 -0
  229. package/src/meeting/util.ts +207 -7
  230. package/src/meeting-info/meeting-info-v2.ts +4 -2
  231. package/src/meetings/index.ts +307 -132
  232. package/src/meetings/meetings.types.ts +19 -0
  233. package/src/meetings/request.ts +43 -0
  234. package/src/meetings/util.ts +127 -13
  235. package/src/member/index.ts +20 -0
  236. package/src/member/types.ts +1 -0
  237. package/src/member/util.ts +41 -0
  238. package/src/members/index.ts +70 -7
  239. package/src/members/util.ts +12 -4
  240. package/src/metrics/constants.ts +11 -0
  241. package/src/multistream/codec/constants.ts +58 -0
  242. package/src/multistream/mediaRequestManager.ts +117 -76
  243. package/src/multistream/receiveSlot.ts +18 -0
  244. package/src/multistream/remoteMediaManager.ts +13 -0
  245. package/src/multistream/sendSlotManager.ts +97 -3
  246. package/src/reachability/clusterReachability.ts +156 -29
  247. package/src/reachability/index.ts +62 -17
  248. package/src/reachability/reachability.types.ts +11 -0
  249. package/src/reachability/reachabilityPeerConnection.ts +3 -1
  250. package/src/reachability/util.ts +36 -0
  251. package/src/reactions/reactions.type.ts +4 -0
  252. package/src/reconnection-manager/index.ts +0 -1
  253. package/src/recording-controller/index.ts +1 -2
  254. package/src/webinar/index.ts +448 -11
  255. package/src/webinar/utils.ts +16 -0
  256. package/test/unit/spec/aiEnableRequest/index.ts +1067 -0
  257. package/test/unit/spec/aiEnableRequest/utils.ts +130 -0
  258. package/test/unit/spec/annotation/index.ts +69 -7
  259. package/test/unit/spec/breakouts/breakout.ts +9 -3
  260. package/test/unit/spec/breakouts/index.ts +49 -0
  261. package/test/unit/spec/common/errors/webex-errors.ts +78 -0
  262. package/test/unit/spec/controls-options-manager/index.js +244 -29
  263. package/test/unit/spec/controls-options-manager/util.js +165 -0
  264. package/test/unit/spec/hashTree/hashTree.ts +721 -0
  265. package/test/unit/spec/hashTree/hashTreeParser.ts +5328 -0
  266. package/test/unit/spec/hashTree/utils.ts +264 -0
  267. package/test/unit/spec/interceptors/dataChannelAuthToken.ts +406 -0
  268. package/test/unit/spec/interceptors/locusRetry.ts +205 -4
  269. package/test/unit/spec/interceptors/locusRouteToken.ts +44 -0
  270. package/test/unit/spec/interceptors/utils.ts +75 -0
  271. package/test/unit/spec/interpretation/index.ts +26 -4
  272. package/test/unit/spec/locus-info/controlsUtils.js +222 -52
  273. package/test/unit/spec/locus-info/index.js +2000 -171
  274. package/test/unit/spec/locus-info/infoUtils.js +184 -1
  275. package/test/unit/spec/media/MediaConnectionAwaiter.ts +96 -1
  276. package/test/unit/spec/media/index.ts +92 -0
  277. package/test/unit/spec/media/properties.ts +12 -3
  278. package/test/unit/spec/meeting/in-meeting-actions.ts +12 -2
  279. package/test/unit/spec/meeting/index.js +2925 -209
  280. package/test/unit/spec/meeting/locusMediaRequest.ts +406 -4
  281. package/test/unit/spec/meeting/muteState.js +81 -0
  282. package/test/unit/spec/meeting/request.js +82 -0
  283. package/test/unit/spec/meeting/utils.js +595 -27
  284. package/test/unit/spec/meeting-info/meetinginfov2.js +19 -10
  285. package/test/unit/spec/meetings/index.js +1214 -75
  286. package/test/unit/spec/meetings/request.js +141 -0
  287. package/test/unit/spec/meetings/utils.js +453 -52
  288. package/test/unit/spec/member/index.js +35 -4
  289. package/test/unit/spec/member/util.js +154 -27
  290. package/test/unit/spec/members/index.js +216 -0
  291. package/test/unit/spec/members/request.js +37 -1
  292. package/test/unit/spec/members/utils.js +63 -0
  293. package/test/unit/spec/multistream/mediaRequestManager.ts +503 -122
  294. package/test/unit/spec/multistream/remoteMediaManager.ts +30 -0
  295. package/test/unit/spec/multistream/sendSlotManager.ts +135 -36
  296. package/test/unit/spec/reachability/clusterReachability.ts +125 -1
  297. package/test/unit/spec/reachability/index.ts +154 -49
  298. package/test/unit/spec/reachability/util.ts +31 -0
  299. package/test/unit/spec/reconnection-manager/index.js +4 -8
  300. package/test/unit/spec/recording-controller/index.js +9 -8
  301. package/test/unit/spec/webinar/index.ts +837 -39
  302. package/test/unit/spec/webinar/utils.ts +39 -0
@@ -31,3 +31,22 @@ export type MeetingRegistrationStatus = {
31
31
  mercuryConnect: boolean;
32
32
  checkH264Support: boolean;
33
33
  };
34
+
35
+ export enum SitePreferenceSelectOption {
36
+ SCHEDULING = 'scheduling',
37
+ }
38
+
39
+ export type FetchSitePreferencesMeViaSiteOptions = {
40
+ siteUrl?: string;
41
+ siteName?: string;
42
+ selectOptions?: SitePreferenceSelectOption[];
43
+ };
44
+
45
+ export const DEFAULT_SITE_PREFERENCE_SELECT_OPTIONS = [SitePreferenceSelectOption.SCHEDULING];
46
+
47
+ export type SitePreferencesResponse = {
48
+ scheduling?: {
49
+ supportScheduleWebinar?: boolean;
50
+ webinarWebLink?: string;
51
+ };
52
+ };
@@ -2,7 +2,14 @@
2
2
  import {StatelessWebexPlugin} from '@webex/webex-core';
3
3
 
4
4
  import LoggerProxy from '../common/logs/logger-proxy';
5
+ import ParameterError from '../common/errors/parameter';
5
6
  import {HTTP_VERBS, API, RESOURCE} from '../constants';
7
+ import {
8
+ DEFAULT_SITE_PREFERENCE_SELECT_OPTIONS,
9
+ type FetchSitePreferencesMeViaSiteOptions,
10
+ type SitePreferencesResponse,
11
+ } from './meetings.types';
12
+ import MeetingsUtil from './util';
6
13
 
7
14
  /**
8
15
  * @class MeetingRequest
@@ -45,6 +52,42 @@ export default class MeetingRequest extends StatelessWebexPlugin {
45
52
  return this.webex.internal.services.getMeetingPreferences();
46
53
  }
47
54
 
55
+ /**
56
+ * Fetches site preferences from a given site given a select option and a siteUrl with an optional siteName. If siteName is not provided, it will be derived from the siteUrl. If siteUrl is not provided, it will throw an error. If selectOptions is not provided, it will default to scheduling.
57
+ *
58
+ * @param {object} [options]
59
+ * @param {string} [options.siteUrl] - Webex site URL, for example "cisco.webex.com".
60
+ * @param {string} [options.siteName] - Site name query override. Defaults to the site name derived from options.siteUrl, e.g., "cisco".
61
+ * @param {SitePreferenceSelectOption[]} [options.selectOptions] - Preference sections to fetch. Defaults to 'scheduling'.
62
+ * @returns {Promise<SitePreferencesResponse>} site preferences response body
63
+ * @throws {ParameterError}
64
+ * @public
65
+ * @memberof MeetingRequest
66
+ */
67
+ fetchSitePreferencesMeViaSite(
68
+ options: FetchSitePreferencesMeViaSiteOptions = {}
69
+ ): Promise<SitePreferencesResponse> {
70
+ const {siteUrl, selectOptions = DEFAULT_SITE_PREFERENCE_SELECT_OPTIONS} = options;
71
+
72
+ if (!siteUrl) {
73
+ throw new ParameterError(
74
+ 'No siteUrl available. Call register() before fetching site preferences or provide options.siteUrl.'
75
+ );
76
+ }
77
+
78
+ // @ts-ignore - config comes from registerPlugin
79
+ const multipartSitePrefixList = this.config.meetings.multipartSitePrefixList || [];
80
+ const siteName = options.siteName || MeetingsUtil.getSiteName(siteUrl, multipartSitePrefixList);
81
+
82
+ // @ts-ignore
83
+ return this.request({
84
+ method: HTTP_VERBS.GET,
85
+ uri: `https://${siteUrl}/wbxappapi/v1/users/me/preference?select=${encodeURIComponent(
86
+ selectOptions.join(',')
87
+ )}&siteurl=${encodeURIComponent(siteName)}`,
88
+ }).then((res: any) => res.body);
89
+ }
90
+
48
91
  // locus federation, determines and populate locus if the responseBody has remote URLs to fetch locus details
49
92
 
50
93
  /**
@@ -1,12 +1,16 @@
1
1
  /* globals window */
2
2
 
3
+ import {CapabilityState, WebCapabilities} from '@webex/web-capabilities';
3
4
  import {
5
+ _CALL_,
4
6
  _CREATED_,
5
7
  _INCOMING_,
6
8
  _JOINED_,
7
9
  _LEFT_,
8
10
  DESTINATION_TYPE,
9
11
  _MOVED_,
12
+ _SIP_BRIDGE_,
13
+ _SPACE_SHARE_,
10
14
  BREAKOUTS,
11
15
  EVENT_TRIGGERS,
12
16
  LOCUS,
@@ -18,6 +22,7 @@ import Trigger from '../common/events/trigger-proxy';
18
22
  import BEHAVIORAL_METRICS from '../metrics/constants';
19
23
  import Metrics from '../metrics';
20
24
  import {MEETING_KEY} from './meetings.types';
25
+ import {EndMeetingReason, LocusFullState} from '../locus-info/types';
21
26
 
22
27
  /**
23
28
  * Meetings Media Codec Missing Event
@@ -117,15 +122,16 @@ MeetingsUtil.getMediaServerIp = (sdp) => {
117
122
  return mediaServerIp;
118
123
  };
119
124
 
120
- MeetingsUtil.checkForCorrelationId = (deviceUrl, locus) => {
121
- let devices = [];
122
-
123
- if (locus) {
124
- if (locus && locus.self && locus.self.devices) {
125
- devices = locus.self.devices;
126
- }
127
-
128
- const foundDevice = devices.find((device) => device.url === deviceUrl);
125
+ /**
126
+ * Finds correlationId of a device from locus self devices array
127
+ * that matches the given deviceUrl
128
+ * @param {string} deviceUrl
129
+ * @param {object} locusSelf
130
+ * @returns {string|false} correlationId or false if not found
131
+ */
132
+ MeetingsUtil.getCorrelationIdForDevice = (deviceUrl: string, locusSelf: any) => {
133
+ if (locusSelf?.devices) {
134
+ const foundDevice = locusSelf?.devices.find((device) => device.url === deviceUrl);
129
135
 
130
136
  if (foundDevice && foundDevice.correlationId) {
131
137
  return foundDevice.correlationId;
@@ -151,6 +157,30 @@ MeetingsUtil.parseDefaultSiteFromMeetingPreferences = (userPreferences) => {
151
157
  return result;
152
158
  };
153
159
 
160
+ MeetingsUtil.getSiteName = (site: string, multipartSitePrefixList: string[] = []) => {
161
+ if (!site) {
162
+ return null;
163
+ }
164
+
165
+ let siteName: string | undefined;
166
+
167
+ multipartSitePrefixList.forEach((multipartSitePrefix) => {
168
+ if (!siteName && site.includes(multipartSitePrefix)) {
169
+ const secondDot = site.indexOf('.', site.indexOf('.') + 1);
170
+
171
+ siteName = site.substring(0, secondDot);
172
+ }
173
+ });
174
+
175
+ if (siteName) {
176
+ return siteName;
177
+ }
178
+
179
+ siteName = site.substring(0, site.indexOf('.'));
180
+
181
+ return siteName;
182
+ };
183
+
154
184
  /**
155
185
  * Will check to see if the H.264 media codec is supported.
156
186
  * @async
@@ -158,20 +188,36 @@ MeetingsUtil.parseDefaultSiteFromMeetingPreferences = (userPreferences) => {
158
188
  * @returns {Promise<boolean>}
159
189
  */
160
190
  MeetingsUtil.hasH264Codec = async () => {
191
+ try {
192
+ const codecCapability = WebCapabilities.isCapableOfReceivingVideoCodec('video/H264');
193
+
194
+ if (codecCapability === CapabilityState.CAPABLE) {
195
+ return true;
196
+ }
197
+
198
+ if (codecCapability === CapabilityState.NOT_CAPABLE) {
199
+ return false;
200
+ }
201
+ } catch (_) {
202
+ // NO-OP
203
+ }
204
+
161
205
  let hasCodec = false;
162
206
 
207
+ let pc;
163
208
  try {
164
- const pc = new window.RTCPeerConnection();
209
+ pc = new window.RTCPeerConnection();
165
210
  const offer = await pc.createOffer({offerToReceiveVideo: true});
166
211
 
167
- if (offer.sdp.match(/^a=rtpmap:\d+\s+H264\/\d+/m)) {
212
+ if (offer.sdp?.match(/^a=rtpmap:\d+\s+H264\/\d+/m)) {
168
213
  hasCodec = true;
169
214
  }
170
- pc.close();
171
215
  } catch (error) {
172
216
  LoggerProxy.logger.warn(
173
217
  'Meetings:util#hasH264Codec --> Error creating peerConnection for H.264 test.'
174
218
  );
219
+ } finally {
220
+ pc?.close();
175
221
  }
176
222
 
177
223
  return hasCodec;
@@ -265,6 +311,49 @@ MeetingsUtil.getThisDevice = (newLocus: any, deviceUrl: string) => {
265
311
  return null;
266
312
  };
267
313
 
314
+ /**
315
+ * Checks if the fullState indicates the meeting has fully ended (not just a breakout move).
316
+ * @param {Object} fullState locus fullState data
317
+ * @returns {boolean}
318
+ */
319
+ MeetingsUtil.isWholeMeetingEnded = (fullState: LocusFullState): boolean => {
320
+ return (
321
+ fullState.state === LOCUS.STATE.INACTIVE &&
322
+ fullState.endMeetingReason !== EndMeetingReason.breakoutEnded
323
+ );
324
+ };
325
+
326
+ /**
327
+ * Checks if the self state in a locus indicates a breakout move or breakout end.
328
+ * Returns true when:
329
+ * - self state is LEFT with reason MOVED (regular breakout move), OR
330
+ * - fullState is INACTIVE with endMeetingReason BREAKOUT_ENDED (breakout session ended)
331
+ * @param {Object} locus locus data
332
+ * @returns {boolean}
333
+ */
334
+ MeetingsUtil.isSelfMovedOrBreakoutEnded = (locus: any): boolean => {
335
+ const isSelfLeftMoved = locus?.self?.state === _LEFT_ && locus?.self?.reason === _MOVED_;
336
+ const isBreakoutEnded =
337
+ locus?.fullState?.state === LOCUS.STATE.INACTIVE &&
338
+ locus?.fullState?.endMeetingReason === EndMeetingReason.breakoutEnded;
339
+
340
+ return isSelfLeftMoved || isBreakoutEnded;
341
+ };
342
+
343
+ /**
344
+ * Checks if a locus is a 1:1 call using locus.fullState.type.
345
+ * Returns true when fullState.type is CALL, SIP_BRIDGE, or SPACE_SHARE.
346
+ * @param {Object} locus locus data
347
+ * @returns {boolean}
348
+ */
349
+ MeetingsUtil.isOneOnOneCall = (locus: any): boolean => {
350
+ const fullStateType = locus?.fullState?.type;
351
+
352
+ return (
353
+ fullStateType === _CALL_ || fullStateType === _SIP_BRIDGE_ || fullStateType === _SPACE_SHARE_
354
+ );
355
+ };
356
+
268
357
  /**
269
358
  * get self device joined status from locus data
270
359
  * @param {Object} meeting current meeting data
@@ -293,7 +382,10 @@ MeetingsUtil.joinedOnThisDevice = (meeting: any, newLocus: any, deviceUrl: strin
293
382
  * @private
294
383
  */
295
384
  MeetingsUtil.isBreakoutLocusDTO = (newLocus: any) => {
296
- return newLocus?.controls?.breakout?.sessionType === BREAKOUTS.SESSION_TYPES.BREAKOUT;
385
+ return (
386
+ newLocus?.controls?.breakout?.sessionType === BREAKOUTS.SESSION_TYPES.BREAKOUT ||
387
+ !!newLocus?.info?.isBreakout
388
+ );
297
389
  };
298
390
 
299
391
  /**
@@ -309,4 +401,26 @@ MeetingsUtil.isValidBreakoutLocus = (locus: any) => {
309
401
 
310
402
  return isLocusAsBreakout && !inActiveStatus && selfJoined;
311
403
  };
404
+ /**
405
+ * check if the breakout locus is associated with the main locus by comparing the breakout control url or the replaces info in self device
406
+ * @param {Object} mainLocus main locus data
407
+ * @param {Object} breakoutLocus breakout locus data
408
+ * @returns {boolean}
409
+ * @private
410
+ */
411
+ MeetingsUtil.isMainAssociatedWithBreakout = (mainLocus: any, breakoutLocus: any) => {
412
+ if (
413
+ mainLocus.controls?.breakout?.url &&
414
+ mainLocus.controls?.breakout?.url === breakoutLocus.controls?.breakout?.url
415
+ ) {
416
+ return true;
417
+ }
418
+ const deviceUrl = breakoutLocus?.self?.deviceUrl;
419
+ const replaceInfo = MeetingsUtil.getThisDevice(breakoutLocus, deviceUrl)?.replaces?.[0];
420
+ if (replaceInfo?.locusUrl && replaceInfo.locusUrl === mainLocus.url) {
421
+ return true;
422
+ }
423
+
424
+ return false;
425
+ };
312
426
  export default MeetingsUtil;
@@ -13,6 +13,7 @@ export type MemberId = string;
13
13
  export default class Member {
14
14
  associatedUser: MemberId | null; // deprecated, use associatedUsers instead
15
15
  associatedUsers: Set<MemberId>; // users associated with this device, empty if this member is not a device
16
+ canApproveAIEnablement: boolean;
16
17
  canReclaimHost: boolean;
17
18
  id: MemberId;
18
19
  isAudioMuted: any;
@@ -26,6 +27,7 @@ export default class Member {
26
27
  isModerator: any;
27
28
  isModeratorAssignmentProhibited: any;
28
29
  isPresenterAssignmentProhibited: any;
30
+ isAttendeeAssignmentProhibited: any;
29
31
  isMutable: any;
30
32
  isNotAdmitted: any;
31
33
  isRecording: any;
@@ -291,6 +293,22 @@ export default class Member {
291
293
  */
292
294
  this.isPresenterAssignmentProhibited = null;
293
295
 
296
+ /**
297
+ * @instance
298
+ * @type {Boolean}
299
+ * @public
300
+ * @memberof Member
301
+ */
302
+ this.isAttendeeAssignmentProhibited = null;
303
+
304
+ /**
305
+ * @instance
306
+ * @type {Boolean}
307
+ * @public
308
+ * @memberof Member
309
+ */
310
+ this.canApproveAIEnablement = null;
311
+
294
312
  /**
295
313
  * @instance
296
314
  * @type {Boolean}
@@ -360,6 +378,8 @@ export default class Member {
360
378
  MemberUtil.isModeratorAssignmentProhibited(participant);
361
379
  this.isPresenterAssignmentProhibited =
362
380
  MemberUtil.isPresenterAssignmentProhibited(participant);
381
+ this.isAttendeeAssignmentProhibited = MemberUtil.isAttendeeAssignmentProhibited(participant);
382
+ this.canApproveAIEnablement = MemberUtil.canApproveAIEnablement(participant);
363
383
  this.processStatus(participant);
364
384
  this.processRoles(participant);
365
385
  // must be done last
@@ -103,6 +103,7 @@ export interface Participant {
103
103
  moderator: boolean; // Locus docs say this is deprecated and role control should be used instead
104
104
  moderatorAssignmentNotAllowed: boolean;
105
105
  presenterAssignmentNotAllowed: boolean;
106
+ attendeeAssignmentNotAllowed?: boolean;
106
107
  person: ParticipantPerson;
107
108
  resourceGuest: boolean;
108
109
  state: string; // probably one of MEETING_STATE.STATES
@@ -42,6 +42,18 @@ const MemberUtil = {
42
42
  return participant.canReclaimHostRole || false;
43
43
  },
44
44
 
45
+ /**
46
+ * @param {Object} participant - The locus participant object.
47
+ * @returns {Boolean}
48
+ */
49
+ canApproveAIEnablement: (participant) => {
50
+ if (!participant) {
51
+ return false;
52
+ }
53
+
54
+ return !participant.attendeeRequestAiAssistantNotAllowed;
55
+ },
56
+
45
57
  /**
46
58
  * @param {Object} participant - The locus participant object.
47
59
  * @returns {[ServerRoleShape]}
@@ -128,6 +140,9 @@ const MemberUtil = {
128
140
  isPresenterAssignmentProhibited: (participant: Participant) =>
129
141
  participant && participant.presenterAssignmentNotAllowed,
130
142
 
143
+ isAttendeeAssignmentProhibited: (participant: Participant) =>
144
+ !!(participant && participant.attendeeAssignmentNotAllowed),
145
+
131
146
  /**
132
147
  * checks to see if the participant id is the same as the passed id
133
148
  * there are multiple ids that can be used
@@ -424,5 +439,31 @@ const MemberUtil = {
424
439
 
425
440
  return participantUrl;
426
441
  },
442
+
443
+ /**
444
+ * Collects all CSIs reported for a participant across all their devices,
445
+ * looking at both the top-level `csis` array and any `mediaSessions[].csi` values.
446
+ *
447
+ * @param {Object} participant - The locus participant object.
448
+ * @returns {Array<number>} unique CSIs for this participant
449
+ */
450
+ extractCsis: (participant: Participant): number[] => {
451
+ const csis = new Set<number>();
452
+
453
+ participant?.devices?.forEach((device: any) => {
454
+ device?.csis?.forEach((csi: number) => {
455
+ if (typeof csi === 'number') {
456
+ csis.add(csi);
457
+ }
458
+ });
459
+ device?.mediaSessions?.forEach((mediaSession: any) => {
460
+ if (typeof mediaSession?.csi === 'number') {
461
+ csis.add(mediaSession.csi);
462
+ }
463
+ });
464
+ });
465
+
466
+ return Array.from(csis);
467
+ },
427
468
  };
428
469
  export default MemberUtil;
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
3
3
  */
4
- import {get, isEmpty, set} from 'lodash';
4
+ import {get, isEmpty, isEqual, set} from 'lodash';
5
5
  // @ts-ignore
6
6
  import {StatelessWebexPlugin} from '@webex/webex-core';
7
7
 
@@ -15,6 +15,7 @@ import {
15
15
  } from '../constants';
16
16
  import Trigger from '../common/events/trigger-proxy';
17
17
  import Member from '../member';
18
+ import MemberUtil from '../member/util';
18
19
  import LoggerProxy from '../common/logs/logger-proxy';
19
20
  import ParameterError from '../common/errors/parameter';
20
21
  import {
@@ -99,6 +100,15 @@ export default class Members extends StatelessWebexPlugin {
99
100
  selfId: any;
100
101
  type: any;
101
102
 
103
+ /**
104
+ * Map of CSI -> memberId that previously used the CSI in a Locus update.
105
+ * Keyed by CSI so findMemberByCsi can resolve it in O(1).
106
+ * Kept here (rather than on each Member) so it survives members being removed
107
+ * and re-added (e.g. when entering/leaving a breakout session).
108
+ * @private
109
+ */
110
+ private memberIdByHistoryCsi: Map<number, string> = new Map();
111
+
102
112
  namespace = MEETINGS;
103
113
 
104
114
  /**
@@ -315,6 +325,14 @@ export default class Members extends StatelessWebexPlugin {
315
325
  * @memberof Members
316
326
  */
317
327
  clearMembers() {
328
+ // capture CSIs of all current members before reset so findMemberByCsi can
329
+ // still resolve them if a member is later re-added (e.g. when leaving a
330
+ // breakout session)
331
+ Object.values(this.membersCollection.getAll()).forEach((member) => {
332
+ MemberUtil.extractCsis(member.participant).forEach((csi) =>
333
+ this.memberIdByHistoryCsi.set(csi, member.id)
334
+ );
335
+ });
318
336
  this.membersCollection.reset();
319
337
  Trigger.trigger(
320
338
  this,
@@ -569,6 +587,15 @@ export default class Members extends StatelessWebexPlugin {
569
587
  */
570
588
  private removeMembers(removedMembers: Array<string>) {
571
589
  removedMembers.forEach((memberId) => {
590
+ // capture CSIs before removal so findMemberByCsi can still resolve them
591
+ // if the member is later re-added (e.g. when leaving a breakout session)
592
+ // with a participant payload that no longer contains the original CSIs
593
+ const existingMember = this.membersCollection.get(memberId);
594
+ if (existingMember) {
595
+ MemberUtil.extractCsis(existingMember.participant).forEach((csi) =>
596
+ this.memberIdByHistoryCsi.set(csi, memberId)
597
+ );
598
+ }
572
599
  this.membersCollection.remove(memberId);
573
600
  });
574
601
  }
@@ -598,6 +625,19 @@ export default class Members extends StatelessWebexPlugin {
598
625
  set(member, prop, existingValue);
599
626
  }
600
627
  });
628
+
629
+ // remember CSIs the member used previously so findMemberByCsi can still
630
+ // resolve a CSI even after participant.devices[].csis no longer contains it.
631
+ // Skip re-extracting when devices haven't changed - existing history already covers them.
632
+ const devicesUnchanged = isEqual(
633
+ existingMember.participant?.devices,
634
+ member.participant?.devices
635
+ );
636
+ if (!devicesUnchanged) {
637
+ MemberUtil.extractCsis(existingMember.participant).forEach((csi) =>
638
+ this.memberIdByHistoryCsi.set(csi, member.id)
639
+ );
640
+ }
601
641
  }
602
642
  }
603
643
  this.membersCollection.set(member.id, member);
@@ -1096,12 +1136,16 @@ export default class Members extends StatelessWebexPlugin {
1096
1136
  * Transfers the host to another member
1097
1137
  * @param {String} memberId
1098
1138
  * @param {boolean} [moderator] default true
1139
+ * @param {String} [breakoutLocusUrl] when provided, the request is sent against this locus url
1140
+ * (i.e. the breakout session's locus) instead of the main session's locus url
1099
1141
  * @returns {Promise}
1100
1142
  * @public
1101
1143
  * @memberof Members
1102
1144
  */
1103
- public transferHostToMember(memberId: string, moderator = true) {
1104
- if (!this.locusUrl) {
1145
+ public transferHostToMember(memberId: string, moderator = true, breakoutLocusUrl = '') {
1146
+ const locusUrl = breakoutLocusUrl || this.locusUrl;
1147
+
1148
+ if (!locusUrl) {
1105
1149
  return Promise.reject(
1106
1150
  new ParameterError(
1107
1151
  'The associated locus url for this meetings members object must be defined.'
@@ -1113,11 +1157,14 @@ export default class Members extends StatelessWebexPlugin {
1113
1157
  new ParameterError('The member id must be defined to transfer host to the member.')
1114
1158
  );
1115
1159
  }
1116
- const options = MembersUtil.generateTransferHostMemberOptions(
1160
+ const options: Record<string, any> = MembersUtil.generateTransferHostMemberOptions(
1117
1161
  memberId,
1118
1162
  moderator,
1119
- this.locusUrl
1163
+ locusUrl
1120
1164
  );
1165
+ if (breakoutLocusUrl && breakoutLocusUrl !== this.locusUrl) {
1166
+ options.authorizingLocusUrl = this.locusUrl;
1167
+ }
1121
1168
 
1122
1169
  return this.membersRequest.transferHostToMember(options);
1123
1170
  }
@@ -1161,18 +1208,34 @@ export default class Members extends StatelessWebexPlugin {
1161
1208
  );
1162
1209
  }
1163
1210
 
1164
- /** Finds a member that has any device with a csi matching provided value
1211
+ /** Finds a member that has any device with a csi matching provided value.
1212
+ * Falls back to the `memberIdByHistoryCsi` map so that a CSI a member used in
1213
+ * a previous Locus update can still be resolved even if it is no longer
1214
+ * present in `participant.devices[].csis`.
1165
1215
  *
1166
1216
  * @param {number} csi
1167
1217
  * @returns {Member}
1168
1218
  */
1169
1219
  findMemberByCsi(csi) {
1170
- return Object.values(this.membersCollection.getAll()).find((member) =>
1220
+ const members = Object.values(this.membersCollection.getAll());
1221
+
1222
+ const currentMatch = members.find((member) =>
1171
1223
  // @ts-ignore
1172
1224
  member.participant?.devices?.find((device) =>
1173
1225
  device.csis?.find((memberCsi) => memberCsi === csi)
1174
1226
  )
1175
1227
  );
1228
+
1229
+ if (currentMatch) {
1230
+ return currentMatch;
1231
+ }
1232
+
1233
+ const historyMemberId = this.memberIdByHistoryCsi.get(csi);
1234
+ if (historyMemberId) {
1235
+ return this.membersCollection.get(historyMemberId);
1236
+ }
1237
+
1238
+ return undefined;
1176
1239
  }
1177
1240
 
1178
1241
  /**
@@ -13,7 +13,7 @@ import {
13
13
  ALIAS,
14
14
  } from '../constants';
15
15
 
16
- import {RoleAssignmentOptions, RoleAssignmentRequest, ServerRoleShape} from './types';
16
+ import {RoleAssignmentOptions, RoleAssignmentRequest, ServerRoleShape, ServerRoles} from './types';
17
17
  import {Invitee} from '../meeting/type';
18
18
 
19
19
  const MembersUtil = {
@@ -330,12 +330,20 @@ const MembersUtil = {
330
330
  };
331
331
  },
332
332
 
333
- getTransferHostToMemberRequestParams: (options) => {
334
- const body = {
333
+ getTransferHostToMemberRequestParams: (options: any) => {
334
+ const body: Record<string, any> = {
335
335
  role: {
336
- moderator: options.moderator,
336
+ roles: [
337
+ {
338
+ hasRole: true,
339
+ type: ServerRoles.Moderator,
340
+ },
341
+ ],
337
342
  },
338
343
  };
344
+ if (options.authorizingLocusUrl) {
345
+ body.authorizingLocusUrl = options.authorizingLocusUrl;
346
+ }
339
347
  const uri = `${options.locusUrl}/${PARTICIPANT}/${options.memberId}/${CONTROLS}`;
340
348
 
341
349
  return {
@@ -11,6 +11,7 @@ const BEHAVIORAL_METRICS = {
11
11
  ADD_MEDIA_SUCCESS: 'js_sdk_add_media_success',
12
12
  ADD_MEDIA_FAILURE: 'js_sdk_add_media_failures',
13
13
  ADD_MEDIA_RETRY: 'js_sdk_add_media_retry',
14
+ LOCUS_MEDIA_REQUEST_RETRY: 'js_sdk_locus_media_request_retry',
14
15
  ROAP_MERCURY_EVENT_RECEIVED: 'js_sdk_roap_mercury_received',
15
16
  CONNECTION_SUCCESS: 'js_sdk_connection_success',
16
17
  CONNECTION_FAILURE: 'js_sdk_connection_failures',
@@ -21,6 +22,7 @@ const BEHAVIORAL_METRICS = {
21
22
  GET_DISPLAY_MEDIA_FAILURE: 'js_sdk_get_display_media_failures',
22
23
  JOIN_WITH_MEDIA_FAILURE: 'js_sdk_join_with_media_failures',
23
24
  LLM_CONNECTION_AFTER_JOIN_FAILURE: 'js_sdk_llm_connection_after_join_failure',
25
+ LLM_HEALTHCHECK_FAILURE: 'js_sdk_llm_healthcheck_failure',
24
26
  RECEIVE_TRANSCRIPTION_AFTER_JOIN_FAILURE: 'js_sdk_receive_transcription_after_join_failure',
25
27
 
26
28
  DISCONNECT_DUE_TO_INACTIVITY: 'js_sdk_disconnect_due_to_inactivity',
@@ -89,6 +91,15 @@ const BEHAVIORAL_METRICS = {
89
91
  MEDIA_ISSUE_DETECTED: 'js_sdk_media_issue_detected',
90
92
  LOCUS_CLASSIC_VS_HASH_TREE_MISMATCH: 'js_sdk_locus_classic_vs_hash_tree_mismatch',
91
93
  LOCUS_HASH_TREE_UNSUPPORTED_OPERATION: 'js_sdk_locus_hash_tree_unsupported_operation',
94
+ MEDIA_STILL_NOT_CONNECTED: 'js_sdk_media_still_not_connected',
95
+ DEPRECATED_SET_CODEC_PARAMETERS_USED: 'js_sdk_deprecated_set_codec_parameters_used',
96
+ DEPRECATED_DELETE_CODEC_PARAMETERS_USED: 'js_sdk_deprecated_delete_codec_parameters_used',
97
+ SET_CUSTOM_CODEC_PARAMETERS_USED: 'js_sdk_set_custom_codec_parameters_used',
98
+ MARK_CUSTOM_CODEC_PARAMETERS_FOR_DELETION_USED:
99
+ 'js_sdk_mark_custom_codec_parameters_for_deletion_used',
100
+ HASH_TREE_SYNC_FAILURE: 'js_sdk_hash_tree_sync_failure',
101
+ HASH_TREE_HEARTBEAT_WATCHDOG_EXPIRED: 'js_sdk_hash_tree_heartbeat_watchdog_expired',
102
+ HASH_TREE_EMPTY_LOCUS_STATE_ELEMENTS: 'js_sdk_hash_tree_empty_locus_state_elements',
92
103
  };
93
104
 
94
105
  export {BEHAVIORAL_METRICS as default};
@@ -0,0 +1,58 @@
1
+ import {AV1EncodingParams, SupportedResolution} from '@webex/internal-media-core';
2
+
3
+ export const AV1_CODEC_PARAMETERS: Record<SupportedResolution, AV1EncodingParams> = {
4
+ '90p': {
5
+ levelIdx: 0,
6
+ tier: 0,
7
+ maxWidth: 160,
8
+ maxHeight: 90,
9
+ maxPicSize: 147_456,
10
+ maxDecodeRate: 5_529_600,
11
+ },
12
+ '180p': {
13
+ levelIdx: 0,
14
+ tier: 0,
15
+ maxWidth: 320,
16
+ maxHeight: 180,
17
+ maxPicSize: 147_456,
18
+ maxDecodeRate: 5_529_600,
19
+ },
20
+ '360p': {
21
+ levelIdx: 1,
22
+ tier: 0,
23
+ maxWidth: 640,
24
+ maxHeight: 360,
25
+ maxPicSize: 278_784,
26
+ maxDecodeRate: 10_454_400,
27
+ },
28
+ '540p': {
29
+ levelIdx: 4,
30
+ tier: 0,
31
+ maxWidth: 960,
32
+ maxHeight: 540,
33
+ maxPicSize: 665_856,
34
+ maxDecodeRate: 24_969_600,
35
+ },
36
+ '720p': {
37
+ levelIdx: 5,
38
+ tier: 0,
39
+ maxWidth: 1280,
40
+ maxHeight: 720,
41
+ maxPicSize: 1_065_024,
42
+ maxDecodeRate: 39_938_400,
43
+ },
44
+ '1080p': {
45
+ levelIdx: 8,
46
+ tier: 0,
47
+ maxWidth: 1920,
48
+ maxHeight: 1080,
49
+ maxPicSize: 2_359_296,
50
+ maxDecodeRate: 77_856_768,
51
+ },
52
+ };
53
+
54
+ export const H264_CODEC_PARAMETERS = {
55
+ maxFs: 8192,
56
+ maxFps: 3000,
57
+ maxMbps: 245760,
58
+ };