@microsoft/teams-js 1.11.0 → 1.12.0-dev.2

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.
@@ -113,7 +113,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
113
113
  exports.sendMessageEventToChild = exports.waitForMessageQueue = exports.sendMessageToParent = exports.uninitializeCommunication = exports.initializeCommunication = exports.Communication = void 0;
114
114
  /* eslint-disable @typescript-eslint/ban-types */
115
115
  var constants_1 = __webpack_require__(4);
116
- var globalVars_1 = __webpack_require__(6);
116
+ var globalVars_1 = __webpack_require__(7);
117
117
  var handlers_1 = __webpack_require__(3);
118
118
  var Communication = /** @class */ (function () {
119
119
  function Communication() {
@@ -422,9 +422,11 @@ function createMessageEvent(func, args) {
422
422
  "use strict";
423
423
 
424
424
  Object.defineProperty(exports, "__esModule", { value: true });
425
- exports.processAdditionalValidOrigins = exports.isAPISupportedByPlatform = exports.ensureInitialized = void 0;
426
- var constants_1 = __webpack_require__(4);
427
- var globalVars_1 = __webpack_require__(6);
425
+ exports.processAdditionalValidOrigins = exports.isApiSupportedOnMobile = exports.isHostClientMobile = exports.isAPISupportedByPlatform = exports.ensureInitialized = void 0;
426
+ var constants_1 = __webpack_require__(2);
427
+ var interfaces_1 = __webpack_require__(6);
428
+ var constants_2 = __webpack_require__(4);
429
+ var globalVars_1 = __webpack_require__(7);
428
430
  var utils_1 = __webpack_require__(5);
429
431
  function ensureInitialized() {
430
432
  var expectedFrameContexts = [];
@@ -454,7 +456,7 @@ exports.ensureInitialized = ensureInitialized;
454
456
  * @param requiredVersion SDK version required by the API
455
457
  */
456
458
  function isAPISupportedByPlatform(requiredVersion) {
457
- if (requiredVersion === void 0) { requiredVersion = constants_1.defaultSDKVersionForCompatCheck; }
459
+ if (requiredVersion === void 0) { requiredVersion = constants_2.defaultSDKVersionForCompatCheck; }
458
460
  var value = (0, utils_1.compareSDKVersions)(globalVars_1.GlobalVars.clientSupportedSDKVersion, requiredVersion);
459
461
  if (isNaN(value)) {
460
462
  return false;
@@ -462,13 +464,38 @@ function isAPISupportedByPlatform(requiredVersion) {
462
464
  return value >= 0;
463
465
  }
464
466
  exports.isAPISupportedByPlatform = isAPISupportedByPlatform;
467
+ /**
468
+ * Helper function to identify if host client is either android or ios
469
+ */
470
+ function isHostClientMobile() {
471
+ return globalVars_1.GlobalVars.hostClientType == constants_1.HostClientType.android || globalVars_1.GlobalVars.hostClientType == constants_1.HostClientType.ios;
472
+ }
473
+ exports.isHostClientMobile = isHostClientMobile;
474
+ /**
475
+ * Helper function which indicates if current API is supported on mobile or not.
476
+ * @returns SdkError if host client is not android/ios or if the requiredVersion is not
477
+ * supported by platform or not. Null is returned in case of success.
478
+ */
479
+ function isApiSupportedOnMobile(requiredVersion) {
480
+ if (requiredVersion === void 0) { requiredVersion = constants_2.defaultSDKVersionForCompatCheck; }
481
+ if (!isHostClientMobile()) {
482
+ var notSupportedError = { errorCode: interfaces_1.ErrorCode.NOT_SUPPORTED_ON_PLATFORM };
483
+ return notSupportedError;
484
+ }
485
+ else if (!isAPISupportedByPlatform(requiredVersion)) {
486
+ var oldPlatformError = { errorCode: interfaces_1.ErrorCode.OLD_PLATFORM };
487
+ return oldPlatformError;
488
+ }
489
+ return null;
490
+ }
491
+ exports.isApiSupportedOnMobile = isApiSupportedOnMobile;
465
492
  /**
466
493
  * Processes the valid origins specifuied by the user, de-duplicates and converts them into a regexp
467
494
  * which is used later for message source/origin validation
468
495
  */
469
496
  function processAdditionalValidOrigins(validMessageOrigins) {
470
497
  var combinedOriginUrls = globalVars_1.GlobalVars.additionalValidOrigins.concat(validMessageOrigins.filter(function (_origin) {
471
- return typeof _origin === 'string' && constants_1.userOriginUrlValidationRegExp.test(_origin);
498
+ return typeof _origin === 'string' && constants_2.userOriginUrlValidationRegExp.test(_origin);
472
499
  }));
473
500
  var dedupUrls = {};
474
501
  combinedOriginUrls = combinedOriginUrls.filter(function (_originUrl) {
@@ -697,45 +724,49 @@ function handleBeforeUnload() {
697
724
  "use strict";
698
725
 
699
726
  Object.defineProperty(exports, "__esModule", { value: true });
700
- exports.userOriginUrlValidationRegExp = exports.validOriginRegExp = exports.validOrigins = exports.scanBarCodeAPIMobileSupportVersion = exports.getMediaCallbackSupportVersion = exports.mediaAPISupportVersion = exports.captureImageMobileSupportVersion = exports.peoplePickerRequiredVersion = exports.locationAPIsRequiredVersion = exports.getUserJoinedTeamsSupportedAndroidClientVersion = exports.videoAndImageMediaAPISupportVersion = exports.defaultSDKVersionForCompatCheck = exports.version = void 0;
727
+ exports.userOriginUrlValidationRegExp = exports.validOriginRegExp = exports.validOrigins = exports.scanBarCodeAPIMobileSupportVersion = exports.getMediaCallbackSupportVersion = exports.mediaAPISupportVersion = exports.captureImageMobileSupportVersion = exports.peoplePickerRequiredVersion = exports.locationAPIsRequiredVersion = exports.getUserJoinedTeamsSupportedAndroidClientVersion = exports.nonFullScreenVideoModeAPISupportVersion = exports.videoAndImageMediaAPISupportVersion = exports.defaultSDKVersionForCompatCheck = exports.version = void 0;
701
728
  var utils_1 = __webpack_require__(5);
702
- exports.version = '1.11.0';
729
+ exports.version = '1.12.0-dev.2';
703
730
  /**
704
- * The SDK version when all SDK APIs started to check platform compatibility for the APIs was 1.6.0.
731
+ * The client version when all SDK APIs started to check platform compatibility for the APIs was 1.6.0.
705
732
  * Modified to 2.0.1 which is hightest till now so that if any client doesn't pass version in initialize function, it will be set to highest.
706
733
  * Mobile clients are passing versions, hence will be applicable to web and desktop clients only.
707
734
  */
708
735
  exports.defaultSDKVersionForCompatCheck = '2.0.1';
709
736
  /**
710
- * This is the SDK version when selectMedia API - VideoAndImage is supported on mobile.
737
+ * This is the client version when selectMedia API - VideoAndImage is supported on mobile.
711
738
  */
712
739
  exports.videoAndImageMediaAPISupportVersion = '2.0.2';
740
+ /**
741
+ * This is the client version when selectMedia API - Video with non-full screen mode is supported on mobile.
742
+ */
743
+ exports.nonFullScreenVideoModeAPISupportVersion = '2.0.3';
713
744
  /**
714
745
  * Minimum required client supported version for {@link getUserJoinedTeams} to be supported on {@link HostClientType.android}
715
746
  */
716
747
  exports.getUserJoinedTeamsSupportedAndroidClientVersion = '2.0.1';
717
748
  /**
718
- * This is the SDK version when location APIs (getLocation and showLocation) are supported.
749
+ * This is the client version when location APIs (getLocation and showLocation) are supported.
719
750
  */
720
751
  exports.locationAPIsRequiredVersion = '1.9.0';
721
752
  /**
722
- * This is the SDK version when people picker API is supported on mobile.
753
+ * This is the client version when people picker API is supported on mobile.
723
754
  */
724
755
  exports.peoplePickerRequiredVersion = '2.0.0';
725
756
  /**
726
- * This is the SDK version when captureImage API is supported on mobile.
757
+ * This is the client version when captureImage API is supported on mobile.
727
758
  */
728
759
  exports.captureImageMobileSupportVersion = '1.7.0';
729
760
  /**
730
- * This is the SDK version when media APIs are supported on all three platforms ios, android and web.
761
+ * This is the client version when media APIs are supported on all three platforms ios, android and web.
731
762
  */
732
763
  exports.mediaAPISupportVersion = '1.8.0';
733
764
  /**
734
- * This is the SDK version when getMedia API is supported via Callbacks on all three platforms ios, android and web.
765
+ * This is the client version when getMedia API is supported via Callbacks on all three platforms ios, android and web.
735
766
  */
736
767
  exports.getMediaCallbackSupportVersion = '2.0.0';
737
768
  /**
738
- * This is the SDK version when scanBarCode API is supported on mobile.
769
+ * This is the client version when scanBarCode API is supported on mobile.
739
770
  */
740
771
  exports.scanBarCodeAPIMobileSupportVersion = '1.9.0';
741
772
  /**
@@ -876,29 +907,6 @@ exports.generateGUID = generateGUID;
876
907
 
877
908
  "use strict";
878
909
 
879
- Object.defineProperty(exports, "__esModule", { value: true });
880
- exports.GlobalVars = void 0;
881
- var GlobalVars = /** @class */ (function () {
882
- function GlobalVars() {
883
- }
884
- GlobalVars.initializeCalled = false;
885
- GlobalVars.initializeCompleted = false;
886
- GlobalVars.additionalValidOrigins = [];
887
- GlobalVars.additionalValidOriginsRegexp = null;
888
- GlobalVars.initializeCallbacks = [];
889
- GlobalVars.isFramelessWindow = false;
890
- GlobalVars.printCapabilityEnabled = false;
891
- return GlobalVars;
892
- }());
893
- exports.GlobalVars = GlobalVars;
894
-
895
-
896
- /***/ }),
897
- /* 7 */
898
- /***/ (function(module, exports, __webpack_require__) {
899
-
900
- "use strict";
901
-
902
910
  Object.defineProperty(exports, "__esModule", { value: true });
903
911
  exports.ErrorCode = exports.FileOpenPreference = void 0;
904
912
  /**
@@ -975,6 +983,29 @@ var ErrorCode;
975
983
  })(ErrorCode = exports.ErrorCode || (exports.ErrorCode = {}));
976
984
 
977
985
 
986
+ /***/ }),
987
+ /* 7 */
988
+ /***/ (function(module, exports, __webpack_require__) {
989
+
990
+ "use strict";
991
+
992
+ Object.defineProperty(exports, "__esModule", { value: true });
993
+ exports.GlobalVars = void 0;
994
+ var GlobalVars = /** @class */ (function () {
995
+ function GlobalVars() {
996
+ }
997
+ GlobalVars.initializeCalled = false;
998
+ GlobalVars.initializeCompleted = false;
999
+ GlobalVars.additionalValidOrigins = [];
1000
+ GlobalVars.additionalValidOriginsRegexp = null;
1001
+ GlobalVars.initializeCallbacks = [];
1002
+ GlobalVars.isFramelessWindow = false;
1003
+ GlobalVars.printCapabilityEnabled = false;
1004
+ return GlobalVars;
1005
+ }());
1006
+ exports.GlobalVars = GlobalVars;
1007
+
1008
+
978
1009
  /***/ }),
979
1010
  /* 8 */
980
1011
  /***/ (function(module, exports, __webpack_require__) {
@@ -994,7 +1025,7 @@ Object.defineProperty(exports, "TaskModuleDimension", { enumerable: true, get: f
994
1025
  Object.defineProperty(exports, "TeamType", { enumerable: true, get: function () { return constants_1.TeamType; } });
995
1026
  Object.defineProperty(exports, "UserTeamRole", { enumerable: true, get: function () { return constants_1.UserTeamRole; } });
996
1027
  Object.defineProperty(exports, "ChannelType", { enumerable: true, get: function () { return constants_1.ChannelType; } });
997
- var interfaces_1 = __webpack_require__(7);
1028
+ var interfaces_1 = __webpack_require__(6);
998
1029
  Object.defineProperty(exports, "ErrorCode", { enumerable: true, get: function () { return interfaces_1.ErrorCode; } });
999
1030
  Object.defineProperty(exports, "FileOpenPreference", { enumerable: true, get: function () { return interfaces_1.FileOpenPreference; } });
1000
1031
  var publicAPIs_1 = __webpack_require__(26);
@@ -1127,7 +1158,7 @@ module.exports = bytesToUuid;
1127
1158
  Object.defineProperty(exports, "__esModule", { value: true });
1128
1159
  exports.authentication = void 0;
1129
1160
  var internalAPIs_1 = __webpack_require__(1);
1130
- var globalVars_1 = __webpack_require__(6);
1161
+ var globalVars_1 = __webpack_require__(7);
1131
1162
  var constants_1 = __webpack_require__(2);
1132
1163
  var communication_1 = __webpack_require__(0);
1133
1164
  var handlers_1 = __webpack_require__(3);
@@ -1626,8 +1657,8 @@ var utils_1 = __webpack_require__(5);
1626
1657
  var communication_1 = __webpack_require__(0);
1627
1658
  var menus_1 = __webpack_require__(15);
1628
1659
  var handlers_1 = __webpack_require__(3);
1629
- var globalVars_1 = __webpack_require__(6);
1630
- var interfaces_1 = __webpack_require__(7);
1660
+ var globalVars_1 = __webpack_require__(7);
1661
+ var interfaces_1 = __webpack_require__(6);
1631
1662
  var constants_2 = __webpack_require__(4);
1632
1663
  function initializePrivateApis() {
1633
1664
  menus_1.menus.initialize();
@@ -2013,8 +2044,8 @@ var __extends = (this && this.__extends) || (function () {
2013
2044
  })();
2014
2045
  Object.defineProperty(exports, "__esModule", { value: true });
2015
2046
  exports.media = void 0;
2016
- var globalVars_1 = __webpack_require__(6);
2017
- var interfaces_1 = __webpack_require__(7);
2047
+ var globalVars_1 = __webpack_require__(7);
2048
+ var interfaces_1 = __webpack_require__(6);
2018
2049
  var internalAPIs_1 = __webpack_require__(1);
2019
2050
  var constants_1 = __webpack_require__(2);
2020
2051
  var utils_1 = __webpack_require__(5);
@@ -2189,6 +2220,87 @@ var media;
2189
2220
  return Media;
2190
2221
  }(File));
2191
2222
  media.Media = Media;
2223
+ /**
2224
+ * @private
2225
+ * Hide from docs
2226
+ * --------
2227
+ * Base class which holds the callback and notifies events to the host client
2228
+ */
2229
+ var MediaController = /** @class */ (function () {
2230
+ function MediaController(controllerCallback) {
2231
+ this.controllerCallback = controllerCallback;
2232
+ }
2233
+ /**
2234
+ * @private
2235
+ * Hide from docs
2236
+ * --------
2237
+ * Function to notify the host client to programatically control the experience
2238
+ * @param mediaEvent indicates what the event that needs to be signaled to the host client
2239
+ * Optional; @param callback is used to send app if host client has successfully handled the notification event or not
2240
+ */
2241
+ MediaController.prototype.notifyEventToHost = function (mediaEvent, callback) {
2242
+ (0, internalAPIs_1.ensureInitialized)(constants_1.FrameContexts.content, constants_1.FrameContexts.task);
2243
+ var err = (0, internalAPIs_1.isApiSupportedOnMobile)(constants_2.nonFullScreenVideoModeAPISupportVersion);
2244
+ if (err) {
2245
+ if (callback) {
2246
+ callback(err);
2247
+ }
2248
+ return;
2249
+ }
2250
+ var params = { mediaType: this.getMediaType(), mediaControllerEvent: mediaEvent };
2251
+ (0, communication_1.sendMessageToParent)('media.controller', [params], function (err) {
2252
+ if (callback) {
2253
+ callback(err);
2254
+ }
2255
+ });
2256
+ };
2257
+ /**
2258
+ * Function to programatically stop the ongoing media event
2259
+ * Optional; @param callback is used to send app if host client has successfully stopped the event or not
2260
+ */
2261
+ MediaController.prototype.stop = function (callback) {
2262
+ this.notifyEventToHost(MediaControllerEvent.StopRecording, callback);
2263
+ };
2264
+ return MediaController;
2265
+ }());
2266
+ /**
2267
+ * VideoController class is used to communicate between the app and the host client during the video capture flow
2268
+ */
2269
+ var VideoController = /** @class */ (function (_super) {
2270
+ __extends(VideoController, _super);
2271
+ function VideoController() {
2272
+ return _super !== null && _super.apply(this, arguments) || this;
2273
+ }
2274
+ VideoController.prototype.getMediaType = function () {
2275
+ return MediaType.Video;
2276
+ };
2277
+ VideoController.prototype.notifyEventToApp = function (mediaEvent) {
2278
+ if (!this.controllerCallback) {
2279
+ // Early return as app has not registered with the callback
2280
+ return;
2281
+ }
2282
+ switch (mediaEvent) {
2283
+ case MediaControllerEvent.StartRecording:
2284
+ if (this.controllerCallback.onRecordingStarted) {
2285
+ this.controllerCallback.onRecordingStarted();
2286
+ break;
2287
+ }
2288
+ }
2289
+ };
2290
+ return VideoController;
2291
+ }(MediaController));
2292
+ media.VideoController = VideoController;
2293
+ /**
2294
+ * @private
2295
+ * Hide from docs
2296
+ * --------
2297
+ * Events which are used to communicate between the app and the host client during the media recording flow
2298
+ */
2299
+ var MediaControllerEvent;
2300
+ (function (MediaControllerEvent) {
2301
+ MediaControllerEvent[MediaControllerEvent["StartRecording"] = 1] = "StartRecording";
2302
+ MediaControllerEvent[MediaControllerEvent["StopRecording"] = 2] = "StopRecording";
2303
+ })(MediaControllerEvent || (MediaControllerEvent = {}));
2192
2304
  /**
2193
2305
  * The modes in which camera can be launched in select Media API
2194
2306
  */
@@ -2213,7 +2325,7 @@ var media;
2213
2325
  var MediaType;
2214
2326
  (function (MediaType) {
2215
2327
  MediaType[MediaType["Image"] = 1] = "Image";
2216
- // Video = 2, // Not implemented yet
2328
+ MediaType[MediaType["Video"] = 2] = "Video";
2217
2329
  MediaType[MediaType["VideoAndImage"] = 3] = "VideoAndImage";
2218
2330
  MediaType[MediaType["Audio"] = 4] = "Audio";
2219
2331
  })(MediaType = media.MediaType || (media.MediaType = {}));
@@ -2240,17 +2352,10 @@ var media;
2240
2352
  callback(oldPlatformError, null);
2241
2353
  return;
2242
2354
  }
2243
- if ((0, mediaUtil_1.isMediaCallForVideoAndImageInputs)(mediaInputs)) {
2244
- if (globalVars_1.GlobalVars.hostClientType != constants_1.HostClientType.android && globalVars_1.GlobalVars.hostClientType != constants_1.HostClientType.ios) {
2245
- var notSupportedError = { errorCode: interfaces_1.ErrorCode.NOT_SUPPORTED_ON_PLATFORM };
2246
- callback(notSupportedError, null);
2247
- return;
2248
- }
2249
- else if (!(0, internalAPIs_1.isAPISupportedByPlatform)(constants_2.videoAndImageMediaAPISupportVersion)) {
2250
- var oldPlatformError = { errorCode: interfaces_1.ErrorCode.OLD_PLATFORM };
2251
- callback(oldPlatformError, null);
2252
- return;
2253
- }
2355
+ var err = (0, mediaUtil_1.isMediaCallSupportedOnMobile)(mediaInputs);
2356
+ if (err) {
2357
+ callback(err, null);
2358
+ return;
2254
2359
  }
2255
2360
  if (!(0, mediaUtil_1.validateSelectMediaInputs)(mediaInputs)) {
2256
2361
  var invalidInput = { errorCode: interfaces_1.ErrorCode.INVALID_ARGUMENTS };
@@ -2258,8 +2363,16 @@ var media;
2258
2363
  return;
2259
2364
  }
2260
2365
  var params = [mediaInputs];
2261
- // What comes back from native at attachments would just be objects and will be missing getMedia method on them.
2262
- (0, communication_1.sendMessageToParent)('selectMedia', params, function (err, localAttachments) {
2366
+ // What comes back from native as attachments would just be objects and will be missing getMedia method on them
2367
+ (0, communication_1.sendMessageToParent)('selectMedia', params, function (err, localAttachments, mediaEvent) {
2368
+ // MediaControllerEvent response is used to notify the app about events and is a partial response to selectMedia
2369
+ if (mediaEvent) {
2370
+ if ((0, mediaUtil_1.isVideoControllerRegistered)(mediaInputs)) {
2371
+ mediaInputs.videoProps.videoController.notifyEventToApp(mediaEvent);
2372
+ }
2373
+ return;
2374
+ }
2375
+ // Media Attachments are final response to selectMedia
2263
2376
  if (!localAttachments) {
2264
2377
  callback(err, null);
2265
2378
  return;
@@ -2342,8 +2455,10 @@ var media;
2342
2455
  "use strict";
2343
2456
 
2344
2457
  Object.defineProperty(exports, "__esModule", { value: true });
2345
- exports.validatePeoplePickerInput = exports.validateScanBarCodeInput = exports.validateViewImagesInput = exports.validateGetMediaInputs = exports.isMediaCallForVideoAndImageInputs = exports.validateSelectMediaInputs = exports.decodeAttachment = exports.createFile = void 0;
2458
+ exports.validatePeoplePickerInput = exports.validateScanBarCodeInput = exports.validateViewImagesInput = exports.validateGetMediaInputs = exports.isMediaCallForNonFullScreenVideoMode = exports.isMediaCallForVideoAndImageInputs = exports.validateSelectMediaInputs = exports.isVideoControllerRegistered = exports.isMediaCallSupportedOnMobile = exports.decodeAttachment = exports.createFile = void 0;
2346
2459
  var media_1 = __webpack_require__(17);
2460
+ var constants_1 = __webpack_require__(4);
2461
+ var internalAPIs_1 = __webpack_require__(1);
2347
2462
  /**
2348
2463
  * Helper function to create a blob from media chunks based on their sequence
2349
2464
  */
@@ -2390,6 +2505,31 @@ function decodeAttachment(attachment, mimeType) {
2390
2505
  return assemble;
2391
2506
  }
2392
2507
  exports.decodeAttachment = decodeAttachment;
2508
+ /**
2509
+ * Function returns null if the media call is supported on current mobile version, else SdkError.
2510
+ */
2511
+ function isMediaCallSupportedOnMobile(mediaInputs) {
2512
+ if (isMediaCallForVideoAndImageInputs(mediaInputs)) {
2513
+ return (0, internalAPIs_1.isApiSupportedOnMobile)(constants_1.videoAndImageMediaAPISupportVersion);
2514
+ }
2515
+ else if (isMediaCallForNonFullScreenVideoMode(mediaInputs)) {
2516
+ return (0, internalAPIs_1.isApiSupportedOnMobile)(constants_1.nonFullScreenVideoModeAPISupportVersion);
2517
+ }
2518
+ return null;
2519
+ }
2520
+ exports.isMediaCallSupportedOnMobile = isMediaCallSupportedOnMobile;
2521
+ /**
2522
+ * Function returns true if the app has registered to listen to video controller events, else false.
2523
+ */
2524
+ function isVideoControllerRegistered(mediaInputs) {
2525
+ if (mediaInputs.mediaType == media_1.media.MediaType.Video &&
2526
+ mediaInputs.videoProps &&
2527
+ mediaInputs.videoProps.videoController) {
2528
+ return true;
2529
+ }
2530
+ return false;
2531
+ }
2532
+ exports.isVideoControllerRegistered = isVideoControllerRegistered;
2393
2533
  /**
2394
2534
  * Returns true if the mediaInput params are valid and false otherwise
2395
2535
  */
@@ -2404,14 +2544,25 @@ exports.validateSelectMediaInputs = validateSelectMediaInputs;
2404
2544
  * Returns true if the mediaInput params are called for mediatype VideoAndImage and false otherwise
2405
2545
  */
2406
2546
  function isMediaCallForVideoAndImageInputs(mediaInputs) {
2407
- if (mediaInputs) {
2408
- if (mediaInputs.mediaType == media_1.media.MediaType.VideoAndImage || mediaInputs.videoAndImageProps) {
2409
- return true;
2410
- }
2547
+ if (mediaInputs && (mediaInputs.mediaType == media_1.media.MediaType.VideoAndImage || mediaInputs.videoAndImageProps)) {
2548
+ return true;
2411
2549
  }
2412
2550
  return false;
2413
2551
  }
2414
2552
  exports.isMediaCallForVideoAndImageInputs = isMediaCallForVideoAndImageInputs;
2553
+ /**
2554
+ * Returns true if the mediaInput params are called for non-full screen video mode and false otherwise
2555
+ */
2556
+ function isMediaCallForNonFullScreenVideoMode(mediaInputs) {
2557
+ if (mediaInputs &&
2558
+ mediaInputs.mediaType == media_1.media.MediaType.Video &&
2559
+ mediaInputs.videoProps &&
2560
+ !mediaInputs.videoProps.isFullScreenMode) {
2561
+ return true;
2562
+ }
2563
+ return false;
2564
+ }
2565
+ exports.isMediaCallForNonFullScreenVideoMode = isMediaCallForNonFullScreenVideoMode;
2415
2566
  /**
2416
2567
  * Returns true if the get Media params are valid and false otherwise
2417
2568
  */
@@ -2873,7 +3024,7 @@ var appInitialization;
2873
3024
  Object.defineProperty(exports, "__esModule", { value: true });
2874
3025
  exports.initializeWithFrameContext = exports.setFrameContext = exports.executeDeepLink = exports.shareDeepLink = exports.getMruTabInstances = exports.getTabInstances = exports.registerEnterSettingsHandler = exports.registerFocusEnterHandler = exports.registerBeforeUnloadHandler = exports.registerOnLoadHandler = exports.registerBackButtonHandler = exports.registerAppButtonHoverLeaveHandler = exports.registerAppButtonHoverEnterHandler = exports.registerAppButtonClickHandler = exports.registerFullScreenHandler = exports.registerOnThemeChangeHandler = exports.getContext = exports.print = exports.enablePrintCapability = exports._uninitialize = exports._initialize = exports.initialize = void 0;
2875
3026
  var internalAPIs_1 = __webpack_require__(1);
2876
- var globalVars_1 = __webpack_require__(6);
3027
+ var globalVars_1 = __webpack_require__(7);
2877
3028
  var constants_1 = __webpack_require__(4);
2878
3029
  var settings_1 = __webpack_require__(12);
2879
3030
  var utils_1 = __webpack_require__(5);
@@ -3305,7 +3456,7 @@ var tasks;
3305
3456
 
3306
3457
  Object.defineProperty(exports, "__esModule", { value: true });
3307
3458
  exports.location = void 0;
3308
- var interfaces_1 = __webpack_require__(7);
3459
+ var interfaces_1 = __webpack_require__(6);
3309
3460
  var internalAPIs_1 = __webpack_require__(1);
3310
3461
  var constants_1 = __webpack_require__(2);
3311
3462
  var communication_1 = __webpack_require__(0);
@@ -3605,7 +3756,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3605
3756
  exports.people = void 0;
3606
3757
  var internalAPIs_1 = __webpack_require__(1);
3607
3758
  var constants_1 = __webpack_require__(2);
3608
- var interfaces_1 = __webpack_require__(7);
3759
+ var interfaces_1 = __webpack_require__(6);
3609
3760
  var mediaUtil_1 = __webpack_require__(18);
3610
3761
  var communication_1 = __webpack_require__(0);
3611
3762
  var constants_2 = __webpack_require__(4);
@@ -3736,7 +3887,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3736
3887
  exports.sharing = void 0;
3737
3888
  var internalAPIs_1 = __webpack_require__(1);
3738
3889
  var communication_1 = __webpack_require__(0);
3739
- var interfaces_1 = __webpack_require__(7);
3890
+ var interfaces_1 = __webpack_require__(6);
3740
3891
  var constants_1 = __webpack_require__(2);
3741
3892
  var sharing;
3742
3893
  (function (sharing) {
@@ -4307,19 +4458,47 @@ var files;
4307
4458
  CloudStorageProvider["Sharefile"] = "SHAREFILE";
4308
4459
  CloudStorageProvider["GoogleDrive"] = "GOOGLEDRIVE";
4309
4460
  CloudStorageProvider["Egnyte"] = "EGNYTE";
4461
+ CloudStorageProvider["SharePoint"] = "SharePoint";
4310
4462
  })(CloudStorageProvider = files.CloudStorageProvider || (files.CloudStorageProvider = {}));
4311
4463
  /**
4312
4464
  * @private
4313
4465
  * Hide from docs
4314
4466
  *
4315
- * Cloud storage provider integration type
4467
+ * Cloud storage provider type enums
4316
4468
  */
4317
4469
  var CloudStorageProviderType;
4318
4470
  (function (CloudStorageProviderType) {
4319
4471
  CloudStorageProviderType[CloudStorageProviderType["Sharepoint"] = 0] = "Sharepoint";
4320
4472
  CloudStorageProviderType[CloudStorageProviderType["WopiIntegration"] = 1] = "WopiIntegration";
4321
4473
  CloudStorageProviderType[CloudStorageProviderType["Google"] = 2] = "Google";
4474
+ CloudStorageProviderType[CloudStorageProviderType["OneDrive"] = 3] = "OneDrive";
4475
+ CloudStorageProviderType[CloudStorageProviderType["Recent"] = 4] = "Recent";
4476
+ CloudStorageProviderType[CloudStorageProviderType["Aggregate"] = 5] = "Aggregate";
4477
+ CloudStorageProviderType[CloudStorageProviderType["FileSystem"] = 6] = "FileSystem";
4478
+ CloudStorageProviderType[CloudStorageProviderType["Search"] = 7] = "Search";
4479
+ CloudStorageProviderType[CloudStorageProviderType["AllFiles"] = 8] = "AllFiles";
4480
+ CloudStorageProviderType[CloudStorageProviderType["SharedWithMe"] = 9] = "SharedWithMe";
4322
4481
  })(CloudStorageProviderType = files.CloudStorageProviderType || (files.CloudStorageProviderType = {}));
4482
+ /**
4483
+ * @private
4484
+ * Hide from docs
4485
+ *
4486
+ * Special Document Library enum
4487
+ */
4488
+ var SpecialDocumentLibraryType;
4489
+ (function (SpecialDocumentLibraryType) {
4490
+ SpecialDocumentLibraryType["ClassMaterials"] = "classMaterials";
4491
+ })(SpecialDocumentLibraryType = files.SpecialDocumentLibraryType || (files.SpecialDocumentLibraryType = {}));
4492
+ /**
4493
+ * @private
4494
+ * Hide from docs
4495
+ *
4496
+ * Document Library Access enum
4497
+ */
4498
+ var DocumentLibraryAccessType;
4499
+ (function (DocumentLibraryAccessType) {
4500
+ DocumentLibraryAccessType["Readonly"] = "readonly";
4501
+ })(DocumentLibraryAccessType = files.DocumentLibraryAccessType || (files.DocumentLibraryAccessType = {}));
4323
4502
  /**
4324
4503
  * @private
4325
4504
  * Hide from docs
@@ -4330,7 +4509,7 @@ var files;
4330
4509
  */
4331
4510
  function getCloudStorageFolders(channelId, callback) {
4332
4511
  (0, internalAPIs_1.ensureInitialized)(public_1.FrameContexts.content);
4333
- if (!channelId || channelId.length == 0) {
4512
+ if (!channelId || channelId.length === 0) {
4334
4513
  throw new Error('[files.getCloudStorageFolders] channelId name cannot be null or empty');
4335
4514
  }
4336
4515
  if (!callback) {
@@ -4349,7 +4528,7 @@ var files;
4349
4528
  */
4350
4529
  function addCloudStorageFolder(channelId, callback) {
4351
4530
  (0, internalAPIs_1.ensureInitialized)(public_1.FrameContexts.content);
4352
- if (!channelId || channelId.length == 0) {
4531
+ if (!channelId || channelId.length === 0) {
4353
4532
  throw new Error('[files.addCloudStorageFolder] channelId name cannot be null or empty');
4354
4533
  }
4355
4534
  if (!callback) {
@@ -4424,6 +4603,48 @@ var files;
4424
4603
  (0, communication_1.sendMessageToParent)('files.openCloudStorageFile', [file, providerCode, fileOpenPreference]);
4425
4604
  }
4426
4605
  files.openCloudStorageFile = openCloudStorageFile;
4606
+ /**
4607
+ * @private
4608
+ * Allow 1st party apps to call this function to get the external
4609
+ * third party cloud storage accounts that the tenant supports
4610
+ * @param excludeAddedProviders: return a list of support third party
4611
+ * cloud storages that hasn't been added yet.
4612
+ */
4613
+ function getExternalProviders(excludeAddedProviders, callback) {
4614
+ if (excludeAddedProviders === void 0) { excludeAddedProviders = false; }
4615
+ (0, internalAPIs_1.ensureInitialized)(public_1.FrameContexts.content);
4616
+ if (!callback) {
4617
+ throw new Error('[files.getExternalProviders] Callback cannot be null');
4618
+ }
4619
+ (0, communication_1.sendMessageToParent)('files.getExternalProviders', [excludeAddedProviders], callback);
4620
+ }
4621
+ files.getExternalProviders = getExternalProviders;
4622
+ /**
4623
+ * @private
4624
+ * Allow 1st party apps to call this function to move files
4625
+ * among SharePoint and third party cloud storages.
4626
+ */
4627
+ function copyMoveFiles(selectedFiles, providerCode, destinationFolder, destinationProviderCode, isMove, callback) {
4628
+ if (isMove === void 0) { isMove = false; }
4629
+ (0, internalAPIs_1.ensureInitialized)(public_1.FrameContexts.content);
4630
+ if (!selectedFiles || selectedFiles.length === 0) {
4631
+ throw new Error('[files.copyMoveFiles] selectedFiles cannot be null or empty');
4632
+ }
4633
+ if (!providerCode) {
4634
+ throw new Error('[files.copyMoveFiles] providerCode cannot be null or empty');
4635
+ }
4636
+ if (!destinationFolder) {
4637
+ throw new Error('[files.copyMoveFiles] destinationFolder cannot be null or empty');
4638
+ }
4639
+ if (!destinationProviderCode) {
4640
+ throw new Error('[files.copyMoveFiles] destinationProviderCode cannot be null or empty');
4641
+ }
4642
+ if (!callback) {
4643
+ throw new Error('[files.copyMoveFiles] callback cannot be null');
4644
+ }
4645
+ (0, communication_1.sendMessageToParent)('files.copyMoveFiles', [selectedFiles, providerCode, destinationFolder, destinationProviderCode, isMove], callback);
4646
+ }
4647
+ files.copyMoveFiles = copyMoveFiles;
4427
4648
  })(files = exports.files || (exports.files = {}));
4428
4649
 
4429
4650
 
@@ -4456,8 +4677,8 @@ var appEntity;
4456
4677
  * @param subEntityId An object that will be made available to the application being configured
4457
4678
  * through the Teams Context's subEntityId field.
4458
4679
  * @param callback Callback that will be triggered once the app entity information is available.
4459
- * The callback takes two arguments: the app entity configuration, if available and
4460
- * an optional SdkError in case something happened (i.e. the window was closed)
4680
+ * The callback takes two arguments: an SdkError in case something happened (i.e.
4681
+ * no permissions to execute the API) and the app entity configuration, if available
4461
4682
  */
4462
4683
  function selectAppEntity(threadId, categories, subEntityId, callback) {
4463
4684
  (0, internalAPIs_1.ensureInitialized)(public_1.FrameContexts.content);