@microsoft/teams-js 2.3.0-beta.1 → 2.3.0-beta.2

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.
@@ -1989,6 +1989,166 @@ export namespace teams {
1989
1989
  }
1990
1990
  }
1991
1991
 
1992
+ /**
1993
+ * @hidden
1994
+ * Extended video API
1995
+ * @beta
1996
+ *
1997
+ * @internal
1998
+ * Limited to Microsoft-internal use
1999
+ */
2000
+ export namespace videoEx {
2001
+ /**
2002
+ * @hidden
2003
+ * Video frame configuration supplied to the host to customize the generated video frame parameters
2004
+ * @beta
2005
+ *
2006
+ * @internal
2007
+ * Limited to Microsoft-internal use
2008
+ */
2009
+ interface VideoFrameConfig extends video.VideoFrameConfig {
2010
+ /**
2011
+ * @hidden
2012
+ * Flag to indicate use camera stream to synthesize video frame or not.
2013
+ * Default value is true.
2014
+ * @beta
2015
+ *
2016
+ * @internal
2017
+ * Limited to Microsoft-internal use
2018
+ */
2019
+ requireCameraStream?: boolean;
2020
+ /**
2021
+ * @hidden
2022
+ * Machine learning model to run in the host to do audio inference for you
2023
+ * @beta
2024
+ *
2025
+ * @internal
2026
+ * Limited to Microsoft-internal use
2027
+ */
2028
+ audioInferenceModel?: ArrayBuffer;
2029
+ }
2030
+ /**
2031
+ * @hidden
2032
+ * Represents a video frame
2033
+ * @beta
2034
+ *
2035
+ * @internal
2036
+ * Limited to Microsoft-internal use
2037
+ */
2038
+ interface VideoFrame extends video.VideoFrame {
2039
+ /**
2040
+ * @hidden
2041
+ * The model output if you passed in an {@linkcode VideoFrameConfig.audioInferenceModel}
2042
+ * @beta
2043
+ *
2044
+ * @internal
2045
+ * Limited to Microsoft-internal use
2046
+ */
2047
+ audioInferenceResult?: Uint8Array;
2048
+ }
2049
+ /**
2050
+ * @hidden
2051
+ * Video frame call back function
2052
+ * @beta
2053
+ *
2054
+ * @internal
2055
+ * Limited to Microsoft-internal use
2056
+ */
2057
+ type VideoFrameCallback = (frame: VideoFrame, notifyVideoFrameProcessed: () => void, notifyError: (errorMessage: string) => void) => void;
2058
+ /**
2059
+ * @hidden
2060
+ * Register to process video frames
2061
+ * @beta
2062
+ *
2063
+ * @param frameCallback - The callback to invoke when registerForVideoFrame has completed
2064
+ * @param config - VideoFrameConfig to customize generated video frame parameters
2065
+ *
2066
+ * @internal
2067
+ * Limited to Microsoft-internal use
2068
+ */
2069
+ function registerForVideoFrame(frameCallback: VideoFrameCallback, config: VideoFrameConfig): void;
2070
+ /**
2071
+ * @hidden
2072
+ * Video extension should call this to notify host that the current selected effect parameter changed.
2073
+ * If it's pre-meeting, host will call videoEffectCallback immediately then use the videoEffect.
2074
+ * If it's the in-meeting scenario, we will call videoEffectCallback when apply button clicked.
2075
+ * @beta
2076
+ * @param effectChangeType - the effect change type.
2077
+ * @param effectId - Newly selected effect id. {@linkcode VideoEffectCallBack}
2078
+ * @param effectParam Variant for the newly selected effect. {@linkcode VideoEffectCallBack}
2079
+ *
2080
+ * @internal
2081
+ * Limited to Microsoft-internal use
2082
+ */
2083
+ function notifySelectedVideoEffectChanged(effectChangeType: video.EffectChangeType, effectId: string | undefined, effectParam?: string): void;
2084
+ /**
2085
+ * @hidden
2086
+ * Video effect change call back function definition
2087
+ * @beta
2088
+ *
2089
+ * @internal
2090
+ * Limited to Microsoft-internal use
2091
+ */
2092
+ type VideoEffectCallBack = (effectId: string | undefined, effectParam?: string) => void;
2093
+ /**
2094
+ * @hidden
2095
+ * Register the video effect callback, host uses this to notify the video extension the new video effect will by applied
2096
+ * @beta
2097
+ * @param callback - The VideoEffectCallback to invoke when registerForVideoEffect has completed
2098
+ *
2099
+ * @internal
2100
+ * Limited to Microsoft-internal use
2101
+ */
2102
+ function registerForVideoEffect(callback: VideoEffectCallBack): void;
2103
+ /**
2104
+ * @hidden
2105
+ * Personalized video effect
2106
+ * @beta
2107
+ *
2108
+ * @internal
2109
+ * Limited to Microsoft-internal use
2110
+ */
2111
+ interface PersonalizedEffect {
2112
+ /**
2113
+ * Personalized effect id
2114
+ */
2115
+ id: string;
2116
+ /**
2117
+ * Display name
2118
+ */
2119
+ name: string;
2120
+ /**
2121
+ * Effect type defined by app
2122
+ */
2123
+ type: string;
2124
+ /**
2125
+ * Data URI of the thumbnail image content encoded in ASCII format using the base64 scheme
2126
+ */
2127
+ thumbnail: string;
2128
+ }
2129
+ /**
2130
+ * @hidden
2131
+ * Send personalized effects to Teams client
2132
+ * @beta
2133
+ *
2134
+ * @internal
2135
+ * Limited to Microsoft-internal use
2136
+ */
2137
+ function updatePersonalizedEffects(effects: PersonalizedEffect[]): void;
2138
+ /**
2139
+ * @hidden
2140
+ * Checks if video capability is supported by the host
2141
+ * @beta
2142
+ *
2143
+ * @returns true if the video capability is enabled in runtime.supports.video and
2144
+ * false if it is disabled
2145
+ *
2146
+ * @internal
2147
+ * Limited to Microsoft-internal use
2148
+ */
2149
+ function isSupported(): boolean;
2150
+ }
2151
+
1992
2152
  /**
1993
2153
  * Namespace to interact with the authentication-specific part of the SDK.
1994
2154
  *
@@ -4136,6 +4296,17 @@ export namespace pages {
4136
4296
  * Limited to Microsoft-internal use
4137
4297
  */
