@microsoft/teams-js 2.0.0-beta.6-dev.6 → 2.0.0-beta.6-dev.7

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.
@@ -1122,7 +1122,7 @@ __webpack_require__.d(__webpack_exports__, {
1122
1122
  });
1123
1123
 
1124
1124
  ;// CONCATENATED MODULE: ./src/internal/constants.ts
1125
- var version = "2.0.0-beta.6-dev.6";
1125
+ var version = "2.0.0-beta.6-dev.7";
1126
1126
  /**
1127
1127
  * @hidden
1128
1128
  * The client version when all SDK APIs started to check platform compatibility for the APIs was 1.6.0.
@@ -2367,7 +2367,6 @@ var runtime = {
2367
2367
  logs: undefined,
2368
2368
  mail: undefined,
2369
2369
  media: undefined,
2370
- meeting: undefined,
2371
2370
  meetingRoom: undefined,
2372
2371
  menus: undefined,
2373
2372
  monetization: undefined,
@@ -2406,7 +2405,6 @@ var teamsRuntimeConfig = {
2406
2405
  },
2407
2406
  logs: {},
2408
2407
  media: {},
2409
- meeting: {},
2410
2408
  meetingRoom: {},
2411
2409
  menus: {},
2412
2410
  monetization: {},
@@ -5439,10 +5437,9 @@ var location_location;
5439
5437
 
5440
5438
 
5441
5439
 
5442
-
5443
-
5444
5440
  /**
5445
- * @alpha
5441
+ * @deprecated
5442
+ * As of 2.0.0-beta.6, use meeting only for backwards compatibility of existing code.
5446
5443
  */
5447
5444
  var meeting;
5448
5445
  (function (meeting) {
@@ -5455,102 +5452,156 @@ var meeting;
5455
5452
  MeetingType["Broadcast"] = "Broadcast";
5456
5453
  MeetingType["MeetNow"] = "MeetNow";
5457
5454
  })(MeetingType = meeting.MeetingType || (meeting.MeetingType = {}));
5455
+ var CallType;
5456
+ (function (CallType) {
5457
+ CallType["OneOnOneCall"] = "oneOnOneCall";
5458
+ CallType["GroupCall"] = "groupCall";
5459
+ })(CallType = meeting.CallType || (meeting.CallType = {}));
5460
+ /**
5461
+ * @deprecated
5462
+ * As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
5463
+ *
5464
+ * Allows an app to get the incoming audio speaker setting for the meeting user
5465
+ *
5466
+ * @param callback - Callback contains 2 parameters, error and result.
5467
+ *
5468
+ * error can either contain an error of type SdkError, incase of an error, or null when fetch is successful
5469
+ * result can either contain the true/false value, incase of a successful fetch or null when the fetching fails
5470
+ * result: True means incoming audio is muted and false means incoming audio is unmuted
5471
+ */
5458
5472
  function getIncomingClientAudioState(callback) {
5473
+ if (!callback) {
5474
+ throw new Error('[get incoming client audio state] Callback cannot be null');
5475
+ }
5459
5476
  ensureInitialized(FrameContexts.sidePanel, FrameContexts.meetingStage);
5460
- return callCallbackWithErrorOrResultOrNullFromPromiseAndReturnPromise(getIncomingClientAudioStateHelper, callback);
5477
+ sendMessageToParent('getIncomingClientAudioState', callback);
5461
5478
  }
5462
5479
  meeting.getIncomingClientAudioState = getIncomingClientAudioState;
5463
- function getIncomingClientAudioStateHelper() {
5464
- return new Promise(function (resolve) {
5465
- resolve(sendAndHandleSdkError('getIncomingClientAudioState'));
5466
- });
5467
- }
5480
+ /**
5481
+ * @deprecated
5482
+ * As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
5483
+ *
5484
+ * Allows an app to toggle the incoming audio speaker setting for the meeting user from mute to unmute or vice-versa
5485
+ *
5486
+ * @param callback - Callback contains 2 parameters, error and result.
5487
+ * error can either contain an error of type SdkError, incase of an error, or null when toggle is successful
5488
+ * result can either contain the true/false value, incase of a successful toggle or null when the toggling fails
5489
+ * result: True means incoming audio is muted and false means incoming audio is unmuted
5490
+ */
5468
5491
  function toggleIncomingClientAudio(callback) {
5492
+ if (!callback) {
5493
+ throw new Error('[toggle incoming client audio] Callback cannot be null');
5494
+ }
5469
5495
  ensureInitialized(FrameContexts.sidePanel, FrameContexts.meetingStage);
5470
- return callCallbackWithErrorOrResultOrNullFromPromiseAndReturnPromise(toggleIncomingClientAudioHelper, callback);
5496
+ sendMessageToParent('toggleIncomingClientAudio', callback);
5471
5497
  }
