@microsoft/teams-js 2.16.0-beta.1 → 2.16.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.
@@ -802,96 +802,96 @@ __webpack_require__.r(__webpack_exports__);
802
802
 
803
803
  // EXPORTS
804
804
  __webpack_require__.d(__webpack_exports__, {
805
- "ActionObjectType": () => (/* reexport */ ActionObjectType),
806
- "ChannelType": () => (/* reexport */ ChannelType),
807
- "ChildAppWindow": () => (/* reexport */ ChildAppWindow),
808
- "DialogDimension": () => (/* reexport */ DialogDimension),
809
- "ErrorCode": () => (/* reexport */ ErrorCode),
810
- "FileOpenPreference": () => (/* reexport */ FileOpenPreference),
811
- "FrameContexts": () => (/* reexport */ FrameContexts),
812
- "HostClientType": () => (/* reexport */ HostClientType),
813
- "HostName": () => (/* reexport */ HostName),
814
- "LiveShareHost": () => (/* reexport */ LiveShareHost),
815
- "NotificationTypes": () => (/* reexport */ NotificationTypes),
816
- "ParentAppWindow": () => (/* reexport */ ParentAppWindow),
817
- "SecondaryM365ContentIdName": () => (/* reexport */ SecondaryM365ContentIdName),
818
- "TaskModuleDimension": () => (/* reexport */ TaskModuleDimension),
819
- "TeamType": () => (/* reexport */ TeamType),
820
- "UserSettingTypes": () => (/* reexport */ UserSettingTypes),
821
- "UserTeamRole": () => (/* reexport */ UserTeamRole),
822
- "ViewerActionTypes": () => (/* reexport */ ViewerActionTypes),
823
- "app": () => (/* reexport */ app),
824
- "appEntity": () => (/* reexport */ appEntity),
825
- "appInitialization": () => (/* reexport */ appInitialization),
826
- "appInstallDialog": () => (/* reexport */ appInstallDialog),
827
- "authentication": () => (/* reexport */ authentication),
828
- "barCode": () => (/* reexport */ barCode),
829
- "calendar": () => (/* reexport */ calendar),
830
- "call": () => (/* reexport */ call),
831
- "chat": () => (/* reexport */ chat),
832
- "clipboard": () => (/* reexport */ clipboard),
833
- "conversations": () => (/* reexport */ conversations),
834
- "dialog": () => (/* reexport */ dialog),
835
- "enablePrintCapability": () => (/* reexport */ enablePrintCapability),
836
- "executeDeepLink": () => (/* reexport */ executeDeepLink),
837
- "files": () => (/* reexport */ files),
838
- "geoLocation": () => (/* reexport */ geoLocation),
839
- "getAdaptiveCardSchemaVersion": () => (/* reexport */ getAdaptiveCardSchemaVersion),
840
- "getContext": () => (/* reexport */ getContext),
841
- "getMruTabInstances": () => (/* reexport */ getMruTabInstances),
842
- "getTabInstances": () => (/* reexport */ getTabInstances),
843
- "initialize": () => (/* reexport */ initialize),
844
- "initializeWithFrameContext": () => (/* reexport */ initializeWithFrameContext),
845
- "liveShare": () => (/* reexport */ liveShare),
846
- "location": () => (/* reexport */ location_location),
847
- "logs": () => (/* reexport */ logs),
848
- "mail": () => (/* reexport */ mail),
849
- "marketplace": () => (/* reexport */ marketplace),
850
- "media": () => (/* reexport */ media),
851
- "meeting": () => (/* reexport */ meeting),
852
- "meetingRoom": () => (/* reexport */ meetingRoom),
853
- "menus": () => (/* reexport */ menus),
854
- "monetization": () => (/* reexport */ monetization),
855
- "navigateBack": () => (/* reexport */ navigateBack),
856
- "navigateCrossDomain": () => (/* reexport */ navigateCrossDomain),
857
- "navigateToTab": () => (/* reexport */ navigateToTab),
858
- "notifications": () => (/* reexport */ notifications),
859
- "openFilePreview": () => (/* reexport */ openFilePreview),
860
- "pages": () => (/* reexport */ pages),
861
- "people": () => (/* reexport */ people),
862
- "print": () => (/* reexport */ print),
863
- "profile": () => (/* reexport */ profile),
864
- "registerAppButtonClickHandler": () => (/* reexport */ registerAppButtonClickHandler),
865
- "registerAppButtonHoverEnterHandler": () => (/* reexport */ registerAppButtonHoverEnterHandler),
866
- "registerAppButtonHoverLeaveHandler": () => (/* reexport */ registerAppButtonHoverLeaveHandler),
867
- "registerBackButtonHandler": () => (/* reexport */ registerBackButtonHandler),
868
- "registerBeforeUnloadHandler": () => (/* reexport */ registerBeforeUnloadHandler),
869
- "registerChangeSettingsHandler": () => (/* reexport */ registerChangeSettingsHandler),
870
- "registerCustomHandler": () => (/* reexport */ registerCustomHandler),
871
- "registerFocusEnterHandler": () => (/* reexport */ registerFocusEnterHandler),
872
- "registerFullScreenHandler": () => (/* reexport */ registerFullScreenHandler),
873
- "registerOnLoadHandler": () => (/* reexport */ registerOnLoadHandler),
874
- "registerOnThemeChangeHandler": () => (/* reexport */ registerOnThemeChangeHandler),
875
- "registerUserSettingsChangeHandler": () => (/* reexport */ registerUserSettingsChangeHandler),
876
- "remoteCamera": () => (/* reexport */ remoteCamera),
877
- "returnFocus": () => (/* reexport */ returnFocus),
878
- "search": () => (/* reexport */ search),
879
- "secondaryBrowser": () => (/* reexport */ secondaryBrowser),
880
- "sendCustomEvent": () => (/* reexport */ sendCustomEvent),
881
- "sendCustomMessage": () => (/* reexport */ sendCustomMessage),
882
- "setFrameContext": () => (/* reexport */ setFrameContext),
883
- "settings": () => (/* reexport */ settings),
884
- "shareDeepLink": () => (/* reexport */ shareDeepLink),
885
- "sharing": () => (/* reexport */ sharing),
886
- "stageView": () => (/* reexport */ stageView),
887
- "tasks": () => (/* reexport */ tasks),
888
- "teams": () => (/* reexport */ teams),
889
- "teamsCore": () => (/* reexport */ teamsCore),
890
- "uploadCustomApp": () => (/* reexport */ uploadCustomApp),
891
- "version": () => (/* reexport */ version),
892
- "video": () => (/* reexport */ video),
893
- "videoEx": () => (/* reexport */ videoEx),
894
- "webStorage": () => (/* reexport */ webStorage)
805
+ ActionObjectType: () => (/* reexport */ ActionObjectType),
806
+ ChannelType: () => (/* reexport */ ChannelType),
807
+ ChildAppWindow: () => (/* reexport */ ChildAppWindow),
808
+ DialogDimension: () => (/* reexport */ DialogDimension),
809
+ ErrorCode: () => (/* reexport */ ErrorCode),
810
+ FileOpenPreference: () => (/* reexport */ FileOpenPreference),
811
+ FrameContexts: () => (/* reexport */ FrameContexts),
812
+ HostClientType: () => (/* reexport */ HostClientType),
813
+ HostName: () => (/* reexport */ HostName),
814
+ LiveShareHost: () => (/* reexport */ LiveShareHost),
815
+ NotificationTypes: () => (/* reexport */ NotificationTypes),
816
+ ParentAppWindow: () => (/* reexport */ ParentAppWindow),
817
+ SecondaryM365ContentIdName: () => (/* reexport */ SecondaryM365ContentIdName),
818
+ TaskModuleDimension: () => (/* reexport */ TaskModuleDimension),
819
+ TeamType: () => (/* reexport */ TeamType),
820
+ UserSettingTypes: () => (/* reexport */ UserSettingTypes),
821
+ UserTeamRole: () => (/* reexport */ UserTeamRole),
822
+ ViewerActionTypes: () => (/* reexport */ ViewerActionTypes),
823
+ app: () => (/* reexport */ app),
824
+ appEntity: () => (/* reexport */ appEntity),
825
+ appInitialization: () => (/* reexport */ appInitialization),
826
+ appInstallDialog: () => (/* reexport */ appInstallDialog),
827
+ authentication: () => (/* reexport */ authentication),
828
+ barCode: () => (/* reexport */ barCode),
829
+ calendar: () => (/* reexport */ calendar),
830
+ call: () => (/* reexport */ call),
831
+ chat: () => (/* reexport */ chat),
832
+ clipboard: () => (/* reexport */ clipboard),
833
+ conversations: () => (/* reexport */ conversations),
834
+ dialog: () => (/* reexport */ dialog),
835
+ enablePrintCapability: () => (/* reexport */ enablePrintCapability),
836
+ executeDeepLink: () => (/* reexport */ executeDeepLink),
837
+ files: () => (/* reexport */ files),
838
+ geoLocation: () => (/* reexport */ geoLocation),
839
+ getAdaptiveCardSchemaVersion: () => (/* reexport */ getAdaptiveCardSchemaVersion),
840
+ getContext: () => (/* reexport */ getContext),
841
+ getMruTabInstances: () => (/* reexport */ getMruTabInstances),
842
+ getTabInstances: () => (/* reexport */ getTabInstances),
843
+ initialize: () => (/* reexport */ initialize),
844
+ initializeWithFrameContext: () => (/* reexport */ initializeWithFrameContext),
845
+ liveShare: () => (/* reexport */ liveShare),
846
+ location: () => (/* reexport */ location_location),
847
+ logs: () => (/* reexport */ logs),
848
+ mail: () => (/* reexport */ mail),
849
+ marketplace: () => (/* reexport */ marketplace),
850
+ media: () => (/* reexport */ media),
851
+ meeting: () => (/* reexport */ meeting),
852
+ meetingRoom: () => (/* reexport */ meetingRoom),
853
+ menus: () => (/* reexport */ menus),
854
+ monetization: () => (/* reexport */ monetization),
855
+ navigateBack: () => (/* reexport */ navigateBack),
856
+ navigateCrossDomain: () => (/* reexport */ navigateCrossDomain),
857
+ navigateToTab: () => (/* reexport */ navigateToTab),
858
+ notifications: () => (/* reexport */ notifications),
859
+ openFilePreview: () => (/* reexport */ openFilePreview),
860
+ pages: () => (/* reexport */ pages),
861
+ people: () => (/* reexport */ people),
862
+ print: () => (/* reexport */ print),
863
+ profile: () => (/* reexport */ profile),
864
+ registerAppButtonClickHandler: () => (/* reexport */ registerAppButtonClickHandler),
865
+ registerAppButtonHoverEnterHandler: () => (/* reexport */ registerAppButtonHoverEnterHandler),
866
+ registerAppButtonHoverLeaveHandler: () => (/* reexport */ registerAppButtonHoverLeaveHandler),
867
+ registerBackButtonHandler: () => (/* reexport */ registerBackButtonHandler),
868
+ registerBeforeUnloadHandler: () => (/* reexport */ registerBeforeUnloadHandler),
869
+ registerChangeSettingsHandler: () => (/* reexport */ registerChangeSettingsHandler),
870
+ registerCustomHandler: () => (/* reexport */ registerCustomHandler),
871
+ registerFocusEnterHandler: () => (/* reexport */ registerFocusEnterHandler),
872
+ registerFullScreenHandler: () => (/* reexport */ registerFullScreenHandler),
873
+ registerOnLoadHandler: () => (/* reexport */ registerOnLoadHandler),
874
+ registerOnThemeChangeHandler: () => (/* reexport */ registerOnThemeChangeHandler),
875
+ registerUserSettingsChangeHandler: () => (/* reexport */ registerUserSettingsChangeHandler),
876
+ remoteCamera: () => (/* reexport */ remoteCamera),
877
+ returnFocus: () => (/* reexport */ returnFocus),
878
+ search: () => (/* reexport */ search),
879
+ secondaryBrowser: () => (/* reexport */ secondaryBrowser),
880
+ sendCustomEvent: () => (/* reexport */ sendCustomEvent),
881
+ sendCustomMessage: () => (/* reexport */ sendCustomMessage),
882
+ setFrameContext: () => (/* reexport */ setFrameContext),
883
+ settings: () => (/* reexport */ settings),
884
+ shareDeepLink: () => (/* reexport */ shareDeepLink),
885
+ sharing: () => (/* reexport */ sharing),
886
+ stageView: () => (/* reexport */ stageView),
887
+ tasks: () => (/* reexport */ tasks),
888
+ teams: () => (/* reexport */ teams),
889
+ teamsCore: () => (/* reexport */ teamsCore),
890
+ uploadCustomApp: () => (/* reexport */ uploadCustomApp),
891
+ version: () => (/* reexport */ version),
892
+ videoEffects: () => (/* reexport */ videoEffects),
893
+ videoEffectsEx: () => (/* reexport */ videoEffectsEx),
894
+ webStorage: () => (/* reexport */ webStorage)
895
895
  });