4138
4298
  function registerFocusEnterHandler(handler: (navigateForward: boolean) => void): void;
4299
+ /**
4300
+ * @hidden
4301
+ * Undocumented helper function with shared code between deprecated version and current version of the registerFocusEnterHandler API.
4302
+ *
4303
+ * @internal
4304
+ * Limited to Microsoft-internal use
4305
+ *
4306
+ * @param handler - The handler for placing focus within the application.
4307
+ * @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
4308
+ */
4309
+ function registerFocusEnterHandlerHelper(handler: (navigateForward: boolean) => void, versionSpecificHelper?: () => void): void;
4139
4310
  /**
4140
4311
  * Sets/Updates the current frame with new information
4141
4312
  *
@@ -4216,6 +4387,17 @@ export namespace pages {
4216
4387
  * @param handler - The handler to invoke when the user toggles full-screen view for a tab.
4217
4388
  */
4218
4389
  function registerFullScreenHandler(handler: (isFullScreen: boolean) => void): void;
4390
+ /**
4391
+ * @hidden
4392
+ * Undocumented helper function with shared code between deprecated version and current version of the registerFullScreenHandler API.
4393
+ *
4394
+ * @internal
4395
+ * Limited to Microsoft-internal use
4396
+ *
4397
+ * @param handler - The handler to invoke when the user toggles full-screen view for a tab.
4398
+ * @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
4399
+ */
4400
+ function registerFullScreenHandlerHelper(handler: (isFullScreen: boolean) => void, versionSpecificHelper?: () => void): void;
4219
4401
  /**
4220
4402
  * Checks if the pages capability is supported by the host
4221
4403
  * @returns true if the pages capability is enabled in runtime.supports.pages and
@@ -4314,6 +4496,17 @@ export namespace pages {
4314
4496
  * @param handler - The handler to invoke when the user selects the Save button.
4315
4497
  */
4316
4498
  function registerOnSaveHandler(handler: (evt: SaveEvent) => void): void;
4499
+ /**
4500
+ * @hidden
4501
+ * Undocumented helper function with shared code between deprecated version and current version of the registerOnSaveHandler API.
4502
+ *
4503
+ * @internal
4504
+ * Limited to Microsoft-internal use
4505
+ *
4506
+ * @param handler - The handler to invoke when the user selects the Save button.
4507
+ * @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
4508
+ */
4509
+ function registerOnSaveHandlerHelper(handler: (evt: SaveEvent) => void, versionSpecificHelper?: () => void): void;
4317
4510
  /**
4318
4511
  * Registers a handler for user attempts to remove content. This handler should be used
4319
4512
  * to remove the underlying resource powering the content.
@@ -4322,11 +4515,33 @@ export namespace pages {
4322
4515
  * @param handler - The handler to invoke when the user selects the Remove button.
4323
4516
  */