5472
5498
  meeting.toggleIncomingClientAudio = toggleIncomingClientAudio;
5473
- function toggleIncomingClientAudioHelper() {
5474
- return new Promise(function (resolve) {
5475
- resolve(sendAndHandleSdkError('toggleIncomingClientAudio'));
5476
- });
5477
- }
5499
+ /**
5500
+ * @deprecated
5501
+ * As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
5502
+ *
5503
+ * @hidden
5504
+ * Hide from docs
5505
+ *
5506
+ * Allows an app to get the meeting details for the meeting
5507
+ *
5508
+ * @param callback - Callback contains 2 parameters, error and meetingDetailsResponse.
5509
+ * error can either contain an error of type SdkError, incase of an error, or null when get is successful
5510
+ * result can either contain a IMeetingDetailsResponse value, incase of a successful get or null when the get fails
5511
+ *
5512
+ * @internal
5513
+ */
5478
5514
  function getMeetingDetails(callback) {
5515
+ if (!callback) {
5516
+ throw new Error('[get meeting details] Callback cannot be null');
5517
+ }
5479
5518
  ensureInitialized(FrameContexts.sidePanel, FrameContexts.meetingStage, FrameContexts.settings, FrameContexts.content);
5480
- return callCallbackWithErrorOrResultOrNullFromPromiseAndReturnPromise(getMeetingDetailsHelper, callback);
5519
+ sendMessageToParent('meeting.getMeetingDetails', callback);
5481
5520
  }
5482
5521
  meeting.getMeetingDetails = getMeetingDetails;
5483
- function getMeetingDetailsHelper() {
5484
- return new Promise(function (resolve) {
5485
- resolve(sendAndHandleSdkError('meeting.getMeetingDetails'));
5486
- });
5487
- }
5522
+ /**
5523
+ * @deprecated
5524
+ * As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
5525
+ *
5526
+ * @hidden
5527
+ * Allows an app to get the authentication token for the anonymous or guest user in the meeting
5528
+ *
5529
+ * @param callback - Callback contains 2 parameters, error and authenticationTokenOfAnonymousUser.
5530
+ * error can either contain an error of type SdkError, incase of an error, or null when get is successful
5531
+ * authenticationTokenOfAnonymousUser can either contain a string value, incase of a successful get or null when the get fails
5532
+ *
5533
+ * @internal
5534
+ */
5488
5535
  function getAuthenticationTokenForAnonymousUser(callback) {
5536
+ if (!callback) {
5537
+ throw new Error('[get Authentication Token For AnonymousUser] Callback cannot be null');
5538
+ }
5489
5539
  ensureInitialized(FrameContexts.sidePanel, FrameContexts.meetingStage);
5490
- return callCallbackWithErrorOrResultOrNullFromPromiseAndReturnPromise(getAuthenticationTokenForAnonymousUserHelper, callback);
5540
+ sendMessageToParent('meeting.getAuthenticationTokenForAnonymousUser', callback);
5491
5541
  }
5492
5542
  meeting.getAuthenticationTokenForAnonymousUser = getAuthenticationTokenForAnonymousUser;