896
896
 
897
897
  ;// CONCATENATED MODULE: ./src/internal/constants.ts
@@ -1028,6 +1028,8 @@ var validOrigins = [
1028
1028
  'www.officeppe.com',
1029
1029
  '*.www.microsoft365.com',
1030
1030
  'www.microsoft365.com',
1031
+ 'bing.com',
1032
+ 'edgeservices.bing.com',
1031
1033
  ];
1032
1034
  /**
1033
1035
  * @hidden
@@ -1971,7 +1973,7 @@ function isRuntimeInitialized(runtime) {
1971
1973
  }
1972
1974
  }
1973
1975
  var runtime = _uninitializedRuntime;
1974
- var teamsRuntimeConfig = {
1976
+ var versionAndPlatformAgnosticTeamsRuntimeConfig = {
1975
1977
  apiVersion: 3,
1976
1978
  hostVersionsInfo: teamsMinAdaptiveCardVersion,
1977
1979
  isLegacyTeams: true,
@@ -2093,7 +2095,7 @@ var upgradeChain = [
2093
2095
  },
2094
2096
  },
2095
2097
  ];
2096
- var versionConstants = {
2098
+ var mapTeamsVersionToSupportedCapabilities = {
2097
2099
  '1.9.0': [
2098
2100
  {
2099
2101
  capability: { location: {} },
@@ -2141,33 +2143,33 @@ var generateBackCompatRuntimeConfigLogger = runtimeLogger.extend('generateBackCo
2141
2143
  * Limited to Microsoft-internal use
2142
2144
  *
2143
2145
  * Generates and returns a runtime configuration for host clients which are not on the latest host SDK version
2144
- * and do not provide their own runtime config. Their supported capabilities are based on the highest
2145
- * client SDK version that they can support.
2146
+ * and do not provide their own runtime config (this is just older versions of Teams on some platforms).
2147
+ * Their supported capabilities are based on the highest client SDK version that they can support.
2146
2148
  *
2147
2149
  * @param highestSupportedVersion - The highest client SDK version that the host client can support.
2148
2150
  * @returns runtime which describes the APIs supported by the legacy host client.
2149
2151
  */
