@microsoft/teams-js 2.6.0-beta.2 → 2.6.0-beta.3

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.
@@ -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
  /**
@@ -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-beta.2";
1136
+ var version = "2.6.0-beta.3";
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
- ensureInitialized(FrameContexts.content, FrameContexts.sidePanel, FrameContexts.task, FrameContexts.meetingStage);
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
- sendMessageToParent('video.notifyError', [errorMessage]);
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