5493
- function getAuthenticationTokenForAnonymousUserHelper() {
5494
- return new Promise(function (resolve) {
5495
- resolve(sendAndHandleSdkError('meeting.getAuthenticationTokenForAnonymousUser'));
5496
- });
5497
- }
5498
- function isSupported() {
5499
- return runtime.supports.meeting ? true : false;
5500
- }
5501
- meeting.isSupported = isSupported;
5543
+ /**
5544
+ * @deprecated
5545
+ * As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
5546
+ *
5547
+ * Allows an app to get the state of the live stream in the current meeting
5548
+ *
5549
+ * @param callback - Callback contains 2 parameters: error and liveStreamState.
5550
+ * error can either contain an error of type SdkError, in case of an error, or null when get is successful
5551
+ * liveStreamState can either contain a LiveStreamState value, or null when operation fails
5552
+ */
5502
5553
  function getLiveStreamState(callback) {
5503
- ensureInitialized();
5504
- return callCallbackWithErrorOrResultOrNullFromPromiseAndReturnPromise(getLiveStreamStateHelper, callback);
5554
+ if (!callback) {
5555
+ throw new Error('[get live stream state] Callback cannot be null');
5556
+ }
5557
+ ensureInitialized(FrameContexts.sidePanel);
5558
+ sendMessageToParent('meeting.getLiveStreamState', callback);
5505
5559
  }
5506
5560
  meeting.getLiveStreamState = getLiveStreamState;
5507
- function getLiveStreamStateHelper() {
5508
- return new Promise(function (resolve) {
5509
- resolve(sendAndHandleSdkError('meeting.getLiveStreamState'));
5510
- });
5511
- }
5512
5561
  /**
5513
- * @hidden
5514
- * This function is the overloaded implementation of requestStartLiveStreaming.
5515
- * Since the method signatures of the v1 callback and v2 promise differ in the type of the first parameter,
5516
- * we need to do an extra check to know the typeof the @param1 to set the proper arguments of the utility function.
5517
- * @param param1
5518
- * @param param2
5519
- * @param param3
5520
- * @returns Promise that will be resolved when the operation has completed or rejected with SdkError value
5562
+ * @deprecated
5563
+ * As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
5564
+ *
5565
+ * Allows an app to request the live streaming be started at the given streaming url
5566
+ *
5567
+ * @remarks
5568
+ * Use getLiveStreamState or registerLiveStreamChangedHandler to get updates on the live stream state
5569
+ *
5570
+ * @param streamUrl - the url to the stream resource
5571
+ * @param streamKey - the key to the stream resource
5572
+ * @param callback - Callback contains error parameter which can be of type SdkError in case of an error, or null when operation is successful
5521
5573
  */
