@microsoft/teams-js 2.6.0-beta.1 → 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.1";
1136
+ var version = "2.6.0-beta.3";
1137
1137
 
1138
1138
  ;// CONCATENATED MODULE: ./src/internal/globalVars.ts
1139
1139
  var GlobalVars = /** @class */ (function () {
@@ -2476,10 +2476,6 @@ var versionConstants = {
2476
2476
  capability: { webStorage: {} },
2477
2477
  hostClientTypes: [HostClientType.desktop],
2478
2478
  },
2479
- {
2480
- capability: { profile: {} },
2481
- hostClientTypes: [HostClientType.desktop, HostClientType.web],
2482
- },
2483
2479
  ],
2484
2480
  '2.0.5': [
2485
2481
  {
@@ -2635,7 +2631,10 @@ var dialog;
2635
2631
  * @beta
2636
2632
  */
2637
2633
  function submit(result, appIds) {
2638
- 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);
2639
2638
  if (!isSupported()) {
2640
2639
  throw errorNotSupportedOnPlatform;
2641
2640
  }
@@ -9891,6 +9890,19 @@ var teams;
9891
9890
  */
9892
9891
  var videoEx;
9893
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 = {}));
9894
9906
  /**
9895
9907
  * @hidden
9896
9908
  * Register to process video frames
@@ -10008,13 +10020,33 @@ var videoEx;
10008
10020
  * Sending error notification to host
10009
10021
  * @beta
10010
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
10011
10024
  *
10012
10025
  * @internal
10013
10026
  * Limited to Microsoft-internal use
10014
10027
  */
10015
- function notifyError(errorMessage) {
10016
- 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);
10017
10048
  }
10049
+ videoEx.notifyFatalError = notifyFatalError;
10018
10050
  })(videoEx || (videoEx = {}));
10019
10051
 
10020
10052
  ;// CONCATENATED MODULE: ./src/private/index.ts