2150
- function generateBackCompatRuntimeConfig(highestSupportedVersion) {
2152
+ function generateVersionBasedTeamsRuntimeConfig(highestSupportedVersion) {
2151
2153
  generateBackCompatRuntimeConfigLogger('generating back compat runtime config for %s', highestSupportedVersion);
2152
- var newSupports = __assign({}, teamsRuntimeConfig.supports);
2154
+ var newSupports = __assign({}, versionAndPlatformAgnosticTeamsRuntimeConfig.supports);
2153
2155
  generateBackCompatRuntimeConfigLogger('Supported capabilities in config before updating based on highestSupportedVersion: %o', newSupports);
2154
- Object.keys(versionConstants).forEach(function (versionNumber) {
2156
+ Object.keys(mapTeamsVersionToSupportedCapabilities).forEach(function (versionNumber) {
2155
2157
  if (compareSDKVersions(highestSupportedVersion, versionNumber) >= 0) {
2156
- versionConstants[versionNumber].forEach(function (capabilityReqs) {
2158
+ mapTeamsVersionToSupportedCapabilities[versionNumber].forEach(function (capabilityReqs) {
2157
2159
  if (capabilityReqs.hostClientTypes.includes(GlobalVars.hostClientType)) {
2158
2160
  newSupports = __assign(__assign({}, newSupports), capabilityReqs.capability);
2159
2161
  }
2160
2162
  });
2161
2163
  }
2162
2164
  });
2163
- var backCompatRuntimeConfig = {
2165
+ var teamsBackCompatRuntimeConfig = {
2164
2166
  apiVersion: latestRuntimeApiVersion,
2165
2167
  hostVersionsInfo: teamsMinAdaptiveCardVersion,
2166
2168
  isLegacyTeams: true,
2167
2169
  supports: newSupports,
2168
2170
  };
2169
- generateBackCompatRuntimeConfigLogger('Runtime config after updating based on highestSupportedVersion: %o', backCompatRuntimeConfig);
2170
- return backCompatRuntimeConfig;
2171
+ generateBackCompatRuntimeConfigLogger('Runtime config after updating based on highestSupportedVersion: %o', teamsBackCompatRuntimeConfig);
2172
+ return teamsBackCompatRuntimeConfig;
2171
2173
  }
2172
2174
  var applyRuntimeConfigLogger = runtimeLogger.extend('applyRuntimeConfig');
2173
2175
  function applyRuntimeConfig(runtimeConfig) {
@@ -2212,7 +2214,7 @@ var _minRuntimeConfigToUninitialize = {
2212
2214
  * @hidden
2213
2215
  * Package version.
2214
2216
  */
2215
- var version = "2.16.0-beta.1";
2217
+ var version = "2.16.0";
2216
2218
 
2217
2219
  ;// CONCATENATED MODULE: ./src/internal/internalAPIs.ts
2218
2220
 
@@ -3541,7 +3543,7 @@ var app;
3541
3543
  }
3542
3544
  catch (e) {
3543
3545
  if (e instanceof SyntaxError) {
3544
- applyRuntimeConfig(generateBackCompatRuntimeConfig(GlobalVars.clientSupportedSDKVersion));
3546
+ applyRuntimeConfig(generateVersionBasedTeamsRuntimeConfig(GlobalVars.clientSupportedSDKVersion));
3545
3547
  }
3546
3548
  else {
3547
3549
  throw e;
@@ -7309,6 +7311,8 @@ var meeting_generator = (undefined && undefined.__generator) || function (thisAr
7309
7311
  * Interact with meetings, including retrieving meeting details, getting mic status, and sharing app content.
7310
7312
  * This namespace is used to handle meeting related functionality like
7311
7313
  * get meeting details, get/update state of mic, sharing app content and more.
7314
+ *
7315
+ * To learn more, visit https://aka.ms/teamsmeetingapps
7312
7316
  */
7313
7317
  var meeting;
7314
7318
  (function (meeting) {
@@ -7341,38 +7345,101 @@ var meeting;
7341
7345
  MeetingReactionType["surprised"] = "surprised";
7342
7346
  MeetingReactionType["applause"] = "applause";
7343
7347
  })(MeetingReactionType = meeting.MeetingReactionType || (meeting.MeetingReactionType = {}));
7344
- /** Represents the type of a meeting */
7348
+ /**
7349
+ * Represents the type of a meeting
7350
+ *
7351
+ * @hidden
7352
+ * Hide from docs.
7353
+ *
7354
+ * @remarks
7355
+ * Teams has several types of meetings to account for different user scenarios and requirements.
7356
+ */
7345
7357
  var MeetingType;
7346
7358
  (function (MeetingType) {
7347
- /** Used when the meeting type is not known. */
7359
+ /**
7360
+ * Used when the meeting type is not known.
7361
+ *
7362
+ * @remarks
7363
+ * This response is not an expected case.
7364
+ */
7348
7365
  MeetingType["Unknown"] = "Unknown";
7349
- /** Used for ad hoc meetings that are created on the fly. */
7366
+ /**
7367
+ * Used for group call meeting types.
7368
+ *
7369
+ * @remarks
7370
+ * To test this meeting type in Teams, start a chat with two or more users and click the "Call" button.
7371
+ * Note that a group call may return as this or {@link CallType.GroupCall}. These two different response types should be considered as equal.
7372
+ */
7350
7373
  MeetingType["Adhoc"] = "Adhoc";
7351
- /** Used for meetings that have been scheduled in advance. */
7374
+ /**
7375
+ * Used for single-occurrence meetings that have been scheduled in advance.
7376
+ *
7377
+ * @remarks
7378
+ * To create a meeting of this type in Teams, press the "New meeting" button from the calendar and enter a meeting title.
7379
+ * Before saving, ensure that the "Online Meeting" field is checked.
7380
+ */
7352
7381
  MeetingType["Scheduled"] = "Scheduled";
7353
- /** Used for meetings that occur on a recurring basis. */
7382
+ /**
7383
+ * Used for meetings that occur on a recurring basis.
7384
+ *
7385
+ * @remarks
7386
+ * To create a meeting of this type in Teams, press the "New meeting" button from the calendar, enter a meeting title, and then change the field labeled "Does not repeat" to some other value.
7387
+ * Before saving, ensure that the "Online Meeting" field is checked.
7388
+ */
7354
7389
  MeetingType["Recurring"] = "Recurring";
7355
- /** Used for live events or webinars. */
7390
+ /**
7391
+ * Used for webinars.
7392
+ *
7393
+ * @remarks
7394
+ * Meeting apps are only supported for those in the "event group" of a webinar, which are those who'll be presenting and producing the webinar.
7395
+ * To learn how to create a meeting of this type, visit https://aka.ms/teams/howto/webinars.
7396
+ */
7356
7397
  MeetingType["Broadcast"] = "Broadcast";
7357
- /** Used for meetings that are created on the fly, but with a more polished experience than ad hoc meetings. */
7398
+ /**
7399
+ * Used for meet now meetings, which are meetings users create on the fly.
7400
+ *
7401
+ * @remarks
7402
+ * To create a meeting of this type, click the "Meet now" button from the calendar in Teams or the "Teams call" button in Outlook.
7403
+ */
7358
7404
  MeetingType["MeetNow"] = "MeetNow";
7359
7405
  })(MeetingType = meeting.MeetingType || (meeting.MeetingType = {}));
7360
- /** Represents the type of a call. */
7406
+ /**
7407
+ * Represents the type of a call.
7408
+ *
7409
+ * @hidden
7410
+ * Hide from docs.
7411
+ */
7361
7412
  var CallType;
7362
7413
  (function (CallType) {
7363
- /** Represents a call between two people. */
7414
+ /**
7415
+ * Represents a call between two people.
7416
+ *
7417
+ * @remarks
7418
+ * To test this feature, start a chat with one other user and click the "Call" button.
7419
+ */
7364
7420
  CallType["OneOnOneCall"] = "oneOnOneCall";
7365
- /** Represents a call between more than two people. */
7421
+ /**
7422
+ * Represents a call between more than two people.
7423
+ *
7424
+ * @remarks
7425
+ * To test this meeting type in Teams, start a chat with two or more users and click the "Call" button.
7426
+ * Note that a group call may return as this or {@link MeetingType.Adhoc}. These two different response types should be considered as equal.
7427
+ */
7366
7428
  CallType["GroupCall"] = "groupCall";
7367
7429
  })(CallType = meeting.CallType || (meeting.CallType = {}));
7368
7430
  /**
7369
- * Allows an app to get the incoming audio speaker setting for the meeting user
7431
+ * Allows an app to get the incoming audio speaker setting for the meeting user.
7432
+ * To learn more, visit https://aka.ms/teamsjs/getIncomingClientAudioState
7370
7433
  *
7371
- * @param callback - Callback contains 2 parameters, error and result.
7434
+ * @remarks
7435
+ * Use {@link toggleIncomingClientAudio} to toggle the current audio state.
7436
+ * For private scheduled meetings, meet now, or calls, include the `OnlineMeetingParticipant.ToggleIncomingAudio.Chat` RSC permission in your app manifest.
7437
+ * Find the app manifest reference at https://aka.ms/teamsAppManifest/authorization.
7438
+ * This API can only be used in the `sidePanel` and `meetingStage` frame contexts.
7372
7439
  *
7373
- * error can either contain an error of type SdkError, incase of an error, or null when fetch is successful
7374
- * result can either contain the true/false value, incase of a successful fetch or null when the fetching fails
7375
- * result: True means incoming audio is muted and false means incoming audio is unmuted
7440
+ * @param callback - Callback contains 2 parameters, `error` and `result`.
7441
+ * `error` can either contain an error of type `SdkError`, in case of an error, or null when fetch is successful.
7442
+ * `result` will be true when incoming audio is muted and false when incoming audio is unmuted, or null when the request fails.
7376
7443
  */
7377
7444
  function getIncomingClientAudioState(callback) {
7378
7445
  if (!callback) {
@@ -7383,12 +7450,18 @@ var meeting;
7383
7450
  }
7384
7451
  meeting.getIncomingClientAudioState = getIncomingClientAudioState;
7385
7452
  /**
7386
- * Allows an app to toggle the incoming audio speaker setting for the meeting user from mute to unmute or vice-versa
7453
+ * Allows an app to toggle the incoming audio speaker setting for the meeting user from mute to unmute or vice-versa.
7454
+ * To learn more, visit https://aka.ms/teamsjs/toggleIncomingClientAudio
7387
7455
  *
7388
- * @param callback - Callback contains 2 parameters, error and result.
7389
- * error can either contain an error of type SdkError, incase of an error, or null when toggle is successful
7390
- * result can either contain the true/false value, incase of a successful toggle or null when the toggling fails
7391
- * result: True means incoming audio is muted and false means incoming audio is unmuted
7456
+ * @remarks
7457
+ * Use {@link getIncomingClientAudioState} to get the current audio state.
7458
+ * For private scheduled meetings, meet now, or calls, include the `OnlineMeetingParticipant.ToggleIncomingAudio.Chat` RSC permission in your app manifest.
7459
+ * Find the app manifest reference at https://aka.ms/teamsAppManifest/authorization.
7460
+ * This API can only be used in the `sidePanel` and `meetingStage` frame contexts.
7461
+ *
7462
+ * @param callback - Callback contains 2 parameters, `error` and `result`.
7463
+ * `error` can either contain an error of type `SdkError`, in case of an error, or null when toggle is successful.
7464
+ * `result` will be true when incoming audio is muted and false when incoming audio is unmuted, or null when the toggling fails.
7392
7465
  */
7393
7466
  function toggleIncomingClientAudio(callback) {
7394
7467
  if (!callback) {
@@ -7402,9 +7475,9 @@ var meeting;
7402
7475
  * @hidden
7403
7476
  * Allows an app to get the meeting details for the meeting
7404
7477
  *
7405
- * @param callback - Callback contains 2 parameters, error and meetingDetailsResponse.
7406
- * error can either contain an error of type SdkError, incase of an error, or null when get is successful
7407
- * result can either contain a IMeetingDetailsResponse value, in case of a successful get or null when the get fails
7478
+ * @param callback - Callback contains 2 parameters, `error` and `meetingDetailsResponse`.
7479
+ * `error` can either contain an error of type `SdkError`, in case of an error, or null when get is successful
7480
+ * `result` can either contain a {@link IMeetingDetailsResponse} value, in case of a successful get or null when the get fails
7408
7481
  *
7409
7482
  * @internal
7410
7483
  * Limited to Microsoft-internal use
@@ -7421,9 +7494,9 @@ var meeting;
7421
7494
  * @hidden
7422
7495
  * Allows an app to get the authentication token for the anonymous or guest user in the meeting
7423
7496
  *
7424
- * @param callback - Callback contains 2 parameters, error and authenticationTokenOfAnonymousUser.
7425
- * error can either contain an error of type SdkError, incase of an error, or null when get is successful
7426
- * authenticationTokenOfAnonymousUser can either contain a string value, incase of a successful get or null when the get fails
7497
+ * @param callback - Callback contains 2 parameters, `error` and `authenticationTokenOfAnonymousUser`.
7498
+ * `error` can either contain an error of type `SdkError`, in case of an error, or null when get is successful
7499
+ * `authenticationTokenOfAnonymousUser` can either contain a string value, in case of a successful get or null when the get fails
7427
7500
  *
7428
7501
  * @internal
7429
7502
  * Limited to Microsoft-internal use
@@ -7437,11 +7510,17 @@ var meeting;
7437
7510
  }
7438
7511
  meeting.getAuthenticationTokenForAnonymousUser = getAuthenticationTokenForAnonymousUser;
7439
7512
  /**
7440
- * Allows an app to get the state of the live stream in the current meeting
7513
+ * Allows an app to get the state of the outgoing live stream in the current meeting.
7514
+ *
7515
+ * @remarks
7516
+ * Use {@link requestStartLiveStreaming} or {@link requestStopLiveStreaming} to start/stop a live stream.
7517
+ * This API can only be used in the `sidePanel` frame context.
7518
+ * The `meetingExtensionDefinition.supportsStreaming` field in your app manifest must be `true` to use this API.
7519
+ * Find the app manifest reference at https://aka.ms/teamsAppManifest/meetingExtensionDefinition.
7441
7520
  *
7442
- * @param callback - Callback contains 2 parameters: error and liveStreamState.
7443
- * error can either contain an error of type SdkError, in case of an error, or null when get is successful
7444
- * liveStreamState can either contain a LiveStreamState value, or null when operation fails
7521
+ * @param callback - Callback contains 2 parameters: `error` and `liveStreamState`.
7522
+ * `error` can either contain an error of type `SdkError`, in case of an error, or null when the request is successful
7523
+ * `liveStreamState` can either contain a `LiveStreamState` value, or null when operation fails
7445
7524
  */
7446
7525
  function getLiveStreamState(callback) {
7447
7526
  if (!callback) {
@@ -7452,14 +7531,20 @@ var meeting;
7452
7531
  }
7453
7532
  meeting.getLiveStreamState = getLiveStreamState;
7454
7533
  /**
7455
- * Allows an app to request the live streaming be started at the given streaming url
7534
+ * Allows an app to ask the local user to begin live streaming the current meeting to the given Real-Time Messaging Protocol (RTMP) stream url.
7535
+ * A confirmation dialog will be shown to the local user with options to "Allow" or "Cancel" this request.
7456
7536
  *
7457
7537
  * @remarks
7458
- * Use getLiveStreamState or registerLiveStreamChangedHandler to get updates on the live stream state
7538
+ * Meeting content (e.g., user video, screenshare, audio, etc.) can be externally streamed to any platform that supports the popular RTMP standard.
7539
+ * Content broadcasted through RTMP is automatically formatted and cannot be customized.
7540
+ * Use {@link getLiveStreamState} or {@link registerLiveStreamChangedHandler} to get updates on the live stream state.
7541
+ * This API can only be used in the `sidePanel` frame context.
7542
+ * The `meetingExtensionDefinition.supportsStreaming` field in your app manifest must be `true` to use this API.
7543
+ * Find the app manifest reference at https://aka.ms/teamsAppManifest/meetingExtensionDefinition.
7459
7544
  *
7460
- * @param streamUrl - the url to the stream resource
7461
- * @param streamKey - the key to the stream resource
7462
- * @param callback - Callback contains error parameter which can be of type SdkError in case of an error, or null when operation is successful
7545
+ * @param callback - completion callback that contains an `error` parameter, which can be of type `SdkError` in case of an error, or null when operation is successful
7546
+ * @param streamUrl - the url to the RTMP stream resource
7547
+ * @param streamKey - the key to the RTMP stream resource
7463
7548
  */
7464
7549
  function requestStartLiveStreaming(callback, streamUrl, streamKey) {
7465
7550
  if (!callback) {
@@ -7470,12 +7555,15 @@ var meeting;
7470
7555
  }
7471
7556
  meeting.requestStartLiveStreaming = requestStartLiveStreaming;
7472
7557
  /**
7473
- * Allows an app to request the live streaming be stopped at the given streaming url
7558
+ * Allows an app to request that live streaming be stopped.
7474
7559
  *
7475
7560
  * @remarks
7476
- * Use getLiveStreamState or registerLiveStreamChangedHandler to get updates on the live stream state
7561
+ * Use {@link getLiveStreamState} or {@link registerLiveStreamChangedHandler} to get updates on the live stream state.
7562
+ * This API can only be used in the `sidePanel` frame context.
7563
+ * The `meetingExtensionDefinition.supportsStreaming` field in your app manifest must be `true` to use this API.
7564
+ * Find the app manifest reference at https://aka.ms/teamsAppManifest/meetingExtensionDefinition.
7477
7565
  *
7478
- * @param callback - Callback contains error parameter which can be of type SdkError in case of an error, or null when operation is successful
7566
+ * @param callback - completion callback that contains an error parameter, which can be of type `SdkError` in case of an error, or null when operation is successful
7479
7567
  */
7480
7568
  function requestStopLiveStreaming(callback) {
7481
7569
  if (!callback) {
@@ -7486,10 +7574,14 @@ var meeting;
7486
7574
  }
7487
7575
  meeting.requestStopLiveStreaming = requestStopLiveStreaming;
7488
7576
  /**
7489
- * Registers a handler for changes to the live stream.
7577
+ * Registers an event handler for state changes to the live stream.
7490
7578
  *
7491
7579
  * @remarks
7492
7580
  * Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
7581
+ * Use {@link requestStartLiveStreaming} or {@link requestStopLiveStreaming} to start/stop a live stream.
7582
+ * This API can only be used in the `sidePanel` frame context.
7583
+ * The `meetingExtensionDefinition.supportsStreaming` field in your app manifest must be `true` to use this API.
7584
+ * Find the app manifest reference at https://aka.ms/teamsAppManifest/meetingExtensionDefinition.
7493
7585
  *
7494
7586
  * @param handler - The handler to invoke when the live stream state changes
7495
7587
  */
@@ -7502,12 +7594,22 @@ var meeting;
7502
7594
  }
7503
7595
  meeting.registerLiveStreamChangedHandler = registerLiveStreamChangedHandler;
7504
7596
  /**
7505
- * Allows an app to share contents in the meeting
7597
+ * Allows an app to share a given URL to the meeting stage for all users in the meeting.
7598
+ * To learn more, visit https://aka.ms/teamsjs/shareAppContentToStage
7506
7599
  *
7507
- * @param callback - Callback contains 2 parameters, error and result.
7508
- * error can either contain an error of type SdkError, incase of an error, or null when share is successful
7509
- * result can either contain a true value, incase of a successful share or null when the share fails
7510
- * @param appContentUrl - is the input URL which needs to be shared on to the stage
7600
+ * @remarks
7601
+ * This API can only be used in the `sidePanel` and `meetingStage` frame contexts.
7602
+ * For private scheduled meetings, meet now, or calls, include the `MeetingStage.Write.Chat` RSC permission in your app manifest.
7603
+ * For channel meetings, include the `ChannelMeetingStage.Write.Group` RSC permission in your app manifest.
7604
+ * Find the app manifest reference at https://aka.ms/teamsAppManifest/authorization.
7605
+ * Use {@link getAppContentStageSharingCapabilities} to determine if the local user is eligible to use this API.
7606
+ * Use {@link getAppContentStageSharingState} to determine whether app content is already being shared to the meeting stage.
7607
+ *
7608
+ * @param callback - Callback contains 2 parameters, `error` and `result`.
7609
+ * `error` can either contain an error of type `SdkError`, in case of an error, or null when share is successful
7610
+ * `result` can either contain a true value, in case of a successful share or null when the share fails
7611
+ * @param appContentUrl - is the input URL to be shared to the meeting stage.
7612
+ * the URL origin must be included in your app manifest's `validDomains` field.
7511
7613
  */
7512
7614
  function shareAppContentToStage(callback, appContentUrl) {
7513
7615
  if (!callback) {
@@ -7518,12 +7620,21 @@ var meeting;
7518
7620
  }
7519
7621
  meeting.shareAppContentToStage = shareAppContentToStage;
7520
7622
  /**
7521
- * Provides information related app's in-meeting sharing capabilities
7623
+ * Allows an app to request whether the local user's app version has the required app manifest permissions to share content to meeting stage.
7624
+ * To learn more, visit https://aka.ms/teamsjs/getAppContentStageSharingCapabilities
7522
7625
  *
7523
- * @param callback - Callback contains 2 parameters, error and result.
7524
- * error can either contain an error of type SdkError (error indication), or null (non-error indication)
7525
- * appContentStageSharingCapabilities can either contain an IAppContentStageSharingCapabilities object
7526
- * (indication of successful retrieval), or null (indication of failed retrieval)
7626
+ * @remarks
7627
+ * If you are updating your published app to include the share to stage feature, you can use this API to prompt users to update their app if they are using an older version.
7628
+ * Your app's `configurableTabs` or `staticTabs` entry's `context` array must include `meetingStage` for `doesAppHaveSharePermission` to be `true` in the `callback` response.
7629
+ *
7630
+ * @throws error if API is being used outside of `sidePanel` or `meetingStage` frame contexts.
7631
+ * @throws error if your app manifest does not include the `MeetingStage.Write.Chat` RSC permission in your app manifest in a private scheduled meeting, meet now, or call --
7632
+ * or if it does not include the `ChannelMeetingStage.Write.Group` RSC permission in your app manifest in a channel meeting.
7633
+ * Find the app manifest reference at https://aka.ms/teamsAppManifest/authorization.
7634
+ *
7635
+ * @param callback - Completion callback contains 2 parameters: `error` and `appContentStageSharingCapabilities`.
7636
+ * `error` can either contain an error of type `SdkError` (error indication), or null (non-error indication).
7637
+ * `appContentStageSharingCapabilities` will contain an {@link IAppContentStageSharingCapabilities} object if the request succeeds, or null if it failed.
7527
7638
  */
7528
7639
  function getAppContentStageSharingCapabilities(callback) {
7529
7640
  if (!callback) {
@@ -7551,12 +7662,18 @@ var meeting;
7551
7662
  }
7552
7663
  meeting.stopSharingAppContentToStage = stopSharingAppContentToStage;
7553
7664
  /**
7554
- * Provides information related to current stage sharing state for app
7665
+ * Provides information related to current stage sharing state for your app.
7666
+ * To learn more, visit https://aka.ms/teamsjs/getAppContentStageSharingState
7555
7667
  *
7556
- * @param callback - Callback contains 2 parameters, error and result.
7668
+ * @remarks
7669
+ * This API can only be used in the `sidePanel` and `meetingStage` frame contexts.
7670
+ * For private scheduled meetings, meet now, or calls, include the `MeetingStage.Write.Chat` RSC permission in your app manifest.
7671
+ * For channel meetings, include the `ChannelMeetingStage.Write.Group` RSC permission in your app manifest.
7672
+ * Find the app manifest reference at https://aka.ms/teamsAppManifest/authorization.
7673
+ *
7674
+ * @param callback - Callback contains 2 parameters, `error` and `appContentStageSharingState`.
7557
7675
  * error can either contain an error of type SdkError (error indication), or null (non-error indication)
7558
- * appContentStageSharingState can either contain an IAppContentStageSharingState object
7559
- * (indication of successful retrieval), or null (indication of failed retrieval)
7676
+ * `appContentStageSharingState` can either contain an `IAppContentStageSharingState` object if the request succeeds, or null if it failed
7560
7677
  */
7561
7678
  function getAppContentStageSharingState(callback) {
7562
7679
  if (!callback) {
@@ -7567,9 +7684,17 @@ var meeting;
7567
7684
  }
7568
7685
  meeting.getAppContentStageSharingState = getAppContentStageSharingState;
7569
7686
  /**
7570
- * Registers a handler for changes to paticipant speaking states. This API returns {@link ISpeakingState}, which will have isSpeakingDetected
7571
- * and/or an error object. If any participant is speaking, isSpeakingDetected will be true. If no participants are speaking, isSpeakingDetected
7572
- * will be false. Default value is false. Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
7687
+ * Registers a handler for changes to participant speaking states.
7688
+ * To learn more, visit https://aka.ms/teamsjs/registerSpeakingStateChangeHandler
7689
+ *
7690
+ * @remarks
7691
+ * This API returns {@link ISpeakingState}, which will have `isSpeakingDetected` and/or an error object.
7692
+ * If any participant is speaking, `isSpeakingDetected` will be true, or false if no participants are speaking.
7693
+ * Only one handler can be registered at a time. Subsequent registrations replace existing registrations.
7694
+ * This API can only be used in the `sidePanel` and `meetingStage` frame contexts.
7695
+ * For private scheduled meetings, meet now, or calls, include the `OnlineMeetingIncomingAudio.Detect.Chat` RSC permission in your app manifest.
7696
+ * For channel meetings, include the `OnlineMeetingIncomingAudio.Detect.Group` RSC permission in your app manifest.
7697
+ * Find the app manifest reference at https://aka.ms/teamsAppManifest/authorization.
7573
7698
  *
7574
7699
  * @param handler The handler to invoke when the speaking state of any participant changes (start/stop speaking).
7575
7700
  */
@@ -7630,6 +7755,12 @@ var meeting;
7630
7755
  /**
7631
7756
  * Nested namespace for functions to control behavior of the app share button
7632
7757
  *
7758
+ * @hidden
7759
+ * Hide from docs.
7760
+ *
7761
+ * @internal
7762
+ * Limited to Microsoft-internal use
7763
+ *
7633
7764
  * @beta
7634
7765
  */
7635
7766
  var appShareButton;
@@ -7642,6 +7773,13 @@ var meeting;
7642
7773
  * @throws standard Invalid Url error
7643
7774
  * @param shareInformation has two elements, one isVisible boolean flag and another
7644
7775
  * optional string contentUrl, which will override contentUrl coming from Manifest
7776
+ *
7777
+ * @hidden
7778
+ * Hide from docs.
7779
+ *
7780
+ * @internal
7781
+ * Limited to Microsoft-internal use
7782
+ *
7645
7783
  * @beta
7646
7784
  */
7647
7785
  function setOptions(shareInformation) {
@@ -8279,325 +8417,57 @@ var profile;
8279
8417
  profile.isSupported = isSupported;
8280
8418
  })(profile || (profile = {}));
8281
8419
 
8282
- ;// CONCATENATED MODULE: ./src/internal/videoFrameTick.ts
8283
-
8284
- var VideoFrameTick = /** @class */ (function () {
8285
- function VideoFrameTick() {
8286
- }
8287
- VideoFrameTick.setTimeout = function (callback, timeoutInMs) {
8288
- var startedAtInMs = performance.now();
8289
- var id = generateGUID();
8290
- VideoFrameTick.setTimeoutCallbacks[id] = {
8291
- callback: callback,
8292
- timeoutInMs: timeoutInMs,
8293
- startedAtInMs: startedAtInMs,
8294
- };
8295
- return id;
8296
- };
8297
- VideoFrameTick.clearTimeout = function (id) {
8298
- delete VideoFrameTick.setTimeoutCallbacks[id];
8299
- };
8300
- VideoFrameTick.setInterval = function (callback, intervalInMs) {
8301
- VideoFrameTick.setTimeout(function next() {
8302
- callback();
8303
- VideoFrameTick.setTimeout(next, intervalInMs);
8304
- }, intervalInMs);
8305
- };
8306
- /**
8307
- * Call this function whenever a frame comes in, it will check if any timeout is due and call the callback
8308
- */
8309
- VideoFrameTick.tick = function () {
8310
- var now = performance.now();
8311
- var timeoutIds = [];
8312
- // find all the timeouts that are due,
8313
- // not to invoke them in the loop to avoid modifying the collection while iterating
8314
- for (var key in VideoFrameTick.setTimeoutCallbacks) {
8315
- var callback = VideoFrameTick.setTimeoutCallbacks[key];
8316
- var start = callback.startedAtInMs;
8317
- if (now - start >= callback.timeoutInMs) {
8318
- timeoutIds.push(key);
8420
+ ;// CONCATENATED MODULE: ./src/internal/videoEffectsUtils.ts
8421
+ var videoEffectsUtils_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
8422
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
8423
+ return new (P || (P = Promise))(function (resolve, reject) {
8424
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
8425
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
8426
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8427
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8428
+ });
8429
+ };
8430
+ var videoEffectsUtils_generator = (undefined && undefined.__generator) || function (thisArg, body) {
8431
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
8432
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
8433
+ function verb(n) { return function (v) { return step([n, v]); }; }
8434
+ function step(op) {
8435
+ if (f) throw new TypeError("Generator is already executing.");
8436
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
8437
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
8438
+ if (y = 0, t) op = [op[0] & 2, t.value];
8439
+ switch (op[0]) {
8440
+ case 0: case 1: t = op; break;
8441
+ case 4: _.label++; return { value: op[1], done: false };
8442
+ case 5: _.label++; y = op[1]; op = [0]; continue;
8443
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
8444
+ default:
8445
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
8446
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
8447
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
8448
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
8449
+ if (t[2]) _.ops.pop();
8450
+ _.trys.pop(); continue;
8319
8451
  }
8320
- }
8321
- // invoke the callbacks
8322
- for (var _i = 0, timeoutIds_1 = timeoutIds; _i < timeoutIds_1.length; _i++) {
8323
- var id = timeoutIds_1[_i];
8324
- var callback = VideoFrameTick.setTimeoutCallbacks[id];
8325
- callback.callback();
8326
- delete VideoFrameTick.setTimeoutCallbacks[id];
8327
- }
8328
- };
8329
- VideoFrameTick.setTimeoutCallbacks = {};
8330
- return VideoFrameTick;
8331
- }());
8452
+ op = body.call(thisArg, _);
8453
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
8454
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
8455
+ }
8456
+ };
8332
8457
 
8333
-
8334
- ;// CONCATENATED MODULE: ./src/internal/videoPerformanceStatistics.ts
8335
8458
 
8336
- var VideoPerformanceStatistics = /** @class */ (function () {
8337
- function VideoPerformanceStatistics(distributionBinSize,
8338
- /**
8339
- * Function to report the statistics result
8340
- */
8341
- reportStatisticsResult) {
8342
- this.reportStatisticsResult = reportStatisticsResult;
8343
- this.sampleCount = 0;
8344
- this.distributionBins = new Uint32Array(distributionBinSize);
8345
- }
8346
- /**
8347
- * Call this function before processing every frame
8348
- */
8349
- VideoPerformanceStatistics.prototype.processStarts = function (effectId, frameWidth, frameHeight, effectParam) {
8350
- VideoFrameTick.tick();
8351
- if (!this.suitableForThisSession(effectId, frameWidth, frameHeight, effectParam)) {
8352
- this.reportAndResetSession(this.getStatistics(), effectId, effectParam, frameWidth, frameHeight);
8353
- }
8354
- this.start();
8355
- };
8356
- VideoPerformanceStatistics.prototype.processEnds = function () {
8357
- // calculate duration of the process and record it
8358
- var durationInMillisecond = performance.now() - this.frameProcessingStartedAt;
8359
- var binIndex = Math.floor(Math.max(0, Math.min(this.distributionBins.length - 1, durationInMillisecond)));
8360
- this.distributionBins[binIndex] += 1;
8361
- this.sampleCount += 1;
8362
- };
8363
- VideoPerformanceStatistics.prototype.getStatistics = function () {
8364
- if (!this.currentSession) {
8365
- return null;
8366
- }
8367
- return {
8368
- effectId: this.currentSession.effectId,
8369
- effectParam: this.currentSession.effectParam,
8370
- frameHeight: this.currentSession.frameHeight,
8371
- frameWidth: this.currentSession.frameWidth,
8372
- duration: performance.now() - this.currentSession.startedAtInMs,
8373
- sampleCount: this.sampleCount,
8374
- distributionBins: this.distributionBins.slice(),
8375
- };
8376
- };
8377
- VideoPerformanceStatistics.prototype.start = function () {
8378
- this.frameProcessingStartedAt = performance.now();
8379
- };
8380
- VideoPerformanceStatistics.prototype.suitableForThisSession = function (effectId, frameWidth, frameHeight, effectParam) {
8381
- return (this.currentSession &&
8382
- this.currentSession.effectId === effectId &&
8383
- this.currentSession.effectParam === effectParam &&
8384
- this.currentSession.frameWidth === frameWidth &&
8385
- this.currentSession.frameHeight === frameHeight);
8386
- };
8387
- VideoPerformanceStatistics.prototype.reportAndResetSession = function (result, effectId, effectParam, frameWidth, frameHeight) {
8388
- var _this = this;
8389
- result && this.reportStatisticsResult(result);
8390
- this.resetCurrentSession(this.getNextTimeout(effectId, this.currentSession), effectId, effectParam, frameWidth, frameHeight);
8391
- if (this.timeoutId) {
8392
- VideoFrameTick.clearTimeout(this.timeoutId);
8393
- }
8394
- this.timeoutId = VideoFrameTick.setTimeout((function () { return _this.reportAndResetSession(_this.getStatistics(), effectId, effectParam, frameWidth, frameHeight); }).bind(this), this.currentSession.timeoutInMs);
8395
- };
8396
- VideoPerformanceStatistics.prototype.resetCurrentSession = function (timeoutInMs, effectId, effectParam, frameWidth, frameHeight) {
8397
- this.currentSession = {
8398
- startedAtInMs: performance.now(),
8399
- timeoutInMs: timeoutInMs,
8400
- effectId: effectId,
8401
- effectParam: effectParam,
8402
- frameWidth: frameWidth,
8403
- frameHeight: frameHeight,
8404
- };
8405
- this.sampleCount = 0;
8406
- this.distributionBins.fill(0);
8407
- };
8408
- // send the statistics result every n second, where n starts from 1, 2, 4...and finally stays at every 30 seconds.
8409
- VideoPerformanceStatistics.prototype.getNextTimeout = function (effectId, currentSession) {
8410
- // only reset timeout when new session or effect changed
8411
- if (!currentSession || currentSession.effectId !== effectId) {
8412
- return VideoPerformanceStatistics.initialSessionTimeoutInMs;
8413
- }
8414
- return Math.min(VideoPerformanceStatistics.maxSessionTimeoutInMs, currentSession.timeoutInMs * 2);
8415
- };
8416
- VideoPerformanceStatistics.initialSessionTimeoutInMs = 1000;
8417
- VideoPerformanceStatistics.maxSessionTimeoutInMs = 1000 * 30;
8418
- return VideoPerformanceStatistics;
8419
- }());
8420
8459
 
8421
-
8422
- ;// CONCATENATED MODULE: ./src/internal/videoPerformanceMonitor.ts
8423
8460
 
8424
8461
 
8425
8462
  /**
8426
- * This class is used to monitor the performance of video processing, and report performance events.
8427
- */
8428
- var VideoPerformanceMonitor = /** @class */ (function () {
8429
- function VideoPerformanceMonitor(reportPerformanceEvent) {
8430
- var _this = this;
8431
- this.reportPerformanceEvent = reportPerformanceEvent;
8432
- this.isFirstFrameProcessed = false;
8433
- this.frameProcessTimeLimit = 100;
8434
- this.frameProcessingStartedAt = 0;
8435
- this.frameProcessingTimeCost = 0;
8436
- this.processedFrameCount = 0;
8437
- this.performanceStatistics = new VideoPerformanceStatistics(VideoPerformanceMonitor.distributionBinSize, function (result) {
8438
- return _this.reportPerformanceEvent('video.performance.performanceDataGenerated', [result]);
8439
- });
8440
- }
8441
- /**
8442
- * Start to check frame processing time intervally
8443
- * and report performance event if the average frame processing time is too long.
8444
- */
8445
- VideoPerformanceMonitor.prototype.startMonitorSlowFrameProcessing = function () {
8446
- var _this = this;
8447
- VideoFrameTick.setInterval(function () {
8448
- if (_this.processedFrameCount === 0) {
8449
- return;
8450
- }
8451
- var averageFrameProcessingTime = _this.frameProcessingTimeCost / _this.processedFrameCount;
8452
- if (averageFrameProcessingTime > _this.frameProcessTimeLimit) {
8453
- _this.reportPerformanceEvent('video.performance.frameProcessingSlow', [averageFrameProcessingTime]);
8454
- }
8455
- _this.frameProcessingTimeCost = 0;
8456
- _this.processedFrameCount = 0;
8457
- }, VideoPerformanceMonitor.calculateFPSInterval);
8458
- };
8459
- /**
8460
- * Define the time limit of frame processing.
8461
- * When the average frame processing time is longer than the time limit, a "video.performance.frameProcessingSlow" event will be reported.
8462
- * @param timeLimit
8463
- */
8464
- VideoPerformanceMonitor.prototype.setFrameProcessTimeLimit = function (timeLimit) {
8465
- this.frameProcessTimeLimit = timeLimit;
8466
- };
8467
- /**
8468
- * Call this function when the app starts to switch to the new video effect
8469
- */
8470
- VideoPerformanceMonitor.prototype.reportApplyingVideoEffect = function (effectId, effectParam) {
8471
- var _a, _b;
8472
- if (((_a = this.applyingEffect) === null || _a === void 0 ? void 0 : _a.effectId) === effectId && ((_b = this.applyingEffect) === null || _b === void 0 ? void 0 : _b.effectParam) === effectParam) {
8473
- return;
8474
- }
8475
- this.applyingEffect = {
8476
- effectId: effectId,
8477
- effectParam: effectParam,
8478
- };
8479
- this.appliedEffect = undefined;
8480
- };
8481
- /**
8482
- * Call this function when the new video effect is ready
8483
- */
8484
- VideoPerformanceMonitor.prototype.reportVideoEffectChanged = function (effectId, effectParam) {
8485
- if (this.applyingEffect === undefined ||
8486
- (this.applyingEffect.effectId !== effectId && this.applyingEffect.effectParam !== effectParam)) {
8487
- // don't handle obsoleted event
8488
- return;
8489
- }
8490
- this.appliedEffect = {
8491
- effectId: effectId,
8492
- effectParam: effectParam,
8493
- };
8494
- this.applyingEffect = undefined;
8495
- this.isFirstFrameProcessed = false;
8496
- };
8497
- /**
8498
- * Call this function when the app starts to process a video frame
8499
- */
8500
- VideoPerformanceMonitor.prototype.reportStartFrameProcessing = function (frameWidth, frameHeight) {
8501
- VideoFrameTick.tick();
8502
- if (!this.appliedEffect) {
8503
- return;
8504
- }
8505
- this.frameProcessingStartedAt = performance.now();
8506
- this.performanceStatistics.processStarts(this.appliedEffect.effectId, frameWidth, frameHeight, this.appliedEffect.effectParam);
8507
- };
8508
- /**
8509
- * Call this function when the app finishes successfully processing a video frame
8510
- */
8511
- VideoPerformanceMonitor.prototype.reportFrameProcessed = function () {
8512
- var _a;
8513
- if (!this.appliedEffect) {
8514
- return;
8515
- }
8516
- this.processedFrameCount++;
8517
- this.frameProcessingTimeCost += performance.now() - this.frameProcessingStartedAt;
8518
- this.performanceStatistics.processEnds();
8519
- if (!this.isFirstFrameProcessed) {
8520
- this.isFirstFrameProcessed = true;
8521
- this.reportPerformanceEvent('video.performance.firstFrameProcessed', [
8522
- Date.now(),
8523
- this.appliedEffect.effectId,
8524
- (_a = this.appliedEffect) === null || _a === void 0 ? void 0 : _a.effectParam,
8525
- ]);
8526
- }
8527
- };
8528
- /**
8529
- * Call this function when the app starts to get the texture stream
8530
- */
8531
- VideoPerformanceMonitor.prototype.reportGettingTextureStream = function (streamId) {
8532
- this.gettingTextureStreamStartedAt = performance.now();
8533
- this.currentStreamId = streamId;
8534
- };
8535
- /**
8536
- * Call this function when the app finishes successfully getting the texture stream
8537
- */
8538
- VideoPerformanceMonitor.prototype.reportTextureStreamAcquired = function () {
8539
- if (this.gettingTextureStreamStartedAt !== undefined) {
8540
- var timeTaken = performance.now() - this.gettingTextureStreamStartedAt;
8541
- this.reportPerformanceEvent('video.performance.textureStreamAcquired', [this.currentStreamId, timeTaken]);
8542
- }
8543
- };
8544
- VideoPerformanceMonitor.distributionBinSize = 1000;
8545
- VideoPerformanceMonitor.calculateFPSInterval = 1000;
8546
- return VideoPerformanceMonitor;
8547
- }());
8548
-
8549
-
8550
- ;// CONCATENATED MODULE: ./src/internal/videoUtils.ts
8551
- var videoUtils_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
8552
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
8553
- return new (P || (P = Promise))(function (resolve, reject) {
8554
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
8555
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
8556
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8557
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8558
- });
8559
- };
8560
- var videoUtils_generator = (undefined && undefined.__generator) || function (thisArg, body) {
8561
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
8562
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
8563
- function verb(n) { return function (v) { return step([n, v]); }; }
8564
- function step(op) {
8565
- if (f) throw new TypeError("Generator is already executing.");
8566
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
8567
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
8568
- if (y = 0, t) op = [op[0] & 2, t.value];
8569
- switch (op[0]) {
8570
- case 0: case 1: t = op; break;
8571
- case 4: _.label++; return { value: op[1], done: false };
8572
- case 5: _.label++; y = op[1]; op = [0]; continue;
8573
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
8574
- default:
8575
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
8576
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
8577
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
8578
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
8579
- if (t[2]) _.ops.pop();
8580
- _.trys.pop(); continue;
8581
- }
8582
- op = body.call(thisArg, _);
8583
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
8584
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
8585
- }
8586
- };
8587
-
8588
-
8589
-
8590
-
8591
-
8592
- /**
8593
- * @hidden
8594
- * Create a MediaStreamTrack from the media stream with the given streamId and processed by videoFrameHandler.
8463
+ * @hidden
8464
+ * Create a MediaStreamTrack from the media stream with the given streamId and processed by videoFrameHandler.
8595
8465
  */
8596
8466
  function processMediaStream(streamId, videoFrameHandler, notifyError, videoPerformanceMonitor) {
8597
8467
  var _a, _b;
8598
- return videoUtils_awaiter(this, void 0, void 0, function () {
8468
+ return videoEffectsUtils_awaiter(this, void 0, void 0, function () {
8599
8469
  var generator, _c;
8600
- return videoUtils_generator(this, function (_d) {
8470
+ return videoEffectsUtils_generator(this, function (_d) {
8601
8471
  switch (_d.label) {
8602
8472
  case 0:
8603
8473
  generator = createProcessedStreamGeneratorWithoutSource();
@@ -8622,9 +8492,9 @@ function processMediaStream(streamId, videoFrameHandler, notifyError, videoPerfo
8622
8492
  */
8623
8493
  function processMediaStreamWithMetadata(streamId, videoFrameHandler, notifyError, videoPerformanceMonitor) {
8624
8494
  var _a, _b;
8625
- return videoUtils_awaiter(this, void 0, void 0, function () {
8495
+ return videoEffectsUtils_awaiter(this, void 0, void 0, function () {
8626
8496
  var generator, _c;
8627
- return videoUtils_generator(this, function (_d) {
8497
+ return videoEffectsUtils_generator(this, function (_d) {
8628
8498
  switch (_d.label) {
8629
8499
  case 0:
8630
8500
  generator = createProcessedStreamGeneratorWithoutSource();
@@ -8643,9 +8513,9 @@ function processMediaStreamWithMetadata(streamId, videoFrameHandler, notifyError
8643
8513
  * Get the video track from the media stream gotten from chrome.webview.getTextureStream(streamId).
8644
8514
  */
8645
8515
  function getInputVideoTrack(streamId, notifyError, videoPerformanceMonitor) {
8646
- return videoUtils_awaiter(this, void 0, void 0, function () {
8516
+ return videoEffectsUtils_awaiter(this, void 0, void 0, function () {
8647
8517
  var chrome, mediaStream, tracks, error_1, errorMsg;
8648
- return videoUtils_generator(this, function (_a) {
8518
+ return videoEffectsUtils_generator(this, function (_a) {
8649
8519
  switch (_a.label) {
8650
8520
  case 0:
8651
8521
  if (inServerSideRenderingEnvironment()) {
@@ -8715,9 +8585,9 @@ var DefaultTransformer = /** @class */ (function () {
8715
8585
  var _this = this;
8716
8586
  this.notifyError = notifyError;
8717
8587
  this.videoFrameHandler = videoFrameHandler;
8718
- this.transform = function (originalFrame, controller) { return videoUtils_awaiter(_this, void 0, void 0, function () {
8588
+ this.transform = function (originalFrame, controller) { return videoEffectsUtils_awaiter(_this, void 0, void 0, function () {
8719
8589
  var timestamp, frameProcessedByApp, processedFrame, error_2;
8720
- return videoUtils_generator(this, function (_a) {
8590
+ return videoEffectsUtils_generator(this, function (_a) {
8721
8591
  switch (_a.label) {
8722
8592
  case 0:
8723
8593
  timestamp = originalFrame.timestamp;
@@ -8877,9 +8747,9 @@ var TransformerWithMetadata = /** @class */ (function () {
8877
8747
  this.notifyError = notifyError;
8878
8748
  this.videoFrameHandler = videoFrameHandler;
8879
8749
  this.shouldDiscardAudioInferenceResult = false;
8880
- this.transform = function (originalFrame, controller) { return videoUtils_awaiter(_this, void 0, void 0, function () {
8750
+ this.transform = function (originalFrame, controller) { return videoEffectsUtils_awaiter(_this, void 0, void 0, function () {
8881
8751
  var timestamp, _a, videoFrame, _b, _c, audioInferenceResult, frameProcessedByApp, processedFrame, error_3;
8882
- return videoUtils_generator(this, function (_d) {
8752
+ return videoEffectsUtils_generator(this, function (_d) {
8883
8753
  switch (_d.label) {
8884
8754
  case 0:
8885
8755
  timestamp = originalFrame.timestamp;
@@ -8940,9 +8810,9 @@ var TransformerWithMetadata = /** @class */ (function () {
8940
8810
  * @internal
8941
8811
  * Limited to Microsoft-internal use
8942
8812
  */
8943
- this.extractVideoFrameAndMetadata = function (texture) { return videoUtils_awaiter(_this, void 0, void 0, function () {
8813
+ this.extractVideoFrameAndMetadata = function (texture) { return videoEffectsUtils_awaiter(_this, void 0, void 0, function () {
8944
8814
  var headerRect, headerBuffer, header, metadataRect, metadataBuffer, metadata;
8945
- return videoUtils_generator(this, function (_a) {
8815
+ return videoEffectsUtils_generator(this, function (_a) {
8946
8816
  switch (_a.label) {
8947
8817
  case 0:
8948
8818
  if (inServerSideRenderingEnvironment()) {
@@ -9005,15 +8875,283 @@ function createEffectParameterChangeCallback(callback, videoPerformanceMonitor)
9005
8875
  sendMessageToParent('video.videoEffectReadiness', [true, effectId, undefined, effectParam]);
9006
8876
  })
9007
8877
  .catch(function (reason) {
9008
- var validReason = reason in video.EffectFailureReason ? reason : video.EffectFailureReason.InitializationFailure;
8878
+ var validReason = reason in videoEffects.EffectFailureReason ? reason : videoEffects.EffectFailureReason.InitializationFailure;
9009
8879
  sendMessageToParent('video.videoEffectReadiness', [false, effectId, validReason, effectParam]);
9010
8880
  });
9011
8881
  };
9012
8882
  }
9013
8883
 
9014
- ;// CONCATENATED MODULE: ./src/public/video.ts
9015
- var video_assign = (undefined && undefined.__assign) || function () {
9016
- video_assign = Object.assign || function(t) {
8884
+ ;// CONCATENATED MODULE: ./src/internal/videoFrameTick.ts
8885
+
8886
+ var VideoFrameTick = /** @class */ (function () {
8887
+ function VideoFrameTick() {
8888
+ }
8889
+ VideoFrameTick.setTimeout = function (callback, timeoutInMs) {
8890
+ var startedAtInMs = performance.now();
8891
+ var id = generateGUID();
8892
+ VideoFrameTick.setTimeoutCallbacks[id] = {
8893
+ callback: callback,
8894
+ timeoutInMs: timeoutInMs,
8895
+ startedAtInMs: startedAtInMs,
8896
+ };
8897
+ return id;
8898
+ };
8899
+ VideoFrameTick.clearTimeout = function (id) {
8900
+ delete VideoFrameTick.setTimeoutCallbacks[id];
8901
+ };
8902
+ VideoFrameTick.setInterval = function (callback, intervalInMs) {
8903
+ VideoFrameTick.setTimeout(function next() {
8904
+ callback();
8905
+ VideoFrameTick.setTimeout(next, intervalInMs);
8906
+ }, intervalInMs);
8907
+ };
8908
+ /**
8909
+ * Call this function whenever a frame comes in, it will check if any timeout is due and call the callback
8910
+ */
8911
+ VideoFrameTick.tick = function () {
8912
+ var now = performance.now();
8913
+ var timeoutIds = [];
8914
+ // find all the timeouts that are due,
8915
+ // not to invoke them in the loop to avoid modifying the collection while iterating
8916
+ for (var key in VideoFrameTick.setTimeoutCallbacks) {
8917
+ var callback = VideoFrameTick.setTimeoutCallbacks[key];
8918
+ var start = callback.startedAtInMs;
8919
+ if (now - start >= callback.timeoutInMs) {
8920
+ timeoutIds.push(key);
8921
+ }
8922
+ }
8923
+ // invoke the callbacks
8924
+ for (var _i = 0, timeoutIds_1 = timeoutIds; _i < timeoutIds_1.length; _i++) {
8925
+ var id = timeoutIds_1[_i];
8926
+ var callback = VideoFrameTick.setTimeoutCallbacks[id];
8927
+ callback.callback();
8928
+ delete VideoFrameTick.setTimeoutCallbacks[id];
8929
+ }
8930
+ };
8931
+ VideoFrameTick.setTimeoutCallbacks = {};
8932
+ return VideoFrameTick;
8933
+ }());
8934
+
8935
+
8936
+ ;// CONCATENATED MODULE: ./src/internal/videoPerformanceStatistics.ts
8937
+
8938
+ var VideoPerformanceStatistics = /** @class */ (function () {
8939
+ function VideoPerformanceStatistics(distributionBinSize,
8940
+ /**
8941
+ * Function to report the statistics result
8942
+ */
8943
+ reportStatisticsResult) {
8944
+ this.reportStatisticsResult = reportStatisticsResult;
8945
+ this.sampleCount = 0;
8946
+ this.distributionBins = new Uint32Array(distributionBinSize);
8947
+ }
8948
+ /**
8949
+ * Call this function before processing every frame
8950
+ */
8951
+ VideoPerformanceStatistics.prototype.processStarts = function (effectId, frameWidth, frameHeight, effectParam) {
8952
+ VideoFrameTick.tick();
8953
+ if (!this.suitableForThisSession(effectId, frameWidth, frameHeight, effectParam)) {
8954
+ this.reportAndResetSession(this.getStatistics(), effectId, effectParam, frameWidth, frameHeight);
8955
+ }
8956
+ this.start();
8957
+ };
8958
+ VideoPerformanceStatistics.prototype.processEnds = function () {
8959
+ // calculate duration of the process and record it
8960
+ var durationInMillisecond = performance.now() - this.frameProcessingStartedAt;
8961
+ var binIndex = Math.floor(Math.max(0, Math.min(this.distributionBins.length - 1, durationInMillisecond)));
8962
+ this.distributionBins[binIndex] += 1;
8963
+ this.sampleCount += 1;
8964
+ };
8965
+ VideoPerformanceStatistics.prototype.getStatistics = function () {
8966
+ if (!this.currentSession) {
8967
+ return null;
8968
+ }
8969
+ return {
8970
+ effectId: this.currentSession.effectId,
8971
+ effectParam: this.currentSession.effectParam,
8972
+ frameHeight: this.currentSession.frameHeight,
8973
+ frameWidth: this.currentSession.frameWidth,
8974
+ duration: performance.now() - this.currentSession.startedAtInMs,
8975
+ sampleCount: this.sampleCount,
8976
+ distributionBins: this.distributionBins.slice(),
8977
+ };
8978
+ };
8979
+ VideoPerformanceStatistics.prototype.start = function () {
8980
+ this.frameProcessingStartedAt = performance.now();
8981
+ };
8982
+ VideoPerformanceStatistics.prototype.suitableForThisSession = function (effectId, frameWidth, frameHeight, effectParam) {
8983
+ return (this.currentSession &&
8984
+ this.currentSession.effectId === effectId &&
8985
+ this.currentSession.effectParam === effectParam &&
8986
+ this.currentSession.frameWidth === frameWidth &&
8987
+ this.currentSession.frameHeight === frameHeight);
8988
+ };
8989
+ VideoPerformanceStatistics.prototype.reportAndResetSession = function (result, effectId, effectParam, frameWidth, frameHeight) {
8990
+ var _this = this;
8991
+ result && this.reportStatisticsResult(result);
8992
+ this.resetCurrentSession(this.getNextTimeout(effectId, this.currentSession), effectId, effectParam, frameWidth, frameHeight);
8993
+ if (this.timeoutId) {
8994
+ VideoFrameTick.clearTimeout(this.timeoutId);
8995
+ }
8996
+ this.timeoutId = VideoFrameTick.setTimeout((function () { return _this.reportAndResetSession(_this.getStatistics(), effectId, effectParam, frameWidth, frameHeight); }).bind(this), this.currentSession.timeoutInMs);
8997
+ };
8998
+ VideoPerformanceStatistics.prototype.resetCurrentSession = function (timeoutInMs, effectId, effectParam, frameWidth, frameHeight) {
8999
+ this.currentSession = {
9000
+ startedAtInMs: performance.now(),
9001
+ timeoutInMs: timeoutInMs,
9002
+ effectId: effectId,
9003
+ effectParam: effectParam,
9004
+ frameWidth: frameWidth,
9005
+ frameHeight: frameHeight,
9006
+ };
9007
+ this.sampleCount = 0;
9008
+ this.distributionBins.fill(0);
9009
+ };
9010
+ // send the statistics result every n second, where n starts from 1, 2, 4...and finally stays at every 30 seconds.
9011
+ VideoPerformanceStatistics.prototype.getNextTimeout = function (effectId, currentSession) {
9012
+ // only reset timeout when new session or effect changed
9013
+ if (!currentSession || currentSession.effectId !== effectId) {
9014
+ return VideoPerformanceStatistics.initialSessionTimeoutInMs;
9015
+ }
9016
+ return Math.min(VideoPerformanceStatistics.maxSessionTimeoutInMs, currentSession.timeoutInMs * 2);
9017
+ };
9018
+ VideoPerformanceStatistics.initialSessionTimeoutInMs = 1000;
9019
+ VideoPerformanceStatistics.maxSessionTimeoutInMs = 1000 * 30;
9020
+ return VideoPerformanceStatistics;
9021
+ }());
9022
+
9023
+
9024
+ ;// CONCATENATED MODULE: ./src/internal/videoPerformanceMonitor.ts
9025
+
9026
+
9027
+ /**
9028
+ * This class is used to monitor the performance of video processing, and report performance events.
9029
+ */
9030
+ var VideoPerformanceMonitor = /** @class */ (function () {
9031
+ function VideoPerformanceMonitor(reportPerformanceEvent) {
9032
+ var _this = this;
9033
+ this.reportPerformanceEvent = reportPerformanceEvent;
9034
+ this.isFirstFrameProcessed = false;
9035
+ this.frameProcessTimeLimit = 100;
9036
+ this.frameProcessingStartedAt = 0;
9037
+ this.frameProcessingTimeCost = 0;
9038
+ this.processedFrameCount = 0;
9039
+ this.performanceStatistics = new VideoPerformanceStatistics(VideoPerformanceMonitor.distributionBinSize, function (result) {
9040
+ return _this.reportPerformanceEvent('video.performance.performanceDataGenerated', [result]);
9041
+ });
9042
+ }
9043
+ /**
9044
+ * Start to check frame processing time intervally
9045
+ * and report performance event if the average frame processing time is too long.
9046
+ */
9047
+ VideoPerformanceMonitor.prototype.startMonitorSlowFrameProcessing = function () {
9048
+ var _this = this;
9049
+ VideoFrameTick.setInterval(function () {
9050
+ if (_this.processedFrameCount === 0) {
9051
+ return;
9052
+ }
9053
+ var averageFrameProcessingTime = _this.frameProcessingTimeCost / _this.processedFrameCount;
9054
+ if (averageFrameProcessingTime > _this.frameProcessTimeLimit) {
9055
+ _this.reportPerformanceEvent('video.performance.frameProcessingSlow', [averageFrameProcessingTime]);
9056
+ }
9057
+ _this.frameProcessingTimeCost = 0;
9058
+ _this.processedFrameCount = 0;
9059
+ }, VideoPerformanceMonitor.calculateFPSInterval);
9060
+ };
9061
+ /**
9062
+ * Define the time limit of frame processing.
9063
+ * When the average frame processing time is longer than the time limit, a "video.performance.frameProcessingSlow" event will be reported.
9064
+ * @param timeLimit
9065
+ */
9066
+ VideoPerformanceMonitor.prototype.setFrameProcessTimeLimit = function (timeLimit) {
9067
+ this.frameProcessTimeLimit = timeLimit;
9068
+ };
9069
+ /**
9070
+ * Call this function when the app starts to switch to the new video effect
9071
+ */
9072
+ VideoPerformanceMonitor.prototype.reportApplyingVideoEffect = function (effectId, effectParam) {
9073
+ var _a, _b;
9074
+ if (((_a = this.applyingEffect) === null || _a === void 0 ? void 0 : _a.effectId) === effectId && ((_b = this.applyingEffect) === null || _b === void 0 ? void 0 : _b.effectParam) === effectParam) {
9075
+ return;
9076
+ }
9077
+ this.applyingEffect = {
9078
+ effectId: effectId,
9079
+ effectParam: effectParam,
9080
+ };
9081
+ this.appliedEffect = undefined;
9082
+ };
9083
+ /**
9084
+ * Call this function when the new video effect is ready
9085
+ */
9086
+ VideoPerformanceMonitor.prototype.reportVideoEffectChanged = function (effectId, effectParam) {
9087
+ if (this.applyingEffect === undefined ||
9088
+ (this.applyingEffect.effectId !== effectId && this.applyingEffect.effectParam !== effectParam)) {
9089
+ // don't handle obsoleted event
9090
+ return;
9091
+ }
9092
+ this.appliedEffect = {
9093
+ effectId: effectId,
9094
+ effectParam: effectParam,
9095
+ };
9096
+ this.applyingEffect = undefined;
9097
+ this.isFirstFrameProcessed = false;
9098
+ };
9099
+ /**
9100
+ * Call this function when the app starts to process a video frame
9101
+ */
9102
+ VideoPerformanceMonitor.prototype.reportStartFrameProcessing = function (frameWidth, frameHeight) {
9103
+ VideoFrameTick.tick();
9104
+ if (!this.appliedEffect) {
9105
+ return;
9106
+ }
9107
+ this.frameProcessingStartedAt = performance.now();
9108
+ this.performanceStatistics.processStarts(this.appliedEffect.effectId, frameWidth, frameHeight, this.appliedEffect.effectParam);
9109
+ };
9110
+ /**
9111
+ * Call this function when the app finishes successfully processing a video frame
9112
+ */
9113
+ VideoPerformanceMonitor.prototype.reportFrameProcessed = function () {
9114
+ var _a;
9115
+ if (!this.appliedEffect) {
9116
+ return;
9117
+ }
9118
+ this.processedFrameCount++;
9119
+ this.frameProcessingTimeCost += performance.now() - this.frameProcessingStartedAt;
9120
+ this.performanceStatistics.processEnds();
9121
+ if (!this.isFirstFrameProcessed) {
9122
+ this.isFirstFrameProcessed = true;
9123
+ this.reportPerformanceEvent('video.performance.firstFrameProcessed', [
9124
+ Date.now(),
9125
+ this.appliedEffect.effectId,
9126
+ (_a = this.appliedEffect) === null || _a === void 0 ? void 0 : _a.effectParam,
9127
+ ]);
9128
+ }
9129
+ };
9130
+ /**
9131
+ * Call this function when the app starts to get the texture stream
9132
+ */
9133
+ VideoPerformanceMonitor.prototype.reportGettingTextureStream = function (streamId) {
9134
+ this.gettingTextureStreamStartedAt = performance.now();
9135
+ this.currentStreamId = streamId;
9136
+ };
9137
+ /**
9138
+ * Call this function when the app finishes successfully getting the texture stream
9139
+ */
9140
+ VideoPerformanceMonitor.prototype.reportTextureStreamAcquired = function () {
9141
+ if (this.gettingTextureStreamStartedAt !== undefined) {
9142
+ var timeTaken = performance.now() - this.gettingTextureStreamStartedAt;
9143
+ this.reportPerformanceEvent('video.performance.textureStreamAcquired', [this.currentStreamId, timeTaken]);
9144
+ }
9145
+ };
9146
+ VideoPerformanceMonitor.distributionBinSize = 1000;
9147
+ VideoPerformanceMonitor.calculateFPSInterval = 1000;
9148
+ return VideoPerformanceMonitor;
9149
+ }());
9150
+
9151
+
9152
+ ;// CONCATENATED MODULE: ./src/public/videoEffects.ts
9153
+ var videoEffects_assign = (undefined && undefined.__assign) || function () {
9154
+ videoEffects_assign = Object.assign || function(t) {
9017
9155
  for (var s, i = 1, n = arguments.length; i < n; i++) {
9018
9156
  s = arguments[i];
9019
9157
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
@@ -9021,9 +9159,9 @@ var video_assign = (undefined && undefined.__assign) || function () {
9021
9159
  }
9022
9160
  return t;
9023
9161
  };
9024
- return video_assign.apply(this, arguments);
9162
+ return videoEffects_assign.apply(this, arguments);
9025
9163
  };
9026
- var video_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
9164
+ var videoEffects_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
9027
9165
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
9028
9166
  return new (P || (P = Promise))(function (resolve, reject) {
9029
9167
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -9032,7 +9170,7 @@ var video_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _ar
9032
9170
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9033
9171
  });
9034
9172
  };
9035
- var video_generator = (undefined && undefined.__generator) || function (thisArg, body) {
9173
+ var videoEffects_generator = (undefined && undefined.__generator) || function (thisArg, body) {
9036
9174
  var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
9037
9175
  return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
9038
9176
  function verb(n) { return function (v) { return step([n, v]); }; }
@@ -9059,7 +9197,7 @@ var video_generator = (undefined && undefined.__generator) || function (thisArg,
9059
9197
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
9060
9198
  }
9061
9199
  };
9062
- var video_rest = (undefined && undefined.__rest) || function (s, e) {
9200
+ var videoEffects_rest = (undefined && undefined.__rest) || function (s, e) {
9063
9201
  var t = {};
9064
9202
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
9065
9203
  t[p] = s[p];
@@ -9082,8 +9220,8 @@ var video_rest = (undefined && undefined.__rest) || function (s, e) {
9082
9220
  * Namespace to video extensibility of the SDK
9083
9221
  * @beta
9084
9222
  */
9085
- var video;
9086
- (function (video) {
9223
+ var videoEffects;
9224
+ (function (videoEffects) {
9087
9225
  var videoPerformanceMonitor = inServerSideRenderingEnvironment()
9088
9226
  ? undefined
9089
9227
  : new VideoPerformanceMonitor(sendMessageToParent);
@@ -9095,7 +9233,7 @@ var video;
9095
9233
  (function (VideoFrameFormat) {
9096
9234
  /** Video format used for encoding and decoding YUV color data in video streaming and storage applications. */
9097
9235
  VideoFrameFormat["NV12"] = "NV12";
9098
- })(VideoFrameFormat = video.VideoFrameFormat || (video.VideoFrameFormat = {}));
9236
+ })(VideoFrameFormat = videoEffects.VideoFrameFormat || (videoEffects.VideoFrameFormat = {}));
9099
9237
  /**
9100
9238
  * Video effect change type enum
9101
9239
  * @beta
@@ -9110,7 +9248,7 @@ var video;
9110
9248
  * Disable the video effect
9111
9249
  */
9112
9250
  EffectChangeType["EffectDisabled"] = "EffectDisabled";
9113
- })(EffectChangeType = video.EffectChangeType || (video.EffectChangeType = {}));
9251
+ })(EffectChangeType = videoEffects.EffectChangeType || (videoEffects.EffectChangeType = {}));
9114
9252
  /**
9115
9253
  * Predefined failure reasons for preparing the selected video effect
9116
9254
  * @beta
@@ -9126,7 +9264,7 @@ var video;
9126
9264
  * The effect can't be initialized
9127
9265
  */
9128
9266
  EffectFailureReason["InitializationFailure"] = "InitializationFailure";
9129
- })(EffectFailureReason = video.EffectFailureReason || (video.EffectFailureReason = {}));
9267
+ })(EffectFailureReason = videoEffects.EffectFailureReason || (videoEffects.EffectFailureReason = {}));
9130
9268
  /**
9131
9269
  * Register callbacks to process the video frames if the host supports it.
9132
9270
  * @beta
@@ -9136,7 +9274,7 @@ var video;
9136
9274
  *
9137
9275
  * @example
9138
9276
  * ```typescript
9139
- * video.registerForVideoFrame({
9277
+ * videoEffects.registerForVideoFrame({
9140
9278
  * videoFrameHandler: async (videoFrameData) => {
9141
9279
  * const originalFrame = videoFrameData.videoFrame as VideoFrame;
9142
9280
  * try {
@@ -9159,7 +9297,7 @@ var video;
9159
9297
  * }
9160
9298
  * },
9161
9299
  * config: {
9162
- * format: video.VideoPixelFormat.NV12,
9300
+ * format: videoEffects.VideoPixelFormat.NV12,
9163
9301
  * }
9164
9302
  * });
9165
9303
  * ```
@@ -9187,7 +9325,7 @@ var video;
9187
9325
  }
9188
9326
  videoPerformanceMonitor === null || videoPerformanceMonitor === void 0 ? void 0 : videoPerformanceMonitor.startMonitorSlowFrameProcessing();
9189
9327
  }
9190
- video.registerForVideoFrame = registerForVideoFrame;
9328
+ videoEffects.registerForVideoFrame = registerForVideoFrame;
9191
9329
  /**
9192
9330
  * Video extension should call this to notify host that the current selected effect parameter changed.
9193
9331
  * If it's pre-meeting, host will call videoEffectCallback immediately then use the videoEffect.
@@ -9203,7 +9341,7 @@ var video;
9203
9341
  }
9204
9342
  sendMessageToParent('video.videoEffectChanged', [effectChangeType, effectId]);
9205
9343
  }
9206
- video.notifySelectedVideoEffectChanged = notifySelectedVideoEffectChanged;
9344
+ videoEffects.notifySelectedVideoEffectChanged = notifySelectedVideoEffectChanged;
9207
9345
  /**
9208
9346
  * Register a callback to be notified when a new video effect is applied.
9209
9347
  * @beta
@@ -9217,7 +9355,7 @@ var video;
9217
9355
  registerHandler('video.effectParameterChange', createEffectParameterChangeCallback(callback, videoPerformanceMonitor), false);
9218
9356
  sendMessageToParent('video.registerForVideoEffect');
9219
9357
  }
9220
- video.registerForVideoEffect = registerForVideoEffect;
9358
+ videoEffects.registerForVideoEffect = registerForVideoEffect;
9221
9359
  /**
9222
9360
  * Sending notification to host finished the video frame processing, now host can render this video frame
9223
9361
  * or pass the video frame to next one in video pipeline
@@ -9248,16 +9386,16 @@ var video;
9248
9386
  /** A host should support either mediaStream or sharedFrame sub-capability to support the video capability */
9249
9387
  (!!runtime.supports.video.mediaStream || !!runtime.supports.video.sharedFrame));
9250
9388
  }
9251
- video.isSupported = isSupported;
9389
+ videoEffects.isSupported = isSupported;
9252
9390
  function registerForMediaStream(videoFrameHandler, config) {
9253
9391
  var _this = this;
9254
9392
  ensureInitialized(runtime, FrameContexts.sidePanel);
9255
9393
  if (!isSupported() || !doesSupportMediaStream()) {
9256
9394
  throw errorNotSupportedOnPlatform;
9257
9395
  }
9258
- registerHandler('video.startVideoExtensibilityVideoStream', function (mediaStreamInfo) { return video_awaiter(_this, void 0, void 0, function () {
9396
+ registerHandler('video.startVideoExtensibilityVideoStream', function (mediaStreamInfo) { return videoEffects_awaiter(_this, void 0, void 0, function () {
9259
9397
  var streamId, monitoredVideoFrameHandler;
9260
- return video_generator(this, function (_a) {
9398
+ return videoEffects_generator(this, function (_a) {
9261
9399
  switch (_a.label) {
9262
9400
  case 0:
9263
9401
  streamId = mediaStreamInfo.streamId;
@@ -9273,9 +9411,9 @@ var video;
9273
9411
  }
9274
9412
  function createMonitoredVideoFrameHandler(videoFrameHandler, videoPerformanceMonitor) {
9275
9413
  var _this = this;
9276
- return function (videoFrameData) { return video_awaiter(_this, void 0, void 0, function () {
9414
+ return function (videoFrameData) { return videoEffects_awaiter(_this, void 0, void 0, function () {
9277
9415
  var originalFrame, processedFrame;
9278
- return video_generator(this, function (_a) {
9416
+ return videoEffects_generator(this, function (_a) {
9279
9417
  switch (_a.label) {
9280
9418
  case 0:
9281
9419
  originalFrame = videoFrameData.videoFrame;
@@ -9314,8 +9452,8 @@ var video;
9314
9452
  }
9315
9453
  else {
9316
9454
  // The host may pass the VideoFrame with the old definition which has `data` instead of `videoFrameBuffer`
9317
- var data = videoBufferData.data, newVideoBufferData = video_rest(videoBufferData, ["data"]);
9318
- return video_assign(video_assign({}, newVideoBufferData), { videoFrameBuffer: data });
9455
+ var data = videoBufferData.data, newVideoBufferData = videoEffects_rest(videoBufferData, ["data"]);
9456
+ return videoEffects_assign(videoEffects_assign({}, newVideoBufferData), { videoFrameBuffer: data });
9319
9457
  }
9320
9458
  }
9321
9459
  function doesSupportMediaStream() {
@@ -9332,7 +9470,7 @@ var video;
9332
9470
  var _a;
9333
9471
  return ensureInitialized(runtime, FrameContexts.sidePanel) && !!((_a = runtime.supports.video) === null || _a === void 0 ? void 0 : _a.sharedFrame);
9334
9472
  }
9335
- })(video || (video = {})); //end of video namespace
9473
+ })(videoEffects || (videoEffects = {})); //end of video namespace
9336
9474
 
9337
9475
  ;// CONCATENATED MODULE: ./src/public/search.ts
9338
9476
 
@@ -10025,7 +10163,8 @@ function shareDeepLink(deepLinkParameters) {
10025
10163
  function executeDeepLink(deepLink, onComplete) {
10026
10164
  ensureInitialized(runtime, FrameContexts.content, FrameContexts.sidePanel, FrameContexts.settings, FrameContexts.task, FrameContexts.stage, FrameContexts.meetingStage);
10027
10165
  onComplete = onComplete ? onComplete : getGenericOnCompleteHandler();
10028
- app.openLink(deepLink)
10166
+ app
10167
+ .openLink(deepLink)
10029
10168
  .then(function () {
10030
10169
  onComplete(true);
10031
10170
  })
@@ -10088,7 +10227,8 @@ function returnFocus(navigateForward) {
10088
10227
  function navigateToTab(tabInstance, onComplete) {
10089
10228
  ensureInitialized(runtime);
10090
10229
  onComplete = onComplete ? onComplete : getGenericOnCompleteHandler();
10091
- pages.tabs.navigateToTab(tabInstance)
10230
+ pages.tabs
10231
+ .navigateToTab(tabInstance)
10092
10232
  .then(function () {
10093
10233
  onComplete(true);
10094
10234
  })
@@ -10112,7 +10252,8 @@ function navigateToTab(tabInstance, onComplete) {
10112
10252
  function navigateCrossDomain(url, onComplete) {
10113
10253
  ensureInitialized(runtime, FrameContexts.content, FrameContexts.sidePanel, FrameContexts.settings, FrameContexts.remove, FrameContexts.task, FrameContexts.stage, FrameContexts.meetingStage);
10114
10254
  onComplete = onComplete ? onComplete : getGenericOnCompleteHandler();
10115
- pages.navigateCrossDomain(url)
10255
+ pages
10256
+ .navigateCrossDomain(url)
10116
10257
  .then(function () {
10117
10258
  onComplete(true);
10118
10259
  })
@@ -10132,7 +10273,8 @@ function navigateCrossDomain(url, onComplete) {
10132
10273
  function navigateBack(onComplete) {
10133
10274
  ensureInitialized(runtime);
10134
10275
  onComplete = onComplete ? onComplete : getGenericOnCompleteHandler();
10135
- pages.backStack.navigateBack()
10276
+ pages.backStack
10277
+ .navigateBack()
10136
10278
  .then(function () {
10137
10279
  onComplete(true);
10138
10280
  })
@@ -10196,7 +10338,8 @@ var settings;
10196
10338
  function setSettings(instanceSettings, onComplete) {
10197
10339
  ensureInitialized(runtime, FrameContexts.content, FrameContexts.settings, FrameContexts.sidePanel);
10198
10340
  onComplete = onComplete ? onComplete : getGenericOnCompleteHandler();
10199
- pages.config.setConfig(instanceSettings)
10341
+ pages.config
10342
+ .setConfig(instanceSettings)
10200
10343
  .then(function () {
10201
10344
  onComplete(true);
10202
10345
  })
@@ -12285,8 +12428,8 @@ var teams;
12285
12428
  })(fullTrust = teams.fullTrust || (teams.fullTrust = {}));
12286
12429
  })(teams || (teams = {}));
12287
12430
 
12288
- ;// CONCATENATED MODULE: ./src/private/videoEx.ts
12289
- var videoEx_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
12431
+ ;// CONCATENATED MODULE: ./src/private/videoEffectsEx.ts
12432
+ var videoEffectsEx_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
12290
12433
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
12291
12434
  return new (P || (P = Promise))(function (resolve, reject) {
12292
12435
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -12295,7 +12438,7 @@ var videoEx_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _
12295
12438
  step((generator = generator.apply(thisArg, _arguments || [])).next());
12296
12439
  });
12297
12440
  };
12298
- var videoEx_generator = (undefined && undefined.__generator) || function (thisArg, body) {
12441
+ var videoEffectsEx_generator = (undefined && undefined.__generator) || function (thisArg, body) {
12299
12442
  var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
12300
12443
  return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
12301
12444
  function verb(n) { return function (v) { return step([n, v]); }; }
@@ -12339,8 +12482,8 @@ var videoEx_generator = (undefined && undefined.__generator) || function (thisAr
12339
12482
  * @internal
12340
12483
  * Limited to Microsoft-internal use
12341
12484
  */
12342
- var videoEx;
12343
- (function (videoEx) {
12485
+ var videoEffectsEx;
12486
+ (function (videoEffectsEx) {
12344
12487
  var videoPerformanceMonitor = inServerSideRenderingEnvironment()
12345
12488
  ? undefined
12346
12489
  : new VideoPerformanceMonitor(sendMessageToParent);
@@ -12356,7 +12499,7 @@ var videoEx;
12356
12499
  (function (ErrorLevel) {
12357
12500
  ErrorLevel["Fatal"] = "fatal";
12358
12501
  ErrorLevel["Warn"] = "warn";
12359
- })(ErrorLevel = videoEx.ErrorLevel || (videoEx.ErrorLevel = {}));
12502
+ })(ErrorLevel = videoEffectsEx.ErrorLevel || (videoEffectsEx.ErrorLevel = {}));
12360
12503
  /**
12361
12504
  * @hidden
12362
12505
  * Register to process video frames
@@ -12381,9 +12524,9 @@ var videoEx;
12381
12524
  if (ensureInitialized(runtime, FrameContexts.sidePanel)) {
12382
12525
  registerHandler('video.setFrameProcessTimeLimit', function (timeLimit) { return videoPerformanceMonitor === null || videoPerformanceMonitor === void 0 ? void 0 : videoPerformanceMonitor.setFrameProcessTimeLimit(timeLimit); }, false);
12383
12526
  if ((_a = runtime.supports.video) === null || _a === void 0 ? void 0 : _a.mediaStream) {
12384
- registerHandler('video.startVideoExtensibilityVideoStream', function (mediaStreamInfo) { return videoEx_awaiter(_this, void 0, void 0, function () {
12527
+ registerHandler('video.startVideoExtensibilityVideoStream', function (mediaStreamInfo) { return videoEffectsEx_awaiter(_this, void 0, void 0, function () {
12385
12528
  var streamId, metadataInTexture, handler, _a;
12386
- return videoEx_generator(this, function (_b) {
12529
+ return videoEffectsEx_generator(this, function (_b) {
12387
12530
  switch (_b.label) {
12388
12531
  case 0:
12389
12532
  streamId = mediaStreamInfo.streamId, metadataInTexture = mediaStreamInfo.metadataInTexture;
@@ -12427,12 +12570,12 @@ var videoEx;
12427
12570
  videoPerformanceMonitor === null || videoPerformanceMonitor === void 0 ? void 0 : videoPerformanceMonitor.startMonitorSlowFrameProcessing();
12428
12571
  }
12429
12572
  }
12430
- videoEx.registerForVideoFrame = registerForVideoFrame;
12573
+ videoEffectsEx.registerForVideoFrame = registerForVideoFrame;
12431
12574
  function createMonitoredVideoFrameHandler(videoFrameHandler, videoPerformanceMonitor) {
12432
12575
  var _this = this;
12433
- return function (receivedVideoFrame) { return videoEx_awaiter(_this, void 0, void 0, function () {
12576
+ return function (receivedVideoFrame) { return videoEffectsEx_awaiter(_this, void 0, void 0, function () {
12434
12577
  var originalFrame, processedFrame;
12435
- return videoEx_generator(this, function (_a) {
12578
+ return videoEffectsEx_generator(this, function (_a) {
12436
12579
  switch (_a.label) {
12437
12580
  case 0:
12438
12581
  originalFrame = receivedVideoFrame.videoFrame;
@@ -12471,7 +12614,7 @@ var videoEx;
12471
12614
  }
12472
12615
  sendMessageToParent('video.videoEffectChanged', [effectChangeType, effectId, effectParam]);
12473
12616
  }
12474
- videoEx.notifySelectedVideoEffectChanged = notifySelectedVideoEffectChanged;
12617
+ videoEffectsEx.notifySelectedVideoEffectChanged = notifySelectedVideoEffectChanged;
12475
12618
  /**
12476
12619
  * @hidden
12477
12620
  * Register the video effect callback, host uses this to notify the video extension the new video effect will by applied
@@ -12489,7 +12632,7 @@ var videoEx;
12489
12632
  registerHandler('video.effectParameterChange', createEffectParameterChangeCallback(callback, videoPerformanceMonitor), false);
12490
12633
  sendMessageToParent('video.registerForVideoEffect');
12491
12634
  }
12492
- videoEx.registerForVideoEffect = registerForVideoEffect;
12635
+ videoEffectsEx.registerForVideoEffect = registerForVideoEffect;
12493
12636
  /**
12494
12637
  * @hidden
12495
12638
  * Send personalized effects to Teams client
@@ -12500,12 +12643,12 @@ var videoEx;
12500
12643
  */
12501
12644
  function updatePersonalizedEffects(effects) {
12502
12645
  ensureInitialized(runtime, FrameContexts.sidePanel);
12503
- if (!video.isSupported()) {
12646
+ if (!videoEffects.isSupported()) {
12504
12647
  throw errorNotSupportedOnPlatform;
12505
12648
  }
12506
12649
  sendMessageToParent('video.personalizedEffectsChanged', [effects]);
12507
12650
  }
12508
- videoEx.updatePersonalizedEffects = updatePersonalizedEffects;
12651
+ videoEffectsEx.updatePersonalizedEffects = updatePersonalizedEffects;
12509
12652
  /**
12510
12653
  * @hidden
12511
12654
  *
@@ -12521,9 +12664,9 @@ var videoEx;
12521
12664
  */
12522
12665
  function isSupported() {
12523
12666
  ensureInitialized(runtime);
12524
- return video.isSupported();
12667
+ return videoEffects.isSupported();
12525
12668
  }
12526
- videoEx.isSupported = isSupported;
12669
+ videoEffectsEx.isSupported = isSupported;
12527
12670
  /**
12528
12671
  * @hidden
12529
12672
  * Sending notification to host finished the video frame processing, now host can render this video frame
@@ -12562,13 +12705,13 @@ var videoEx;
12562
12705
  */
12563
12706
  function notifyFatalError(errorMessage) {
12564
12707
  ensureInitialized(runtime);
12565
- if (!video.isSupported()) {
12708
+ if (!videoEffects.isSupported()) {
12566
12709
  throw errorNotSupportedOnPlatform;
12567
12710
  }
12568
12711
  notifyError(errorMessage, ErrorLevel.Fatal);
12569
12712
  }
12570
- videoEx.notifyFatalError = notifyFatalError;
12571
- })(videoEx || (videoEx = {}));
12713
+ videoEffectsEx.notifyFatalError = notifyFatalError;
12714
+ })(videoEffectsEx || (videoEffectsEx = {}));
12572
12715
 
12573
12716
  ;// CONCATENATED MODULE: ./src/private/index.ts
12574
12717