@microsoft/teams-js 2.10.0 → 2.10.1-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/MicrosoftTeams.d.ts +93 -182
- package/dist/MicrosoftTeams.js +74 -335
- package/dist/MicrosoftTeams.js.map +1 -1
- package/dist/MicrosoftTeams.min.js +1 -1
- package/dist/MicrosoftTeams.min.js.map +1 -1
- package/package.json +1 -36
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.10.
|
27
|
+
You can reference these files directly [from here](https://res.cdn.office.net/teams-js/2.10.1/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.10.
|
49
|
-
integrity="sha384-
|
48
|
+
src="https://res.cdn.office.net/teams-js/2.10.1/js/MicrosoftTeams.min.js"
|
49
|
+
integrity="sha384-Tc1x2xjzm4vRqLV4l416qPm+i7t8ujpxrioZEjRCNP7g/gQNDW41TB1SpVkQxowY"
|
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.10.
|
54
|
+
<script src="node_modules/@microsoft/teams-js@2.10.1/dist/MicrosoftTeams.min.js"></script>
|
55
55
|
|
56
56
|
<!-- Microsoft Teams JavaScript API (via local) -->
|
57
57
|
<script src="MicrosoftTeams.min.js"></script>
|
package/dist/MicrosoftTeams.d.ts
CHANGED
@@ -2026,6 +2026,18 @@ 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
|
+
}
|
2029
2041
|
/**
|
2030
2042
|
* @hidden
|
2031
2043
|
* Video frame configuration supplied to the host to customize the generated video frame parameters
|
@@ -2057,16 +2069,44 @@ export namespace videoEx {
|
|
2057
2069
|
}
|
2058
2070
|
/**
|
2059
2071
|
* @hidden
|
2060
|
-
*
|
2072
|
+
* Represents a video frame
|
2061
2073
|
* @beta
|
2062
2074
|
*
|
2063
2075
|
* @internal
|
2064
2076
|
* Limited to Microsoft-internal use
|
2065
2077
|
*/
|
2066
|
-
|
2067
|
-
|
2068
|
-
|
2078
|
+
interface VideoFrame extends video.VideoFrame {
|
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;
|
2069
2088
|
}
|
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;
|
2070
2110
|
/**
|
2071
2111
|
* @hidden
|
2072
2112
|
* Video extension should call this to notify host that the current selected effect parameter changed.
|
@@ -2160,69 +2200,6 @@ export namespace videoEx {
|
|
2160
2200
|
* Limited to Microsoft-internal use
|
2161
2201
|
*/
|
2162
2202
|
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
|
-
}
|
2226
2203
|
}
|
2227
2204
|
|
2228
2205
|
/**
|
@@ -6749,12 +6726,46 @@ export interface ShowProfileRequestInternal {
|
|
6749
6726
|
* @beta
|
6750
6727
|
*/
|
6751
6728
|
export namespace video {
|
6729
|
+
/**
|
6730
|
+
* Represents a video frame
|
6731
|
+
* @beta
|
6732
|
+
*/
|
6733
|
+
interface VideoFrame {
|
6734
|
+
/**
|
6735
|
+
* Video frame width
|
6736
|
+
*/
|
6737
|
+
width: number;
|
6738
|
+
/**
|
6739
|
+
* Video frame height
|
6740
|
+
*/
|
6741
|
+
height: number;
|
6742
|
+
/**
|
6743
|
+
* Video frame buffer
|
6744
|
+
*/
|
6745
|
+
data: Uint8ClampedArray;
|
6746
|
+
/**
|
6747
|
+
* NV12 luma stride, valid only when video frame format is NV12
|
6748
|
+
*/
|
6749
|
+
lumaStride?: number;
|
6750
|
+
/**
|
6751
|
+
* NV12 chroma stride, valid only when video frame format is NV12
|
6752
|
+
*/
|
6753
|
+
chromaStride?: number;
|
6754
|
+
/**
|
6755
|
+
* RGB stride, valid only when video frame format is RGB
|
6756
|
+
*/
|
6757
|
+
stride?: number;
|
6758
|
+
/**
|
6759
|
+
* The time stamp of the current video frame
|
6760
|
+
*/
|
6761
|
+
timestamp?: number;
|
6762
|
+
}
|
6752
6763
|
/**
|
6753
6764
|
* Video frame format enum, currently only support NV12
|
6754
6765
|
* @beta
|
6755
6766
|
*/
|
6756
6767
|
enum VideoFrameFormat {
|
6757
|
-
NV12 =
|
6768
|
+
NV12 = 0
|
6758
6769
|
}
|
6759
6770
|
/**
|
6760
6771
|
* Video frame configuration supplied to the host to customize the generated video frame parameters, like format
|
@@ -6774,12 +6785,17 @@ export namespace video {
|
|
6774
6785
|
/**
|
6775
6786
|
* Current video effect changed
|
6776
6787
|
*/
|
6777
|
-
EffectChanged =
|
6788
|
+
EffectChanged = 0,
|
6778
6789
|
/**
|
6779
6790
|
* Disable the video effect
|
6780
6791
|
*/
|
6781
|
-
EffectDisabled =
|
6792
|
+
EffectDisabled = 1
|
6782
6793
|
}
|
6794
|
+
/**
|
6795
|
+
* Video frame call back function definition
|
6796
|
+
* @beta
|
6797
|
+
*/
|
6798
|
+
type VideoFrameCallback = (frame: VideoFrame, notifyVideoFrameProcessed: () => void, notifyError: (errorMessage: string) => void) => void;
|
6783
6799
|
/**
|
6784
6800
|
* Predefined failure reasons for preparing the selected video effect
|
6785
6801
|
* @beta
|
@@ -6801,6 +6817,13 @@ export namespace video {
|
|
6801
6817
|
* @beta
|
6802
6818
|
*/
|
6803
6819
|
type VideoEffectCallback = (effectId: string | undefined) => Promise<void>;
|
6820
|
+
/**
|
6821
|
+
* Register to read the video frames in Permissions section
|
6822
|
+
* @beta
|
6823
|
+
* @param frameCallback - The callback to invoke when registerForVideoFrame has completed
|
6824
|
+
* @param config - VideoFrameConfig to customize generated video frame parameters
|
6825
|
+
*/
|
6826
|
+
function registerForVideoFrame(frameCallback: VideoFrameCallback, config: VideoFrameConfig): void;
|
6804
6827
|
/**
|
6805
6828
|
* Video extension should call this to notify host that the current selected effect parameter changed.
|
6806
6829
|
* If it's pre-meeting, host will call videoEffectCallback immediately then use the videoEffect.
|
@@ -6825,118 +6848,6 @@ export namespace video {
|
|
6825
6848
|
*
|
6826
6849
|
*/
|
6827
6850
|
function isSupported(): boolean;
|
6828
|
-
/**
|
6829
|
-
* @beta
|
6830
|
-
* Namespace to get video frames from a media stream.
|
6831
|
-
* When the host supports this capability, developer should call {@link mediaStream.registerForVideoFrame} to get the video frames.
|
6832
|
-
*/
|
6833
|
-
namespace mediaStream {
|
6834
|
-
/**
|
6835
|
-
* @beta
|
6836
|
-
* Checks if video.mediaStream capability is supported by the host
|
6837
|
-
* @returns boolean to represent whether the video.medisStream capability is supported
|
6838
|
-
*
|
6839
|
-
* @throws Error if {@linkcode app.initialize} has not successfully completed
|
6840
|
-
*
|
6841
|
-
*/
|
6842
|
-
function isSupported(): boolean;
|
6843
|
-
/**
|
6844
|
-
* @beta
|
6845
|
-
* Video frame data extracted from the media stream. More properties may be added in the future.
|
6846
|
-
*/
|
6847
|
-
type MediaStreamFrameData = {
|
6848
|
-
/**
|
6849
|
-
* The video frame from the media stream.
|
6850
|
-
*/
|
6851
|
-
videoFrame: VideoFrame;
|
6852
|
-
};
|
6853
|
-
/**
|
6854
|
-
* @beta
|
6855
|
-
* Video effect change call back function definition.
|
6856
|
-
* The video app should resolve the promise to notify a successfully processed video frame.
|
6857
|
-
* The video app should reject the promise to notify a failure.
|
6858
|
-
*/
|
6859
|
-
type VideoFrameCallback = (receivedVideoFrame: MediaStreamFrameData) => Promise<VideoFrame>;
|
6860
|
-
/**
|
6861
|
-
* @beta
|
6862
|
-
* Register to read the video frames from the media stream provided by the host.
|
6863
|
-
* @param frameCallback - The callback to invoke when recieve a video frame from the media stream.
|
6864
|
-
* @example
|
6865
|
-
* ```typescript
|
6866
|
-
* video.mediaStream.registerForVideoFrame(async (receivedVideoFrame) => {
|
6867
|
-
* const { videoFrame } = receivedVideoFrame;
|
6868
|
-
* try {
|
6869
|
-
* return await processVideoFrame(videoFrame);
|
6870
|
-
* } catch (error) {
|
6871
|
-
* throw error;
|
6872
|
-
* }
|
6873
|
-
* });
|
6874
|
-
* ```
|
6875
|
-
*/
|
6876
|
-
function registerForVideoFrame(frameCallback: VideoFrameCallback): void;
|
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
|
-
}
|
6940
6851
|
}
|
6941
6852
|
|
6942
6853
|
/**
|