4324
4517
  function registerOnRemoveHandler(handler: (evt: RemoveEvent) => void): void;
4518
+ /**
4519
+ * @hidden
4520
+ * Undocumented helper function with shared code between deprecated version and current version of the registerOnRemoveHandler API.
4521
+ *
4522
+ * @internal
4523
+ * Limited to Microsoft-internal use
4524
+ *
4525
+ * @param handler - The handler to invoke when the user selects the Remove button.
4526
+ * @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
4527
+ */
4528
+ function registerOnRemoveHandlerHelper(handler: (evt: RemoveEvent) => void, versionSpecificHelper?: () => void): void;
4325
4529
  /**
4326
4530
  * Registers a handler for when the tab configuration is changed by the user
4327
4531
  * @param handler - The handler to invoke when the user clicks on Settings.
4328
4532
  */
4329
4533
  function registerChangeConfigHandler(handler: () => void): void;
4534
+ /**
4535
+ * @hidden
4536
+ * Undocumented helper function with shared code between deprecated version and current version of the registerConfigChangeHandler API.
4537
+ *
4538
+ * @internal
4539
+ * Limited to Microsoft-internal use
4540
+ *
4541
+ * @param handler - The handler to invoke when the user clicks on Settings.
4542
+ * @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
4543
+ */
4544
+ function registerChangeConfigHandlerHelper(handler: () => void, versionSpecificHelper?: () => void): void;
4330
4545
  /**
4331
4546
  * Describes the results of the settings.save event. Includes result, notifySuccess, and notifyFailure
4332
4547
  * to indicate the return object (result) and the status of whether the settings.save call succeeded or not and why.
@@ -4395,6 +4610,17 @@ export namespace pages {
4395
4610
  * @param handler - The handler to invoke when the user presses the host client's back button.
4396
4611
  */
4397
4612
  function registerBackButtonHandler(handler: () => boolean): void;
4613
+ /**
4614
+ * @hidden
4615
+ * Undocumented helper function with shared code between deprecated version and current version of the registerBackButtonHandler API.
4616
+ *
4617
+ * @internal
4618
+ * Limited to Microsoft-internal use
4619
+ *
4620
+ * @param handler - The handler to invoke when the user presses the host client's back button.
4621
+ * @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
4622
+ */
4623
+ function registerBackButtonHandlerHelper(handler: () => boolean, versionSpecificHelper?: () => void): void;
4398
4624
  /**
4399
4625
  * Checks if the pages.backStack capability is supported by the host
4400
4626
  * @returns true if the pages.backStack capability is enabled in runtime.supports.pages.backStack and
@@ -4443,18 +4669,51 @@ export namespace pages {
4443
4669
  * @param handler - The handler to invoke when the personal app button is clicked in the app bar.
4444
4670
  */
4445
4671
  function onClick(handler: () => void): void;
4672
+ /**
4673
+ * @hidden
4674
+ * Undocumented helper function with shared code between deprecated version and current version of the onClick API.
4675
+ *
4676
+ * @internal
4677
+ * Limited to Microsoft-internal use
4678
+ *
4679
+ * @param handler - The handler to invoke when the personal app button is clicked in the app bar.
4680
+ * @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
4681
+ */
4682
+ function onClickHelper(handler: () => void, versionSpecificHelper?: () => void): void;
4446
4683
  /**
4447
4684
  * Registers a handler for entering hover of the app button.
4448
4685
  * Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
4449
4686
  * @param handler - The handler to invoke when entering hover of the personal app button in the app bar.
4450
4687
  */
4451
4688
  function onHoverEnter(handler: () => void): void;
4689
+ /**
4690
+ * @hidden
4691
+ * Undocumented helper function with shared code between deprecated version and current version of the onHoverEnter API.
4692
+ *
4693
+ * @internal
4694
+ * Limited to Microsoft-internal use
4695
+ *
4696
+ * @param handler - The handler to invoke when entering hover of the personal app button in the app bar.
4697
+ * @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
4698
+ */
4699
+ function onHoverEnterHelper(handler: () => void, versionSpecificHelper?: () => void): void;
4452
4700
  /**
4453
4701
  * Registers a handler for exiting hover of the app button.
4454
4702
  * Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
4455
4703
  * @param handler - The handler to invoke when exiting hover of the personal app button in the app bar.
4456
4704
  */