5522
- function requestStartLiveStreaming(param1, param2, param3) {
5523
- var _a, _b;
5524
- ensureInitialized(FrameContexts.sidePanel);
5525
- var streamUrl;
5526
- var streamKey;
5527
- var callback;
5528
- if (typeof param1 === 'function') {
5529
- // Legacy code, with callbacks.
5530
- _a = [param1, param2, param3], callback = _a[0], streamUrl = _a[1], streamKey = _a[2];
5531
- }
5532
- else if (typeof param1 === 'string') {
5533
- _b = [param1, param2], streamUrl = _b[0], streamKey = _b[1];
5574
+ function requestStartLiveStreaming(callback, streamUrl, streamKey) {
5575
+ if (!callback) {
5576
+ throw new Error('[request start live streaming] Callback cannot be null');
5534
5577
  }
5535
- return callCallbackWithSdkErrorFromPromiseAndReturnPromise(requestStartLiveStreamingHelper, callback, streamUrl, streamKey);
5578
+ ensureInitialized(FrameContexts.sidePanel);
5579
+ sendMessageToParent('meeting.requestStartLiveStreaming', [streamUrl, streamKey], callback);
5536
5580
  }
5537
5581
  meeting.requestStartLiveStreaming = requestStartLiveStreaming;
5538
- function requestStartLiveStreamingHelper(streamUrl, streamKey) {
5539
- return new Promise(function (resolve) {
5540
- resolve(sendAndHandleSdkError('meeting.requestStartLiveStreaming', streamUrl, streamKey));
5541
- });
5542
- }
5582
+ /**
5583
+ * @deprecated
5584
+ * As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
5585
+ *
5586
+ * Allows an app to request the live streaming be stopped at the given streaming url
5587
+ *
5588
+ * @remarks
5589
+ * Use getLiveStreamState or registerLiveStreamChangedHandler to get updates on the live stream state
5590
+ *
5591
+ * @param callback - Callback contains error parameter which can be of type SdkError in case of an error, or null when operation is successful
5592
+ */
5543
5593
  function requestStopLiveStreaming(callback) {
5594
+ if (!callback) {
5595
+ throw new Error('[request stop live streaming] Callback cannot be null');
5596
+ }
5544
5597
  ensureInitialized(FrameContexts.sidePanel);
5545
- return callCallbackWithSdkErrorFromPromiseAndReturnPromise(requestStopLiveStreamingHelper, callback);
5598
+ sendMessageToParent('meeting.requestStopLiveStreaming', callback);
5546
5599
  }
5547
5600
  meeting.requestStopLiveStreaming = requestStopLiveStreaming;
5548
- function requestStopLiveStreamingHelper() {
5549
- return new Promise(function (resolve) {
5550
- resolve(sendAndHandleSdkError('meeting.requestStopLiveStreaming'));
5551
- });
5552
- }
5553
5601
  /**
5602
+ * @deprecated
5603
+ * As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
5604
+ *
5554
5605
  * Registers a handler for changes to the live stream.
5555
5606
  *
5556
5607
  * @remarks
@@ -5567,81 +5618,90 @@ var meeting;
5567
5618
  }
5568
5619
  meeting.registerLiveStreamChangedHandler = registerLiveStreamChangedHandler;
5569
5620
  /**
5570
- * This function is the overloaded implementation of shareAppContentToStage.
5571
- * Since the method signatures of the v1 callback and v2 promise differ in the type of the first parameter,
5572
- * we need to do an extra check to know the typeof the @param1 to set the proper arguments of the utility function.
5573
- * @param param1
5574
- * @param param2
5575
- * @returns Promise resolved indicating whether or not the share was successful or rejected with SdkError value
5621
+ * @deprecated
5622
+ * As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
5623
+ *
5624
+ * Allows an app to share contents in the meeting
5625
+ *
5626
+ * @param callback - Callback contains 2 parameters, error and result.
5627
+ * error can either contain an error of type SdkError, incase of an error, or null when share is successful
5628
+ * result can either contain a true value, incase of a successful share or null when the share fails
5629
+ * @param appContentUrl - is the input URL which needs to be shared on to the stage
5576
5630
  */
5577
- function shareAppContentToStage(param1, param2) {
5578
- var _a;
5579
- ensureInitialized(FrameContexts.sidePanel, FrameContexts.meetingStage);
5580
- var appContentUrl;
5581
- var callback;
5582
- if (typeof param1 === 'function') {
5583
- // Legacy callback
5584
- _a = [param1, param2], callback = _a[0], appContentUrl = _a[1];
5585
- }
5586
- else {
5587
- appContentUrl = param1;
5631
+ function shareAppContentToStage(callback, appContentUrl) {
5632
+ if (!callback) {
5633
+ throw new Error('[share app content to stage] Callback cannot be null');
5588
5634
  }
5589
- return callCallbackWithErrorOrResultOrNullFromPromiseAndReturnPromise(shareAppContentToStageHelper, callback, appContentUrl);
5635
+ ensureInitialized(FrameContexts.sidePanel, FrameContexts.meetingStage);
5636
+ sendMessageToParent('meeting.shareAppContentToStage', [appContentUrl], callback);
5590
5637
  }
5591
5638
  meeting.shareAppContentToStage = shareAppContentToStage;
5592
5639
  /**
5593
- * @hidden
5594
- * Helper method to generate and return a promise for shareAppContentToStage
5595
- * @param appContentUrl
5596
- * @returns
5640
+ * @deprecated
5641
+ * As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
5642
+ *
5643
+ * Provides information related app's in-meeting sharing capabilities
5644
+ *
5645
+ * @param callback - Callback contains 2 parameters, error and result.
5646
+ * error can either contain an error of type SdkError (error indication), or null (non-error indication)
5647
+ * appContentStageSharingCapabilities can either contain an IAppContentStageSharingCapabilities object
5648
+ * (indication of successful retrieval), or null (indication of failed retrieval)
5597
5649
  */
5598
- function shareAppContentToStageHelper(appContentUrl) {
5599
- return new Promise(function (resolve) {
5600
- resolve(sendAndHandleSdkError('meeting.shareAppContentToStage', appContentUrl));
5601
- });
5602
- }
5603
5650
  function getAppContentStageSharingCapabilities(callback) {
5651
+ if (!callback) {
5652
+ throw new Error('[get app content stage sharing capabilities] Callback cannot be null');
5653
+ }
5604
5654
  ensureInitialized(FrameContexts.sidePanel, FrameContexts.meetingStage);
5605
- return callCallbackWithErrorOrResultOrNullFromPromiseAndReturnPromise(getAppContentStageSharingCapabilitiesHelper, callback);
5655
+ sendMessageToParent('meeting.getAppContentStageSharingCapabilities', callback);
5606
5656
  }
5607
5657
  meeting.getAppContentStageSharingCapabilities = getAppContentStageSharingCapabilities;
5608
5658
  /**
5659
+ * @deprecated
5660
+ * As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
5661
+ *
5609
5662
  * @hidden
5610
- * @returns
5663
+ * Hide from docs.
5664
+ * Terminates current stage sharing session in meeting
5665
+ *
5666
+ * @param callback - Callback contains 2 parameters, error and result.
5667
+ * error can either contain an error of type SdkError (error indication), or null (non-error indication)
5668
+ * result can either contain a true boolean value (successful termination), or null (unsuccessful fetch)
5611
5669
  */
5612
- function getAppContentStageSharingCapabilitiesHelper() {
5613
- return new Promise(function (resolve) {
5614
- resolve(sendAndHandleSdkError('meeting.getAppContentStageSharingCapabilities'));
5615
- });
5616
- }
5617
5670
  function stopSharingAppContentToStage(callback) {
5671
+ if (!callback) {
5672
+ throw new Error('[stop sharing app content to stage] Callback cannot be null');
5673
+ }
5618
5674
  ensureInitialized(FrameContexts.sidePanel, FrameContexts.meetingStage);
5619
- return callCallbackWithErrorOrResultOrNullFromPromiseAndReturnPromise(stopSharingAppContentToStageHelper, callback);
5675
+ sendMessageToParent('meeting.stopSharingAppContentToStage', callback);
5620
5676
  }
5621
5677
  meeting.stopSharingAppContentToStage = stopSharingAppContentToStage;
5622
5678
  /**
5623
- * @hidden
5624
- * @returns
5679
+ * @deprecated
5680
+ * As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
5681
+ *
5682
+ * Provides information related to current stage sharing state for app
5683
+ *
5684
+ * @param callback - Callback contains 2 parameters, error and result.
5685
+ * error can either contain an error of type SdkError (error indication), or null (non-error indication)
5686
+ * appContentStageSharingState can either contain an IAppContentStageSharingState object
5687
+ * (indication of successful retrieval), or null (indication of failed retrieval)
5625
5688
  */
5626
- function stopSharingAppContentToStageHelper() {
5627
- return new Promise(function (resolve) {
5628
- resolve(sendAndHandleSdkError('meeting.stopSharingAppContentToStage'));
5629
- });
5630
- }
5631
5689
  function getAppContentStageSharingState(callback) {
5690
+ if (!callback) {
5691
+ throw new Error('[get app content stage sharing state] Callback cannot be null');
5692
+ }
5632
5693
  ensureInitialized(FrameContexts.sidePanel, FrameContexts.meetingStage);
5633
- return callCallbackWithErrorOrResultOrNullFromPromiseAndReturnPromise(getAppContentStageSharingStateHelper, callback);
5694
+ sendMessageToParent('meeting.getAppContentStageSharingState', callback);
5634
5695
  }
5635
5696
  meeting.getAppContentStageSharingState = getAppContentStageSharingState;
5636
- function getAppContentStageSharingStateHelper() {
5637
- return new Promise(function (resolve) {
5638
- resolve(sendAndHandleSdkError('meeting.getAppContentStageSharingState'));
5639
- });
5640
- }
5641
5697
  /**
5698
+ * @deprecated
5699
+ * As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
5700
+ *
5642
5701
  * Registers a handler for changes to paticipant speaking states. If any participant is speaking, isSpeakingDetected
5643
5702
  * will be true. If no participants are speaking, isSpeakingDetected will be false. Only one handler can be registered
5644
5703
  * at a time. A subsequent registration replaces an existing registration.
5704
+ *
5645
5705
  * @param handler The handler to invoke when the speaking state of any participant changes (start/stop speaking).
5646
5706
  */
5647
5707
  function registerSpeakingStateChangeHandler(handler) {