@microsoft/teams-js 2.14.0-beta.2 → 2.15.0-beta.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.
package/README.md CHANGED
@@ -24,7 +24,7 @@ To install the stable [version](https://learn.microsoft.com/javascript/api/overv
24
24
 
25
25
  ### Production
26
26
 
27
- You can reference these files directly [from here](https://res.cdn.office.net/teams-js/2.13.0/js/MicrosoftTeams.min.js) or point your package manager at them.
27
+ You can reference these files directly [from here](https://res.cdn.office.net/teams-js/2.14.0/js/MicrosoftTeams.min.js) or point your package manager at them.
28
28
 
29
29
  ## Usage
30
30
 
@@ -45,13 +45,13 @@ Reference the library inside of your `.html` page using:
45
45
  ```html
46
46
  <!-- Microsoft Teams JavaScript API (via CDN) -->
47
47
  <script
48
- src="https://res.cdn.office.net/teams-js/2.13.0/js/MicrosoftTeams.min.js"
49
- integrity="sha384-F9Iwc2j9qTKP1PITJeEV0OOS8NDzEUzrP//Fz0t2gzapTMPvNjhYdQjF0idJOuG3"
48
+ src="https://res.cdn.office.net/teams-js/2.14.0/js/MicrosoftTeams.min.js"
49
+ integrity="sha384-+DItxkmrHBjTqyGZe60m2HxjR/eDhdYpaTux8gT9/YqHSMxASoTe+Y66GvNEMT8k"
50
50
  crossorigin="anonymous"
51
51
  ></script>
52
52
 
53
53
  <!-- Microsoft Teams JavaScript API (via npm) -->
54
- <script src="node_modules/@microsoft/teams-js@2.13.0/dist/MicrosoftTeams.min.js"></script>
54
+ <script src="node_modules/@microsoft/teams-js@2.14.0/dist/MicrosoftTeams.min.js"></script>
55
55
 
56
56
  <!-- Microsoft Teams JavaScript API (via local) -->
57
57
  <script src="MicrosoftTeams.min.js"></script>
@@ -2273,12 +2273,12 @@ export namespace authentication {
2273
2273
  /**
2274
2274
  * Initiates an authentication flow which requires a new window.
2275
2275
  * There are two primary uses for this function:
2276
- * 1. When your app needs to authenticate using a 3rd-party identity provider (not Azure Active Directory)
2277
- * 2. When your app needs to show authentication UI that is blocked from being shown in an iframe (e.g., Azure Active Directory consent prompts)
2276
+ * 1. When your app needs to authenticate using a 3rd-party identity provider (not Microsoft Entra ID)
2277
+ * 2. When your app needs to show authentication UI that is blocked from being shown in an iframe (e.g., Microsoft Entra consent prompts)
2278
2278
  *
2279
2279
  * For more details, see [Enable authentication using third-party OAuth provider](https://learn.microsoft.com/microsoftteams/platform/tabs/how-to/authentication/auth-flow-tab)
2280
2280
  *
2281
- * This function is *not* needed for "standard" Azure SSO usage. Using {@link getAuthToken} is usually sufficient in that case. For more, see
2281
+ * This function is *not* needed for "standard" Microsoft Entra SSO usage. Using {@link getAuthToken} is usually sufficient in that case. For more, see
2282
2282
  * [Enable SSO for tab apps](https://learn.microsoft.com/microsoftteams/platform/tabs/how-to/authentication/tab-sso-overview))
2283
2283
  *
2284
2284
  * @remarks
@@ -2311,8 +2311,8 @@ export namespace authentication {
2311
2311
  */
2312
2312
  function authenticate(authenticateParameters?: AuthenticateParameters): void;
2313
2313
  /**
2314
- * Requests an Azure AD token to be issued on behalf of your app in an SSO flow.
2315
- * The token is acquired from the cache if it is not expired. Otherwise a request is sent to Azure AD to
2314
+ * Requests an Microsoft Entra token to be issued on behalf of your app in an SSO flow.
2315
+ * The token is acquired from the cache if it is not expired. Otherwise a request is sent to Microsoft Entra to
2316
2316
  * obtain a new token.
2317
2317
  * This function is used to enable SSO scenarios. See [Enable SSO for tab apps](https://learn.microsoft.com/microsoftteams/platform/tabs/how-to/authentication/tab-sso-overview)
2318
2318
  * for more details.
@@ -2338,7 +2338,7 @@ export namespace authentication {
2338
2338
  function getAuthToken(authTokenRequest?: AuthTokenRequest): void;
2339
2339
  /**
2340
2340
  * @hidden
2341
- * Requests the decoded Azure AD user identity on behalf of the app.
2341
+ * Requests the decoded Microsoft Entra user identity on behalf of the app.
2342
2342
  *
2343
2343
  * @returns Promise that resolves with the {@link UserProfile}.
2344
2344
  *
@@ -2351,7 +2351,7 @@ export namespace authentication {
2351
2351
  * As of 2.0.0, please use {@link authentication.getUser authentication.getUser(): Promise\<UserProfile\>} instead.
2352
2352
  *
2353
2353
  * @hidden
2354
- * Requests the decoded Azure AD user identity on behalf of the app.
2354
+ * Requests the decoded Microsoft Entra user identity on behalf of the app.
2355
2355
  *
2356
2356
  * @param userRequest - It passes success/failure callbacks in the userRequest object(deprecated)
2357
2357
  * @internal
@@ -2457,7 +2457,7 @@ export namespace authentication {
2457
2457
  */
2458
2458
  resources?: string[];
2459
2459
  /**
2460
- * An optional list of claims which to pass to AAD when requesting the access token.
2460
+ * An optional list of claims which to pass to Microsoft Entra when requesting the access token.
2461
2461
  */
2462
2462
  claims?: string[];
2463
2463
  /**
@@ -2504,8 +2504,8 @@ export namespace authentication {
2504
2504
  iat: number;
2505
2505
  /**
2506
2506
  * @hidden
2507
- * Identifies the security token service (STS) that constructs and returns the token. In the tokens that Azure AD
2508
- * returns, the issuer is sts.windows.net. The GUID in the issuer claim value is the tenant ID of the Azure AD
2507
+ * Identifies the security token service (STS) that constructs and returns the token. In the tokens that Microsoft Entra
2508
+ * returns, the issuer is sts.windows.net. The GUID in the issuer claim value is the tenant ID of the Microsoft Entra
2509
2509
  * directory. The tenant ID is an immutable and reliable identifier of the directory.
2510
2510
  *
2511
2511
  * @internal
@@ -2514,7 +2514,7 @@ export namespace authentication {
2514
2514
  iss: string;
2515
2515
  /**
2516
2516
  * @hidden
2517
- * Provides the last name, surname, or family name of the user as defined in the Azure AD user object.
2517
+ * Provides the last name, surname, or family name of the user as defined in the Microsoft Entra user object.
2518
2518
  *
2519
2519
  * @internal
2520
2520
  * Limited to Microsoft-internal use
@@ -2522,7 +2522,7 @@ export namespace authentication {
2522
2522
  family_name: string;
2523
2523
  /**
2524
2524
  * @hidden
2525
- * Provides the first or "given" name of the user, as set on the Azure AD user object.
2525
+ * Provides the first or "given" name of the user, as set on the Microsoft Entra user object.
2526
2526
  *
2527
2527
  * @internal
2528
2528
  * Limited to Microsoft-internal use
@@ -2539,8 +2539,8 @@ export namespace authentication {
2539
2539
  unique_name: string;
2540
2540
  /**
2541
2541
  * @hidden
2542
- * Contains a unique identifier of an object in Azure AD. This value is immutable and cannot be reassigned or
2543
- * reused. Use the object ID to identify an object in queries to Azure AD.
2542
+ * Contains a unique identifier of an object in Microsoft Entra. This value is immutable and cannot be reassigned or
2543
+ * reused. Use the object ID to identify an object in queries to Microsoft Entra.
2544
2544
  *
2545
2545
  * @internal
2546
2546
  * Limited to Microsoft-internal use
@@ -2550,7 +2550,7 @@ export namespace authentication {
2550
2550
  * @hidden
2551
2551
  * Identifies the principal about which the token asserts information, such as the user of an application.
2552
2552
  * This value is immutable and cannot be reassigned or reused, so it can be used to perform authorization
2553
- * checks safely. Because the subject is always present in the tokens the Azure AD issues, we recommended
2553
+ * checks safely. Because the subject is always present in the tokens the Microsoft Entra issues, we recommended
2554
2554
  * using this value in a general-purpose authorization system.
2555
2555
  *
2556
2556
  * @internal
@@ -2572,7 +2572,7 @@ export namespace authentication {
2572
2572
  * Defines the end of the time interval within which a token is valid. The service that validates the token
2573
2573
  * should verify that the current date is within the token lifetime; otherwise it should reject the token. The
2574
2574
  * service might allow for up to five minutes beyond the token lifetime to account for any differences in clock
2575
- * time ("time skew") between Azure AD and the service.
2575
+ * time ("time skew") between Microsoft Entra and the service.
2576
2576
  *
2577
2577
  * @internal
2578
2578
  * Limited to Microsoft-internal use
@@ -2583,7 +2583,7 @@ export namespace authentication {
2583
2583
  * Defines the start of the time interval within which a token is valid. The service that validates the token
2584
2584
  * should verify that the current date is within the token lifetime; otherwise it should reject the token. The
2585
2585
  * service might allow for up to five minutes beyond the token lifetime to account for any differences in clock
2586
- * time ("time skew") between Azure AD and the service.
2586
+ * time ("time skew") between Microsoft Entra and the service.
2587
2587
  *
2588
2588
  * @internal
2589
2589
  * Limited to Microsoft-internal use
@@ -3165,7 +3165,7 @@ export interface Context {
3165
3165
  * @deprecated
3166
3166
  * As of 2.0.0, please use {@link app.TenantInfo.id | app.Context.user.tenant.id} instead
3167
3167
  *
3168
- * The Azure AD tenant ID of the current user.
3168
+ * The Microsoft Entra tenant ID of the current user.
3169
3169
  * Because a malicious party can run your content in a browser, this value should
3170
3170
  * be used only as a hint as to who the user is and never as proof of identity.
3171
3171
  * This field is available only when the identity permission is requested in the manifest.
@@ -3224,7 +3224,7 @@ export interface Context {
3224
3224
  * @deprecated
3225
3225
  * As of 2.0.0, please use {@link app.ChannelInfo.ownerGroupId | app.Context.channel.ownerGroupId} instead
3226
3226
  *
3227
- * The AAD group ID of the host team.
3227
+ * The Microsoft Entra group ID of the host team.
3228
3228
  */
3229
3229
  hostTeamGroupId?: string;
3230
3230
  /**
@@ -3261,7 +3261,7 @@ export interface Context {
3261
3261
  * @deprecated
3262
3262
  * As of 2.0.0, please use {@link app.UserInfo.loginHint | app.Context.user.loginHint} instead
3263
3263
  *
3264
- * A value suitable for use as a login_hint when authenticating with Azure AD.
3264
+ * A value suitable for use as a login_hint when authenticating with Microsoft Entra ID.
3265
3265
  * Because a malicious party can run your content in a browser, this value should
3266
3266
  * be used only as a hint as to who the user is and never as proof of identity.
3267
3267
  * This field is available only when the identity permission is requested in the manifest.
@@ -3281,7 +3281,7 @@ export interface Context {
3281
3281
  * @deprecated
3282
3282
  * As of 2.0.0, please use {@link app.UserInfo.id | app.Context.user.id} instead
3283
3283
  *
3284
- * The Azure AD object id of the current user.
3284
+ * The Microsoft Entra object ID of the current user.
3285
3285
  * Because a malicious party run your content in a browser, this value should
3286
3286
  * be used only as a hint as to who the user is and never as proof of identity.
3287
3287
  * This field is available only when the identity permission is requested in the manifest.
@@ -3930,7 +3930,7 @@ export namespace app {
3930
3930
  */
3931
3931
  ownerTenantId?: string;
3932
3932
  /**
3933
- * The AAD group ID of the team which owns the channel.
3933
+ * The Microsoft Entra group ID of the team which owns the channel.
3934
3934
  */
3935
3935
  ownerGroupId?: string;
3936
3936
  }
@@ -4026,7 +4026,7 @@ export namespace app {
4026
4026
  */
4027
4027
  export interface UserInfo {
4028
4028
  /**
4029
- * The Azure AD object id of the current user.
4029
+ * The Microsoft Entra object id of the current user.
4030
4030
  *
4031
4031
  * Because a malicious party can run your content in a browser, this value should
4032
4032
  * be used only as a optimization hint as to who the user is and never as proof of identity.
@@ -4055,7 +4055,7 @@ export namespace app {
4055
4055
  */
4056
4056
  licenseType?: string;
4057
4057
  /**
4058
- * A value suitable for use when providing a login_hint to Azure Active Directory for authentication purposes.
4058
+ * A value suitable for use when providing a login_hint to Microsoft Entra ID for authentication purposes.
4059
4059
  * See [Provide optional claims to your app](https://learn.microsoft.com/azure/active-directory/develop/active-directory-optional-claims#v10-and-v20-optional-claims-set)
4060
4060
  * for more information about the use of login_hint
4061
4061
  *
@@ -4086,7 +4086,7 @@ export namespace app {
4086
4086
  */
4087
4087
  export interface TenantInfo {
4088
4088
  /**
4089
- * The Azure AD tenant ID of the current user.
4089
+ * The Microsoft Entra tenant ID of the current user.
4090
4090
 
4091
4091
  * Because a malicious party can run your content in a browser, this value should
4092
4092
  * be used only as a optimization hint as to who the user is and never as proof of identity.
@@ -4285,6 +4285,97 @@ export namespace appInstallDialog {
4285
4285
  function isSupported(): boolean;
4286
4286
  }
4287
4287
 
4288
+ /**
4289
+ * Namespace to interact with the appNotification specific part of the SDK
4290
+ * @beta
4291
+ */
4292
+ export namespace appNotification {
4293
+ /**
4294
+ * Data structure to represent appNotification information
4295
+ *
4296
+ * @beta
4297
+ */
4298
+ interface NotificationDisplayParam {
4299
+ /**
4300
+ * Notification title(maximum length: 75 characters)
4301
+ */
4302
+ title: string;
4303
+ /**
4304
+ * Notification content (maximum length: 1500 characters)
4305
+ */
4306
+ content: string;
4307
+ /**
4308
+ * This would represent an optional icon that can be displayed on the notification. It should have a max size of 49 pixels by 49 pixels
4309
+ * If no icon is provided, the notification card would be displayed without an icon
4310
+ * The url link to where the icon is stored should be provided as the input string
4311
+ */
4312
+ icon?: URL;
4313
+ /**
4314
+ * This would specify how long a notification would be displayed on the screen for (unit: seconds)
4315
+ *
4316
+ */
4317
+ displayDurationInSeconds: number;
4318
+ /**
4319
+ * A url link to the page in which the notification would direct the user to.
4320
+ */
4321
+ notificationActionUrl: URL;
4322
+ }
4323
+ /**
4324
+ * @internal
4325
+ *
4326
+ * @hidden
4327
+ *
4328
+ * @beta
4329
+ *
4330
+ * Data structure to represent appNotification information that would be sent to the host SDK
4331
+ */
4332
+ interface NotificationDisplayParamForAppHost {
4333
+ /**
4334
+ * Notification title(maximum length: 75 characters)
4335
+ */
4336
+ title: string;
4337
+ /**
4338
+ * Notification content (maximum length: 1500 characters)
4339
+ */
4340
+ content: string;
4341
+ /**
4342
+ * This would represent an optional icon that can be displayed on the notification. It should have a max size of 49 pixels by 49 pixels
4343
+ * If no icon is provided, the notification card would be displayed without an icon
4344
+ * The url link to where the icon is stored should be provided as the input string
4345
+ */
4346
+ notificationIconAsString?: string;
4347
+ /**
4348
+ * This would specify how long a notification would be displayed on the screen for (unit: seconds)
4349
+ *
4350
+ */
4351
+ displayDurationInSeconds: number;
4352
+ /**
4353
+ * A url string type to the page in which the notification would direct the user to.
4354
+ */
4355
+ notificationActionUrlAsString: string;
4356
+ }
4357
+ /**
4358
+ * Displays appNotification after making a validiity check on all of the required parameters, by calling the validateNotificationDisplayParams helper function
4359
+ * An interface object containing all the required parameters to be displayed on the notification would be passed in here
4360
+ * The notificationDisplayParam would be serialized before passing across to the message handler to ensure all objects passed contain simple parameters that would properly pass across the Iframe
4361
+ * @param notificationdisplayparam - Interface object with all the parameters required to display an appNotificiation
4362
+ * @returns a promise resolution upon conclusion
4363
+ * @throws Error if appNotification capability is not supported
4364
+ * @throws Error if notficationDisplayParam was not validated successfully
4365
+ *
4366
+ * @beta
4367
+ */
4368
+ function displayInAppNotification(notificationDisplayParam: NotificationDisplayParam): Promise<void>;
4369
+ /**
4370
+ * Checks if appNotification is supported by the host
4371
+ * @returns boolean to represent whether the appNotification capability is supported
4372
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
4373
+ *
4374
+ * @beta
4375
+ */
4376
+ function isSupported(): boolean;
4377
+ }
4378
+
4288
4379
  /**
4289
4380
  * Namespace to interact with the barcode scanning-specific part of the SDK.
4290
4381
  *
@@ -4361,7 +4452,7 @@ interface OpenChatRequest {
4361
4452
  */
4362
4453
  export interface OpenSingleChatRequest extends OpenChatRequest {
4363
4454
  /**
4364
- * The Azure Active Directory UPN (e-mail address) of the user to chat with
4455
+ * The Microsoft Entra UPN (e-mail address) of the user to chat with
4365
4456
  */
4366
4457
  user: string;
4367
4458
  }
@@ -4374,7 +4465,7 @@ export interface OpenSingleChatRequest extends OpenChatRequest {
4374
4465
  */
4375
4466
  export interface OpenGroupChatRequest extends OpenChatRequest {
4376
4467
  /**
4377
- * Array containing Azure Active Directory UPNs (e-mail addresss) of users to open chat with
4468
+ * Array containing Microsoft Entra UPNs (e-mail addresss) of users to open chat with
4378
4469
  */
4379
4470
  users: string[];
4380
4471
  /**
@@ -4556,7 +4647,7 @@ export namespace dialog {
4556
4647
  */
4557
4648
  namespace bot {
4558
4649
  /**
4559
- * Allows an app to open the dialog module using bot.
4650
+ * Allows an app to open a dialog that sends submitted data to a bot.
4560
4651
  *
4561
4652
  * @param botUrlDialogInfo - An object containing the parameters of the dialog module including completionBotId.
4562
4653
  * @param submitHandler - Handler that triggers when the dialog has been submitted or closed.
@@ -6873,7 +6964,7 @@ export namespace people {
6873
6964
  * Launches a people picker and allows the user to select one or more people from the list
6874
6965
  * If the app is added to personal app scope the people picker launched is org wide and if the app is added to a chat/channel, people picker launched is also limited to the members of chat/channel
6875
6966
 
6876
- * @param callback - Returns list of JSON object of type PeoplePickerResult which consists of AAD IDs, display names and emails of the selected users
6967
+ * @param callback - Returns list of JSON object of type PeoplePickerResult which consists of Microsoft Entra IDs, display names and emails of the selected users
6877
6968
  * @param peoplePickerInputs - Input parameters to launch customized people picker
6878
6969
  * @returns Promise that will be fulfilled when the operation has completed
6879
6970
  */
@@ -6885,7 +6976,7 @@ export namespace people {
6885
6976
  * Launches a people picker and allows the user to select one or more people from the list
6886
6977
  * If the app is added to personal app scope the people picker launched is org wide and if the app is added to a chat/channel, people picker launched is also limited to the members of chat/channel
6887
6978
 
6888
- * @param callback - Returns list of JSON object of type PeoplePickerResult which consists of AAD IDs, display names and emails of the selected users
6979
+ * @param callback - Returns list of JSON object of type PeoplePickerResult which consists of Microsoft Entra IDs, display names and emails of the selected users
6889
6980
  * @param peoplePickerInputs - Input parameters to launch customized people picker
6890
6981
  */
6891
6982
  function selectPeople(callback: selectPeopleCallbackFunctionType, peoplePickerInputs?: PeoplePickerInputs): void;
@@ -6899,7 +6990,7 @@ export namespace people {
6899
6990
  */
6900
6991
  title?: string;
6901
6992
  /**
6902
- * Optional; AAD ids of the users to be pre-populated in the search box of people picker control
6993
+ * Optional; Microsoft Entra IDs of the users to be pre-populated in the search box of people picker control
6903
6994
  * If single select is enabled this value, only the first user in the list will be pre-populated
6904
6995
  * Default value is null
6905
6996
  */
@@ -6920,7 +7011,7 @@ export namespace people {
6920
7011
  */
6921
7012
  interface PeoplePickerResult {
6922
7013
  /**
6923
- * user object Id (also known as aad id) of the selected user
7014
+ * user object ID (also known as Microsoft Entra ID) of the selected user
6924
7015
  */
6925
7016
  objectId: string;
6926
7017
  /**
@@ -6976,13 +7067,13 @@ export namespace profile {
6976
7067
  * The set of identifiers that are supported for resolving the persona.
6977
7068
  *
6978
7069
  * At least one is required, and if multiple are provided then only the highest
6979
- * priority one will be used (AadObjectId > Upn > Smtp).
7070
+ * priority one will be used (AadObjectId > Upn > Smtp). AAD is now known as "Microsoft Entra ID"
6980
7071
  *
6981
7072
  * @beta
6982
7073
  */
6983
7074
  type PersonaIdentifiers = {
6984
7075
  /**
6985
- * The object id in Azure Active Directory.
7076
+ * The object id in Microsoft Entra.
6986
7077
  *
6987
7078
  * This id is guaranteed to be unique for an object within a tenant,
6988
7079
  * and so if provided will lead to a more performant lookup. It can
@@ -7562,7 +7653,7 @@ export namespace call {
7562
7653
  * Comma-separated list of user IDs representing the participants of the call.
7563
7654
  *
7564
7655
  * @remarks
7565
- * Currently the User ID field supports the Azure AD UserPrincipalName,
7656
+ * Currently the User ID field supports the Microsoft Entra UserPrincipalName,
7566
7657
  * typically an email address, or in case of a PSTN call, it supports a pstn
7567
7658
  * mri 4:\<phonenumber>.
7568
7659
  */
@@ -8621,7 +8712,7 @@ export namespace marketplace {
8621
8712
  * @hidden
8622
8713
  * Create a MediaStreamTrack from the media stream with the given streamId and processed by videoFrameHandler.
8623
8714
  */
8624
- export function processMediaStream(streamId: string, videoFrameHandler: video.VideoFrameHandler, notifyError: (string: any) => void): Promise<MediaStreamTrack>;
8715
+ export function processMediaStream(streamId: string, videoFrameHandler: video.VideoFrameHandler, notifyError: (string: any) => void, videoPerformanceMonitor?: VideoPerformanceMonitor): Promise<MediaStreamTrack>;
8625
8716
  /**
8626
8717
  * @hidden
8627
8718
  * Create a MediaStreamTrack from the media stream with the given streamId and processed by videoFrameHandler.
@@ -8630,7 +8721,7 @@ export function processMediaStream(streamId: string, videoFrameHandler: video.Vi
8630
8721
  * @internal
8631
8722
  * Limited to Microsoft-internal use
8632
8723
  */
8633
- export function processMediaStreamWithMetadata(streamId: string, videoFrameHandler: videoEx.VideoFrameHandler, notifyError: (string: any) => void): Promise<MediaStreamTrack>;
8724
+ export function processMediaStreamWithMetadata(streamId: string, videoFrameHandler: videoEx.VideoFrameHandler, notifyError: (string: any) => void, videoPerformanceMonitor?: VideoPerformanceMonitor): Promise<MediaStreamTrack>;
8634
8725
  /**
8635
8726
  * @hidden
8636
8727
  * Video effect change call back function definition
@@ -8643,6 +8734,48 @@ type VideoEffectCallBack = (effectId: string | undefined, effectParam?: string)
8643
8734
  /**
8644
8735
  * @hidden
8645
8736
  */
8646
- export function createEffectParameterChangeCallback(callback: VideoEffectCallBack): (effectId: string | undefined, effectParam?: string) => void;
8737
+ export function createEffectParameterChangeCallback(callback: VideoEffectCallBack, videoPerformanceMonitor?: VideoPerformanceMonitor): (effectId: string | undefined, effectParam?: string) => void;
8647
8738
  export { VideoEffectCallBack as DefaultVideoEffectCallBack };
8648
8739
 
8740
+ /**
8741
+ * This class is used to monitor the performance of video processing, and report performance events.
8742
+ */
8743
+ export class VideoPerformanceMonitor {
8744
+ constructor(reportPerformanceEvent: (actionName: string, args: unknown[]) => void);
8745
+ /**
8746
+ * Start to check frame processing time intervally
8747
+ * and report performance event if the average frame processing time is too long.
8748
+ */
8749
+ startMonitorSlowFrameProcessing(): void;
8750
+ /**
8751
+ * Define the time limit of frame processing.
8752
+ * When the average frame processing time is longer than the time limit, a "video.performance.frameProcessingSlow" event will be reported.
8753
+ * @param timeLimit
8754
+ */
8755
+ setFrameProcessTimeLimit(timeLimit: number): void;
8756
+ /**
8757
+ * Call this function when the app starts to switch to the new video effect
8758
+ */
8759
+ reportApplyingVideoEffect(effectId: string, effectParam?: string): void;
8760
+ /**
8761
+ * Call this function when the new video effect is ready
8762
+ */
8763
+ reportVideoEffectChanged(effectId: string, effectParam?: string): void;
8764
+ /**
8765
+ * Call this function when the app starts to process a video frame
8766
+ */
8767
+ reportStartFrameProcessing(frameWidth: number, frameHeight: number): void;
8768
+ /**
8769
+ * Call this function when the app finishes successfully processing a video frame
8770
+ */
8771
+ reportFrameProcessed(): void;
8772
+ /**
8773
+ * Call this function when the app starts to get the texture stream
8774
+ */
8775
+ reportGettingTextureStream(streamId: string): void;
8776
+ /**
8777
+ * Call this function when the app finishes successfully getting the texture stream
8778
+ */
8779
+ reportTextureStreamAcquired(): void;
8780
+ }
8781
+