4457
4705
  function onHoverLeave(handler: () => void): void;
4706
+ /**
4707
+ * @hidden
4708
+ * Undocumented helper function with shared code between deprecated version and current version of the onHoverLeave API.
4709
+ *
4710
+ * @internal
4711
+ * Limited to Microsoft-internal use
4712
+ *
4713
+ * @param handler - The handler to invoke when existing hover of the personal app button in the app bar.
4714
+ * @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
4715
+ */
4716
+ function onHoverLeaveHelper(handler: () => void, versionSpecificHelper?: () => void): void;
4458
4717
  /**
4459
4718
  * Checks if pages.appButton capability is supported by the host
4460
4719
  * @returns true if the pages.appButton capability is enabled in runtime.supports.pages.appButton and
@@ -5606,6 +5865,17 @@ export namespace teamsCore {
5606
5865
  * @internal
5607
5866
  */
5608
5867
  function registerOnLoadHandler(handler: (context: LoadContext) => void): void;
5868
+ /**
5869
+ * @hidden
5870
+ * Undocumented helper function with shared code between deprecated version and current version of the registerOnLoadHandler API.
5871
+ *
5872
+ * @internal
5873
+ * Limited to Microsoft-internal use
5874
+ *
5875
+ * @param handler - The handler to invoke when the page is loaded.
5876
+ * @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
5877
+ */
5878
+ function registerOnLoadHandlerHelper(handler: (context: LoadContext) => void, versionSpecificHelper?: () => void): void;
5609
5879
  /**
5610
5880
  * @hidden
5611
5881
  * Registers a handler to be called before the page is unloaded.
@@ -5616,6 +5886,18 @@ export namespace teamsCore {
5616
5886
  * @internal
5617
5887
  */
5618
5888
  function registerBeforeUnloadHandler(handler: (readyToUnload: () => void) => boolean): void;
5889
+ /**
5890
+ * @hidden
5891
+ * Undocumented helper function with shared code between deprecated version and current version of the registerBeforeUnloadHandler API.
5892
+ *
5893
+ * @internal
5894
+ * Limited to Microsoft-internal use
5895
+ *
5896
+ * @param handler - - The handler to invoke before the page is unloaded. If this handler returns true the page should
5897
+ * invoke the readyToUnload function provided to it once it's ready to be unloaded.
5898
+ * @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
5899
+ */
5900
+ function registerBeforeUnloadHandlerHelper(handler: (readyToUnload: () => void) => boolean, versionSpecificHelper?: () => void): void;
5619
5901
  /**
5620
5902
  * Checks if teamsCore capability is supported by the host
5621
5903
  * @returns true if the teamsCore capability is enabled in runtime.supports.teamsCore and
@@ -5841,11 +6123,11 @@ export namespace video {
5841
6123
  */
5842
6124
  enum EffectChangeType {
5843
6125
  /**
5844
- * current video effect changed
6126
+ * Current video effect changed
5845
6127
  */
5846
6128
  EffectChanged = 0,
5847
6129
  /**
5848
- * disable the video effect
6130
+ * Disable the video effect
5849
6131
  */
5850
6132
  EffectDisabled = 1
5851
6133
  }
@@ -5867,8 +6149,8 @@ export namespace video {
5867
6149
  */
5868
6150
  function registerForVideoFrame(frameCallback: VideoFrameCallback, config: VideoFrameConfig): void;
5869
6151
  /**
5870
- * Video extension should call this to notify host client that the current selected effect parameter changed.
5871
- * If it's pre-meeting, host client will call videoEffectCallback immediately then use the videoEffect.
6152
+ * Video extension should call this to notify host that the current selected effect parameter changed.
6153
+ * If it's pre-meeting, host will call videoEffectCallback immediately then use the videoEffect.
5872
6154
  * If it's the in-meeting scenario, we will call videoEffectCallback when apply button clicked.
5873
6155
  * @beta
5874
6156
  * @param effectChangeType - the effect change type.
@@ -5876,7 +6158,7 @@ export namespace video {
5876
6158
  */
5877
6159
  function notifySelectedVideoEffectChanged(effectChangeType: EffectChangeType, effectId: string | undefined): void;
5878
6160
  /**
5879
- * Register the video effect callback, host client uses this to notify the video extension the new video effect will by applied
6161
+ * Register the video effect callback, host uses this to notify the video extension the new video effect will by applied
5880
6162
  * @beta
5881
6163
  * @param callback - The VideoEffectCallback to invoke when registerForVideoEffect has completed
5882
6164
  */