@microsoft/teams-js 2.10.0-beta.3 → 2.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -24,7 +24,7 @@ To install the stable [version](https://learn.microsoft.com/javascript/api/overv
24
24
 
25
25
  ### Production
26
26
 
27
- You can reference these files directly [from here](https://res.cdn.office.net/teams-js/2.9.1/js/MicrosoftTeams.min.js) or point your package manager at them.
27
+ You can reference these files directly [from here](https://res.cdn.office.net/teams-js/2.10.0/js/MicrosoftTeams.min.js) or point your package manager at them.
28
28
 
29
29
  ## Usage
30
30
 
@@ -45,13 +45,13 @@ Reference the library inside of your `.html` page using:
45
45
  ```html
46
46
  <!-- Microsoft Teams JavaScript API (via CDN) -->
47
47
  <script
48
- src="https://res.cdn.office.net/teams-js/2.9.1/js/MicrosoftTeams.min.js"
49
- integrity="sha384-xnsUQ1tUqsrutBJl0vuf4/hufzLFWW8ZhGnhItfpQ0/BtWgM2uw6YT6BQ5YaKBSM"
48
+ src="https://res.cdn.office.net/teams-js/2.10.0/js/MicrosoftTeams.min.js"
49
+ integrity="sha384-7ZMvcfeIUPV84BQMdPBAJDk+zIac00KLvdNWZGZ0nF8FIDH0YE80EKj4ilp/VwZ1"
50
50
  crossorigin="anonymous"
51
51
  ></script>
52
52
 
53
53
  <!-- Microsoft Teams JavaScript API (via npm) -->
54
- <script src="node_modules/@microsoft/teams-js@2.9.1/dist/MicrosoftTeams.min.js"></script>
54
+ <script src="node_modules/@microsoft/teams-js@2.10.0/dist/MicrosoftTeams.min.js"></script>
55
55
 
56
56
  <!-- Microsoft Teams JavaScript API (via local) -->
57
57
  <script src="MicrosoftTeams.min.js"></script>
@@ -2026,18 +2026,6 @@ export namespace teams {
2026
2026
  * Limited to Microsoft-internal use
2027
2027
  */
2028
2028
  export namespace videoEx {
2029
- /**
2030
- * @hidden
2031
- * Error level when notifying errors to the host, the host will decide what to do acording to the error level.
2032
- * @beta
2033
- *
2034
- * @internal
2035
- * Limited to Microsoft-internal use
2036
- */
2037
- enum ErrorLevel {
2038
- Fatal = "fatal",
2039
- Warn = "warn"
2040
- }
2041
2029
  /**
2042
2030
  * @hidden
2043
2031
  * Video frame configuration supplied to the host to customize the generated video frame parameters
@@ -2069,44 +2057,16 @@ export namespace videoEx {
2069
2057
  }
2070
2058
  /**
2071
2059
  * @hidden
2072
- * Represents a video frame
2060
+ * Error level when notifying errors to the host, the host will decide what to do acording to the error level.
2073
2061
  * @beta
2074
2062
  *
2075
2063
  * @internal
2076
2064
  * Limited to Microsoft-internal use
2077
2065
  */
2078
- interface VideoFrame extends video.VideoFrameData {
2079
- /**
2080
- * @hidden
2081
- * The model output if you passed in an {@linkcode VideoFrameConfig.audioInferenceModel}
2082
- * @beta
2083
- *
2084
- * @internal
2085
- * Limited to Microsoft-internal use
2086
- */
2087
- audioInferenceResult?: Uint8Array;
2066
+ enum ErrorLevel {
2067
+ Fatal = "fatal",
2068
+ Warn = "warn"
2088
2069
  }
2089
- /**
2090
- * @hidden
2091
- * Video frame call back function
2092
- * @beta
2093
- *
2094
- * @internal
2095
- * Limited to Microsoft-internal use
2096
- */
2097
- type VideoFrameCallback = (frame: VideoFrame, notifyVideoFrameProcessed: () => void, notifyError: (errorMessage: string) => void) => void;
2098
- /**
2099
- * @hidden
2100
- * Register to process video frames
2101
- * @beta
2102
- *
2103
- * @param frameCallback - The callback to invoke when registerForVideoFrame has completed
2104
- * @param config - VideoFrameConfig to customize generated video frame parameters
2105
- *
2106
- * @internal
2107
- * Limited to Microsoft-internal use
2108
- */
2109
- function registerForVideoFrame(frameCallback: VideoFrameCallback, config: VideoFrameConfig): void;
2110
2070
  /**
2111
2071
  * @hidden
2112
2072
  * Video extension should call this to notify host that the current selected effect parameter changed.
@@ -2200,6 +2160,69 @@ export namespace videoEx {
2200
2160
  * Limited to Microsoft-internal use
2201
2161
  */
2202
2162
  function notifyFatalError(errorMessage: string): void;
2163
+ /**
2164
+ * @hidden
2165
+ * @internal
2166
+ * @beta
2167
+ * Namespace to get shared video framed.
2168
+ * When the host supports this capability, developer should call {@link sharedFrame.registerForVideoFrame} to get the video frames.
2169
+ */
2170
+ namespace sharedFrame {
2171
+ /**
2172
+ * @hidden
2173
+ *
2174
+ * Checks if video.sharedFrame capability is supported by the host
2175
+ * @beta
2176
+ *
2177
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
2178
+ *
2179
+ * @returns boolean to represent whether the video.sharedFrame capability is supported
2180
+ *
2181
+ * @internal
2182
+ * Limited to Microsoft-internal use
2183
+ */
2184
+ function isSupported(): boolean;
2185
+ /**
2186
+ * @hidden
2187
+ * Represents a video frame
2188
+ * @beta
2189
+ *
2190
+ * @internal
2191
+ * Limited to Microsoft-internal use
2192
+ */
2193
+ interface VideoFrame extends video.sharedFrame.VideoFrameData {
2194
+ /**
2195
+ * @hidden
2196
+ * The model output if you passed in an {@linkcode VideoFrameConfig.audioInferenceModel}
2197
+ * @beta
2198
+ *
2199
+ * @internal
2200
+ * Limited to Microsoft-internal use
2201
+ */
2202
+ audioInferenceResult?: Uint8Array;
2203
+ }
2204
+ /**
2205
+ * @hidden
2206
+ * Video frame call back function
2207
+ * @beta
2208
+ *
2209
+ * @internal
2210
+ * Limited to Microsoft-internal use
2211
+ */
2212
+ type VideoFrameCallback = (frame: VideoFrame, notifyVideoFrameProcessed: () => void, notifyError: (errorMessage: string) => void) => void;
2213
+ /**
2214
+ * @hidden
2215
+ * Register to process video frames
2216
+ * @beta
2217
+ *
2218
+ * @param frameCallback - The callback to invoke when registerForVideoFrame has completed
2219
+ * @param config - VideoFrameConfig to customize generated video frame parameters
2220
+ *
2221
+ * @internal
2222
+ * Limited to Microsoft-internal use
2223
+ */
2224
+ function registerForVideoFrame(frameCallback: VideoFrameCallback, config: VideoFrameConfig): void;
2225
+ }
2203
2226
  }
2204
2227
 
2205
2228
  /**
@@ -3868,6 +3891,7 @@ export namespace app {
3868
3891
  templateId?: string;
3869
3892
  /**
3870
3893
  * The user's role in the team.
3894
+
3871
3895
  * Because a malicious party can run your content in a browser, this value should
3872
3896
  * be used only as a hint as to the user's role, and never as proof of her role.
3873
3897
  */
@@ -3879,8 +3903,13 @@ export namespace app {
3879
3903
  interface UserInfo {
3880
3904
  /**
3881
3905
  * The Azure AD object id of the current user.
3882
- * Because a malicious party run your content in a browser, this value should
3883
- * be used only as a hint as to who the user is and never as proof of identity.
3906
+ *
3907
+ * Because a malicious party can run your content in a browser, this value should
3908
+ * be used only as a optimization hint as to who the user is and never as proof of identity.
3909
+ * Specifically, this value should never be used to determine if a user is authorized to access
3910
+ * a resource; access tokens should be used for that.
3911
+ * See {@link authentication.getAuthToken} and {@link authentication.authenticate} for more information on access tokens.
3912
+ *
3884
3913
  * This field is available only when the identity permission is requested in the manifest.
3885
3914
  */
3886
3915
  id: string;
@@ -3902,17 +3931,25 @@ export namespace app {
3902
3931
  */
3903
3932
  licenseType?: string;
3904
3933
  /**
3905
- * A value suitable for use as a login_hint when authenticating with Azure AD.
3934
+ * A value suitable for use when providing a login_hint to Azure Active Directory for authentication purposes.
3935
+ * See [Provide optional claims to your app](https://learn.microsoft.com/azure/active-directory/develop/active-directory-optional-claims#v10-and-v20-optional-claims-set)
3936
+ * for more information about the use of login_hint
3937
+ *
3906
3938
  * Because a malicious party can run your content in a browser, this value should
3907
- * be used only as a hint as to who the user is and never as proof of identity.
3908
- * This field is available only when the identity permission is requested in the manifest.
3939
+ * be used only as a optimization hint as to who the user is and never as proof of identity.
3940
+ * Specifically, this value should never be used to determine if a user is authorized to access
3941
+ * a resource; access tokens should be used for that.
3942
+ * See {@link authentication.getAuthToken} and {@link authentication.authenticate} for more information on access tokens.
3909
3943
  */
3910
3944
  loginHint?: string;
3911
3945
  /**
3912
3946
  * The UPN of the current user. This may be an externally-authenticated UPN (e.g., guest users).
3913
- * Because a malicious party run your content in a browser, this value should
3914
- * be used only as a hint as to who the user is and never as proof of identity.
3915
- * This field is available only when the identity permission is requested in the manifest.
3947
+
3948
+ * Because a malicious party can run your content in a browser, this value should
3949
+ * be used only as a optimization hint as to who the user is and never as proof of identity.
3950
+ * Specifically, this value should never be used to determine if a user is authorized to access
3951
+ * a resource; access tokens should be used for that.
3952
+ * See {@link authentication.getAuthToken} and {@link authentication.authenticate} for more information on access tokens.
3916
3953
  */
3917
3954
  userPrincipalName?: string;
3918
3955
  /**
@@ -3926,9 +3963,12 @@ export namespace app {
3926
3963
  interface TenantInfo {
3927
3964
  /**
3928
3965
  * The Azure AD tenant ID of the current user.
3966
+
3929
3967
  * Because a malicious party can run your content in a browser, this value should
3930
- * be used only as a hint as to who the user is and never as proof of identity.
3931
- * This field is available only when the identity permission is requested in the manifest.
3968
+ * be used only as a optimization hint as to who the user is and never as proof of identity.
3969
+ * Specifically, this value should never be used to determine if a user is authorized to access
3970
+ * a resource; access tokens should be used for that.
3971
+ * See {@link authentication.getAuthToken} and {@link authentication.authenticate} for more information on access tokens.
3932
3972
  */
3933
3973
  id: string;
3934
3974
  /**
@@ -6709,40 +6749,6 @@ export interface ShowProfileRequestInternal {
6709
6749
  * @beta
6710
6750
  */
6711
6751
  export namespace video {
6712
- /**
6713
- * Represents a video frame
6714
- * @beta
6715
- */
6716
- interface VideoFrameData {
6717
- /**
6718
- * Video frame width
6719
- */
6720
- width: number;
6721
- /**
6722
- * Video frame height
6723
- */
6724
- height: number;
6725
- /**
6726
- * Video frame buffer
6727
- */
6728
- videoFrameBuffer: Uint8ClampedArray;
6729
- /**
6730
- * NV12 luma stride, valid only when video frame format is NV12
6731
- */
6732
- lumaStride?: number;
6733
- /**
6734
- * NV12 chroma stride, valid only when video frame format is NV12
6735
- */
6736
- chromaStride?: number;
6737
- /**
6738
- * RGB stride, valid only when video frame format is RGB
6739
- */
6740
- stride?: number;
6741
- /**
6742
- * The time stamp of the current video frame
6743
- */
6744
- timestamp?: number;
6745
- }
6746
6752
  /**
6747
6753
  * Video frame format enum, currently only support NV12
6748
6754
  * @beta
@@ -6774,11 +6780,6 @@ export namespace video {
6774
6780
  */
6775
6781
  EffectDisabled = "EffectDisabled"
6776
6782
  }
6777
- /**
6778
- * Video frame call back function definition
6779
- * @beta
6780
- */
6781
- type VideoFrameCallback = (frame: VideoFrameData, notifyVideoFrameProcessed: () => void, notifyError: (errorMessage: string) => void) => void;
6782
6783
  /**
6783
6784
  * Predefined failure reasons for preparing the selected video effect
6784
6785
  * @beta
@@ -6800,13 +6801,6 @@ export namespace video {
6800
6801
  * @beta
6801
6802
  */
6802
6803
  type VideoEffectCallback = (effectId: string | undefined) => Promise<void>;
6803
- /**
6804
- * Register to read the video frames in Permissions section
6805
- * @beta
6806
- * @param frameCallback - The callback to invoke when registerForVideoFrame has completed
6807
- * @param config - VideoFrameConfig to customize generated video frame parameters
6808
- */
6809
- function registerForVideoFrame(frameCallback: VideoFrameCallback, config: VideoFrameConfig): void;
6810
6804
  /**
6811
6805
  * Video extension should call this to notify host that the current selected effect parameter changed.
6812
6806
  * If it's pre-meeting, host will call videoEffectCallback immediately then use the videoEffect.
@@ -6834,7 +6828,7 @@ export namespace video {
6834
6828
  /**
6835
6829
  * @beta
6836
6830
  * Namespace to get video frames from a media stream.
6837
- * When the host supports this capability, developer should call {@link mediaStream.registerForVideoFrame} to get the video frames instead of {@link registerForVideoFrame} to get the video frames, callback of {@link registerForVideoFrame} will be ignored when the host supports this capability.
6831
+ * When the host supports this capability, developer should call {@link mediaStream.registerForVideoFrame} to get the video frames.
6838
6832
  */
6839
6833
  namespace mediaStream {
6840
6834
  /**
@@ -6881,6 +6875,68 @@ export namespace video {
6881
6875
  */
6882
6876
  function registerForVideoFrame(frameCallback: VideoFrameCallback): void;
6883
6877
  }
6878
+ /**
6879
+ * @beta
6880
+ * Namespace to get shared video framed.
6881
+ * When the host supports this capability, developer should call {@link sharedFrame.registerForVideoFrame} to get the video frames.
6882
+ */
6883
+ namespace sharedFrame {
6884
+ /**
6885
+ * Checks if video.sharedFrame capability is supported by the host
6886
+ * @beta
6887
+ * @returns boolean to represent whether the video capability is supported
6888
+ *
6889
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
6890
+ *
6891
+ */
6892
+ function isSupported(): boolean;
6893
+ /**
6894
+ * Represents a video frame
6895
+ * @beta
6896
+ */
6897
+ interface VideoFrameData {
6898
+ /**
6899
+ * Video frame width
6900
+ */
6901
+ width: number;
6902
+ /**
6903
+ * Video frame height
6904
+ */
6905
+ height: number;
6906
+ /**
6907
+ * Video frame buffer
6908
+ */
6909
+ videoFrameBuffer: Uint8ClampedArray;
6910
+ /**
6911
+ * NV12 luma stride, valid only when video frame format is NV12
6912
+ */
6913
+ lumaStride?: number;
6914
+ /**
6915
+ * NV12 chroma stride, valid only when video frame format is NV12
6916
+ */
6917
+ chromaStride?: number;
6918
+ /**
6919
+ * RGB stride, valid only when video frame format is RGB
6920
+ */
6921
+ stride?: number;
6922
+ /**
6923
+ * The time stamp of the current video frame
6924
+ */
6925
+ timestamp?: number;
6926
+ }
6927
+ /**
6928
+ * Video frame call back function definition
6929
+ * @beta
6930
+ */
6931
+ type VideoFrameCallback = (frame: VideoFrameData, notifyVideoFrameProcessed: () => void, notifyError: (errorMessage: string) => void) => void;
6932
+ /**
6933
+ * Register to read the video frames in Permissions section
6934
+ * @beta
6935
+ * @param frameCallback - The callback to invoke when registerForVideoFrame has completed
6936
+ * @param config - VideoFrameConfig to customize generated video frame parameters
6937
+ */
6938
+ function registerForVideoFrame(frameCallback: VideoFrameCallback, config: VideoFrameConfig): void;
6939
+ }
6884
6940
  }
6885
6941
 
6886
6942
  /**
@@ -7127,7 +7183,7 @@ export namespace call {
7127
7183
  * @remarks
7128
7184
  * Currently the User ID field supports the Azure AD UserPrincipalName,
7129
7185
  * typically an email address, or in case of a PSTN call, it supports a pstn
7130
- * mri 4:<phonenumber>.
7186
+ * mri 4:\<phonenumber>.
7131
7187
  */
7132
7188
  targets: string[];
7133
7189
  /**
@@ -7596,7 +7652,7 @@ export namespace tasks {
7596
7652
  function submitTask(result?: string | object, appIds?: string | string[]): void;
7597
7653
  /**
7598
7654
  * Sets the height and width of the {@link TaskInfo} object to the original height and width, if initially specified,
7599
- * otherwise uses the height and width values corresponding to {@link TaskModuleDimension | TaskModuleDimension.Small}
7655
+ * otherwise uses the height and width values corresponding to {@link DialogDimension | TaskModuleDimension.Small}
7600
7656
  * @param taskInfo TaskInfo object from which to extract size info, if specified
7601
7657
  * @returns TaskInfo with height and width specified
7602
7658
  */