@microsoft/teams-js 2.6.0-beta.2 → 2.6.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.
|
27
|
+
You can reference these files directly [from here](https://res.cdn.office.net/teams-js/2.6.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.
|
49
|
-
integrity="sha384-
|
48
|
+
src="https://res.cdn.office.net/teams-js/2.6.0/js/MicrosoftTeams.min.js"
|
49
|
+
integrity="sha384-Q7h+aillQBDAjk8Nr/waeppYrt/SiTiPdIqtnZXIsJ8PvrJw7rcsTeD/nNAf1fmQ"
|
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.
|
54
|
+
<script src="node_modules/@microsoft/teams-js@2.6.0/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
|
@@ -2177,6 +2189,17 @@ export namespace videoEx {
|
|
2177
2189
|
* Limited to Microsoft-internal use
|
2178
2190
|
*/
|
2179
2191
|
function isSupported(): boolean;
|
2192
|
+
/**
|
2193
|
+
* @hidden
|
2194
|
+
* Sending fatal error notification to host. Call this function only when your app meets fatal error and can't continue.
|
2195
|
+
* The host will stop the video pipeline and terminate this session, and optionally, show an error message to the user.
|
2196
|
+
* @beta
|
2197
|
+
* @param errorMessage - The error message that will be sent to the host
|
2198
|
+
*
|
2199
|
+
* @internal
|
2200
|
+
* Limited to Microsoft-internal use
|
2201
|
+
*/
|
2202
|
+
function notifyFatalError(errorMessage: string): void;
|
2180
2203
|
}
|
2181
2204
|
|
2182
2205
|
/**
|
package/dist/MicrosoftTeams.js
CHANGED
@@ -1133,7 +1133,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
1133
1133
|
});
|
1134
1134
|
|
1135
1135
|
;// CONCATENATED MODULE: ./src/public/version.ts
|
1136
|
-
var version = "2.6.0
|
1136
|
+
var version = "2.6.0";
|
1137
1137
|
|
1138
1138
|
;// CONCATENATED MODULE: ./src/internal/globalVars.ts
|
1139
1139
|
var GlobalVars = /** @class */ (function () {
|
@@ -2631,7 +2631,10 @@ var dialog;
|
|
2631
2631
|
* @beta
|
2632
2632
|
*/
|
2633
2633
|
function submit(result, appIds) {
|
2634
|
-
|
2634
|
+
// FrameContext content should not be here because dialog.submit can be called only from inside of a dialog (FrameContext task)
|
2635
|
+
// but it's here because Teams mobile incorrectly returns FrameContext.content when calling app.getFrameContext().
|
2636
|
+
// FrameContexts.content will be removed once the bug is fixed.
|
2637
|
+
ensureInitialized(FrameContexts.content, FrameContexts.task);
|
2635
2638
|
if (!isSupported()) {
|
2636
2639
|
throw errorNotSupportedOnPlatform;
|
2637
2640
|
}
|
@@ -9887,6 +9890,19 @@ var teams;
|
|
9887
9890
|
*/
|
9888
9891
|
var videoEx;
|
9889
9892
|
(function (videoEx) {
|
9893
|
+
/**
|
9894
|
+
* @hidden
|
9895
|
+
* Error level when notifying errors to the host, the host will decide what to do acording to the error level.
|
9896
|
+
* @beta
|
9897
|
+
*
|
9898
|
+
* @internal
|
9899
|
+
* Limited to Microsoft-internal use
|
9900
|
+
*/
|
9901
|
+
var ErrorLevel;
|
9902
|
+
(function (ErrorLevel) {
|
9903
|
+
ErrorLevel["Fatal"] = "fatal";
|
9904
|
+
ErrorLevel["Warn"] = "warn";
|
9905
|
+
})(ErrorLevel = videoEx.ErrorLevel || (videoEx.ErrorLevel = {}));
|
9890
9906
|
/**
|
9891
9907
|
* @hidden
|
9892
9908
|
* Register to process video frames
|
@@ -10004,13 +10020,33 @@ var videoEx;
|
|
10004
10020
|
* Sending error notification to host
|
10005
10021
|
* @beta
|
10006
10022
|
* @param errorMessage - The error message that will be sent to the host
|
10023
|
+
* @param errorLevel - The error level that will be sent to the host
|
10007
10024
|
*
|
10008
10025
|
* @internal
|
10009
10026
|
* Limited to Microsoft-internal use
|
10010
10027
|
*/
|
10011
|
-
function notifyError(errorMessage) {
|
10012
|
-
|
10028
|
+
function notifyError(errorMessage, errorLevel) {
|
10029
|
+
if (errorLevel === void 0) { errorLevel = ErrorLevel.Warn; }
|
10030
|
+
sendMessageToParent('video.notifyError', [errorMessage, errorLevel]);
|
10031
|
+
}
|
10032
|
+
/**
|
10033
|
+
* @hidden
|
10034
|
+
* Sending fatal error notification to host. Call this function only when your app meets fatal error and can't continue.
|
10035
|
+
* The host will stop the video pipeline and terminate this session, and optionally, show an error message to the user.
|
10036
|
+
* @beta
|
10037
|
+
* @param errorMessage - The error message that will be sent to the host
|
10038
|
+
*
|
10039
|
+
* @internal
|
10040
|
+
* Limited to Microsoft-internal use
|
10041
|
+
*/
|
10042
|
+
function notifyFatalError(errorMessage) {
|
10043
|
+
ensureInitialized();
|
10044
|
+
if (!video.isSupported()) {
|
10045
|
+
throw errorNotSupportedOnPlatform;
|
10046
|
+
}
|
10047
|
+
notifyError(errorMessage, ErrorLevel.Fatal);
|
10013
10048
|
}
|
10049
|
+
videoEx.notifyFatalError = notifyFatalError;
|
10014
10050
|
})(videoEx || (videoEx = {}));
|
10015
10051
|
|
10016
10052
|
;// CONCATENATED MODULE: ./src/private/index.ts
|