@azure/communication-react 1.7.0-alpha-202308010015 → 1.7.0-alpha-202308030014
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/dist/communication-react.d.ts +59 -7
- package/dist/dist-cjs/communication-react/index.js +541 -391
- package/dist/dist-cjs/communication-react/index.js.map +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.d.ts +5 -0
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js +5 -0
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.js +44 -13
- package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.d.ts +13 -3
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +21 -8
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.d.ts +15 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js +5 -2
- package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.d.ts +4 -2
- package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js +2 -2
- package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/index.d.ts +3 -1
- package/dist/dist-esm/calling-component-bindings/src/index.js.map +1 -1
- package/dist/dist-esm/communication-react/src/index.d.ts +2 -1
- package/dist/dist-esm/communication-react/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ImageGallery.d.ts +92 -0
- package/dist/dist-esm/react-components/src/components/ImageGallery.js +38 -0
- package/dist/dist-esm/react-components/src/components/ImageGallery.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/index.d.ts +2 -0
- package/dist/dist-esm/react-components/src/components/index.js +2 -0
- package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/ImageGallery.style.d.ts +62 -0
- package/dist/dist-esm/react-components/src/components/styles/ImageGallery.style.js +179 -0
- package/dist/dist-esm/react-components/src/components/styles/ImageGallery.style.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +2 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +7 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +22 -8
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +6 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/createHandlers.d.ts +4 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/createHandlers.js +10 -4
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/createHandlers.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +3 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js +4 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/ScreenShare.js +3 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/ScreenShare.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.d.ts +2 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +5 -5
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +2 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.d.ts +3 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js +4 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +2 -2
- package/dist/dist-esm/react-composites/src/composites/common/icons.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/resolveVideoEffectDependency.d.ts +8 -0
- package/dist/dist-esm/react-composites/src/composites/common/resolveVideoEffectDependency.js +33 -0
- package/dist/dist-esm/react-composites/src/composites/common/resolveVideoEffectDependency.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/resolveVideoEffectDependencyLazy.d.ts +8 -0
- package/dist/dist-esm/react-composites/src/composites/common/resolveVideoEffectDependencyLazy.js +32 -0
- package/dist/dist-esm/react-composites/src/composites/common/resolveVideoEffectDependencyLazy.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/index.d.ts +2 -0
- package/dist/dist-esm/react-composites/src/composites/index.js +4 -0
- package/dist/dist-esm/react-composites/src/composites/index.js.map +1 -1
- package/package.json +8 -8
@@ -6,7 +6,6 @@ var communicationCommon = require('@azure/communication-common');
|
|
6
6
|
var reselect = require('reselect');
|
7
7
|
var communicationCalling = require('@azure/communication-calling');
|
8
8
|
var memoizeOne = require('memoize-one');
|
9
|
-
var communicationCallingEffects = require('@azure/communication-calling-effects');
|
10
9
|
var logger = require('@azure/logger');
|
11
10
|
var EventEmitter = require('events');
|
12
11
|
var produce = require('immer');
|
@@ -27,6 +26,7 @@ var reactWindowProvider = require('@fluentui/react-window-provider');
|
|
27
26
|
var copy = require('copy-to-clipboard');
|
28
27
|
var communicationChat = require('@azure/communication-chat');
|
29
28
|
var nanoid = require('nanoid');
|
29
|
+
var communicationCallingEffects = require('@azure/communication-calling-effects');
|
30
30
|
|
31
31
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
32
32
|
|
@@ -178,7 +178,7 @@ const _isValidIdentifier = (identifier) => {
|
|
178
178
|
// Copyright (c) Microsoft Corporation.
|
179
179
|
// Licensed under the MIT license.
|
180
180
|
// GENERATED FILE. DO NOT EDIT MANUALLY.
|
181
|
-
var telemetryVersion = '1.7.0-alpha-
|
181
|
+
var telemetryVersion = '1.7.0-alpha-202308030014';
|
182
182
|
|
183
183
|
// Copyright (c) Microsoft Corporation.
|
184
184
|
/**
|
@@ -340,6 +340,11 @@ const getRole = (state, props) => {
|
|
340
340
|
/* @conditional-compile-remove(rooms) */
|
341
341
|
return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.role;
|
342
342
|
};
|
343
|
+
/* @conditional-compile-remove(capabilities) */
|
344
|
+
/**
|
345
|
+
* @private
|
346
|
+
*/
|
347
|
+
const getCapabilites = (state, props) => { var _a, _b; return (_b = (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.capabilities) === null || _b === void 0 ? void 0 : _b.capabilities; };
|
343
348
|
/**
|
344
349
|
* @private
|
345
350
|
*/
|
@@ -449,7 +454,7 @@ const getSupportedSpokenLanguages = (state, props) => {
|
|
449
454
|
|
450
455
|
// Copyright (c) Microsoft Corporation.
|
451
456
|
// Licensed under the MIT license.
|
452
|
-
var __awaiter$
|
457
|
+
var __awaiter$L = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
453
458
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
454
459
|
return new (P || (P = Promise))(function (resolve, reject) {
|
455
460
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -488,7 +493,7 @@ const _isPreviewOn = (deviceManager) => {
|
|
488
493
|
*
|
489
494
|
* @private
|
490
495
|
*/
|
491
|
-
const disposeAllLocalPreviewViews = (callClient) => __awaiter$
|
496
|
+
const disposeAllLocalPreviewViews = (callClient) => __awaiter$L(void 0, void 0, void 0, function* () {
|
492
497
|
const unparentedViews = callClient.getState().deviceManager.unparentedViews;
|
493
498
|
for (const view of unparentedViews) {
|
494
499
|
yield callClient.disposeView(undefined, undefined, view);
|
@@ -543,10 +548,21 @@ const _isRingingPSTNParticipant = (participant) => {
|
|
543
548
|
*
|
544
549
|
* @public
|
545
550
|
*/
|
546
|
-
const microphoneButtonSelector = reselect__namespace.createSelector([
|
551
|
+
const microphoneButtonSelector = reselect__namespace.createSelector([
|
552
|
+
getCallExists,
|
553
|
+
getIsMuted,
|
554
|
+
getDeviceManager$1,
|
555
|
+
/* @conditional-compile-remove(capabilities) */ getCapabilites,
|
556
|
+
/* @conditional-compile-remove(capabilities) */ getRole
|
557
|
+
], (callExists, isMuted, deviceManager,
|
558
|
+
/* @conditional-compile-remove(capabilities) */ capabilities,
|
559
|
+
/* @conditional-compile-remove(capabilities) */ role) => {
|
547
560
|
const permission = deviceManager.deviceAccess ? deviceManager.deviceAccess.audio : true;
|
561
|
+
/* @conditional-compile-remove(capabilities) */
|
562
|
+
const incapable = ((capabilities === null || capabilities === void 0 ? void 0 : capabilities.muteUnmuteMic.isPresent) === false && (capabilities === null || capabilities === void 0 ? void 0 : capabilities.muteUnmuteMic.reason) !== 'NotInitialized') ||
|
563
|
+
role === 'Consumer';
|
548
564
|
return {
|
549
|
-
disabled: !callExists || !permission || /* @conditional-compile-remove(
|
565
|
+
disabled: !callExists || !permission || /* @conditional-compile-remove(capabilities) */ incapable,
|
550
566
|
checked: callExists ? !isMuted : false,
|
551
567
|
microphones: deviceManager.microphones,
|
552
568
|
speakers: deviceManager.speakers,
|
@@ -559,15 +575,28 @@ const microphoneButtonSelector = reselect__namespace.createSelector([getCallExis
|
|
559
575
|
*
|
560
576
|
* @public
|
561
577
|
*/
|
562
|
-
const cameraButtonSelector = reselect__namespace.createSelector([
|
578
|
+
const cameraButtonSelector = reselect__namespace.createSelector([
|
579
|
+
getLocalVideoStreams$1,
|
580
|
+
getDeviceManager$1,
|
581
|
+
/* @conditional-compile-remove(capabilities) */ getCapabilites,
|
582
|
+
/* @conditional-compile-remove(capabilities) */ getRole
|
583
|
+
], (localVideoStreams, deviceManager,
|
584
|
+
/* @conditional-compile-remove(capabilities) */ capabilities,
|
585
|
+
/* @conditional-compile-remove(capabilities) */ role) => {
|
563
586
|
const previewOn = _isPreviewOn(deviceManager);
|
564
587
|
const localVideoFromCall = localVideoStreams === null || localVideoStreams === void 0 ? void 0 : localVideoStreams.find((stream) => stream.mediaStreamType === 'Video');
|
565
588
|
const permission = deviceManager.deviceAccess ? deviceManager.deviceAccess.video : true;
|
589
|
+
/* @conditional-compile-remove(capabilities) */
|
590
|
+
const incapable = ((capabilities === null || capabilities === void 0 ? void 0 : capabilities.turnVideoOnOff.isPresent) === false &&
|
591
|
+
(capabilities === null || capabilities === void 0 ? void 0 : capabilities.turnVideoOnOff.reason) !== 'NotInitialized' &&
|
592
|
+
/* TODO: Remove this when Calling SDK fixes bug that sets capabilities.turnVideoOnOff to be MeetingRestricted by default */
|
593
|
+
(capabilities === null || capabilities === void 0 ? void 0 : capabilities.turnVideoOnOff.reason) !== 'MeetingRestricted') ||
|
594
|
+
role === 'Consumer';
|
566
595
|
return {
|
567
596
|
disabled: !deviceManager.selectedCamera ||
|
568
597
|
!permission ||
|
569
598
|
!deviceManager.cameras.length ||
|
570
|
-
/* @conditional-compile-remove(
|
599
|
+
/* @conditional-compile-remove(capabilities) */ incapable,
|
571
600
|
checked: localVideoStreams !== undefined && localVideoStreams.length > 0 ? !!localVideoFromCall : previewOn,
|
572
601
|
cameras: deviceManager.cameras,
|
573
602
|
selectedCamera: deviceManager.selectedCamera
|
@@ -581,17 +610,24 @@ const cameraButtonSelector = reselect__namespace.createSelector([getLocalVideoSt
|
|
581
610
|
const screenShareButtonSelector = reselect__namespace.createSelector([
|
582
611
|
getIsScreenSharingOn,
|
583
612
|
/* @conditional-compile-remove(PSTN-calls) */ getCallState,
|
584
|
-
/* @conditional-compile-remove(
|
613
|
+
/* @conditional-compile-remove(capabilities) */ getCapabilites,
|
614
|
+
/* @conditional-compile-remove(capabilities) */ getRole
|
585
615
|
], (isScreenSharingOn,
|
586
616
|
/* @conditional-compile-remove(PSTN-calls) */ callState,
|
587
|
-
/* @conditional-compile-remove(
|
588
|
-
|
617
|
+
/* @conditional-compile-remove(capabilities) */ capabilities,
|
618
|
+
/* @conditional-compile-remove(capabilities) */ role) => {
|
619
|
+
let disabled = undefined;
|
620
|
+
/* @conditional-compile-remove(capabilities) */
|
621
|
+
disabled =
|
622
|
+
disabled ||
|
623
|
+
((capabilities === null || capabilities === void 0 ? void 0 : capabilities.shareScreen.isPresent) === false && (capabilities === null || capabilities === void 0 ? void 0 : capabilities.shareScreen.reason) !== 'NotInitialized') ||
|
624
|
+
role === 'Consumer' ||
|
625
|
+
role === 'Attendee';
|
626
|
+
/* @conditional-compile-remove(PSTN-calls) */
|
627
|
+
disabled = disabled || ['InLobby', 'Connecting'].includes(callState);
|
589
628
|
return {
|
590
629
|
checked: isScreenSharingOn,
|
591
|
-
|
592
|
-
disabled: (callState === 'InLobby' ? true : (_a = callState === 'Connecting') !== null && _a !== void 0 ? _a : false) ||
|
593
|
-
/* @conditional-compile-remove(rooms) */ role === 'Consumer' ||
|
594
|
-
/* @conditional-compile-remove(rooms) */ role === 'Attendee'
|
630
|
+
disabled
|
595
631
|
};
|
596
632
|
});
|
597
633
|
/**
|
@@ -625,7 +661,7 @@ const holdButtonSelector = reselect__namespace.createSelector([getCallState], (c
|
|
625
661
|
|
626
662
|
// Copyright (c) Microsoft Corporation.
|
627
663
|
// Licensed under the MIT license.
|
628
|
-
var __awaiter$
|
664
|
+
var __awaiter$K = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
629
665
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
630
666
|
return new (P || (P = Promise))(function (resolve, reject) {
|
631
667
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -645,8 +681,8 @@ const areStreamsEqual = (prevStream, newStream) => {
|
|
645
681
|
*
|
646
682
|
* @private
|
647
683
|
*/
|
648
|
-
const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callClient, deviceManager, call) => {
|
649
|
-
const onStartLocalVideo = () => __awaiter$
|
684
|
+
const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callClient, deviceManager, call, options) => {
|
685
|
+
const onStartLocalVideo = () => __awaiter$K(void 0, void 0, void 0, function* () {
|
650
686
|
// Before the call object creates a stream, dispose of any local preview streams.
|
651
687
|
// @TODO: is there any way to parent the unparented view to the call object instead
|
652
688
|
// of disposing and creating a new stream?
|
@@ -666,7 +702,7 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
666
702
|
yield call.startVideo(stream);
|
667
703
|
}
|
668
704
|
});
|
669
|
-
const onStopLocalVideo = (stream) => __awaiter$
|
705
|
+
const onStopLocalVideo = (stream) => __awaiter$K(void 0, void 0, void 0, function* () {
|
670
706
|
const callId = call === null || call === void 0 ? void 0 : call.id;
|
671
707
|
if (!callId) {
|
672
708
|
return;
|
@@ -675,7 +711,7 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
675
711
|
yield call.stopVideo(stream);
|
676
712
|
}
|
677
713
|
});
|
678
|
-
const onToggleCamera = (options) => __awaiter$
|
714
|
+
const onToggleCamera = (options) => __awaiter$K(void 0, void 0, void 0, function* () {
|
679
715
|
const previewOn = _isPreviewOn(callClient.getState().deviceManager);
|
680
716
|
if (previewOn && call && call.state === 'Connecting') {
|
681
717
|
// This is to workaround: https://skype.visualstudio.com/SPOOL/_workitems/edit/3030558.
|
@@ -723,19 +759,19 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
723
759
|
}
|
724
760
|
}
|
725
761
|
});
|
726
|
-
const onSelectMicrophone = (device) => __awaiter$
|
762
|
+
const onSelectMicrophone = (device) => __awaiter$K(void 0, void 0, void 0, function* () {
|
727
763
|
if (!deviceManager) {
|
728
764
|
return;
|
729
765
|
}
|
730
766
|
return deviceManager.selectMicrophone(device);
|
731
767
|
});
|
732
|
-
const onSelectSpeaker = (device) => __awaiter$
|
768
|
+
const onSelectSpeaker = (device) => __awaiter$K(void 0, void 0, void 0, function* () {
|
733
769
|
if (!deviceManager) {
|
734
770
|
return;
|
735
771
|
}
|
736
772
|
return deviceManager.selectSpeaker(device);
|
737
773
|
});
|
738
|
-
const onSelectCamera = (device, options) => __awaiter$
|
774
|
+
const onSelectCamera = (device, options) => __awaiter$K(void 0, void 0, void 0, function* () {
|
739
775
|
if (!deviceManager) {
|
740
776
|
return;
|
741
777
|
}
|
@@ -758,19 +794,19 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
758
794
|
}, options);
|
759
795
|
}
|
760
796
|
});
|
761
|
-
const onToggleMicrophone = () => __awaiter$
|
797
|
+
const onToggleMicrophone = () => __awaiter$K(void 0, void 0, void 0, function* () {
|
762
798
|
if (!call || !_isInCall(call.state)) {
|
763
799
|
throw new Error(`Please invoke onToggleMicrophone after call is started`);
|
764
800
|
}
|
765
801
|
return call.isMuted ? yield call.unmute() : yield call.mute();
|
766
802
|
});
|
767
|
-
const onStartScreenShare = () => __awaiter$
|
768
|
-
const onStopScreenShare = () => __awaiter$
|
769
|
-
const onToggleScreenShare = () => __awaiter$
|
770
|
-
const onHangUp = (forEveryone) => __awaiter$
|
803
|
+
const onStartScreenShare = () => __awaiter$K(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.startScreenSharing()); });
|
804
|
+
const onStopScreenShare = () => __awaiter$K(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.stopScreenSharing()); });
|
805
|
+
const onToggleScreenShare = () => __awaiter$K(void 0, void 0, void 0, function* () { return (call === null || call === void 0 ? void 0 : call.isScreenSharingOn) ? yield onStopScreenShare() : yield onStartScreenShare(); });
|
806
|
+
const onHangUp = (forEveryone) => __awaiter$K(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.hangUp({ forEveryone: forEveryone === true ? true : false })); });
|
771
807
|
/* @conditional-compile-remove(PSTN-calls) */
|
772
|
-
const onToggleHold = () => __awaiter$
|
773
|
-
const onCreateLocalStreamView = (options = { scalingMode: 'Crop', isMirrored: true }) => __awaiter$
|
808
|
+
const onToggleHold = () => __awaiter$K(void 0, void 0, void 0, function* () { return (call === null || call === void 0 ? void 0 : call.state) === 'LocalHold' ? yield (call === null || call === void 0 ? void 0 : call.resume()) : yield (call === null || call === void 0 ? void 0 : call.hold()); });
|
809
|
+
const onCreateLocalStreamView = (options = { scalingMode: 'Crop', isMirrored: true }) => __awaiter$K(void 0, void 0, void 0, function* () {
|
774
810
|
var _a;
|
775
811
|
if (!call || call.localVideoStreams.length === 0) {
|
776
812
|
return;
|
@@ -786,7 +822,7 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
786
822
|
const { view } = (_a = (yield callClient.createView(call.id, undefined, localStream, options))) !== null && _a !== void 0 ? _a : {};
|
787
823
|
return view ? { view } : undefined;
|
788
824
|
});
|
789
|
-
const onCreateRemoteStreamView = (userId, options = { scalingMode: 'Crop' }) => __awaiter$
|
825
|
+
const onCreateRemoteStreamView = (userId, options = { scalingMode: 'Crop' }) => __awaiter$K(void 0, void 0, void 0, function* () {
|
790
826
|
if (!call) {
|
791
827
|
return;
|
792
828
|
}
|
@@ -817,7 +853,7 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
817
853
|
}
|
818
854
|
return (createViewResult === null || createViewResult === void 0 ? void 0 : createViewResult.view) ? { view: createViewResult === null || createViewResult === void 0 ? void 0 : createViewResult.view } : undefined;
|
819
855
|
});
|
820
|
-
const onDisposeRemoteStreamView = (userId) => __awaiter$
|
856
|
+
const onDisposeRemoteStreamView = (userId) => __awaiter$K(void 0, void 0, void 0, function* () {
|
821
857
|
if (!call) {
|
822
858
|
return;
|
823
859
|
}
|
@@ -838,7 +874,7 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
838
874
|
callClient.disposeView(call.id, participant.identifier, screenShareStream);
|
839
875
|
}
|
840
876
|
});
|
841
|
-
const onDisposeRemoteVideoStreamView = (userId) => __awaiter$
|
877
|
+
const onDisposeRemoteVideoStreamView = (userId) => __awaiter$K(void 0, void 0, void 0, function* () {
|
842
878
|
if (!call) {
|
843
879
|
return;
|
844
880
|
}
|
@@ -855,7 +891,7 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
855
891
|
callClient.disposeView(call.id, participant.identifier, remoteVideoStream);
|
856
892
|
}
|
857
893
|
});
|
858
|
-
const onDisposeRemoteScreenShareStreamView = (userId) => __awaiter$
|
894
|
+
const onDisposeRemoteScreenShareStreamView = (userId) => __awaiter$K(void 0, void 0, void 0, function* () {
|
859
895
|
if (!call) {
|
860
896
|
return;
|
861
897
|
}
|
@@ -872,7 +908,7 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
872
908
|
callClient.disposeView(call.id, participant.identifier, screenShareStream);
|
873
909
|
}
|
874
910
|
});
|
875
|
-
const onDisposeLocalStreamView = () => __awaiter$
|
911
|
+
const onDisposeLocalStreamView = () => __awaiter$K(void 0, void 0, void 0, function* () {
|
876
912
|
// If the user is currently in a call, dispose of the local stream view attached to that call.
|
877
913
|
const callState = call && callClient.getState().calls[call.id];
|
878
914
|
const localStream = callState === null || callState === void 0 ? void 0 : callState.localVideoStreams.find((item) => item.mediaStreamType === 'Video');
|
@@ -885,56 +921,71 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
885
921
|
yield disposeAllLocalPreviewViews(callClient);
|
886
922
|
});
|
887
923
|
/* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */
|
888
|
-
const onSendDtmfTone = (dtmfTone) => __awaiter$
|
924
|
+
const onSendDtmfTone = (dtmfTone) => __awaiter$K(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.sendDtmf(dtmfTone)); });
|
889
925
|
const notImplemented = () => {
|
890
926
|
throw new Error('Not implemented, cannot call a method from an abstract object');
|
891
927
|
};
|
892
928
|
/* @conditional-compile-remove(call-readiness) */
|
893
|
-
const askDevicePermission = (constrain) => __awaiter$
|
929
|
+
const askDevicePermission = (constrain) => __awaiter$K(void 0, void 0, void 0, function* () {
|
894
930
|
if (deviceManager) {
|
895
931
|
yield (deviceManager === null || deviceManager === void 0 ? void 0 : deviceManager.askDevicePermission(constrain));
|
896
932
|
}
|
897
933
|
});
|
898
934
|
/* @conditional-compile-remove(video-background-effects) */
|
899
|
-
const onRemoveVideoBackgroundEffects = () => __awaiter$
|
935
|
+
const onRemoveVideoBackgroundEffects = () => __awaiter$K(void 0, void 0, void 0, function* () {
|
900
936
|
const stream = (call === null || call === void 0 ? void 0 : call.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video')) ||
|
901
937
|
(deviceManager === null || deviceManager === void 0 ? void 0 : deviceManager.getUnparentedVideoStreams().find((stream) => stream.mediaStreamType === 'Video'));
|
902
938
|
if (stream) {
|
903
|
-
|
939
|
+
if (!(options === null || options === void 0 ? void 0 : options.onResolveVideoBackgroundEffectsDependency)) {
|
940
|
+
throw new Error(`Video background effects dependency not resolved`);
|
941
|
+
}
|
942
|
+
else {
|
943
|
+
return stream.feature(communicationCalling.Features.VideoEffects).stopEffects();
|
944
|
+
}
|
904
945
|
}
|
905
946
|
});
|
906
947
|
/* @conditional-compile-remove(video-background-effects) */
|
907
|
-
const onBlurVideoBackground = (backgroundBlurConfig) => __awaiter$
|
948
|
+
const onBlurVideoBackground = (backgroundBlurConfig) => __awaiter$K(void 0, void 0, void 0, function* () {
|
949
|
+
var _b;
|
908
950
|
const stream = (call === null || call === void 0 ? void 0 : call.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video')) ||
|
909
951
|
(deviceManager === null || deviceManager === void 0 ? void 0 : deviceManager.getUnparentedVideoStreams().find((stream) => stream.mediaStreamType === 'Video'));
|
910
952
|
if (stream) {
|
911
|
-
|
953
|
+
if (!(options === null || options === void 0 ? void 0 : options.onResolveVideoBackgroundEffectsDependency)) {
|
954
|
+
throw new Error(`Video background effects dependency not resolved`);
|
955
|
+
}
|
956
|
+
const createEffect = (options === null || options === void 0 ? void 0 : options.onResolveVideoBackgroundEffectsDependency) &&
|
957
|
+
((_b = (yield options.onResolveVideoBackgroundEffectsDependency())) === null || _b === void 0 ? void 0 : _b.createBackgroundBlurEffect);
|
958
|
+
return createEffect && stream.feature(communicationCalling.Features.VideoEffects).startEffects(createEffect(backgroundBlurConfig));
|
912
959
|
}
|
913
960
|
});
|
914
961
|
/* @conditional-compile-remove(video-background-effects) */
|
915
|
-
const onReplaceVideoBackground = (backgroundReplacementConfig) => __awaiter$
|
962
|
+
const onReplaceVideoBackground = (backgroundReplacementConfig) => __awaiter$K(void 0, void 0, void 0, function* () {
|
963
|
+
var _c;
|
916
964
|
const stream = (call === null || call === void 0 ? void 0 : call.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video')) ||
|
917
965
|
(deviceManager === null || deviceManager === void 0 ? void 0 : deviceManager.getUnparentedVideoStreams().find((stream) => stream.mediaStreamType === 'Video'));
|
918
966
|
if (stream) {
|
919
|
-
|
920
|
-
|
921
|
-
|
967
|
+
if (!(options === null || options === void 0 ? void 0 : options.onResolveVideoBackgroundEffectsDependency)) {
|
968
|
+
throw new Error(`Video background effects dependency not resolved`);
|
969
|
+
}
|
970
|
+
const createEffect = (options === null || options === void 0 ? void 0 : options.onResolveVideoBackgroundEffectsDependency) &&
|
971
|
+
((_c = (yield options.onResolveVideoBackgroundEffectsDependency())) === null || _c === void 0 ? void 0 : _c.createBackgroundReplacementEffect);
|
972
|
+
return (createEffect && stream.feature(communicationCalling.Features.VideoEffects).startEffects(createEffect(backgroundReplacementConfig)));
|
922
973
|
}
|
923
974
|
});
|
924
975
|
/* @conditional-compile-remove(close-captions) */
|
925
|
-
const onStartCaptions = (options) => __awaiter$
|
976
|
+
const onStartCaptions = (options) => __awaiter$K(void 0, void 0, void 0, function* () {
|
926
977
|
yield (call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.TeamsCaptions).startCaptions(options));
|
927
978
|
});
|
928
979
|
/* @conditional-compile-remove(close-captions) */
|
929
|
-
const onStopCaptions = () => __awaiter$
|
980
|
+
const onStopCaptions = () => __awaiter$K(void 0, void 0, void 0, function* () {
|
930
981
|
yield (call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.TeamsCaptions).stopCaptions());
|
931
982
|
});
|
932
983
|
/* @conditional-compile-remove(close-captions) */
|
933
|
-
const onSetSpokenLanguage = (language) => __awaiter$
|
984
|
+
const onSetSpokenLanguage = (language) => __awaiter$K(void 0, void 0, void 0, function* () {
|
934
985
|
yield (call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.TeamsCaptions).setSpokenLanguage(language));
|
935
986
|
});
|
936
987
|
/* @conditional-compile-remove(close-captions) */
|
937
|
-
const onSetCaptionLanguage = (language) => __awaiter$
|
988
|
+
const onSetCaptionLanguage = (language) => __awaiter$K(void 0, void 0, void 0, function* () {
|
938
989
|
yield (call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.TeamsCaptions).setCaptionLanguage(language));
|
939
990
|
});
|
940
991
|
return {
|
@@ -982,7 +1033,7 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
982
1033
|
|
983
1034
|
// Copyright (c) Microsoft Corporation.
|
984
1035
|
// Licensed under the MIT license.
|
985
|
-
var __awaiter$
|
1036
|
+
var __awaiter$J = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
986
1037
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
987
1038
|
return new (P || (P = Promise))(function (resolve, reject) {
|
988
1039
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -999,15 +1050,18 @@ var __awaiter$H = (window && window.__awaiter) || function (thisArg, _arguments,
|
|
999
1050
|
*
|
1000
1051
|
* @public
|
1001
1052
|
*/
|
1002
|
-
const createDefaultCallingHandlers = memoizeOne__default['default']((
|
1003
|
-
|
1053
|
+
const createDefaultCallingHandlers = memoizeOne__default['default']((...args) => {
|
1054
|
+
const [callClient, callAgent, deviceManager, call,
|
1055
|
+
/* @conditional-compile-remove(video-background-effects) */ options] = args;
|
1056
|
+
return Object.assign(Object.assign({}, createDefaultCommonCallingHandlers(callClient, deviceManager, call,
|
1057
|
+
/* @conditional-compile-remove(video-background-effects) */ options)), {
|
1004
1058
|
// FIXME: onStartCall API should use string, not the underlying SDK types.
|
1005
1059
|
onStartCall: (participants, options) => {
|
1006
1060
|
/* @conditional-compile-remove(teams-adhoc-call) */
|
1007
1061
|
return callAgent === null || callAgent === void 0 ? void 0 : callAgent.startCall(participants, options);
|
1008
1062
|
},
|
1009
1063
|
/* @conditional-compile-remove(PSTN-calls) */
|
1010
|
-
onAddParticipant: (userId, options) => __awaiter$
|
1064
|
+
onAddParticipant: (userId, options) => __awaiter$J(void 0, void 0, void 0, function* () {
|
1011
1065
|
const participant = _toCommunicationIdentifier(userId);
|
1012
1066
|
if (communicationCommon.isPhoneNumberIdentifier(participant)) {
|
1013
1067
|
call === null || call === void 0 ? void 0 : call.addParticipant(participant, options);
|
@@ -1015,7 +1069,7 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
|
|
1015
1069
|
else if (communicationCommon.isCommunicationUserIdentifier(participant) || communicationCommon.isMicrosoftTeamsUserIdentifier(participant)) {
|
1016
1070
|
call === null || call === void 0 ? void 0 : call.addParticipant(participant);
|
1017
1071
|
}
|
1018
|
-
}), onRemoveParticipant: (userId) => __awaiter$
|
1072
|
+
}), onRemoveParticipant: (userId) => __awaiter$J(void 0, void 0, void 0, function* () {
|
1019
1073
|
const participant = _toCommunicationIdentifier(userId);
|
1020
1074
|
yield (call === null || call === void 0 ? void 0 : call.removeParticipant(participant));
|
1021
1075
|
}) });
|
@@ -1023,7 +1077,7 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
|
|
1023
1077
|
|
1024
1078
|
// Copyright (c) Microsoft Corporation.
|
1025
1079
|
// Licensed under the MIT license.
|
1026
|
-
var __awaiter$
|
1080
|
+
var __awaiter$I = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
1027
1081
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
1028
1082
|
return new (P || (P = Promise))(function (resolve, reject) {
|
1029
1083
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -1040,8 +1094,8 @@ var __awaiter$G = (window && window.__awaiter) || function (thisArg, _arguments,
|
|
1040
1094
|
*
|
1041
1095
|
* @beta
|
1042
1096
|
*/
|
1043
|
-
const createDefaultTeamsCallingHandlers = memoizeOne__default['default']((callClient, callAgent, deviceManager, call) => {
|
1044
|
-
return Object.assign(Object.assign({}, createDefaultCommonCallingHandlers(callClient, deviceManager, call)), { onStartCall: (participants, options) => {
|
1097
|
+
const createDefaultTeamsCallingHandlers = memoizeOne__default['default']((callClient, callAgent, deviceManager, call, options) => {
|
1098
|
+
return Object.assign(Object.assign({}, createDefaultCommonCallingHandlers(callClient, deviceManager, call, options)), { onStartCall: (participants, options) => {
|
1045
1099
|
/* @conditional-compile-remove(teams-identity-support) */
|
1046
1100
|
const threadId = options === null || options === void 0 ? void 0 : options.threadId;
|
1047
1101
|
if (!isTeamsCallParticipants(participants)) {
|
@@ -1055,7 +1109,7 @@ const createDefaultTeamsCallingHandlers = memoizeOne__default['default']((callCl
|
|
1055
1109
|
},
|
1056
1110
|
/* @conditional-compile-remove(teams-identity-support) */
|
1057
1111
|
/* @conditional-compile-remove(PSTN-calls) */
|
1058
|
-
onAddParticipant: (userId, options) => __awaiter$
|
1112
|
+
onAddParticipant: (userId, options) => __awaiter$I(void 0, void 0, void 0, function* () {
|
1059
1113
|
const participant = _toCommunicationIdentifier(userId);
|
1060
1114
|
/* @conditional-compile-remove(teams-identity-support) */
|
1061
1115
|
const threadId = options === null || options === void 0 ? void 0 : options.threadId;
|
@@ -1072,7 +1126,7 @@ const createDefaultTeamsCallingHandlers = memoizeOne__default['default']((callCl
|
|
1072
1126
|
}
|
1073
1127
|
/* @conditional-compile-remove(teams-identity-support) */
|
1074
1128
|
call === null || call === void 0 ? void 0 : call.addParticipant(participant);
|
1075
|
-
}), onRemoveParticipant: (userId) => __awaiter$
|
1129
|
+
}), onRemoveParticipant: (userId) => __awaiter$I(void 0, void 0, void 0, function* () {
|
1076
1130
|
const participant = _toCommunicationIdentifier(userId);
|
1077
1131
|
if (communicationCommon.isCommunicationUserIdentifier(participant)) {
|
1078
1132
|
throw new Error('CommunicationIdentifier in Teams call is not supported!');
|
@@ -1154,7 +1208,7 @@ const getCaptionsSpeakerIdentifier = (captions) => {
|
|
1154
1208
|
|
1155
1209
|
// Copyright (c) Microsoft Corporation.
|
1156
1210
|
// Licensed under the MIT license.
|
1157
|
-
var __awaiter$
|
1211
|
+
var __awaiter$H = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
1158
1212
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
1159
1213
|
return new (P || (P = Promise))(function (resolve, reject) {
|
1160
1214
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -1203,13 +1257,13 @@ class ProxyDeviceManager {
|
|
1203
1257
|
this.selectCamera = (videoDeviceInfo) => {
|
1204
1258
|
this._context.setDeviceManagerSelectedCamera(videoDeviceInfo);
|
1205
1259
|
};
|
1206
|
-
this.videoDevicesUpdated = () => __awaiter$
|
1260
|
+
this.videoDevicesUpdated = () => __awaiter$H(this, void 0, void 0, function* () {
|
1207
1261
|
// Device Manager always has a camera with '' name if there are no real camera devices available.
|
1208
1262
|
// We don't want to show that in the UI.
|
1209
1263
|
const realCameras = (yield this._deviceManager.getCameras()).filter((c) => !!c.name);
|
1210
1264
|
this._context.setDeviceManagerCameras(dedupeById(realCameras));
|
1211
1265
|
});
|
1212
|
-
this.audioDevicesUpdated = () => __awaiter$
|
1266
|
+
this.audioDevicesUpdated = () => __awaiter$H(this, void 0, void 0, function* () {
|
1213
1267
|
this._context.setDeviceManagerMicrophones(dedupeById(yield this._deviceManager.getMicrophones()));
|
1214
1268
|
this._context.setDeviceManagerSpeakers(dedupeById(yield this._deviceManager.getSpeakers()));
|
1215
1269
|
});
|
@@ -1597,7 +1651,7 @@ function convertFromSDKToDeclarativeVideoStreamVideoEffects(videoEffects) {
|
|
1597
1651
|
|
1598
1652
|
// Copyright (c) Microsoft Corporation.
|
1599
1653
|
// Licensed under the MIT license.
|
1600
|
-
var __awaiter$
|
1654
|
+
var __awaiter$G = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
1601
1655
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
1602
1656
|
return new (P || (P = Promise))(function (resolve, reject) {
|
1603
1657
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -2316,7 +2370,7 @@ class CallContext$2 {
|
|
2316
2370
|
* @throws CallError. Exceptions thrown from `f` are tagged with the failed `target.
|
2317
2371
|
*/
|
2318
2372
|
withAsyncErrorTeedToState(action, target) {
|
2319
|
-
return (...args) => __awaiter$
|
2373
|
+
return (...args) => __awaiter$G(this, void 0, void 0, function* () {
|
2320
2374
|
try {
|
2321
2375
|
return yield action(...args);
|
2322
2376
|
}
|
@@ -2736,7 +2790,7 @@ function _logStreamEvent(eventName, streamLogInfo, error) {
|
|
2736
2790
|
|
2737
2791
|
// Copyright (c) Microsoft Corporation.
|
2738
2792
|
// Licensed under the MIT license.
|
2739
|
-
var __awaiter$
|
2793
|
+
var __awaiter$F = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
2740
2794
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
2741
2795
|
return new (P || (P = Promise))(function (resolve, reject) {
|
2742
2796
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -2746,7 +2800,7 @@ var __awaiter$D = (window && window.__awaiter) || function (thisArg, _arguments,
|
|
2746
2800
|
});
|
2747
2801
|
};
|
2748
2802
|
function createViewVideo(context, internalContext, callId, stream, participantId, options) {
|
2749
|
-
return __awaiter$
|
2803
|
+
return __awaiter$F(this, void 0, void 0, function* () {
|
2750
2804
|
// we can only have 3 types of createView
|
2751
2805
|
let streamEventType;
|
2752
2806
|
// we will reuse these for local as well but we need to make sure the remote stream is passed in like before.
|
@@ -2868,7 +2922,7 @@ function createViewVideo(context, internalContext, callId, stream, participantId
|
|
2868
2922
|
});
|
2869
2923
|
}
|
2870
2924
|
function createViewUnparentedVideo(context, internalContext, stream, options) {
|
2871
|
-
return __awaiter$
|
2925
|
+
return __awaiter$F(this, void 0, void 0, function* () {
|
2872
2926
|
const renderInfo = internalContext.getUnparentedRenderInfo(stream);
|
2873
2927
|
if (renderInfo && renderInfo.status === 'Rendered') {
|
2874
2928
|
console.warn('Unparented LocalVideoStream is already rendered');
|
@@ -3036,7 +3090,7 @@ function createView(context, internalContext, callId, participantId, stream, opt
|
|
3036
3090
|
// Render LocalVideoStream that is not part of a Call
|
3037
3091
|
// Because it is not part of the call we don't tee errors to state naturally (e.g. via a Call Client function such as startVideo).
|
3038
3092
|
// We do not have a startLocalPreviewVideo function, so as a workaround we ensure any errors are propagated here.
|
3039
|
-
return context.withAsyncErrorTeedToState(() => __awaiter$
|
3093
|
+
return context.withAsyncErrorTeedToState(() => __awaiter$F(this, void 0, void 0, function* () { return yield createViewUnparentedVideo(context, internalContext, stream, options); }), 'Call.startVideo')();
|
3040
3094
|
}
|
3041
3095
|
else {
|
3042
3096
|
_logStreamEvent(EventNames.CREATE_STREAM_INVALID_PARAMS, { streamType });
|
@@ -3584,7 +3638,7 @@ class CallSubscriber {
|
|
3584
3638
|
|
3585
3639
|
// Copyright (c) Microsoft Corporation.
|
3586
3640
|
// Licensed under the MIT license.
|
3587
|
-
var __awaiter$
|
3641
|
+
var __awaiter$E = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3588
3642
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3589
3643
|
return new (P || (P = Promise))(function (resolve, reject) {
|
3590
3644
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -3604,14 +3658,14 @@ class ProxyIncomingCall {
|
|
3604
3658
|
switch (prop) {
|
3605
3659
|
case 'accept': {
|
3606
3660
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3607
|
-
return __awaiter$
|
3661
|
+
return __awaiter$E(this, void 0, void 0, function* () {
|
3608
3662
|
return yield target.accept(...args);
|
3609
3663
|
});
|
3610
3664
|
}, 'IncomingCall.accept');
|
3611
3665
|
}
|
3612
3666
|
case 'reject': {
|
3613
3667
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3614
|
-
return __awaiter$
|
3668
|
+
return __awaiter$E(this, void 0, void 0, function* () {
|
3615
3669
|
return yield target.reject(...args);
|
3616
3670
|
});
|
3617
3671
|
}, 'IncomingCall.reject');
|
@@ -3852,7 +3906,7 @@ const clearCallRelatedState = (context, internalContext) => {
|
|
3852
3906
|
|
3853
3907
|
// Copyright (c) Microsoft Corporation.
|
3854
3908
|
// Licensed under the MIT license.
|
3855
|
-
var __awaiter$
|
3909
|
+
var __awaiter$D = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3856
3910
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3857
3911
|
return new (P || (P = Promise))(function (resolve, reject) {
|
3858
3912
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -3878,56 +3932,56 @@ class ProxyCallCommon {
|
|
3878
3932
|
switch (prop) {
|
3879
3933
|
case 'mute': {
|
3880
3934
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3881
|
-
return __awaiter$
|
3935
|
+
return __awaiter$D(this, void 0, void 0, function* () {
|
3882
3936
|
return yield target.mute(...args);
|
3883
3937
|
});
|
3884
3938
|
}, 'Call.mute');
|
3885
3939
|
}
|
3886
3940
|
case 'unmute': {
|
3887
3941
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3888
|
-
return __awaiter$
|
3942
|
+
return __awaiter$D(this, void 0, void 0, function* () {
|
3889
3943
|
return yield target.unmute(...args);
|
3890
3944
|
});
|
3891
3945
|
}, 'Call.unmute');
|
3892
3946
|
}
|
3893
3947
|
case 'startVideo': {
|
3894
3948
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3895
|
-
return __awaiter$
|
3949
|
+
return __awaiter$D(this, void 0, void 0, function* () {
|
3896
3950
|
return yield target.startVideo(...args);
|
3897
3951
|
});
|
3898
3952
|
}, 'Call.startVideo');
|
3899
3953
|
}
|
3900
3954
|
case 'stopVideo': {
|
3901
3955
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3902
|
-
return __awaiter$
|
3956
|
+
return __awaiter$D(this, void 0, void 0, function* () {
|
3903
3957
|
return yield target.stopVideo(...args);
|
3904
3958
|
});
|
3905
3959
|
}, 'Call.stopVideo');
|
3906
3960
|
}
|
3907
3961
|
case 'startScreenSharing': {
|
3908
3962
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3909
|
-
return __awaiter$
|
3963
|
+
return __awaiter$D(this, void 0, void 0, function* () {
|
3910
3964
|
return yield target.startScreenSharing(...args);
|
3911
3965
|
});
|
3912
3966
|
}, 'Call.startScreenSharing');
|
3913
3967
|
}
|
3914
3968
|
case 'stopScreenSharing': {
|
3915
3969
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3916
|
-
return __awaiter$
|
3970
|
+
return __awaiter$D(this, void 0, void 0, function* () {
|
3917
3971
|
return yield target.stopScreenSharing(...args);
|
3918
3972
|
});
|
3919
3973
|
}, 'Call.stopScreenSharing');
|
3920
3974
|
}
|
3921
3975
|
case 'hold': {
|
3922
3976
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3923
|
-
return __awaiter$
|
3977
|
+
return __awaiter$D(this, void 0, void 0, function* () {
|
3924
3978
|
return yield target.hold(...args);
|
3925
3979
|
});
|
3926
3980
|
}, 'Call.hold');
|
3927
3981
|
}
|
3928
3982
|
case 'resume': {
|
3929
3983
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3930
|
-
return __awaiter$
|
3984
|
+
return __awaiter$D(this, void 0, void 0, function* () {
|
3931
3985
|
return yield target.resume(...args);
|
3932
3986
|
});
|
3933
3987
|
}, 'Call.resume');
|
@@ -3967,7 +4021,7 @@ class ProxyTeamsCaptionsFeature {
|
|
3967
4021
|
get(target, prop) {
|
3968
4022
|
switch (prop) {
|
3969
4023
|
case 'startCaptions':
|
3970
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
4024
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$D(this, void 0, void 0, function* () {
|
3971
4025
|
var _a, _b;
|
3972
4026
|
this._context.setStartCaptionsInProgress(this._call.id, true);
|
3973
4027
|
const ret = yield target.startCaptions(...args);
|
@@ -3975,20 +4029,20 @@ class ProxyTeamsCaptionsFeature {
|
|
3975
4029
|
return ret;
|
3976
4030
|
}), 'Call.feature');
|
3977
4031
|
case 'stopCaptions':
|
3978
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
4032
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$D(this, void 0, void 0, function* () {
|
3979
4033
|
const ret = yield target.stopCaptions(...args);
|
3980
4034
|
this._context.setIsCaptionActive(this._call.id, false);
|
3981
4035
|
this._context.setStartCaptionsInProgress(this._call.id, false);
|
3982
4036
|
return ret;
|
3983
4037
|
}), 'Call.feature');
|
3984
4038
|
case 'setSpokenLanguage':
|
3985
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
4039
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$D(this, void 0, void 0, function* () {
|
3986
4040
|
const ret = yield target.setSpokenLanguage(...args);
|
3987
4041
|
this._context.setSelectedSpokenLanguage(this._call.id, args[0]);
|
3988
4042
|
return ret;
|
3989
4043
|
}), 'Call.feature');
|
3990
4044
|
case 'setCaptionLanguage':
|
3991
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
4045
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$D(this, void 0, void 0, function* () {
|
3992
4046
|
const ret = yield target.setCaptionLanguage(...args);
|
3993
4047
|
this._context.setSelectedCaptionLanguage(this._call.id, args[0]);
|
3994
4048
|
return ret;
|
@@ -4036,7 +4090,7 @@ class ProxyTransferCallFeature {
|
|
4036
4090
|
|
4037
4091
|
// Copyright (c) Microsoft Corporation.
|
4038
4092
|
// Licensed under the MIT license.
|
4039
|
-
var __awaiter$
|
4093
|
+
var __awaiter$C = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
4040
4094
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4041
4095
|
return new (P || (P = Promise))(function (resolve, reject) {
|
4042
4096
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -4050,7 +4104,7 @@ class ProxyCall extends ProxyCallCommon {
|
|
4050
4104
|
switch (prop) {
|
4051
4105
|
case 'addParticipant': {
|
4052
4106
|
return this.getContext().withAsyncErrorTeedToState(function (...args) {
|
4053
|
-
return __awaiter$
|
4107
|
+
return __awaiter$C(this, void 0, void 0, function* () {
|
4054
4108
|
return yield target.addParticipant(...args);
|
4055
4109
|
});
|
4056
4110
|
}, 'Call.addParticipant');
|
@@ -4271,7 +4325,7 @@ class InternalCallContext {
|
|
4271
4325
|
|
4272
4326
|
// Copyright (c) Microsoft Corporation.
|
4273
4327
|
// Licensed under the MIT license.
|
4274
|
-
var __awaiter$
|
4328
|
+
var __awaiter$B = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
4275
4329
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4276
4330
|
return new (P || (P = Promise))(function (resolve, reject) {
|
4277
4331
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -4286,7 +4340,7 @@ class ProxyTeamsCall extends ProxyCallCommon {
|
|
4286
4340
|
switch (prop) {
|
4287
4341
|
case 'addParticipant': {
|
4288
4342
|
return this.getContext().withAsyncErrorTeedToState(function (...args) {
|
4289
|
-
return __awaiter$
|
4343
|
+
return __awaiter$B(this, void 0, void 0, function* () {
|
4290
4344
|
return yield target.addParticipant(...args);
|
4291
4345
|
});
|
4292
4346
|
}, 'TeamsCall.addParticipant');
|
@@ -4401,7 +4455,7 @@ const teamsCallAgentDeclaratify = (callAgent, context, internalContext) => {
|
|
4401
4455
|
|
4402
4456
|
// Copyright (c) Microsoft Corporation.
|
4403
4457
|
// Licensed under the MIT license.
|
4404
|
-
var __awaiter$
|
4458
|
+
var __awaiter$A = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
4405
4459
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4406
4460
|
return new (P || (P = Promise))(function (resolve, reject) {
|
4407
4461
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -4423,7 +4477,7 @@ class ProxyVideoStreamRendererView {
|
|
4423
4477
|
get(target, prop) {
|
4424
4478
|
switch (prop) {
|
4425
4479
|
case 'updateScalingMode': {
|
4426
|
-
return (...args) => __awaiter$
|
4480
|
+
return (...args) => __awaiter$A(this, void 0, void 0, function* () {
|
4427
4481
|
yield target.updateScalingMode(...args);
|
4428
4482
|
this._context.setRemoteVideoStreamViewScalingMode(this._callId, this._participantId, this._streamId, args[0]);
|
4429
4483
|
});
|
@@ -4444,7 +4498,7 @@ const videoStreamRendererViewDeclaratify = (view, context, callId, participantId
|
|
4444
4498
|
|
4445
4499
|
// Copyright (c) Microsoft Corporation.
|
4446
4500
|
// Licensed under the MIT license.
|
4447
|
-
var __awaiter$
|
4501
|
+
var __awaiter$z = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
4448
4502
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4449
4503
|
return new (P || (P = Promise))(function (resolve, reject) {
|
4450
4504
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -4466,7 +4520,7 @@ class ProxyCallClient {
|
|
4466
4520
|
get(target, prop) {
|
4467
4521
|
switch (prop) {
|
4468
4522
|
case 'createCallAgent': {
|
4469
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
4523
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$z(this, void 0, void 0, function* () {
|
4470
4524
|
// createCallAgent will throw an exception if the previous callAgent was not disposed. If the previous
|
4471
4525
|
// callAgent was disposed then it would have unsubscribed to events so we can just create a new declarative
|
4472
4526
|
// callAgent if the createCallAgent succeeds.
|
@@ -4479,7 +4533,7 @@ class ProxyCallClient {
|
|
4479
4533
|
}), 'CallClient.createCallAgent');
|
4480
4534
|
}
|
4481
4535
|
case 'createTeamsCallAgent': {
|
4482
|
-
/* @conditional-compile-remove(teams-identity-support) */ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
4536
|
+
/* @conditional-compile-remove(teams-identity-support) */ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$z(this, void 0, void 0, function* () {
|
4483
4537
|
// createCallAgent will throw an exception if the previous callAgent was not disposed. If the previous
|
4484
4538
|
// callAgent was disposed then it would have unsubscribed to events so we can just create a new declarative
|
4485
4539
|
// callAgent if the createCallAgent succeeds.
|
@@ -4492,7 +4546,7 @@ class ProxyCallClient {
|
|
4492
4546
|
}), 'CallClient.createTeamsCallAgent');
|
4493
4547
|
}
|
4494
4548
|
case 'getDeviceManager': {
|
4495
|
-
return this._context.withAsyncErrorTeedToState(() => __awaiter$
|
4549
|
+
return this._context.withAsyncErrorTeedToState(() => __awaiter$z(this, void 0, void 0, function* () {
|
4496
4550
|
// As of writing, the SDK always returns the same instance of DeviceManager so we keep a reference of
|
4497
4551
|
// DeviceManager and if it does not change we return the cached DeclarativeDeviceManager. If it does not we'll
|
4498
4552
|
// throw an error that indicate we need to fix this issue as our implementation has diverged from the SDK.
|
@@ -4521,7 +4575,7 @@ class ProxyCallClient {
|
|
4521
4575
|
/**
|
4522
4576
|
* add to this object if we want to proxy anything else off the DebugInfo feature object.
|
4523
4577
|
*/
|
4524
|
-
return Object.assign(Object.assign({}, feature), { getEnvironmentInfo: () => __awaiter$
|
4578
|
+
return Object.assign(Object.assign({}, feature), { getEnvironmentInfo: () => __awaiter$z(this, void 0, void 0, function* () {
|
4525
4579
|
const environmentInfo = yield feature.getEnvironmentInfo();
|
4526
4580
|
this._context.setEnvironmentInfo(environmentInfo);
|
4527
4581
|
return environmentInfo;
|
@@ -4574,7 +4628,7 @@ const createStatefulCallClientWithDeps = (callClient, context, internalContext)
|
|
4574
4628
|
});
|
4575
4629
|
Object.defineProperty(callClient, 'createView', {
|
4576
4630
|
configurable: false,
|
4577
|
-
value: (callId, participantId, stream, options) => __awaiter$
|
4631
|
+
value: (callId, participantId, stream, options) => __awaiter$z(void 0, void 0, void 0, function* () {
|
4578
4632
|
const participantIdKind = participantId ? communicationCommon.getIdentifierKind(participantId) : undefined;
|
4579
4633
|
const result = yield createView(context, internalContext, callId, participantIdKind, stream, options);
|
4580
4634
|
// We only need to declaratify the VideoStreamRendererView object for remote participants. Because the updateScalingMode only needs to be called on remote participant stream views.
|
@@ -7276,7 +7330,7 @@ const _MentionPopover = (props) => {
|
|
7276
7330
|
|
7277
7331
|
// Copyright (c) Microsoft Corporation.
|
7278
7332
|
// Licensed under the MIT license.
|
7279
|
-
var __awaiter$
|
7333
|
+
var __awaiter$y = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
7280
7334
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
7281
7335
|
return new (P || (P = Promise))(function (resolve, reject) {
|
7282
7336
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -7451,7 +7505,7 @@ const TextFieldWithMention = (props) => {
|
|
7451
7505
|
onSuggestionSelected,
|
7452
7506
|
updateMentionSuggestions
|
7453
7507
|
]);
|
7454
|
-
const debouncedQueryUpdate = useDebounce.useDebouncedCallback((query) => __awaiter$
|
7508
|
+
const debouncedQueryUpdate = useDebounce.useDebouncedCallback((query) => __awaiter$y(void 0, void 0, void 0, function* () {
|
7455
7509
|
var _a;
|
7456
7510
|
let suggestions = (_a = (yield (mentionLookupOptions === null || mentionLookupOptions === void 0 ? void 0 : mentionLookupOptions.onQueryUpdated(query)))) !== null && _a !== void 0 ? _a : [];
|
7457
7511
|
suggestions = suggestions.filter((suggestion) => suggestion.displayText.trim() !== '');
|
@@ -7628,7 +7682,7 @@ const TextFieldWithMention = (props) => {
|
|
7628
7682
|
});
|
7629
7683
|
}
|
7630
7684
|
}, [updateSelectionIndexesWithMentionIfNeeded, setSelectionStartValue, setSelectionEndValue]);
|
7631
|
-
const handleOnChange = React.useCallback(({ currentSelectionEnd, currentSelectionStart, currentTriggerStartIndex, event, htmlTextValue, inputTextValue, previousSelectionEnd, previousSelectionStart, tagsValue, updatedValue }) => __awaiter$
|
7685
|
+
const handleOnChange = React.useCallback(({ currentSelectionEnd, currentSelectionStart, currentTriggerStartIndex, event, htmlTextValue, inputTextValue, previousSelectionEnd, previousSelectionStart, tagsValue, updatedValue }) => __awaiter$y(void 0, void 0, void 0, function* () {
|
7632
7686
|
var _b;
|
7633
7687
|
debouncedQueryUpdate.cancel();
|
7634
7688
|
if (event.currentTarget === null) {
|
@@ -9376,7 +9430,7 @@ const chatMessageActionMenuProps = (menuProps) => {
|
|
9376
9430
|
return actionMenuProps;
|
9377
9431
|
};
|
9378
9432
|
|
9379
|
-
var __awaiter$
|
9433
|
+
var __awaiter$x = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
9380
9434
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
9381
9435
|
return new (P || (P = Promise))(function (resolve, reject) {
|
9382
9436
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -9419,7 +9473,7 @@ const _FileDownloadCards = (props) => {
|
|
9419
9473
|
fileCount: `${fileMetadata.filter(isFileSharingAttachment).length}`
|
9420
9474
|
});
|
9421
9475
|
}, [(_b = props.strings) === null || _b === void 0 ? void 0 : _b.fileCardGroupMessage, localeStrings.fileCardGroupMessage, fileMetadata, isFileSharingAttachment]);
|
9422
|
-
const fileDownloadHandler = React.useCallback((userId, file) => __awaiter$
|
9476
|
+
const fileDownloadHandler = React.useCallback((userId, file) => __awaiter$x(void 0, void 0, void 0, function* () {
|
9423
9477
|
if (!props.downloadHandler) {
|
9424
9478
|
window.open(file.url, '_blank', 'noopener,noreferrer');
|
9425
9479
|
}
|
@@ -9589,7 +9643,7 @@ const ChatMessageComponentAsMessageBubble = React__default['default'].memo(Messa
|
|
9589
9643
|
|
9590
9644
|
// Copyright (c) Microsoft Corporation.
|
9591
9645
|
// Licensed under the MIT license.
|
9592
|
-
var __awaiter$
|
9646
|
+
var __awaiter$w = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
9593
9647
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
9594
9648
|
return new (P || (P = Promise))(function (resolve, reject) {
|
9595
9649
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -9622,7 +9676,7 @@ const ChatMessageComponent = (props) => {
|
|
9622
9676
|
onSendMessage && onSendMessage(content !== undefined ? content : '');
|
9623
9677
|
}, [clientMessageId, content, onSendMessage, onDeleteMessage]);
|
9624
9678
|
if (isEditing && message.messageType === 'chat') {
|
9625
|
-
return (React__default['default'].createElement(ChatMessageComponentAsEditBox, { message: message, inlineEditButtons: props.inlineAcceptRejectEditButtons, strings: props.strings, onSubmit: (text, metadata, options) => __awaiter$
|
9679
|
+
return (React__default['default'].createElement(ChatMessageComponentAsEditBox, { message: message, inlineEditButtons: props.inlineAcceptRejectEditButtons, strings: props.strings, onSubmit: (text, metadata, options) => __awaiter$w(void 0, void 0, void 0, function* () {
|
9626
9680
|
props.onUpdateMessage &&
|
9627
9681
|
message.messageId &&
|
9628
9682
|
(yield props.onUpdateMessage(message.messageId, text, metadata, options));
|
@@ -9811,7 +9865,7 @@ const LiveAnnouncer = (props) => {
|
|
9811
9865
|
|
9812
9866
|
// Copyright (c) Microsoft Corporation.
|
9813
9867
|
// Licensed under the MIT license.
|
9814
|
-
var __awaiter$
|
9868
|
+
var __awaiter$v = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
9815
9869
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
9816
9870
|
return new (P || (P = Promise))(function (resolve, reject) {
|
9817
9871
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -10033,7 +10087,7 @@ const MessageThread = (props) => {
|
|
10033
10087
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
10034
10088
|
const [inlineAttachments, setInlineAttachments] = React.useState({});
|
10035
10089
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
10036
|
-
const onFetchInlineAttachment = React.useCallback((attachment) => __awaiter$
|
10090
|
+
const onFetchInlineAttachment = React.useCallback((attachment) => __awaiter$v(void 0, void 0, void 0, function* () {
|
10037
10091
|
if (!onFetchAttachments || attachment.attachmentType !== 'inlineImage' || attachment.id in inlineAttachments) {
|
10038
10092
|
return;
|
10039
10093
|
}
|
@@ -10082,7 +10136,7 @@ const MessageThread = (props) => {
|
|
10082
10136
|
setChatMessagesInitialized(chatMessagesInitialized);
|
10083
10137
|
};
|
10084
10138
|
// we try to only send those message status if user is scrolled to the bottom.
|
10085
|
-
const sendMessageStatusIfAtBottom = React.useCallback(() => __awaiter$
|
10139
|
+
const sendMessageStatusIfAtBottom = React.useCallback(() => __awaiter$v(void 0, void 0, void 0, function* () {
|
10086
10140
|
if (!isAtBottomOfScrollRef.current ||
|
10087
10141
|
!document.hasFocus() ||
|
10088
10142
|
!messagesRef.current ||
|
@@ -10133,7 +10187,7 @@ const MessageThread = (props) => {
|
|
10133
10187
|
setIsAtBottomOfScrollRef(atBottom);
|
10134
10188
|
}, [scrollToBottom, sendMessageStatusIfAtBottom]);
|
10135
10189
|
// Infinite scrolling + threadInitialize function
|
10136
|
-
const fetchNewMessageWhenAtTop = React.useCallback(() => __awaiter$
|
10190
|
+
const fetchNewMessageWhenAtTop = React.useCallback(() => __awaiter$v(void 0, void 0, void 0, function* () {
|
10137
10191
|
if (!isLoadingChatMessagesRef.current) {
|
10138
10192
|
if (onLoadPreviousChatMessages) {
|
10139
10193
|
isLoadingChatMessagesRef.current = true;
|
@@ -14496,7 +14550,7 @@ const DevicesButton = (props) => {
|
|
14496
14550
|
|
14497
14551
|
// Copyright (c) Microsoft Corporation.
|
14498
14552
|
// Licensed under the MIT license.
|
14499
|
-
var __awaiter$
|
14553
|
+
var __awaiter$u = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
14500
14554
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
14501
14555
|
return new (P || (P = Promise))(function (resolve, reject) {
|
14502
14556
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -14534,7 +14588,7 @@ const CameraButton = (props) => {
|
|
14534
14588
|
const toggleAnnouncerString = React.useCallback((isCameraOn) => {
|
14535
14589
|
setAnnouncerString(!isCameraOn ? strings.cameraActionTurnedOffAnnouncement : strings.cameraActionTurnedOnAnnouncement);
|
14536
14590
|
}, [strings.cameraActionTurnedOffAnnouncement, strings.cameraActionTurnedOnAnnouncement]);
|
14537
|
-
const onToggleClick = React.useCallback(() => __awaiter$
|
14591
|
+
const onToggleClick = React.useCallback(() => __awaiter$u(void 0, void 0, void 0, function* () {
|
14538
14592
|
// Throttle click on camera, need to await onToggleCamera then allow another click
|
14539
14593
|
if (onToggleCamera) {
|
14540
14594
|
setWaitForCamera(true);
|
@@ -14702,7 +14756,7 @@ const lightThemeCallButtonStyles = {
|
|
14702
14756
|
|
14703
14757
|
// Copyright (c) Microsoft Corporation.
|
14704
14758
|
// Licensed under the MIT license.
|
14705
|
-
var __awaiter$
|
14759
|
+
var __awaiter$t = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
14706
14760
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
14707
14761
|
return new (P || (P = Promise))(function (resolve, reject) {
|
14708
14762
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -14743,7 +14797,7 @@ const MicrophoneButton = (props) => {
|
|
14743
14797
|
const toggleAnnouncerString = React.useCallback((isMicOn) => {
|
14744
14798
|
setAnnouncerString(!isMicOn ? strings.microphoneActionTurnedOffAnnouncement : strings.microphoneActionTurnedOnAnnouncement);
|
14745
14799
|
}, [strings.microphoneActionTurnedOffAnnouncement, strings.microphoneActionTurnedOnAnnouncement]);
|
14746
|
-
const onToggleClick = React.useCallback(() => __awaiter$
|
14800
|
+
const onToggleClick = React.useCallback(() => __awaiter$t(void 0, void 0, void 0, function* () {
|
14747
14801
|
if (onToggleMicrophone) {
|
14748
14802
|
try {
|
14749
14803
|
yield onToggleMicrophone();
|
@@ -15639,7 +15693,7 @@ const formatPhoneNumber = (phoneNumber) => {
|
|
15639
15693
|
|
15640
15694
|
// Copyright (c) Microsoft Corporation.
|
15641
15695
|
// Licensed under the MIT license.
|
15642
|
-
var __awaiter$
|
15696
|
+
var __awaiter$s = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
15643
15697
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
15644
15698
|
return new (P || (P = Promise))(function (resolve, reject) {
|
15645
15699
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -15681,10 +15735,10 @@ const DialpadButton = (props) => {
|
|
15681
15735
|
const theme = react.useTheme();
|
15682
15736
|
const { digit, index, onClick, onLongPress, isMobile = false } = props;
|
15683
15737
|
const useLongPressProps = React__default['default'].useMemo(() => ({
|
15684
|
-
onClick: () => __awaiter$
|
15738
|
+
onClick: () => __awaiter$s(void 0, void 0, void 0, function* () {
|
15685
15739
|
onClick(digit, index);
|
15686
15740
|
}),
|
15687
|
-
onLongPress: () => __awaiter$
|
15741
|
+
onLongPress: () => __awaiter$s(void 0, void 0, void 0, function* () {
|
15688
15742
|
onLongPress(digit, index);
|
15689
15743
|
}),
|
15690
15744
|
touchEventsOnly: isMobile
|
@@ -16458,7 +16512,7 @@ const dropdownStyles = {
|
|
16458
16512
|
callout: Object.assign({ height: _pxToRem(300), overflow: 'auto' }, scrollbarStyles)
|
16459
16513
|
};
|
16460
16514
|
|
16461
|
-
var __awaiter$
|
16515
|
+
var __awaiter$r = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
16462
16516
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
16463
16517
|
return new (P || (P = Promise))(function (resolve, reject) {
|
16464
16518
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -16493,7 +16547,7 @@ const _CaptionsSettingsModal = (props) => {
|
|
16493
16547
|
setHasSetSpokenLanguage(true);
|
16494
16548
|
}
|
16495
16549
|
}, [isCaptionsFeatureActive, onSetSpokenLanguage, selectedItem.key, hasSetSpokenLanguage]);
|
16496
|
-
const onConfirm = React.useCallback(() => __awaiter$
|
16550
|
+
const onConfirm = React.useCallback(() => __awaiter$r(void 0, void 0, void 0, function* () {
|
16497
16551
|
const languageCode = selectedItem.key.toString();
|
16498
16552
|
if (isCaptionsFeatureActive) {
|
16499
16553
|
onSetSpokenLanguage(languageCode);
|
@@ -17125,7 +17179,7 @@ const findConditionalCompiledSelector = (component) => {
|
|
17125
17179
|
|
17126
17180
|
// Copyright (c) Microsoft Corporation.
|
17127
17181
|
// Licensed under the MIT license.
|
17128
|
-
var __awaiter$
|
17182
|
+
var __awaiter$q = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
17129
17183
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
17130
17184
|
return new (P || (P = Promise))(function (resolve, reject) {
|
17131
17185
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -17148,35 +17202,35 @@ const createDefaultChatHandlers = memoizeOne__default['default']((chatClient, ch
|
|
17148
17202
|
let messageIterator = undefined;
|
17149
17203
|
let readReceiptIterator = undefined;
|
17150
17204
|
return {
|
17151
|
-
onSendMessage: (content, options) => __awaiter$
|
17205
|
+
onSendMessage: (content, options) => __awaiter$q(void 0, void 0, void 0, function* () {
|
17152
17206
|
const sendMessageRequest = {
|
17153
17207
|
content,
|
17154
17208
|
senderDisplayName: chatClient.getState().displayName
|
17155
17209
|
};
|
17156
17210
|
yield chatThreadClient.sendMessage(sendMessageRequest, options);
|
17157
17211
|
}),
|
17158
|
-
onUpdateMessage: (messageId, content, metadata, options) => __awaiter$
|
17212
|
+
onUpdateMessage: (messageId, content, metadata, options) => __awaiter$q(void 0, void 0, void 0, function* () {
|
17159
17213
|
const updatedMetadata = metadata ? Object.assign({}, metadata) : {};
|
17160
17214
|
updatedMetadata['fileSharingMetadata'] = JSON.stringify((options === null || options === void 0 ? void 0 : options.attachedFilesMetadata) || []);
|
17161
17215
|
yield chatThreadClient.updateMessage(messageId, { content, metadata: updatedMetadata });
|
17162
17216
|
}),
|
17163
|
-
onDeleteMessage: (messageId) => __awaiter$
|
17217
|
+
onDeleteMessage: (messageId) => __awaiter$q(void 0, void 0, void 0, function* () {
|
17164
17218
|
yield chatThreadClient.deleteMessage(messageId);
|
17165
17219
|
}),
|
17166
17220
|
// This handler is designed for chatThread to consume
|
17167
|
-
onMessageSeen: (chatMessageId) => __awaiter$
|
17221
|
+
onMessageSeen: (chatMessageId) => __awaiter$q(void 0, void 0, void 0, function* () {
|
17168
17222
|
yield chatThreadClient.sendReadReceipt({ chatMessageId });
|
17169
17223
|
}),
|
17170
|
-
onTyping: () => __awaiter$
|
17224
|
+
onTyping: () => __awaiter$q(void 0, void 0, void 0, function* () {
|
17171
17225
|
yield chatThreadClient.sendTypingNotification();
|
17172
17226
|
}),
|
17173
|
-
onRemoveParticipant: (userId) => __awaiter$
|
17227
|
+
onRemoveParticipant: (userId) => __awaiter$q(void 0, void 0, void 0, function* () {
|
17174
17228
|
yield chatThreadClient.removeParticipant(fromFlatCommunicationIdentifier(userId));
|
17175
17229
|
}),
|
17176
|
-
updateThreadTopicName: (topicName) => __awaiter$
|
17230
|
+
updateThreadTopicName: (topicName) => __awaiter$q(void 0, void 0, void 0, function* () {
|
17177
17231
|
yield chatThreadClient.updateTopic(topicName);
|
17178
17232
|
}),
|
17179
|
-
onLoadPreviousChatMessages: (messagesToLoad) => __awaiter$
|
17233
|
+
onLoadPreviousChatMessages: (messagesToLoad) => __awaiter$q(void 0, void 0, void 0, function* () {
|
17180
17234
|
var _a, _b, _c;
|
17181
17235
|
if (messageIterator === undefined) {
|
17182
17236
|
// Lazy definition so that errors in the method call are reported correctly.
|
@@ -18043,7 +18097,7 @@ const chatStatefulLogger = logger.createClientLogger('communication-react:chat-s
|
|
18043
18097
|
|
18044
18098
|
// Copyright (c) Microsoft Corporation.
|
18045
18099
|
// Licensed under the MIT license.
|
18046
|
-
var __awaiter$
|
18100
|
+
var __awaiter$p = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
18047
18101
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
18048
18102
|
return new (P || (P = Promise))(function (resolve, reject) {
|
18049
18103
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -18318,7 +18372,7 @@ class ChatContext$1 {
|
|
18318
18372
|
* @throws ChatError. Exceptions thrown from `f` are tagged with the failed `target.
|
18319
18373
|
*/
|
18320
18374
|
withAsyncErrorTeedToState(f, target) {
|
18321
|
-
return (...args) => __awaiter$
|
18375
|
+
return (...args) => __awaiter$p(this, void 0, void 0, function* () {
|
18322
18376
|
try {
|
18323
18377
|
return yield f(...args);
|
18324
18378
|
}
|
@@ -18430,7 +18484,7 @@ const convertChatMessage = (message, status = 'delivered', clientMessageId) => {
|
|
18430
18484
|
|
18431
18485
|
// Copyright (c) Microsoft Corporation.
|
18432
18486
|
// Licensed under the MIT license.
|
18433
|
-
var __awaiter$
|
18487
|
+
var __awaiter$o = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
18434
18488
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
18435
18489
|
return new (P || (P = Promise))(function (resolve, reject) {
|
18436
18490
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -18519,7 +18573,7 @@ class EventSubscriber {
|
|
18519
18573
|
};
|
18520
18574
|
// This is a temporary fix that no participant message is received for onChatMessageReceived event, which should be handled by JS SDK.
|
18521
18575
|
// Without the temporary fix, there are missing 'participant joined' and 'participant left' system messages in the chat thread.
|
18522
|
-
this.fetchLastParticipantMessage = (threadId, actionType) => __awaiter$
|
18576
|
+
this.fetchLastParticipantMessage = (threadId, actionType) => __awaiter$o(this, void 0, void 0, function* () {
|
18523
18577
|
var e_1, _a;
|
18524
18578
|
try {
|
18525
18579
|
for (var _b = __asyncValues$1(this.chatClient
|
@@ -18611,7 +18665,7 @@ class EventSubscriber {
|
|
18611
18665
|
|
18612
18666
|
// Copyright (c) Microsoft Corporation.
|
18613
18667
|
// Licensed under the MIT license.
|
18614
|
-
var __awaiter$
|
18668
|
+
var __awaiter$n = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
18615
18669
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
18616
18670
|
return new (P || (P = Promise))(function (resolve, reject) {
|
18617
18671
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -18633,7 +18687,7 @@ const createDecoratedIterator = (iteratorCreator, context, decorateFn) => {
|
|
18633
18687
|
const threadsIterator = iteratorCreator(...args);
|
18634
18688
|
return {
|
18635
18689
|
next() {
|
18636
|
-
return __awaiter$
|
18690
|
+
return __awaiter$n(this, void 0, void 0, function* () {
|
18637
18691
|
const result = yield threadsIterator.next();
|
18638
18692
|
if (!result.done && result.value) {
|
18639
18693
|
decorateFn(result.value, context);
|
@@ -18648,7 +18702,7 @@ const createDecoratedIterator = (iteratorCreator, context, decorateFn) => {
|
|
18648
18702
|
const pages = threadsIterator.byPage(settings);
|
18649
18703
|
return {
|
18650
18704
|
next() {
|
18651
|
-
return __awaiter$
|
18705
|
+
return __awaiter$n(this, void 0, void 0, function* () {
|
18652
18706
|
const result = yield pages.next();
|
18653
18707
|
const page = result.value;
|
18654
18708
|
if (!result.done && result.value) {
|
@@ -18732,7 +18786,7 @@ const createDecoratedListParticipants = (chatThreadClient, context) => {
|
|
18732
18786
|
|
18733
18787
|
// Copyright (c) Microsoft Corporation.
|
18734
18788
|
// Licensed under the MIT license.
|
18735
|
-
var __awaiter$
|
18789
|
+
var __awaiter$m = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
18736
18790
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
18737
18791
|
return new (P || (P = Promise))(function (resolve, reject) {
|
18738
18792
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -18751,14 +18805,14 @@ class ProxyChatThreadClient {
|
|
18751
18805
|
return createDecoratedListMessages(chatThreadClient, this._context);
|
18752
18806
|
}
|
18753
18807
|
case 'getMessage': {
|
18754
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
18808
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$m(this, void 0, void 0, function* () {
|
18755
18809
|
const message = yield chatThreadClient.getMessage(...args);
|
18756
18810
|
this._context.setChatMessage(chatThreadClient.threadId, convertChatMessage(message));
|
18757
18811
|
return message;
|
18758
18812
|
}), 'ChatThreadClient.getMessage');
|
18759
18813
|
}
|
18760
18814
|
case 'sendMessage': {
|
18761
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
18815
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$m(this, void 0, void 0, function* () {
|
18762
18816
|
// Retry logic?
|
18763
18817
|
const [request, options] = args;
|
18764
18818
|
const { content } = request;
|
@@ -18798,7 +18852,7 @@ class ProxyChatThreadClient {
|
|
18798
18852
|
}), 'ChatThreadClient.sendMessage');
|
18799
18853
|
}
|
18800
18854
|
case 'addParticipants': {
|
18801
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
18855
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$m(this, void 0, void 0, function* () {
|
18802
18856
|
const result = yield chatThreadClient.addParticipants(...args);
|
18803
18857
|
const [addRequest] = args;
|
18804
18858
|
const participantsToAdd = addRequest.participants;
|
@@ -18807,7 +18861,7 @@ class ProxyChatThreadClient {
|
|
18807
18861
|
}), 'ChatThreadClient.addParticipants');
|
18808
18862
|
}
|
18809
18863
|
case 'deleteMessage': {
|
18810
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
18864
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$m(this, void 0, void 0, function* () {
|
18811
18865
|
// DeleteMessage is able to either delete local one(for failed message) or synced message
|
18812
18866
|
const [messageId] = args;
|
18813
18867
|
if (this._context.deleteLocalMessage(chatThreadClient.threadId, messageId)) {
|
@@ -18825,12 +18879,12 @@ class ProxyChatThreadClient {
|
|
18825
18879
|
return createDecoratedListReadReceipts(chatThreadClient, this._context);
|
18826
18880
|
}
|
18827
18881
|
case 'sendTypingNotification': {
|
18828
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
18882
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$m(this, void 0, void 0, function* () {
|
18829
18883
|
return yield chatThreadClient.sendTypingNotification(...args);
|
18830
18884
|
}), 'ChatThreadClient.sendTypingNotification');
|
18831
18885
|
}
|
18832
18886
|
case 'removeParticipant': {
|
18833
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
18887
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$m(this, void 0, void 0, function* () {
|
18834
18888
|
const result = yield chatThreadClient.removeParticipant(...args);
|
18835
18889
|
const [removeIdentifier] = args;
|
18836
18890
|
this._context.deleteParticipant(chatThreadClient.threadId, communicationCommon.getIdentifierKind(removeIdentifier));
|
@@ -18838,7 +18892,7 @@ class ProxyChatThreadClient {
|
|
18838
18892
|
}), 'ChatThreadClient.removeParticipant');
|
18839
18893
|
}
|
18840
18894
|
case 'updateMessage': {
|
18841
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
18895
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$m(this, void 0, void 0, function* () {
|
18842
18896
|
const result = yield chatThreadClient.updateMessage(...args);
|
18843
18897
|
const [messageId, updateOption] = args;
|
18844
18898
|
this._context.updateChatMessageContent(chatThreadClient.threadId, messageId, updateOption === null || updateOption === void 0 ? void 0 : updateOption.content);
|
@@ -18846,7 +18900,7 @@ class ProxyChatThreadClient {
|
|
18846
18900
|
}), 'ChatThreadClient.updateMessage');
|
18847
18901
|
}
|
18848
18902
|
case 'updateTopic': {
|
18849
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
18903
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$m(this, void 0, void 0, function* () {
|
18850
18904
|
const result = yield chatThreadClient.updateTopic(...args);
|
18851
18905
|
const [topic] = args;
|
18852
18906
|
this._context.updateThreadTopic(chatThreadClient.threadId, topic);
|
@@ -18854,7 +18908,7 @@ class ProxyChatThreadClient {
|
|
18854
18908
|
}), 'ChatThreadClient.updateTopic');
|
18855
18909
|
}
|
18856
18910
|
case 'getProperties': {
|
18857
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
18911
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$m(this, void 0, void 0, function* () {
|
18858
18912
|
const result = yield chatThreadClient.getProperties(...args);
|
18859
18913
|
this._context.updateThread(chatThreadClient.threadId, result);
|
18860
18914
|
return result;
|
@@ -18891,7 +18945,7 @@ const createDecoratedListThreads = (chatClient, context) => {
|
|
18891
18945
|
|
18892
18946
|
// Copyright (c) Microsoft Corporation.
|
18893
18947
|
// Licensed under the MIT license.
|
18894
|
-
var __awaiter$
|
18948
|
+
var __awaiter$l = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
18895
18949
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
18896
18950
|
return new (P || (P = Promise))(function (resolve, reject) {
|
18897
18951
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -18910,7 +18964,7 @@ const proxyChatClient = {
|
|
18910
18964
|
switch (prop) {
|
18911
18965
|
case 'createChatThread': {
|
18912
18966
|
return context.withAsyncErrorTeedToState(function (...args) {
|
18913
|
-
return __awaiter$
|
18967
|
+
return __awaiter$l(this, void 0, void 0, function* () {
|
18914
18968
|
const result = yield chatClient.createChatThread(...args);
|
18915
18969
|
const thread = result.chatThread;
|
18916
18970
|
if (thread) {
|
@@ -18923,7 +18977,7 @@ const proxyChatClient = {
|
|
18923
18977
|
}
|
18924
18978
|
case 'deleteChatThread': {
|
18925
18979
|
return context.withAsyncErrorTeedToState(function (...args) {
|
18926
|
-
return __awaiter$
|
18980
|
+
return __awaiter$l(this, void 0, void 0, function* () {
|
18927
18981
|
const result = yield chatClient.deleteChatThread(...args);
|
18928
18982
|
context.deleteThread(args[0]);
|
18929
18983
|
return result;
|
@@ -18943,7 +18997,7 @@ const proxyChatClient = {
|
|
18943
18997
|
}
|
18944
18998
|
case 'startRealtimeNotifications': {
|
18945
18999
|
return context.withAsyncErrorTeedToState(function (...args) {
|
18946
|
-
return __awaiter$
|
19000
|
+
return __awaiter$l(this, void 0, void 0, function* () {
|
18947
19001
|
const ret = yield chatClient.startRealtimeNotifications(...args);
|
18948
19002
|
if (!receiver.eventSubscriber) {
|
18949
19003
|
receiver.eventSubscriber = new EventSubscriber(chatClient, context);
|
@@ -18954,7 +19008,7 @@ const proxyChatClient = {
|
|
18954
19008
|
}
|
18955
19009
|
case 'stopRealtimeNotifications': {
|
18956
19010
|
return context.withAsyncErrorTeedToState(function (...args) {
|
18957
|
-
return __awaiter$
|
19011
|
+
return __awaiter$l(this, void 0, void 0, function* () {
|
18958
19012
|
const ret = yield chatClient.stopRealtimeNotifications(...args);
|
18959
19013
|
if (receiver.eventSubscriber) {
|
18960
19014
|
receiver.eventSubscriber.unsubscribe();
|
@@ -19104,7 +19158,7 @@ const COMPOSITE_ONLY_ICONS = {
|
|
19104
19158
|
/* @conditional-compile-remove(PSTN-calls) */
|
19105
19159
|
DialpadStartCall: React__default['default'].createElement(reactIcons.Call20Regular, null),
|
19106
19160
|
/* @conditional-compile-remove(rooms) */
|
19107
|
-
|
19161
|
+
NoticePageAccessDeniedRoomsCall: React__default['default'].createElement(reactIcons.Info20Filled, null),
|
19108
19162
|
/* @conditional-compile-remove(video-background-effects) */
|
19109
19163
|
BlurVideoBackground: React__default['default'].createElement(reactIcons.VideoBackgroundEffect20Regular, null),
|
19110
19164
|
/* @conditional-compile-remove(video-background-effects) */
|
@@ -19620,7 +19674,7 @@ const convertObservableFileUploadToFileUploadsUiState = (fileUploads) => {
|
|
19620
19674
|
|
19621
19675
|
// Copyright (c) Microsoft Corporation.
|
19622
19676
|
// Licensed under the MIT license.
|
19623
|
-
var __awaiter$
|
19677
|
+
var __awaiter$k = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
19624
19678
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
19625
19679
|
return new (P || (P = Promise))(function (resolve, reject) {
|
19626
19680
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -19755,9 +19809,9 @@ class AzureCommunicationChatAdapter {
|
|
19755
19809
|
this.unsubscribeAllEvents();
|
19756
19810
|
}
|
19757
19811
|
fetchInitialData() {
|
19758
|
-
return __awaiter$
|
19812
|
+
return __awaiter$k(this, void 0, void 0, function* () {
|
19759
19813
|
// If get properties fails we dont want to try to get the participants after.
|
19760
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
19814
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$k(this, void 0, void 0, function* () {
|
19761
19815
|
var e_1, _a;
|
19762
19816
|
yield this.chatThreadClient.getProperties();
|
19763
19817
|
try {
|
@@ -19791,8 +19845,8 @@ class AzureCommunicationChatAdapter {
|
|
19791
19845
|
this.context.offStateChange(handler);
|
19792
19846
|
}
|
19793
19847
|
sendMessage(content, options = {}) {
|
19794
|
-
return __awaiter$
|
19795
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
19848
|
+
return __awaiter$k(this, void 0, void 0, function* () {
|
19849
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$k(this, void 0, void 0, function* () {
|
19796
19850
|
/* @conditional-compile-remove(file-sharing) */
|
19797
19851
|
options.metadata = Object.assign(Object.assign({}, options.metadata), convertFileUploadsUiStateToMessageMetadata(this.context.getState().fileUploads));
|
19798
19852
|
/* @conditional-compile-remove(file-sharing) */
|
@@ -19809,51 +19863,51 @@ class AzureCommunicationChatAdapter {
|
|
19809
19863
|
});
|
19810
19864
|
}
|
19811
19865
|
sendReadReceipt(chatMessageId) {
|
19812
|
-
return __awaiter$
|
19813
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
19866
|
+
return __awaiter$k(this, void 0, void 0, function* () {
|
19867
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$k(this, void 0, void 0, function* () {
|
19814
19868
|
yield this.handlers.onMessageSeen(chatMessageId);
|
19815
19869
|
}));
|
19816
19870
|
});
|
19817
19871
|
}
|
19818
19872
|
sendTypingIndicator() {
|
19819
|
-
return __awaiter$
|
19820
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
19873
|
+
return __awaiter$k(this, void 0, void 0, function* () {
|
19874
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$k(this, void 0, void 0, function* () {
|
19821
19875
|
yield this.handlers.onTyping();
|
19822
19876
|
}));
|
19823
19877
|
});
|
19824
19878
|
}
|
19825
19879
|
removeParticipant(userId) {
|
19826
|
-
return __awaiter$
|
19827
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
19880
|
+
return __awaiter$k(this, void 0, void 0, function* () {
|
19881
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$k(this, void 0, void 0, function* () {
|
19828
19882
|
yield this.handlers.onRemoveParticipant(userId);
|
19829
19883
|
}));
|
19830
19884
|
});
|
19831
19885
|
}
|
19832
19886
|
setTopic(topicName) {
|
19833
|
-
return __awaiter$
|
19834
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
19887
|
+
return __awaiter$k(this, void 0, void 0, function* () {
|
19888
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$k(this, void 0, void 0, function* () {
|
19835
19889
|
yield this.handlers.updateThreadTopicName(topicName);
|
19836
19890
|
}));
|
19837
19891
|
});
|
19838
19892
|
}
|
19839
19893
|
loadPreviousChatMessages(messagesToLoad) {
|
19840
|
-
return __awaiter$
|
19841
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
19894
|
+
return __awaiter$k(this, void 0, void 0, function* () {
|
19895
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$k(this, void 0, void 0, function* () {
|
19842
19896
|
return yield this.handlers.onLoadPreviousChatMessages(messagesToLoad);
|
19843
19897
|
}));
|
19844
19898
|
});
|
19845
19899
|
}
|
19846
19900
|
updateMessage(messageId, content, metadata, options) {
|
19847
|
-
return __awaiter$
|
19848
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
19901
|
+
return __awaiter$k(this, void 0, void 0, function* () {
|
19902
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$k(this, void 0, void 0, function* () {
|
19849
19903
|
/* @conditional-compile-remove(file-sharing) */
|
19850
19904
|
return yield this.handlers.onUpdateMessage(messageId, content, metadata, options);
|
19851
19905
|
}));
|
19852
19906
|
});
|
19853
19907
|
}
|
19854
19908
|
deleteMessage(messageId) {
|
19855
|
-
return __awaiter$
|
19856
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
19909
|
+
return __awaiter$k(this, void 0, void 0, function* () {
|
19910
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$k(this, void 0, void 0, function* () {
|
19857
19911
|
return yield this.handlers.onDeleteMessage(messageId);
|
19858
19912
|
}));
|
19859
19913
|
});
|
@@ -19888,8 +19942,8 @@ class AzureCommunicationChatAdapter {
|
|
19888
19942
|
}
|
19889
19943
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
19890
19944
|
downloadAttachments(options) {
|
19891
|
-
return __awaiter$
|
19892
|
-
return this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
19945
|
+
return __awaiter$k(this, void 0, void 0, function* () {
|
19946
|
+
return this.asyncTeeErrorToEventEmitter(() => __awaiter$k(this, void 0, void 0, function* () {
|
19893
19947
|
if (this.credential === undefined) {
|
19894
19948
|
const e = new Error();
|
19895
19949
|
e['target'] = 'ChatThreadClient.getMessage';
|
@@ -19909,9 +19963,9 @@ class AzureCommunicationChatAdapter {
|
|
19909
19963
|
}
|
19910
19964
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
19911
19965
|
downloadAuthenticatedFile(accessToken, options) {
|
19912
|
-
return __awaiter$
|
19966
|
+
return __awaiter$k(this, void 0, void 0, function* () {
|
19913
19967
|
function fetchWithAuthentication(url, token) {
|
19914
|
-
return __awaiter$
|
19968
|
+
return __awaiter$k(this, void 0, void 0, function* () {
|
19915
19969
|
const headers = new Headers();
|
19916
19970
|
headers.append('Authorization', `Bearer ${token}`);
|
19917
19971
|
try {
|
@@ -19983,7 +20037,7 @@ class AzureCommunicationChatAdapter {
|
|
19983
20037
|
this.emitter.off(event, listener);
|
19984
20038
|
}
|
19985
20039
|
asyncTeeErrorToEventEmitter(f) {
|
19986
|
-
return __awaiter$
|
20040
|
+
return __awaiter$k(this, void 0, void 0, function* () {
|
19987
20041
|
try {
|
19988
20042
|
return yield f();
|
19989
20043
|
}
|
@@ -20025,7 +20079,7 @@ const convertEventType = (type) => {
|
|
20025
20079
|
*
|
20026
20080
|
* @public
|
20027
20081
|
*/
|
20028
|
-
const createAzureCommunicationChatAdapter = ({ endpoint: endpointUrl, userId, displayName, credential, threadId }) => __awaiter$
|
20082
|
+
const createAzureCommunicationChatAdapter = ({ endpoint: endpointUrl, userId, displayName, credential, threadId }) => __awaiter$k(void 0, void 0, void 0, function* () {
|
20029
20083
|
if (!_isValidIdentifier(userId)) {
|
20030
20084
|
throw new Error('Provided userId is invalid. Please provide valid identifier object.');
|
20031
20085
|
}
|
@@ -20094,7 +20148,7 @@ beforeDispose) => {
|
|
20094
20148
|
if (!credential || !displayName || !endpoint || !threadId || !userId) {
|
20095
20149
|
return;
|
20096
20150
|
}
|
20097
|
-
(() => __awaiter$
|
20151
|
+
(() => __awaiter$k(void 0, void 0, void 0, function* () {
|
20098
20152
|
if (adapterRef.current) {
|
20099
20153
|
// Dispose the old adapter when a new one is created.
|
20100
20154
|
//
|
@@ -20126,7 +20180,7 @@ beforeDispose) => {
|
|
20126
20180
|
// Dispose any existing adapter when the component unmounts.
|
20127
20181
|
React.useEffect(() => {
|
20128
20182
|
return () => {
|
20129
|
-
(() => __awaiter$
|
20183
|
+
(() => __awaiter$k(void 0, void 0, void 0, function* () {
|
20130
20184
|
if (adapterRef.current) {
|
20131
20185
|
if (beforeDisposeRef.current) {
|
20132
20186
|
yield beforeDisposeRef.current(adapterRef.current);
|
@@ -20150,7 +20204,7 @@ beforeDispose) => {
|
|
20150
20204
|
function createAzureCommunicationChatAdapterFromClient(chatClient, chatThreadClient,
|
20151
20205
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
20152
20206
|
options) {
|
20153
|
-
return __awaiter$
|
20207
|
+
return __awaiter$k(this, void 0, void 0, function* () {
|
20154
20208
|
return new AzureCommunicationChatAdapter(chatClient, chatThreadClient,
|
20155
20209
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */ options);
|
20156
20210
|
});
|
@@ -20363,7 +20417,7 @@ const sendboxContainerStyles = {
|
|
20363
20417
|
|
20364
20418
|
// Copyright (c) Microsoft Corporation.
|
20365
20419
|
// Licensed under the MIT license.
|
20366
|
-
var __awaiter$
|
20420
|
+
var __awaiter$j = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
20367
20421
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
20368
20422
|
return new (P || (P = Promise))(function (resolve, reject) {
|
20369
20423
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -20384,7 +20438,7 @@ const AvatarPersona = (props) => {
|
|
20384
20438
|
const { userId, dataProvider, text, imageUrl, imageInitials, initialsColor, initialsTextColor, showOverflowTooltip } = props;
|
20385
20439
|
const [data, setData] = React.useState();
|
20386
20440
|
React.useEffect(() => {
|
20387
|
-
(() => __awaiter$
|
20441
|
+
(() => __awaiter$j(void 0, void 0, void 0, function* () {
|
20388
20442
|
if (dataProvider && userId) {
|
20389
20443
|
const newData = yield dataProvider(userId);
|
20390
20444
|
if (avatarDeepDifferenceCheck(data, newData)) {
|
@@ -20765,7 +20819,7 @@ const FileDownloadErrorBar = (props) => {
|
|
20765
20819
|
|
20766
20820
|
// Copyright (c) Microsoft Corporation.
|
20767
20821
|
// Licensed under the MIT license.
|
20768
|
-
var __awaiter$
|
20822
|
+
var __awaiter$i = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
20769
20823
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
20770
20824
|
return new (P || (P = Promise))(function (resolve, reject) {
|
20771
20825
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -20786,7 +20840,7 @@ const ChatScreen = (props) => {
|
|
20786
20840
|
const theme = useTheme();
|
20787
20841
|
React.useEffect(() => {
|
20788
20842
|
// Initial data should be always fetched by the composite(or external caller) instead of the adapter
|
20789
|
-
const fetchData = () => __awaiter$
|
20843
|
+
const fetchData = () => __awaiter$i(void 0, void 0, void 0, function* () {
|
20790
20844
|
// Fetch initial data for adapter
|
20791
20845
|
yield adapter.fetchInitialData();
|
20792
20846
|
// Fetch initial set of messages. Without fetching messages here, if the Composite's adapter is changed the message thread does not load new messages.
|
@@ -20820,7 +20874,7 @@ const ChatScreen = (props) => {
|
|
20820
20874
|
setDownloadErrorMessage(errorMessage);
|
20821
20875
|
} })), [fileSharing === null || fileSharing === void 0 ? void 0 : fileSharing.downloadHandler]);
|
20822
20876
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
20823
|
-
const onRenderInlineAttachment = React.useCallback((attachment) => __awaiter$
|
20877
|
+
const onRenderInlineAttachment = React.useCallback((attachment) => __awaiter$i(void 0, void 0, void 0, function* () {
|
20824
20878
|
if (attachment.attachmentType === 'inlineImage' && attachment.previewUrl) {
|
20825
20879
|
const blob = yield adapter.downloadAttachments({ attachmentUrls: [attachment.previewUrl] });
|
20826
20880
|
return blob;
|
@@ -21055,7 +21109,7 @@ const END_CALL_PAGES = [
|
|
21055
21109
|
|
21056
21110
|
// Copyright (c) Microsoft Corporation.
|
21057
21111
|
// Licensed under the MIT license.
|
21058
|
-
var __awaiter$
|
21112
|
+
var __awaiter$h = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
21059
21113
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
21060
21114
|
return new (P || (P = Promise))(function (resolve, reject) {
|
21061
21115
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -21285,7 +21339,7 @@ const isDisabled$2 = (option) => {
|
|
21285
21339
|
/**
|
21286
21340
|
* @returns Permissions state for the camera.
|
21287
21341
|
*/
|
21288
|
-
const queryCameraPermissionFromPermissionsAPI = () => __awaiter$
|
21342
|
+
const queryCameraPermissionFromPermissionsAPI = () => __awaiter$h(void 0, void 0, void 0, function* () {
|
21289
21343
|
try {
|
21290
21344
|
return (yield navigator.permissions.query({ name: 'camera' })).state;
|
21291
21345
|
}
|
@@ -21298,7 +21352,7 @@ const queryCameraPermissionFromPermissionsAPI = () => __awaiter$f(void 0, void 0
|
|
21298
21352
|
/**
|
21299
21353
|
* @returns Permissions state for the microphone.
|
21300
21354
|
*/
|
21301
|
-
const queryMicrophonePermissionFromPermissionsAPI = () => __awaiter$
|
21355
|
+
const queryMicrophonePermissionFromPermissionsAPI = () => __awaiter$h(void 0, void 0, void 0, function* () {
|
21302
21356
|
try {
|
21303
21357
|
return (yield navigator.permissions.query({ name: 'microphone' })).state;
|
21304
21358
|
}
|
@@ -21315,7 +21369,7 @@ const queryMicrophonePermissionFromPermissionsAPI = () => __awaiter$f(void 0, vo
|
|
21315
21369
|
* If permission API is not supported on this browser, permission state is set to unsupported.
|
21316
21370
|
* @private
|
21317
21371
|
*/
|
21318
|
-
const getDevicePermissionState = (setVideoState, setAudioState) => __awaiter$
|
21372
|
+
const getDevicePermissionState = (setVideoState, setAudioState) => __awaiter$h(void 0, void 0, void 0, function* () {
|
21319
21373
|
const [cameraResult, microphoneResult] = yield Promise.all([
|
21320
21374
|
queryCameraPermissionFromPermissionsAPI(),
|
21321
21375
|
queryMicrophonePermissionFromPermissionsAPI()
|
@@ -21378,10 +21432,12 @@ const createParticipantModifier = (createModifiedParticipant) => {
|
|
21378
21432
|
};
|
21379
21433
|
/* @conditional-compile-remove(video-background-effects) */
|
21380
21434
|
/** @private */
|
21381
|
-
const getBackgroundEffectFromSelectedEffect = (selectedEffect) => (selectedEffect === null || selectedEffect === void 0 ? void 0 : selectedEffect.effectName) === 'blur'
|
21382
|
-
?
|
21435
|
+
const getBackgroundEffectFromSelectedEffect = (selectedEffect, VideoBackgroundEffectsDependency) => (selectedEffect === null || selectedEffect === void 0 ? void 0 : selectedEffect.effectName) === 'blur'
|
21436
|
+
? VideoBackgroundEffectsDependency.createBackgroundBlurEffect()
|
21383
21437
|
: (selectedEffect === null || selectedEffect === void 0 ? void 0 : selectedEffect.effectName) === 'replacement'
|
21384
|
-
?
|
21438
|
+
? VideoBackgroundEffectsDependency.createBackgroundReplacementEffect({
|
21439
|
+
backgroundImageUrl: selectedEffect.backgroundImageUrl
|
21440
|
+
})
|
21385
21441
|
: undefined;
|
21386
21442
|
/**
|
21387
21443
|
* @remarks this logic should mimic the onToggleCamera in the common call handlers.
|
@@ -21391,7 +21447,7 @@ const getSelectedCameraFromAdapterState = (state) => state.devices.selectedCamer
|
|
21391
21447
|
|
21392
21448
|
// Copyright (c) Microsoft Corporation.
|
21393
21449
|
// Licensed under the MIT license.
|
21394
|
-
var __awaiter$
|
21450
|
+
var __awaiter$g = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
21395
21451
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
21396
21452
|
return new (P || (P = Promise))(function (resolve, reject) {
|
21397
21453
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -21410,112 +21466,112 @@ _component) => {
|
|
21410
21466
|
return createCompositeHandlers(useAdapter());
|
21411
21467
|
};
|
21412
21468
|
const createCompositeHandlers = memoizeOne__default['default']((adapter) => ({
|
21413
|
-
onCreateLocalStreamView: (options) => __awaiter$
|
21469
|
+
onCreateLocalStreamView: (options) => __awaiter$g(void 0, void 0, void 0, function* () {
|
21414
21470
|
return yield adapter.createStreamView(undefined, options);
|
21415
21471
|
}),
|
21416
|
-
onCreateRemoteStreamView: (userId, options) => __awaiter$
|
21472
|
+
onCreateRemoteStreamView: (userId, options) => __awaiter$g(void 0, void 0, void 0, function* () {
|
21417
21473
|
return yield adapter.createStreamView(userId, options);
|
21418
21474
|
}),
|
21419
|
-
onHangUp: (forEveryone) => __awaiter$
|
21475
|
+
onHangUp: (forEveryone) => __awaiter$g(void 0, void 0, void 0, function* () {
|
21420
21476
|
yield adapter.leaveCall(forEveryone);
|
21421
21477
|
}),
|
21422
21478
|
/* @conditional-compile-remove(PSTN-calls) */
|
21423
|
-
onToggleHold: () => __awaiter$
|
21479
|
+
onToggleHold: () => __awaiter$g(void 0, void 0, void 0, function* () {
|
21424
21480
|
var _a;
|
21425
21481
|
return ((_a = adapter.getState().call) === null || _a === void 0 ? void 0 : _a.state) === 'LocalHold' ? yield adapter.resumeCall() : yield adapter.holdCall();
|
21426
21482
|
}),
|
21427
21483
|
/* @conditional-compile-remove(PSTN-calls) */
|
21428
|
-
onAddParticipant: (participant, options) => __awaiter$
|
21484
|
+
onAddParticipant: (participant, options) => __awaiter$g(void 0, void 0, void 0, function* () {
|
21429
21485
|
return yield adapter.addParticipant(participant, options);
|
21430
21486
|
}),
|
21431
21487
|
/* @conditional-compile-remove(PSTN-calls) */
|
21432
|
-
onSendDtmfTone: (dtmfTone) => __awaiter$
|
21488
|
+
onSendDtmfTone: (dtmfTone) => __awaiter$g(void 0, void 0, void 0, function* () {
|
21433
21489
|
yield adapter.sendDtmfTone(dtmfTone);
|
21434
21490
|
}),
|
21435
|
-
onRemoveParticipant: (userId) => __awaiter$
|
21491
|
+
onRemoveParticipant: (userId) => __awaiter$g(void 0, void 0, void 0, function* () {
|
21436
21492
|
yield adapter.removeParticipant(userId);
|
21437
21493
|
}),
|
21438
|
-
onSelectCamera: (deviceInfo, options) => __awaiter$
|
21494
|
+
onSelectCamera: (deviceInfo, options) => __awaiter$g(void 0, void 0, void 0, function* () {
|
21439
21495
|
yield adapter.setCamera(deviceInfo, options);
|
21440
21496
|
}),
|
21441
|
-
onSelectMicrophone: (deviceInfo) => __awaiter$
|
21497
|
+
onSelectMicrophone: (deviceInfo) => __awaiter$g(void 0, void 0, void 0, function* () {
|
21442
21498
|
yield adapter.setMicrophone(deviceInfo);
|
21443
21499
|
}),
|
21444
|
-
onSelectSpeaker: (deviceInfo) => __awaiter$
|
21500
|
+
onSelectSpeaker: (deviceInfo) => __awaiter$g(void 0, void 0, void 0, function* () {
|
21445
21501
|
yield adapter.setSpeaker(deviceInfo);
|
21446
21502
|
}),
|
21447
21503
|
onStartCall: (participants, options) => {
|
21448
21504
|
const rawIds = participants.map((participant) => toFlatCommunicationIdentifier(participant));
|
21449
21505
|
return adapter.startCall(rawIds, options);
|
21450
21506
|
},
|
21451
|
-
onStartScreenShare: () => __awaiter$
|
21507
|
+
onStartScreenShare: () => __awaiter$g(void 0, void 0, void 0, function* () {
|
21452
21508
|
yield adapter.startScreenShare();
|
21453
21509
|
}),
|
21454
|
-
onStopScreenShare: () => __awaiter$
|
21510
|
+
onStopScreenShare: () => __awaiter$g(void 0, void 0, void 0, function* () {
|
21455
21511
|
yield adapter.stopScreenShare();
|
21456
21512
|
}),
|
21457
|
-
onToggleCamera: (options) => __awaiter$
|
21513
|
+
onToggleCamera: (options) => __awaiter$g(void 0, void 0, void 0, function* () {
|
21458
21514
|
isCameraOn(adapter.getState()) ? yield adapter.stopCamera() : yield adapter.startCamera(options);
|
21459
21515
|
}),
|
21460
|
-
onToggleMicrophone: () => __awaiter$
|
21516
|
+
onToggleMicrophone: () => __awaiter$g(void 0, void 0, void 0, function* () {
|
21461
21517
|
var _b;
|
21462
21518
|
return ((_b = adapter.getState().call) === null || _b === void 0 ? void 0 : _b.isMuted) ? yield adapter.unmute() : yield adapter.mute();
|
21463
21519
|
}),
|
21464
|
-
onToggleScreenShare: () => __awaiter$
|
21520
|
+
onToggleScreenShare: () => __awaiter$g(void 0, void 0, void 0, function* () {
|
21465
21521
|
var _c;
|
21466
21522
|
return ((_c = adapter.getState().call) === null || _c === void 0 ? void 0 : _c.isScreenSharingOn)
|
21467
21523
|
? yield adapter.stopScreenShare()
|
21468
21524
|
: yield adapter.startScreenShare();
|
21469
21525
|
}),
|
21470
|
-
onStartLocalVideo: () => __awaiter$
|
21526
|
+
onStartLocalVideo: () => __awaiter$g(void 0, void 0, void 0, function* () {
|
21471
21527
|
if (adapter.getState().call) {
|
21472
21528
|
return adapter.startCamera();
|
21473
21529
|
}
|
21474
21530
|
}),
|
21475
|
-
onDisposeLocalStreamView: () => __awaiter$
|
21531
|
+
onDisposeLocalStreamView: () => __awaiter$g(void 0, void 0, void 0, function* () {
|
21476
21532
|
return adapter.disposeLocalVideoStreamView();
|
21477
21533
|
}),
|
21478
|
-
onDisposeRemoteStreamView: (userId) => __awaiter$
|
21534
|
+
onDisposeRemoteStreamView: (userId) => __awaiter$g(void 0, void 0, void 0, function* () {
|
21479
21535
|
return adapter.disposeStreamView(userId);
|
21480
21536
|
}),
|
21481
|
-
onDisposeRemoteScreenShareStreamView: (userId) => __awaiter$
|
21537
|
+
onDisposeRemoteScreenShareStreamView: (userId) => __awaiter$g(void 0, void 0, void 0, function* () {
|
21482
21538
|
return adapter.disposeScreenShareStreamView(userId);
|
21483
21539
|
}),
|
21484
|
-
onDisposeRemoteVideoStreamView: (userId) => __awaiter$
|
21540
|
+
onDisposeRemoteVideoStreamView: (userId) => __awaiter$g(void 0, void 0, void 0, function* () {
|
21485
21541
|
return adapter.disposeRemoteVideoStreamView(userId);
|
21486
21542
|
}),
|
21487
21543
|
/* @conditional-compile-remove(call-readiness) */
|
21488
|
-
askDevicePermission: (constrain) => __awaiter$
|
21544
|
+
askDevicePermission: (constrain) => __awaiter$g(void 0, void 0, void 0, function* () {
|
21489
21545
|
return adapter.askDevicePermission(constrain);
|
21490
21546
|
}),
|
21491
21547
|
/* @conditional-compile-remove(video-background-effects) */
|
21492
|
-
onRemoveVideoBackgroundEffects: () => __awaiter$
|
21548
|
+
onRemoveVideoBackgroundEffects: () => __awaiter$g(void 0, void 0, void 0, function* () {
|
21493
21549
|
return yield adapter.stopVideoBackgroundEffects();
|
21494
21550
|
}),
|
21495
21551
|
/* @conditional-compile-remove(video-background-effects) */
|
21496
|
-
onBlurVideoBackground: (backgroundBlurConfig) => __awaiter$
|
21552
|
+
onBlurVideoBackground: (backgroundBlurConfig) => __awaiter$g(void 0, void 0, void 0, function* () {
|
21497
21553
|
const blurConfig = Object.assign({ effectName: 'blur' }, backgroundBlurConfig);
|
21498
21554
|
return yield adapter.startVideoBackgroundEffect(blurConfig);
|
21499
21555
|
}),
|
21500
21556
|
/* @conditional-compile-remove(video-background-effects) */
|
21501
|
-
onReplaceVideoBackground: (backgroundReplacementConfig) => __awaiter$
|
21557
|
+
onReplaceVideoBackground: (backgroundReplacementConfig) => __awaiter$g(void 0, void 0, void 0, function* () {
|
21502
21558
|
const replacementConfig = Object.assign({ effectName: 'replacement' }, backgroundReplacementConfig);
|
21503
21559
|
return yield adapter.startVideoBackgroundEffect(replacementConfig);
|
21504
21560
|
}),
|
21505
21561
|
/* @conditional-compile-remove(close-captions) */
|
21506
|
-
onStartCaptions: (options) => __awaiter$
|
21562
|
+
onStartCaptions: (options) => __awaiter$g(void 0, void 0, void 0, function* () {
|
21507
21563
|
yield adapter.startCaptions(options);
|
21508
21564
|
}),
|
21509
21565
|
/* @conditional-compile-remove(close-captions) */
|
21510
|
-
onStopCaptions: () => __awaiter$
|
21566
|
+
onStopCaptions: () => __awaiter$g(void 0, void 0, void 0, function* () {
|
21511
21567
|
yield adapter.stopCaptions();
|
21512
21568
|
}),
|
21513
21569
|
/* @conditional-compile-remove(close-captions) */
|
21514
|
-
onSetSpokenLanguage: (language) => __awaiter$
|
21570
|
+
onSetSpokenLanguage: (language) => __awaiter$g(void 0, void 0, void 0, function* () {
|
21515
21571
|
yield adapter.setSpokenLanguage(language);
|
21516
21572
|
}),
|
21517
21573
|
/* @conditional-compile-remove(close-captions) */
|
21518
|
-
onSetCaptionLanguage: (language) => __awaiter$
|
21574
|
+
onSetCaptionLanguage: (language) => __awaiter$g(void 0, void 0, void 0, function* () {
|
21519
21575
|
yield adapter.setCaptionLanguage(language);
|
21520
21576
|
})
|
21521
21577
|
}));
|
@@ -21646,7 +21702,7 @@ const MoreButton = (props) => {
|
|
21646
21702
|
return (React__default['default'].createElement(ControlBarButton, Object.assign({}, props, { labelKey: 'optionsButtonLabelKey', showLabel: props.showLabel, onRenderOnIcon: icon$2, onRenderOffIcon: icon$2, onClick: props.onClick, "data-ui-id": props['data-ui-id'] })));
|
21647
21703
|
};
|
21648
21704
|
|
21649
|
-
var __awaiter$
|
21705
|
+
var __awaiter$f = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
21650
21706
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
21651
21707
|
return new (P || (P = Promise))(function (resolve, reject) {
|
21652
21708
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -21674,7 +21730,7 @@ const CaptionsBannerMoreButton = (props) => {
|
|
21674
21730
|
/* @conditional-compile-remove(close-captions) */
|
21675
21731
|
const moreButtonContextualMenuItems = [];
|
21676
21732
|
/* @conditional-compile-remove(close-captions) */
|
21677
|
-
const startCaptions = React.useCallback(() => __awaiter$
|
21733
|
+
const startCaptions = React.useCallback(() => __awaiter$f(void 0, void 0, void 0, function* () {
|
21678
21734
|
yield startCaptionsButtonHandlers.onStartCaptions({
|
21679
21735
|
spokenLanguage: startCaptionsButtonProps.currentSpokenLanguage
|
21680
21736
|
});
|
@@ -22058,8 +22114,9 @@ const ScreenShare = (props) => {
|
|
22058
22114
|
/* @conditional-compile-remove(rooms) */
|
22059
22115
|
const isRoomsCall = adapter.getState().isRoomsCall;
|
22060
22116
|
const screenShareButtonDisabled = () => {
|
22061
|
-
|
22062
|
-
|
22117
|
+
var _a;
|
22118
|
+
/* @conditional-compile-remove(capabilities) */ /* @conditional-compile-remove(PSTN-calls) */
|
22119
|
+
return (_a = screenShareButtonProps === null || screenShareButtonProps === void 0 ? void 0 : screenShareButtonProps.disabled) !== null && _a !== void 0 ? _a : isDisabled(props.option);
|
22063
22120
|
};
|
22064
22121
|
return (React__default['default'].createElement(ScreenShareButton, Object.assign({ "data-ui-id": "call-composite-screenshare-button" }, screenShareButtonProps, { showLabel: props.displayType !== 'compact', disabled: screenShareButtonDisabled() ||
|
22065
22122
|
props.disabled ||
|
@@ -22540,7 +22597,7 @@ const onFetchCustomButtonPropsTrampoline = (options) => {
|
|
22540
22597
|
|
22541
22598
|
// Copyright (c) Microsoft Corporation.
|
22542
22599
|
// Licensed under the MIT license.
|
22543
|
-
var __awaiter$
|
22600
|
+
var __awaiter$e = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
22544
22601
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
22545
22602
|
return new (P || (P = Promise))(function (resolve, reject) {
|
22546
22603
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -22563,7 +22620,7 @@ const DesktopMoreButton = (props) => {
|
|
22563
22620
|
/* @conditional-compile-remove(close-captions) */
|
22564
22621
|
const startCaptionsButtonHandlers = useHandlers();
|
22565
22622
|
/* @conditional-compile-remove(close-captions) */
|
22566
|
-
const startCaptions = React.useCallback(() => __awaiter$
|
22623
|
+
const startCaptions = React.useCallback(() => __awaiter$e(void 0, void 0, void 0, function* () {
|
22567
22624
|
yield startCaptionsButtonHandlers.onStartCaptions({
|
22568
22625
|
spokenLanguage: startCaptionsButtonProps.currentSpokenLanguage
|
22569
22626
|
});
|
@@ -23127,7 +23184,7 @@ const themedToggleButtonStyle = (theme, checked) => {
|
|
23127
23184
|
|
23128
23185
|
// Copyright (c) Microsoft Corporation.
|
23129
23186
|
// Licensed under the MIT license.
|
23130
|
-
var __awaiter$
|
23187
|
+
var __awaiter$d = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
23131
23188
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
23132
23189
|
return new (P || (P = Promise))(function (resolve, reject) {
|
23133
23190
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -23267,7 +23324,7 @@ const MoreDrawer = (props) => {
|
|
23267
23324
|
/* @conditional-compile-remove(close-captions) */
|
23268
23325
|
const [currentSpokenLanguage, setCurrentSpokenLanguage] = React.useState(startCaptionsButtonProps.currentSpokenLanguage);
|
23269
23326
|
/* @conditional-compile-remove(close-captions) */
|
23270
|
-
const onToggleChange = React.useCallback(() => __awaiter$
|
23327
|
+
const onToggleChange = React.useCallback(() => __awaiter$d(void 0, void 0, void 0, function* () {
|
23271
23328
|
if (!startCaptionsButtonProps.checked) {
|
23272
23329
|
yield startCaptionsButtonHandlers.onStartCaptions({
|
23273
23330
|
spokenLanguage: currentSpokenLanguage
|
@@ -23956,7 +24013,7 @@ const AddPeopleButton = (props) => {
|
|
23956
24013
|
|
23957
24014
|
// Copyright (c) Microsoft Corporation.
|
23958
24015
|
// Licensed under the MIT license.
|
23959
|
-
var __awaiter$
|
24016
|
+
var __awaiter$c = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
23960
24017
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
23961
24018
|
return new (P || (P = Promise))(function (resolve, reject) {
|
23962
24019
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -23978,11 +24035,11 @@ const PeoplePaneContent = (props) => {
|
|
23978
24035
|
return localeStrings.strings.call;
|
23979
24036
|
};
|
23980
24037
|
const strings = getStrings();
|
23981
|
-
const removeParticipantFromCall = React.useCallback((participantId) => __awaiter$
|
24038
|
+
const removeParticipantFromCall = React.useCallback((participantId) => __awaiter$c(void 0, void 0, void 0, function* () {
|
23982
24039
|
yield adapter.removeParticipant(participantId);
|
23983
24040
|
}), [adapter]);
|
23984
24041
|
/* @conditional-compile-remove(PSTN-calls) */
|
23985
|
-
const addParticipantToCall = React.useCallback((participant, options) => __awaiter$
|
24042
|
+
const addParticipantToCall = React.useCallback((participant, options) => __awaiter$c(void 0, void 0, void 0, function* () {
|
23986
24043
|
yield adapter.addParticipant(participant, options);
|
23987
24044
|
}), [adapter]);
|
23988
24045
|
/* @conditional-compile-remove(PSTN-calls) */
|
@@ -24009,7 +24066,7 @@ const PeoplePaneContent = (props) => {
|
|
24009
24066
|
setDrawerMenuItems
|
24010
24067
|
]);
|
24011
24068
|
const participantListProps = React.useMemo(() => {
|
24012
|
-
const onRemoveAParticipant = (participantId) => __awaiter$
|
24069
|
+
const onRemoveAParticipant = (participantId) => __awaiter$c(void 0, void 0, void 0, function* () { return removeParticipantFromCall(participantId); });
|
24013
24070
|
return Object.assign(Object.assign({}, participantListDefaultProps), {
|
24014
24071
|
// Passing undefined callback for mobile to avoid context menus for participants in ParticipantList are clicked
|
24015
24072
|
onRemoveParticipant: props.mobileView ? undefined : onRemoveAParticipant,
|
@@ -24143,7 +24200,7 @@ const localVideoSelector = reselect__namespace.createSelector([callStatusSelecto
|
|
24143
24200
|
};
|
24144
24201
|
});
|
24145
24202
|
|
24146
|
-
var __awaiter$
|
24203
|
+
var __awaiter$b = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
24147
24204
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
24148
24205
|
return new (P || (P = Promise))(function (resolve, reject) {
|
24149
24206
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -24212,7 +24269,7 @@ const VideoEffectsPaneContent = (props) => {
|
|
24212
24269
|
return videoEffects;
|
24213
24270
|
}, [strings, adapter]);
|
24214
24271
|
/* @conditional-compile-remove(video-background-effects) */
|
24215
|
-
const onEffectChange = React.useCallback((effectKey) => __awaiter$
|
24272
|
+
const onEffectChange = React.useCallback((effectKey) => __awaiter$b(void 0, void 0, void 0, function* () {
|
24216
24273
|
if (effectKey === 'blur') {
|
24217
24274
|
const blurEffect = {
|
24218
24275
|
effectName: effectKey
|
@@ -24693,6 +24750,8 @@ const CallArrangement = (props) => {
|
|
24693
24750
|
placeholderText: callWithChatStrings.dtmfDialpadPlaceholderText
|
24694
24751
|
}), [callWithChatStrings]);
|
24695
24752
|
/* @conditional-compile-remove(video-background-effects) */
|
24753
|
+
const onResolveVideoEffectDependency = adapter.getState().onResolveVideoEffectDependency;
|
24754
|
+
/* @conditional-compile-remove(video-background-effects) */
|
24696
24755
|
const { openVideoEffectsPane } = useVideoEffectsPane(props.updateSidePaneRenderer, props.mobileView, props.latestErrors, props.onDismissError);
|
24697
24756
|
const [showDrawer, setShowDrawer] = React.useState(false);
|
24698
24757
|
const onMoreButtonClicked = React.useCallback(() => {
|
@@ -24760,7 +24819,7 @@ const CallArrangement = (props) => {
|
|
24760
24819
|
/* @conditional-compile-remove(close-captions) */
|
24761
24820
|
isCaptionsSupported: isTeamsCall && hasJoinedCall,
|
24762
24821
|
/* @conditional-compile-remove(video-background-effects) */
|
24763
|
-
onShowVideoEffectsPicker: openVideoEffectsPane,
|
24822
|
+
onShowVideoEffectsPicker: onResolveVideoEffectDependency ? openVideoEffectsPane : undefined,
|
24764
24823
|
/* @conditional-compile-remove(PSTN-calls) */
|
24765
24824
|
onClickShowDialpad: alternateCallerId ? onClickShowDialpad : undefined, displayVertical: verticalControlBar }))))),
|
24766
24825
|
((_e = props.callControlProps) === null || _e === void 0 ? void 0 : _e.options) !== false && showDrawer && (React__default['default'].createElement(react.Stack, { styles: drawerContainerStylesValue },
|
@@ -25601,8 +25660,10 @@ const LocalDeviceSettings = (props) => {
|
|
25601
25660
|
var _a, _b;
|
25602
25661
|
const theme = useTheme();
|
25603
25662
|
const locale = useLocale();
|
25604
|
-
/* @conditional-compile-remove(call-readiness) */ /* @conditional-compile-remove(rooms) */
|
25663
|
+
/* @conditional-compile-remove(call-readiness) */ /* @conditional-compile-remove(video-background-effects) */ /* @conditional-compile-remove(rooms) */
|
25605
25664
|
const adapter = useAdapter();
|
25665
|
+
/* @conditional-compile-remove(video-background-effects) */
|
25666
|
+
const onResolveVideoEffectDependency = adapter.getState().onResolveVideoEffectDependency;
|
25606
25667
|
const defaultPlaceHolder = locale.strings.call.defaultPlaceHolder;
|
25607
25668
|
const cameraLabel = locale.strings.call.cameraLabel;
|
25608
25669
|
const soundLabel = locale.strings.call.soundLabel;
|
@@ -25662,7 +25723,7 @@ const LocalDeviceSettings = (props) => {
|
|
25662
25723
|
React__default['default'].createElement(react.Stack, { horizontal: true, horizontalAlign: "space-between", styles: cameraAndVideoEffectsContainerStyleDesktop },
|
25663
25724
|
React__default['default'].createElement(react.Label, { id: 'call-composite-local-camera-settings-label', className: react.mergeStyles(dropDownStyles(theme).label), disabled: !cameraPermissionGranted }, cameraLabel),
|
25664
25725
|
/* @conditional-compile-remove(video-background-effects) */
|
25665
|
-
React__default['default'].createElement(react.DefaultButton, { iconProps: { iconName: 'ConfigurationScreenVideoEffectsButton' }, styles: effectsButtonStyles(theme), onClick: props.onVideoEffectsClick, "data-ui-id": 'call-config-video-effects-button' }, locale.strings.call.configurationPageVideoEffectsButtonLabel)),
|
25726
|
+
onResolveVideoEffectDependency && (React__default['default'].createElement(react.DefaultButton, { iconProps: { iconName: 'ConfigurationScreenVideoEffectsButton' }, styles: effectsButtonStyles(theme), onClick: props.onVideoEffectsClick, "data-ui-id": 'call-config-video-effects-button' }, locale.strings.call.configurationPageVideoEffectsButtonLabel))),
|
25666
25727
|
React__default['default'].createElement(ConfigurationPageCameraDropdown, { cameraGrantedDropdown: cameraGrantedDropdown, cameraPermissionGranted: cameraPermissionGranted !== null && cameraPermissionGranted !== void 0 ? cameraPermissionGranted : false,
|
25667
25728
|
/* @conditional-compile-remove(call-readiness) */
|
25668
25729
|
dropdownProps: dropdownProps,
|
@@ -25802,7 +25863,7 @@ const localPreviewButtonStyle = {
|
|
25802
25863
|
|
25803
25864
|
// Copyright (c) Microsoft Corporation.
|
25804
25865
|
// Licensed under the MIT license.
|
25805
|
-
var __awaiter$
|
25866
|
+
var __awaiter$a = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
25806
25867
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
25807
25868
|
return new (P || (P = Promise))(function (resolve, reject) {
|
25808
25869
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -25822,7 +25883,7 @@ const LocalPreview = (props) => {
|
|
25822
25883
|
const { audio: microphonePermissionGranted, video: cameraPermissionGranted } = useSelector$1(devicePermissionSelector);
|
25823
25884
|
const isLocalMicrophoneEnabled = useSelector$1(getLocalMicrophoneEnabled);
|
25824
25885
|
const adapter = useAdapter();
|
25825
|
-
const onToggleMic = React.useCallback(() => __awaiter$
|
25886
|
+
const onToggleMic = React.useCallback(() => __awaiter$a(void 0, void 0, void 0, function* () {
|
25826
25887
|
isLocalMicrophoneEnabled ? adapter.mute() : adapter.unmute();
|
25827
25888
|
}), [adapter, isLocalMicrophoneEnabled]);
|
25828
25889
|
const hasNoDevices = devicesButtonProps.cameras.length === 0 &&
|
@@ -26090,7 +26151,7 @@ const CallReadinessModalFallBack = (props) => {
|
|
26090
26151
|
|
26091
26152
|
// Copyright (c) Microsoft Corporation.
|
26092
26153
|
// Licensed under the MIT license.
|
26093
|
-
var __awaiter$
|
26154
|
+
var __awaiter$9 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
26094
26155
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
26095
26156
|
return new (P || (P = Promise))(function (resolve, reject) {
|
26096
26157
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -26199,7 +26260,7 @@ const ConfigurationPage = (props) => {
|
|
26199
26260
|
const forceShowingCheckPermissions = !minimumFallbackTimerElapsed;
|
26200
26261
|
/* @conditional-compile-remove(video-background-effects) */
|
26201
26262
|
const { toggleVideoEffectsPane, closeVideoEffectsPane, isVideoEffectsPaneOpen } = useVideoEffectsPane(props.updateSidePaneRenderer, mobileView, props.latestErrors, props.onDismissError);
|
26202
|
-
const startCall = React.useCallback(() => __awaiter$
|
26263
|
+
const startCall = React.useCallback(() => __awaiter$9(void 0, void 0, void 0, function* () {
|
26203
26264
|
/* @conditional-compile-remove(video-background-effects) */
|
26204
26265
|
closeVideoEffectsPane();
|
26205
26266
|
startCallHandler();
|
@@ -26685,7 +26746,7 @@ const holdPaneContentStyles = {
|
|
26685
26746
|
|
26686
26747
|
// Copyright (c) Microsoft Corporation.
|
26687
26748
|
// Licensed under the MIT license.
|
26688
|
-
var __awaiter$
|
26749
|
+
var __awaiter$8 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
26689
26750
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
26690
26751
|
return new (P || (P = Promise))(function (resolve, reject) {
|
26691
26752
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -26720,7 +26781,7 @@ const HoldPane = () => {
|
|
26720
26781
|
React__default['default'].createElement(react.Stack, { horizontal: true, styles: holdPaneContentStyles },
|
26721
26782
|
React__default['default'].createElement(react.Text, { styles: holdPaneTimerStyles }, elapsedTime),
|
26722
26783
|
React__default['default'].createElement(react.Text, { styles: holdPaneLabelStyles }, strings.holdScreenLabel),
|
26723
|
-
React__default['default'].createElement(react.PrimaryButton, { text: !resumingCall ? strings.resumeCallButtonLabel : strings.resumingCallButtonLabel, ariaLabel: !resumingCall ? strings.resumeCallButtonAriaLabel : strings.resumingCallButtonAriaLabel, styles: resumeButtonStyles, disabled: resumingCall, onClick: () => __awaiter$
|
26784
|
+
React__default['default'].createElement(react.PrimaryButton, { text: !resumingCall ? strings.resumeCallButtonLabel : strings.resumingCallButtonLabel, ariaLabel: !resumingCall ? strings.resumeCallButtonAriaLabel : strings.resumingCallButtonAriaLabel, styles: resumeButtonStyles, disabled: resumingCall, onClick: () => __awaiter$8(void 0, void 0, void 0, function* () {
|
26724
26785
|
setResumingCall(true);
|
26725
26786
|
try {
|
26726
26787
|
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
@@ -26834,7 +26895,7 @@ const containerStyles = {
|
|
26834
26895
|
|
26835
26896
|
// Copyright (c) Microsoft Corporation.
|
26836
26897
|
// Licensed under the MIT license.
|
26837
|
-
var __awaiter$
|
26898
|
+
var __awaiter$7 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
26838
26899
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
26839
26900
|
return new (P || (P = Promise))(function (resolve, reject) {
|
26840
26901
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -26887,10 +26948,10 @@ const MainScreen = (props) => {
|
|
26887
26948
|
/* @conditional-compile-remove(rooms) */
|
26888
26949
|
switch (page) {
|
26889
26950
|
case 'roomNotFound':
|
26890
|
-
pageElement = (React__default['default'].createElement(NoticePage, { iconName: "
|
26951
|
+
pageElement = (React__default['default'].createElement(NoticePage, { iconName: "NoticePageAccessDeniedRoomsCall", title: locale.strings.call.roomNotFoundTitle, moreDetails: locale.strings.call.roomNotFoundDetails, dataUiId: 'room-not-found-page' }));
|
26891
26952
|
break;
|
26892
26953
|
case 'deniedPermissionToRoom':
|
26893
|
-
pageElement = (React__default['default'].createElement(NoticePage, { iconName: "
|
26954
|
+
pageElement = (React__default['default'].createElement(NoticePage, { iconName: "NoticePageAccessDeniedRoomsCall", title: locale.strings.call.deniedPermissionToRoomTitle, moreDetails: locale.strings.call.deniedPermissionToRoomDetails, dataUiId: 'not-invited-to-room-page' }));
|
26894
26955
|
break;
|
26895
26956
|
}
|
26896
26957
|
switch (page) {
|
@@ -26964,7 +27025,7 @@ const CallComposite = (props) => React__default['default'].createElement(CallCom
|
|
26964
27025
|
const CallCompositeInner = (props) => {
|
26965
27026
|
const { adapter, callInvitationUrl, onFetchAvatarPersonaData, onFetchParticipantMenuItems, options, formFactor = 'desktop' } = props;
|
26966
27027
|
React.useEffect(() => {
|
26967
|
-
(() => __awaiter$
|
27028
|
+
(() => __awaiter$7(void 0, void 0, void 0, function* () {
|
26968
27029
|
var _a;
|
26969
27030
|
const constrain = getQueryOptions({
|
26970
27031
|
/* @conditional-compile-remove(rooms) */ role: (_a = adapter.getState().call) === null || _a === void 0 ? void 0 : _a.role
|
@@ -27127,21 +27188,27 @@ class DiagnosticsForwarder {
|
|
27127
27188
|
*
|
27128
27189
|
* This is used to create correct handler for generic agent type
|
27129
27190
|
*/
|
27130
|
-
|
27191
|
+
function createHandlers(callClient, callAgent, deviceManager, call,
|
27192
|
+
/* @conditional-compile-remove(video-background-effects) */
|
27193
|
+
options) {
|
27131
27194
|
// Call can be either undefined or ACS Call
|
27132
27195
|
if (_isACSCallAgent(callAgent) && (!call || (call && _isACSCall(call)))) {
|
27133
|
-
return createDefaultCallingHandlers(callClient, callAgent, deviceManager, call
|
27196
|
+
return createDefaultCallingHandlers(callClient, callAgent, deviceManager, call,
|
27197
|
+
/* @conditional-compile-remove(video-background-effects) */
|
27198
|
+
options);
|
27134
27199
|
}
|
27135
27200
|
/* @conditional-compile-remove(teams-identity-support) */
|
27136
27201
|
if (_isTeamsCallAgent(callAgent) && (!call || (call && _isTeamsCall(call)))) {
|
27137
|
-
return createDefaultTeamsCallingHandlers(callClient, callAgent, deviceManager, call
|
27202
|
+
return createDefaultTeamsCallingHandlers(callClient, callAgent, deviceManager, call,
|
27203
|
+
/* @conditional-compile-remove(video-background-effects) */
|
27204
|
+
options);
|
27138
27205
|
}
|
27139
27206
|
throw new Error('Unhandled agent type');
|
27140
|
-
}
|
27207
|
+
}
|
27141
27208
|
|
27142
27209
|
// Copyright (c) Microsoft Corporation.
|
27143
27210
|
// Licensed under the MIT license.
|
27144
|
-
var __awaiter$
|
27211
|
+
var __awaiter$6 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
27145
27212
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
27146
27213
|
return new (P || (P = Promise))(function (resolve, reject) {
|
27147
27214
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -27158,7 +27225,7 @@ const createProfileStateModifier = (onFetchProfile, notifyUpdate) => {
|
|
27158
27225
|
return (state) => {
|
27159
27226
|
var _a;
|
27160
27227
|
const originalParticipants = (_a = state.call) === null || _a === void 0 ? void 0 : _a.remoteParticipants;
|
27161
|
-
(() => __awaiter$
|
27228
|
+
(() => __awaiter$6(void 0, void 0, void 0, function* () {
|
27162
27229
|
let shouldNotifyUpdates = false;
|
27163
27230
|
for (const key in originalParticipants) {
|
27164
27231
|
if (cachedDisplayName[key]) {
|
@@ -27185,7 +27252,7 @@ const createProfileStateModifier = (onFetchProfile, notifyUpdate) => {
|
|
27185
27252
|
|
27186
27253
|
// Copyright (c) Microsoft Corporation.
|
27187
27254
|
// Licensed under the MIT license.
|
27188
|
-
var __awaiter$
|
27255
|
+
var __awaiter$5 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
27189
27256
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
27190
27257
|
return new (P || (P = Promise))(function (resolve, reject) {
|
27191
27258
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -27199,7 +27266,7 @@ class CallContext {
|
|
27199
27266
|
constructor(clientState, isTeamsCall,
|
27200
27267
|
/* @conditional-compile-remove(rooms) */
|
27201
27268
|
isRoomsCall, options) {
|
27202
|
-
var _a, _b;
|
27269
|
+
var _a, _b, _c, _d;
|
27203
27270
|
this.emitter = new EventEmitter.EventEmitter();
|
27204
27271
|
this.state = {
|
27205
27272
|
isLocalPreviewMicrophoneEnabled: false,
|
@@ -27214,11 +27281,13 @@ class CallContext {
|
|
27214
27281
|
/* @conditional-compile-remove(PSTN-calls) */ alternateCallerId: clientState.alternateCallerId,
|
27215
27282
|
/* @conditional-compile-remove(unsupported-browser) */ environmentInfo: clientState.environmentInfo,
|
27216
27283
|
/* @conditional-compile-remove(unsupported-browser) */ unsupportedBrowserVersionsAllowed: false,
|
27217
|
-
/* @conditional-compile-remove(video-background-effects) */ videoBackgroundImages: options === null || options === void 0 ? void 0 : options.videoBackgroundImages,
|
27284
|
+
/* @conditional-compile-remove(video-background-effects) */ videoBackgroundImages: (_b = options === null || options === void 0 ? void 0 : options.videoBackgroundOptions) === null || _b === void 0 ? void 0 : _b.videoBackgroundImages,
|
27285
|
+
/* @conditional-compile-remove(video-background-effects) */
|
27286
|
+
onResolveVideoEffectDependency: (_c = options === null || options === void 0 ? void 0 : options.videoBackgroundOptions) === null || _c === void 0 ? void 0 : _c.onResolveDependency,
|
27218
27287
|
/* @conditional-compile-remove(video-background-effects) */ selectedVideoBackgroundEffect: undefined,
|
27219
27288
|
cameraStatus: undefined
|
27220
27289
|
};
|
27221
|
-
this.emitter.setMaxListeners((
|
27290
|
+
this.emitter.setMaxListeners((_d = options === null || options === void 0 ? void 0 : options.maxListeners) !== null && _d !== void 0 ? _d : 50);
|
27222
27291
|
this.bindPublicMethods();
|
27223
27292
|
this.displayNameModifier = (options === null || options === void 0 ? void 0 : options.onFetchProfile)
|
27224
27293
|
? createProfileStateModifier(options.onFetchProfile, () => {
|
@@ -27342,6 +27411,7 @@ const findLatestAcceptedTransfer = (acceptedTransfers) => {
|
|
27342
27411
|
*/
|
27343
27412
|
class AzureCommunicationCallAdapter {
|
27344
27413
|
constructor(callClient, locator, callAgent, deviceManager, options) {
|
27414
|
+
var _a;
|
27345
27415
|
this.participantSubscribers = new Map();
|
27346
27416
|
this.emitter = new EventEmitter.EventEmitter();
|
27347
27417
|
this.isMyMutedChanged = () => {
|
@@ -27359,6 +27429,8 @@ class AzureCommunicationCallAdapter {
|
|
27359
27429
|
const isTeamsMeeting = 'meetingLink' in this.locator;
|
27360
27430
|
/* @conditional-compile-remove(rooms) */
|
27361
27431
|
const isRoomsCall = 'roomId' in this.locator;
|
27432
|
+
/* @conditional-compile-remove(video-background-effects) */
|
27433
|
+
this.onResolveVideoBackgroundEffectsDependency = (_a = options === null || options === void 0 ? void 0 : options.videoBackgroundOptions) === null || _a === void 0 ? void 0 : _a.onResolveDependency;
|
27362
27434
|
this.context = new CallContext(callClient.getState(), isTeamsMeeting,
|
27363
27435
|
/* @conditional-compile-remove(rooms) */ isRoomsCall,
|
27364
27436
|
/* @conditional-compile-remove(video-background-effects) */ options);
|
@@ -27405,7 +27477,10 @@ class AzureCommunicationCallAdapter {
|
|
27405
27477
|
}
|
27406
27478
|
}
|
27407
27479
|
};
|
27408
|
-
this.handlers = createHandlers(callClient, callAgent, deviceManager, undefined
|
27480
|
+
this.handlers = createHandlers(callClient, callAgent, deviceManager, undefined,
|
27481
|
+
/* @conditional-compile-remove(video-background-effects) */ {
|
27482
|
+
onResolveVideoBackgroundEffectsDependency: this.onResolveVideoBackgroundEffectsDependency
|
27483
|
+
});
|
27409
27484
|
this.onClientStateChange = onStateChange;
|
27410
27485
|
this.subscribeDeviceManagerEvents();
|
27411
27486
|
this.callClient.onStateChange(onStateChange);
|
@@ -27523,9 +27598,9 @@ class AzureCommunicationCallAdapter {
|
|
27523
27598
|
this.callAgent.dispose();
|
27524
27599
|
}
|
27525
27600
|
queryCameras() {
|
27526
|
-
return __awaiter$
|
27601
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27527
27602
|
const startTime = new Date().getTime();
|
27528
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
27603
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
27529
27604
|
const cameras = yield this.deviceManager.getCameras();
|
27530
27605
|
const endTime = new Date().getTime();
|
27531
27606
|
compositeLogger.info('time to query cameras', endTime - startTime, 'ms');
|
@@ -27534,9 +27609,9 @@ class AzureCommunicationCallAdapter {
|
|
27534
27609
|
});
|
27535
27610
|
}
|
27536
27611
|
queryMicrophones() {
|
27537
|
-
return __awaiter$
|
27612
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27538
27613
|
const startTime = new Date().getTime();
|
27539
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
27614
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
27540
27615
|
const microphones = yield this.deviceManager.getMicrophones();
|
27541
27616
|
const endTime = new Date().getTime();
|
27542
27617
|
compositeLogger.info('time to query microphones', endTime - startTime, 'ms');
|
@@ -27545,9 +27620,9 @@ class AzureCommunicationCallAdapter {
|
|
27545
27620
|
});
|
27546
27621
|
}
|
27547
27622
|
querySpeakers() {
|
27548
|
-
return __awaiter$
|
27623
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27549
27624
|
const startTime = new Date().getTime();
|
27550
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
27625
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
27551
27626
|
const speakers = (yield this.deviceManager.isSpeakerSelectionAvailable) ? this.deviceManager.getSpeakers() : [];
|
27552
27627
|
const endTime = new Date().getTime();
|
27553
27628
|
compositeLogger.info('time to query speakers', endTime - startTime, 'ms');
|
@@ -27556,9 +27631,9 @@ class AzureCommunicationCallAdapter {
|
|
27556
27631
|
});
|
27557
27632
|
}
|
27558
27633
|
askDevicePermission(constrain) {
|
27559
|
-
return __awaiter$
|
27634
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27560
27635
|
const startTime = new Date().getTime();
|
27561
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
27636
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
27562
27637
|
yield this.deviceManager.askDevicePermission(constrain);
|
27563
27638
|
const endTime = new Date().getTime();
|
27564
27639
|
compositeLogger.info('time to query askDevicePermissions', endTime - startTime, 'ms');
|
@@ -27649,7 +27724,7 @@ class AzureCommunicationCallAdapter {
|
|
27649
27724
|
});
|
27650
27725
|
}
|
27651
27726
|
createStreamView(remoteUserId, options) {
|
27652
|
-
return __awaiter$
|
27727
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27653
27728
|
if (remoteUserId === undefined) {
|
27654
27729
|
return yield this.handlers.onCreateLocalStreamView(options);
|
27655
27730
|
}
|
@@ -27659,7 +27734,7 @@ class AzureCommunicationCallAdapter {
|
|
27659
27734
|
});
|
27660
27735
|
}
|
27661
27736
|
disposeStreamView(remoteUserId) {
|
27662
|
-
return __awaiter$
|
27737
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27663
27738
|
if (remoteUserId === undefined) {
|
27664
27739
|
yield this.handlers.onDisposeLocalStreamView();
|
27665
27740
|
}
|
@@ -27669,25 +27744,28 @@ class AzureCommunicationCallAdapter {
|
|
27669
27744
|
});
|
27670
27745
|
}
|
27671
27746
|
disposeScreenShareStreamView(remoteUserId) {
|
27672
|
-
return __awaiter$
|
27747
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27673
27748
|
yield this.handlers.onDisposeRemoteScreenShareStreamView(remoteUserId);
|
27674
27749
|
});
|
27675
27750
|
}
|
27676
27751
|
disposeRemoteVideoStreamView(remoteUserId) {
|
27677
|
-
return __awaiter$
|
27752
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27678
27753
|
yield this.handlers.onDisposeRemoteVideoStreamView(remoteUserId);
|
27679
27754
|
});
|
27680
27755
|
}
|
27681
27756
|
disposeLocalVideoStreamView() {
|
27682
|
-
return __awaiter$
|
27757
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27683
27758
|
yield this.handlers.onDisposeLocalStreamView();
|
27684
27759
|
});
|
27685
27760
|
}
|
27686
27761
|
leaveCall(forEveryone) {
|
27687
|
-
return __awaiter$
|
27762
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27688
27763
|
yield this.handlers.onHangUp(forEveryone);
|
27689
27764
|
this.unsubscribeCallEvents();
|
27690
|
-
this.handlers = createHandlers(this.callClient, this.callAgent, this.deviceManager, undefined
|
27765
|
+
this.handlers = createHandlers(this.callClient, this.callAgent, this.deviceManager, undefined,
|
27766
|
+
/* @conditional-compile-remove(video-background-effects) */ {
|
27767
|
+
onResolveVideoBackgroundEffectsDependency: this.onResolveVideoBackgroundEffectsDependency
|
27768
|
+
});
|
27691
27769
|
// We set the adapter.call object to undefined immediately when a call is ended.
|
27692
27770
|
// We do not set the context.callId to undefined because it is a part of the immutable data flow loop.
|
27693
27771
|
this.call = undefined;
|
@@ -27696,29 +27774,29 @@ class AzureCommunicationCallAdapter {
|
|
27696
27774
|
});
|
27697
27775
|
}
|
27698
27776
|
setCamera(device, options) {
|
27699
|
-
return __awaiter$
|
27700
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
27777
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27778
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
27701
27779
|
yield this.handlers.onSelectCamera(device, options);
|
27702
27780
|
}));
|
27703
27781
|
});
|
27704
27782
|
}
|
27705
27783
|
setMicrophone(device) {
|
27706
|
-
return __awaiter$
|
27707
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
27784
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27785
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
27708
27786
|
yield this.handlers.onSelectMicrophone(device);
|
27709
27787
|
}));
|
27710
27788
|
});
|
27711
27789
|
}
|
27712
27790
|
setSpeaker(device) {
|
27713
|
-
return __awaiter$
|
27714
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
27791
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27792
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
27715
27793
|
yield this.handlers.onSelectSpeaker(device);
|
27716
27794
|
}));
|
27717
27795
|
});
|
27718
27796
|
}
|
27719
27797
|
startCamera(options) {
|
27720
|
-
return __awaiter$
|
27721
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
27798
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27799
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
27722
27800
|
if (!isCameraOn(this.getState())) {
|
27723
27801
|
// First kick off the effect on the local device before starting the camera in the call.
|
27724
27802
|
// This prevents the effect not being applied for a brief moment when the camera is started.
|
@@ -27726,9 +27804,9 @@ class AzureCommunicationCallAdapter {
|
|
27726
27804
|
{
|
27727
27805
|
const selectedEffect = this.getState().selectedVideoBackgroundEffect;
|
27728
27806
|
const selectedCamera = getSelectedCameraFromAdapterState(this.getState());
|
27729
|
-
if (selectedEffect && selectedCamera) {
|
27807
|
+
if (selectedEffect && selectedCamera && this.onResolveVideoBackgroundEffectsDependency) {
|
27730
27808
|
const stream = new communicationCalling.LocalVideoStream(selectedCamera);
|
27731
|
-
const effect = getBackgroundEffectFromSelectedEffect(selectedEffect);
|
27809
|
+
const effect = getBackgroundEffectFromSelectedEffect(selectedEffect, yield this.onResolveVideoBackgroundEffectsDependency());
|
27732
27810
|
if (effect) {
|
27733
27811
|
yield stream.feature(communicationCalling.Features.VideoEffects).startEffects(effect);
|
27734
27812
|
}
|
@@ -27743,8 +27821,8 @@ class AzureCommunicationCallAdapter {
|
|
27743
27821
|
});
|
27744
27822
|
}
|
27745
27823
|
stopCamera() {
|
27746
|
-
return __awaiter$
|
27747
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
27824
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27825
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
27748
27826
|
if (isCameraOn(this.getState())) {
|
27749
27827
|
yield this.handlers.onToggleCamera();
|
27750
27828
|
}
|
@@ -27752,8 +27830,8 @@ class AzureCommunicationCallAdapter {
|
|
27752
27830
|
});
|
27753
27831
|
}
|
27754
27832
|
mute() {
|
27755
|
-
return __awaiter$
|
27756
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
27833
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27834
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
27757
27835
|
var _a, _b;
|
27758
27836
|
this.context.setIsLocalMicrophoneEnabled(false);
|
27759
27837
|
if (_isInCall((_a = this.call) === null || _a === void 0 ? void 0 : _a.state) && !((_b = this.call) === null || _b === void 0 ? void 0 : _b.isMuted)) {
|
@@ -27763,8 +27841,8 @@ class AzureCommunicationCallAdapter {
|
|
27763
27841
|
});
|
27764
27842
|
}
|
27765
27843
|
unmute() {
|
27766
|
-
return __awaiter$
|
27767
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
27844
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27845
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
27768
27846
|
var _a, _b;
|
27769
27847
|
this.context.setIsLocalMicrophoneEnabled(true);
|
27770
27848
|
if (_isInCall((_a = this.call) === null || _a === void 0 ? void 0 : _a.state) && ((_b = this.call) === null || _b === void 0 ? void 0 : _b.isMuted)) {
|
@@ -27774,8 +27852,8 @@ class AzureCommunicationCallAdapter {
|
|
27774
27852
|
});
|
27775
27853
|
}
|
27776
27854
|
startScreenShare() {
|
27777
|
-
return __awaiter$
|
27778
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
27855
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27856
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
27779
27857
|
var _a;
|
27780
27858
|
if (!((_a = this.call) === null || _a === void 0 ? void 0 : _a.isScreenSharingOn)) {
|
27781
27859
|
yield this.handlers.onToggleScreenShare();
|
@@ -27784,8 +27862,8 @@ class AzureCommunicationCallAdapter {
|
|
27784
27862
|
});
|
27785
27863
|
}
|
27786
27864
|
stopScreenShare() {
|
27787
|
-
return __awaiter$
|
27788
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
27865
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27866
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
27789
27867
|
var _a;
|
27790
27868
|
if ((_a = this.call) === null || _a === void 0 ? void 0 : _a.isScreenSharingOn) {
|
27791
27869
|
yield this.handlers.onToggleScreenShare();
|
@@ -27800,7 +27878,7 @@ class AzureCommunicationCallAdapter {
|
|
27800
27878
|
}
|
27801
27879
|
/* @conditional-compile-remove(video-background-effects) */
|
27802
27880
|
startVideoBackgroundEffect(videoBackgroundEffect) {
|
27803
|
-
return __awaiter$
|
27881
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27804
27882
|
if (this.isBlurEffect(videoBackgroundEffect)) {
|
27805
27883
|
const blurConfig = videoBackgroundEffect;
|
27806
27884
|
yield this.handlers.onBlurVideoBackground(blurConfig);
|
@@ -27813,7 +27891,7 @@ class AzureCommunicationCallAdapter {
|
|
27813
27891
|
}
|
27814
27892
|
/* @conditional-compile-remove(video-background-effects) */
|
27815
27893
|
stopVideoBackgroundEffects() {
|
27816
|
-
return __awaiter$
|
27894
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27817
27895
|
yield this.handlers.onRemoveVideoBackgroundEffects();
|
27818
27896
|
});
|
27819
27897
|
}
|
@@ -27857,7 +27935,10 @@ class AzureCommunicationCallAdapter {
|
|
27857
27935
|
this.context.setCurrentCallId(call.id);
|
27858
27936
|
// Resync state after callId is set
|
27859
27937
|
this.context.updateClientState(this.callClient.getState());
|
27860
|
-
this.handlers = createHandlers(this.callClient, this.callAgent, this.deviceManager, this.call
|
27938
|
+
this.handlers = createHandlers(this.callClient, this.callAgent, this.deviceManager, this.call,
|
27939
|
+
/* @conditional-compile-remove(video-background-effects) */ {
|
27940
|
+
onResolveVideoBackgroundEffectsDependency: this.onResolveVideoBackgroundEffectsDependency
|
27941
|
+
});
|
27861
27942
|
this.subscribeCallEvents();
|
27862
27943
|
}
|
27863
27944
|
/* @conditional-compile-remove(video-background-effects) */
|
@@ -27869,7 +27950,7 @@ class AzureCommunicationCallAdapter {
|
|
27869
27950
|
return effect.effectName === 'replacement';
|
27870
27951
|
}
|
27871
27952
|
removeParticipant(userId) {
|
27872
|
-
return __awaiter$
|
27953
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27873
27954
|
let participant = userId;
|
27874
27955
|
/* @conditional-compile-remove(PSTN-calls) */
|
27875
27956
|
participant = _toCommunicationIdentifier(userId);
|
@@ -27878,7 +27959,7 @@ class AzureCommunicationCallAdapter {
|
|
27878
27959
|
}
|
27879
27960
|
/* @conditional-compile-remove(PSTN-calls) */
|
27880
27961
|
addParticipant(participant, options) {
|
27881
|
-
return __awaiter$
|
27962
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27882
27963
|
if (communicationCommon.isPhoneNumberIdentifier(participant) && options) {
|
27883
27964
|
this.handlers.onAddParticipant(participant, options);
|
27884
27965
|
}
|
@@ -27890,7 +27971,7 @@ class AzureCommunicationCallAdapter {
|
|
27890
27971
|
/* @conditional-compile-remove(PSTN-calls) */
|
27891
27972
|
holdCall() {
|
27892
27973
|
var _a;
|
27893
|
-
return __awaiter$
|
27974
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27894
27975
|
if (((_a = this.call) === null || _a === void 0 ? void 0 : _a.state) !== 'LocalHold') {
|
27895
27976
|
this.handlers.onToggleHold();
|
27896
27977
|
}
|
@@ -27899,7 +27980,7 @@ class AzureCommunicationCallAdapter {
|
|
27899
27980
|
/* @conditional-compile-remove(PSTN-calls) */
|
27900
27981
|
resumeCall() {
|
27901
27982
|
var _a;
|
27902
|
-
return __awaiter$
|
27983
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27903
27984
|
if (((_a = this.call) === null || _a === void 0 ? void 0 : _a.state) === 'LocalHold') {
|
27904
27985
|
this.handlers.onToggleHold();
|
27905
27986
|
}
|
@@ -27907,31 +27988,31 @@ class AzureCommunicationCallAdapter {
|
|
27907
27988
|
}
|
27908
27989
|
/* @conditional-compile-remove(PSTN-calls) */
|
27909
27990
|
sendDtmfTone(dtmfTone) {
|
27910
|
-
return __awaiter$
|
27991
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27911
27992
|
this.handlers.onSendDtmfTone(dtmfTone);
|
27912
27993
|
});
|
27913
27994
|
}
|
27914
27995
|
/* @conditional-compile-remove(close-captions) */
|
27915
27996
|
startCaptions(options) {
|
27916
|
-
return __awaiter$
|
27997
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27917
27998
|
this.handlers.onStartCaptions(options);
|
27918
27999
|
});
|
27919
28000
|
}
|
27920
28001
|
/* @conditional-compile-remove(close-captions) */
|
27921
28002
|
stopCaptions() {
|
27922
|
-
return __awaiter$
|
28003
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27923
28004
|
this.handlers.onStopCaptions();
|
27924
28005
|
});
|
27925
28006
|
}
|
27926
28007
|
/* @conditional-compile-remove(close-captions) */
|
27927
28008
|
setCaptionLanguage(language) {
|
27928
|
-
return __awaiter$
|
28009
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27929
28010
|
this.handlers.onSetCaptionLanguage(language);
|
27930
28011
|
});
|
27931
28012
|
}
|
27932
28013
|
/* @conditional-compile-remove(close-captions) */
|
27933
28014
|
setSpokenLanguage(language) {
|
27934
|
-
return __awaiter$
|
28015
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27935
28016
|
this.handlers.onSetSpokenLanguage(language);
|
27936
28017
|
});
|
27937
28018
|
}
|
@@ -28054,7 +28135,7 @@ class AzureCommunicationCallAdapter {
|
|
28054
28135
|
this.emitter.off(event, listener);
|
28055
28136
|
}
|
28056
28137
|
asyncTeeErrorToEventEmitter(f) {
|
28057
|
-
return __awaiter$
|
28138
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
28058
28139
|
try {
|
28059
28140
|
return yield f();
|
28060
28141
|
}
|
@@ -28089,7 +28170,7 @@ class AzureCommunicationCallAdapter {
|
|
28089
28170
|
*/
|
28090
28171
|
const createAzureCommunicationCallAdapter = ({ userId, displayName, credential, locator,
|
28091
28172
|
/* @conditional-compile-remove(PSTN-calls) */ alternateCallerId,
|
28092
|
-
/* @conditional-compile-remove(video-background-effects) */ options }) => __awaiter$
|
28173
|
+
/* @conditional-compile-remove(video-background-effects) */ options }) => __awaiter$5(void 0, void 0, void 0, function* () {
|
28093
28174
|
if (!_isValidIdentifier(userId)) {
|
28094
28175
|
throw new Error('Invalid identifier. Please provide valid identifier object.');
|
28095
28176
|
}
|
@@ -28108,7 +28189,7 @@ const createAzureCommunicationCallAdapter = ({ userId, displayName, credential,
|
|
28108
28189
|
/**
|
28109
28190
|
* @beta
|
28110
28191
|
*/
|
28111
|
-
const createTeamsCallAdapter = ({ userId, credential, locator, options }) => __awaiter$
|
28192
|
+
const createTeamsCallAdapter = ({ userId, credential, locator, options }) => __awaiter$5(void 0, void 0, void 0, function* () {
|
28112
28193
|
const callClient = createStatefulCallClient({
|
28113
28194
|
userId
|
28114
28195
|
});
|
@@ -28148,7 +28229,7 @@ const useAzureCommunicationCallAdapterGeneric = (args, afterCreate, beforeDispos
|
|
28148
28229
|
if (adapterKind === 'AzureCommunication' && !displayName) {
|
28149
28230
|
return;
|
28150
28231
|
}
|
28151
|
-
(() => __awaiter$
|
28232
|
+
(() => __awaiter$5(void 0, void 0, void 0, function* () {
|
28152
28233
|
if (adapterRef.current) {
|
28153
28234
|
// Dispose the old adapter when a new one is created.
|
28154
28235
|
//
|
@@ -28227,7 +28308,7 @@ const useAzureCommunicationCallAdapterGeneric = (args, afterCreate, beforeDispos
|
|
28227
28308
|
// Dispose any existing adapter when the component unmounts.
|
28228
28309
|
React.useEffect(() => {
|
28229
28310
|
return () => {
|
28230
|
-
(() => __awaiter$
|
28311
|
+
(() => __awaiter$5(void 0, void 0, void 0, function* () {
|
28231
28312
|
if (adapterRef.current) {
|
28232
28313
|
if (beforeDisposeRef.current) {
|
28233
28314
|
yield beforeDisposeRef.current(adapterRef.current);
|
@@ -28321,7 +28402,7 @@ beforeDispose) => {
|
|
28321
28402
|
*
|
28322
28403
|
* @public
|
28323
28404
|
*/
|
28324
|
-
const createAzureCommunicationCallAdapterFromClient = (callClient, callAgent, locator, options) => __awaiter$
|
28405
|
+
const createAzureCommunicationCallAdapterFromClient = (callClient, callAgent, locator, options) => __awaiter$5(void 0, void 0, void 0, function* () {
|
28325
28406
|
const deviceManager = (yield callClient.getDeviceManager());
|
28326
28407
|
yield Promise.all([deviceManager.getCameras(), deviceManager.getMicrophones()]);
|
28327
28408
|
if (deviceManager.isSpeakerSelectionAvailable) {
|
@@ -28341,7 +28422,7 @@ const createAzureCommunicationCallAdapterFromClient = (callClient, callAgent, lo
|
|
28341
28422
|
*
|
28342
28423
|
* @beta
|
28343
28424
|
*/
|
28344
|
-
const createTeamsCallAdapterFromClient = (callClient, callAgent, locator, options) => __awaiter$
|
28425
|
+
const createTeamsCallAdapterFromClient = (callClient, callAgent, locator, options) => __awaiter$5(void 0, void 0, void 0, function* () {
|
28345
28426
|
const deviceManager = (yield callClient.getDeviceManager());
|
28346
28427
|
yield Promise.all([deviceManager.getCameras(), deviceManager.getMicrophones()]);
|
28347
28428
|
if (deviceManager.isSpeakerSelectionAvailable) {
|
@@ -28384,7 +28465,7 @@ const callCompositeContainerStyles = (isMobile) => ({
|
|
28384
28465
|
|
28385
28466
|
// Copyright (c) Microsoft Corporation.
|
28386
28467
|
// Licensed under the MIT license.
|
28387
|
-
var __awaiter$
|
28468
|
+
var __awaiter$4 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
28388
28469
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
28389
28470
|
return new (P || (P = Promise))(function (resolve, reject) {
|
28390
28471
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -28450,44 +28531,44 @@ class CallWithChatBackedCallAdapter {
|
|
28450
28531
|
return this.callWithChatAdapter.joinCall(options);
|
28451
28532
|
}
|
28452
28533
|
};
|
28453
|
-
this.leaveCall = (forEveryone) => __awaiter$
|
28534
|
+
this.leaveCall = (forEveryone) => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.leaveCall(forEveryone); });
|
28454
28535
|
this.startCall = (participants, options) => {
|
28455
28536
|
let communicationParticipants = participants;
|
28456
28537
|
/* @conditional-compile-remove(PSTN-calls) */
|
28457
28538
|
communicationParticipants = participants.map(_toCommunicationIdentifier);
|
28458
28539
|
return this.callWithChatAdapter.startCall(communicationParticipants, options);
|
28459
28540
|
};
|
28460
|
-
this.setCamera = (sourceId, options) => __awaiter$
|
28461
|
-
this.setMicrophone = (sourceId) => __awaiter$
|
28462
|
-
this.setSpeaker = (sourceId) => __awaiter$
|
28463
|
-
this.askDevicePermission = (constraints) => __awaiter$
|
28464
|
-
this.queryCameras = () => __awaiter$
|
28465
|
-
this.queryMicrophones = () => __awaiter$
|
28466
|
-
this.querySpeakers = () => __awaiter$
|
28467
|
-
this.startCamera = (options) => __awaiter$
|
28468
|
-
this.stopCamera = () => __awaiter$
|
28469
|
-
this.mute = () => __awaiter$
|
28470
|
-
this.unmute = () => __awaiter$
|
28471
|
-
this.startScreenShare = () => __awaiter$
|
28472
|
-
this.stopScreenShare = () => __awaiter$
|
28473
|
-
this.removeParticipant = (userId) => __awaiter$
|
28541
|
+
this.setCamera = (sourceId, options) => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.setCamera(sourceId, options); });
|
28542
|
+
this.setMicrophone = (sourceId) => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.setMicrophone(sourceId); });
|
28543
|
+
this.setSpeaker = (sourceId) => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.setSpeaker(sourceId); });
|
28544
|
+
this.askDevicePermission = (constraints) => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.askDevicePermission(constraints); });
|
28545
|
+
this.queryCameras = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.queryCameras(); });
|
28546
|
+
this.queryMicrophones = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.queryMicrophones(); });
|
28547
|
+
this.querySpeakers = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.querySpeakers(); });
|
28548
|
+
this.startCamera = (options) => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.startCamera(options); });
|
28549
|
+
this.stopCamera = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.stopCamera(); });
|
28550
|
+
this.mute = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.mute(); });
|
28551
|
+
this.unmute = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.unmute(); });
|
28552
|
+
this.startScreenShare = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.startScreenShare(); });
|
28553
|
+
this.stopScreenShare = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.stopScreenShare(); });
|
28554
|
+
this.removeParticipant = (userId) => __awaiter$4(this, void 0, void 0, function* () {
|
28474
28555
|
let participant = userId;
|
28475
28556
|
/* @conditional-compile-remove(PSTN-calls) */
|
28476
28557
|
participant = _toCommunicationIdentifier(userId);
|
28477
28558
|
yield this.callWithChatAdapter.removeParticipant(participant);
|
28478
28559
|
});
|
28479
|
-
this.createStreamView = (remoteUserId, options) => __awaiter$
|
28480
|
-
this.disposeStreamView = (remoteUserId, options) => __awaiter$
|
28560
|
+
this.createStreamView = (remoteUserId, options) => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.createStreamView(remoteUserId, options); });
|
28561
|
+
this.disposeStreamView = (remoteUserId, options) => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.disposeStreamView(remoteUserId, options); });
|
28481
28562
|
/* @conditional-compile-remove(PSTN-calls) */
|
28482
|
-
this.holdCall = () => __awaiter$
|
28563
|
+
this.holdCall = () => __awaiter$4(this, void 0, void 0, function* () {
|
28483
28564
|
yield this.callWithChatAdapter.holdCall();
|
28484
28565
|
});
|
28485
28566
|
/* @conditional-compile-remove(PSTN-calls) */
|
28486
|
-
this.resumeCall = () => __awaiter$
|
28567
|
+
this.resumeCall = () => __awaiter$4(this, void 0, void 0, function* () {
|
28487
28568
|
yield this.callWithChatAdapter.resumeCall();
|
28488
28569
|
});
|
28489
28570
|
/* @conditional-compile-remove(PSTN-calls) */
|
28490
|
-
this.sendDtmfTone = (dtmfTone) => __awaiter$
|
28571
|
+
this.sendDtmfTone = (dtmfTone) => __awaiter$4(this, void 0, void 0, function* () {
|
28491
28572
|
yield this.callWithChatAdapter.sendDtmfTone(dtmfTone);
|
28492
28573
|
});
|
28493
28574
|
this.callWithChatAdapter = callWithChatAdapter;
|
@@ -28503,7 +28584,7 @@ class CallWithChatBackedCallAdapter {
|
|
28503
28584
|
}
|
28504
28585
|
/* @conditional-compile-remove(PSTN-calls) */
|
28505
28586
|
addParticipant(participant, options) {
|
28506
|
-
return __awaiter$
|
28587
|
+
return __awaiter$4(this, void 0, void 0, function* () {
|
28507
28588
|
if (communicationCommon.isPhoneNumberIdentifier(participant) && options) {
|
28508
28589
|
return this.callWithChatAdapter.addParticipant(participant, options);
|
28509
28590
|
}
|
@@ -28518,37 +28599,37 @@ class CallWithChatBackedCallAdapter {
|
|
28518
28599
|
}
|
28519
28600
|
/* @conditional-compile-remove(close-captions) */
|
28520
28601
|
startCaptions(options) {
|
28521
|
-
return __awaiter$
|
28602
|
+
return __awaiter$4(this, void 0, void 0, function* () {
|
28522
28603
|
this.callWithChatAdapter.startCaptions(options);
|
28523
28604
|
});
|
28524
28605
|
}
|
28525
28606
|
/* @conditional-compile-remove(close-captions) */
|
28526
28607
|
stopCaptions() {
|
28527
|
-
return __awaiter$
|
28608
|
+
return __awaiter$4(this, void 0, void 0, function* () {
|
28528
28609
|
this.callWithChatAdapter.stopCaptions();
|
28529
28610
|
});
|
28530
28611
|
}
|
28531
28612
|
/* @conditional-compile-remove(close-captions) */
|
28532
28613
|
setCaptionLanguage(language) {
|
28533
|
-
return __awaiter$
|
28614
|
+
return __awaiter$4(this, void 0, void 0, function* () {
|
28534
28615
|
this.callWithChatAdapter.setCaptionLanguage(language);
|
28535
28616
|
});
|
28536
28617
|
}
|
28537
28618
|
/* @conditional-compile-remove(close-captions) */
|
28538
28619
|
setSpokenLanguage(language) {
|
28539
|
-
return __awaiter$
|
28620
|
+
return __awaiter$4(this, void 0, void 0, function* () {
|
28540
28621
|
this.callWithChatAdapter.setSpokenLanguage(language);
|
28541
28622
|
});
|
28542
28623
|
}
|
28543
28624
|
/* @conditional-compile-remove(video-background-effects) */
|
28544
28625
|
startVideoBackgroundEffect(videoBackgroundEffect) {
|
28545
|
-
return __awaiter$
|
28626
|
+
return __awaiter$4(this, void 0, void 0, function* () {
|
28546
28627
|
yield this.callWithChatAdapter.startVideoBackgroundEffect(videoBackgroundEffect);
|
28547
28628
|
});
|
28548
28629
|
}
|
28549
28630
|
/* @conditional-compile-remove(video-background-effects) */
|
28550
28631
|
stopVideoBackgroundEffects() {
|
28551
|
-
return __awaiter$
|
28632
|
+
return __awaiter$4(this, void 0, void 0, function* () {
|
28552
28633
|
yield this.callWithChatAdapter.stopVideoBackgroundEffects();
|
28553
28634
|
});
|
28554
28635
|
}
|
@@ -28580,13 +28661,15 @@ function callAdapterStateFromCallWithChatAdapterState(callWithChatAdapterState)
|
|
28580
28661
|
/* @conditional-compile-remove(video-background-effects) */
|
28581
28662
|
videoBackgroundImages: callWithChatAdapterState.videoBackgroundImages,
|
28582
28663
|
/* @conditional-compile-remove(video-background-effects) */
|
28664
|
+
onResolveVideoEffectDependency: callWithChatAdapterState.onResolveVideoEffectDependency,
|
28665
|
+
/* @conditional-compile-remove(video-background-effects) */
|
28583
28666
|
selectedVideoBackgroundEffect: callWithChatAdapterState.selectedVideoBackgroundEffect
|
28584
28667
|
};
|
28585
28668
|
}
|
28586
28669
|
|
28587
28670
|
// Copyright (c) Microsoft Corporation.
|
28588
28671
|
// Licensed under the MIT license.
|
28589
|
-
var __awaiter$
|
28672
|
+
var __awaiter$3 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
28590
28673
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
28591
28674
|
return new (P || (P = Promise))(function (resolve, reject) {
|
28592
28675
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -28607,12 +28690,12 @@ class CallWithChatBackedChatAdapter {
|
|
28607
28690
|
// For onStateChange we must convert CallWithChat state to chat state. This involves creating a new handler to be passed into the onStateChange.
|
28608
28691
|
// In order to unsubscribe the handler when offStateChange is called we must have a mapping of the original handler to the newly created handler.
|
28609
28692
|
this.eventStore = new Map();
|
28610
|
-
this.fetchInitialData = () => __awaiter$
|
28611
|
-
this.sendMessage = (content) => __awaiter$
|
28612
|
-
this.sendReadReceipt = (chatMessageId) => __awaiter$
|
28613
|
-
this.sendTypingIndicator = () => __awaiter$
|
28614
|
-
this.removeParticipant = (userId) => __awaiter$
|
28615
|
-
this.loadPreviousChatMessages = (messagesToLoad) => __awaiter$
|
28693
|
+
this.fetchInitialData = () => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.fetchInitialData(); });
|
28694
|
+
this.sendMessage = (content) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.sendMessage(content); });
|
28695
|
+
this.sendReadReceipt = (chatMessageId) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.sendReadReceipt(chatMessageId); });
|
28696
|
+
this.sendTypingIndicator = () => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.sendTypingIndicator(); });
|
28697
|
+
this.removeParticipant = (userId) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.removeParticipant(userId); });
|
28698
|
+
this.loadPreviousChatMessages = (messagesToLoad) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.loadPreviousChatMessages(messagesToLoad); });
|
28616
28699
|
this.dispose = () => this.callWithChatAdapter.dispose();
|
28617
28700
|
this.onStateChange = (handler) => {
|
28618
28701
|
const convertedHandler = (state) => {
|
@@ -28651,12 +28734,12 @@ class CallWithChatBackedChatAdapter {
|
|
28651
28734
|
return this.callWithChatAdapter.off(event, listener);
|
28652
28735
|
}
|
28653
28736
|
};
|
28654
|
-
this.updateMessage = (messageId, content, metadata) => __awaiter$
|
28655
|
-
this.deleteMessage = (messageId) => __awaiter$
|
28737
|
+
this.updateMessage = (messageId, content, metadata) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.updateMessage(messageId, content, metadata); });
|
28738
|
+
this.deleteMessage = (messageId) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.deleteMessage(messageId); });
|
28656
28739
|
this.clearErrors = (errorTypes) => {
|
28657
28740
|
throw new Error(`Method not supported in CallWithChatComposite.`);
|
28658
28741
|
};
|
28659
|
-
this.setTopic = (topicName) => __awaiter$
|
28742
|
+
this.setTopic = (topicName) => __awaiter$3(this, void 0, void 0, function* () {
|
28660
28743
|
throw new Error(`Chat Topics are not supported in CallWithChatComposite.`);
|
28661
28744
|
});
|
28662
28745
|
/* @conditional-compile-remove(file-sharing) */
|
@@ -28691,7 +28774,7 @@ class CallWithChatBackedChatAdapter {
|
|
28691
28774
|
}
|
28692
28775
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
28693
28776
|
downloadAttachments(options) {
|
28694
|
-
return __awaiter$
|
28777
|
+
return __awaiter$3(this, void 0, void 0, function* () {
|
28695
28778
|
return yield this.callWithChatAdapter.downloadAttachments(options);
|
28696
28779
|
});
|
28697
28780
|
}
|
@@ -29075,6 +29158,8 @@ function callWithChatAdapterStateFromBackingStates(callAdapter, chatAdapter) {
|
|
29075
29158
|
/* @conditional-compile-remove(video-background-effects) */
|
29076
29159
|
videoBackgroundImages: callAdapterState.videoBackgroundImages,
|
29077
29160
|
/* @conditional-compile-remove(video-background-effects) */
|
29161
|
+
onResolveVideoEffectDependency: callAdapterState.onResolveVideoEffectDependency,
|
29162
|
+
/* @conditional-compile-remove(video-background-effects) */
|
29078
29163
|
selectedVideoBackgroundEffect: callAdapterState.selectedVideoBackgroundEffect
|
29079
29164
|
};
|
29080
29165
|
}
|
@@ -29094,6 +29179,8 @@ function mergeCallAdapterStateIntoCallWithChatAdapterState(existingCallWithChatA
|
|
29094
29179
|
/* @conditional-compile-remove(video-background-effects) */
|
29095
29180
|
videoBackgroundImages: callAdapterState.videoBackgroundImages,
|
29096
29181
|
/* @conditional-compile-remove(video-background-effects) */
|
29182
|
+
onResolveVideoEffectDependency: callAdapterState.onResolveVideoEffectDependency,
|
29183
|
+
/* @conditional-compile-remove(video-background-effects) */
|
29097
29184
|
selectedVideoBackgroundEffect: callAdapterState.selectedVideoBackgroundEffect });
|
29098
29185
|
}
|
29099
29186
|
|
@@ -29133,7 +29220,7 @@ const getChatThreadFromTeamsLink = (teamsMeetingLink) => {
|
|
29133
29220
|
|
29134
29221
|
// Copyright (c) Microsoft Corporation.
|
29135
29222
|
// Licensed under the MIT license.
|
29136
|
-
var __awaiter = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
29223
|
+
var __awaiter$2 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
29137
29224
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
29138
29225
|
return new (P || (P = Promise))(function (resolve, reject) {
|
29139
29226
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -29305,7 +29392,7 @@ class AzureCommunicationCallWithChatAdapter {
|
|
29305
29392
|
}
|
29306
29393
|
/** Leave current Call. */
|
29307
29394
|
leaveCall(forEveryone) {
|
29308
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29395
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29309
29396
|
// Only remove self from the GroupCall. Contoso must manage access to Chat.
|
29310
29397
|
yield this.callAdapter.leaveCall(forEveryone);
|
29311
29398
|
});
|
@@ -29344,7 +29431,7 @@ class AzureCommunicationCallWithChatAdapter {
|
|
29344
29431
|
}
|
29345
29432
|
/** Remove a participant from the Call only. */
|
29346
29433
|
removeParticipant(userId) {
|
29347
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29434
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29348
29435
|
let participant = userId;
|
29349
29436
|
/* @conditional-compile-remove(PSTN-calls) */
|
29350
29437
|
participant = _toCommunicationIdentifier(userId);
|
@@ -29352,174 +29439,174 @@ class AzureCommunicationCallWithChatAdapter {
|
|
29352
29439
|
});
|
29353
29440
|
}
|
29354
29441
|
setCamera(device, options) {
|
29355
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29442
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29356
29443
|
yield this.callAdapter.setCamera(device, options);
|
29357
29444
|
});
|
29358
29445
|
}
|
29359
29446
|
/** Set the microphone to be used in the Call. */
|
29360
29447
|
setMicrophone(device) {
|
29361
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29448
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29362
29449
|
yield this.callAdapter.setMicrophone(device);
|
29363
29450
|
});
|
29364
29451
|
}
|
29365
29452
|
/** Set the speaker to be used in the Call. */
|
29366
29453
|
setSpeaker(device) {
|
29367
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29454
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29368
29455
|
yield this.callAdapter.setSpeaker(device);
|
29369
29456
|
});
|
29370
29457
|
}
|
29371
29458
|
askDevicePermission(constraints) {
|
29372
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29459
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29373
29460
|
yield this.callAdapter.askDevicePermission(constraints);
|
29374
29461
|
});
|
29375
29462
|
}
|
29376
29463
|
/** Query for available cameras. */
|
29377
29464
|
queryCameras() {
|
29378
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29465
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29379
29466
|
return yield this.callAdapter.queryCameras();
|
29380
29467
|
});
|
29381
29468
|
}
|
29382
29469
|
/** Query for available microphones. */
|
29383
29470
|
queryMicrophones() {
|
29384
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29471
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29385
29472
|
return yield this.callAdapter.queryMicrophones();
|
29386
29473
|
});
|
29387
29474
|
}
|
29388
29475
|
/** Query for available speakers. */
|
29389
29476
|
querySpeakers() {
|
29390
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29477
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29391
29478
|
return yield this.callAdapter.querySpeakers();
|
29392
29479
|
});
|
29393
29480
|
}
|
29394
29481
|
/** Start the camera for the user in the Call. */
|
29395
29482
|
startCamera(options) {
|
29396
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29483
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29397
29484
|
yield this.callAdapter.startCamera(options);
|
29398
29485
|
});
|
29399
29486
|
}
|
29400
29487
|
/** Stop the camera for the user in the Call. */
|
29401
29488
|
stopCamera() {
|
29402
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29489
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29403
29490
|
yield this.callAdapter.stopCamera();
|
29404
29491
|
});
|
29405
29492
|
}
|
29406
29493
|
/** Mute the user in the Call. */
|
29407
29494
|
mute() {
|
29408
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29495
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29409
29496
|
yield this.callAdapter.mute();
|
29410
29497
|
});
|
29411
29498
|
}
|
29412
29499
|
/** Unmute the user in the Call. */
|
29413
29500
|
unmute() {
|
29414
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29501
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29415
29502
|
yield this.callAdapter.unmute();
|
29416
29503
|
});
|
29417
29504
|
}
|
29418
29505
|
/** Trigger the user to start screen share. */
|
29419
29506
|
startScreenShare() {
|
29420
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29507
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29421
29508
|
yield this.callAdapter.startScreenShare();
|
29422
29509
|
});
|
29423
29510
|
}
|
29424
29511
|
/** Stop the current active screen share. */
|
29425
29512
|
stopScreenShare() {
|
29426
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29513
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29427
29514
|
yield this.callAdapter.stopScreenShare();
|
29428
29515
|
});
|
29429
29516
|
}
|
29430
29517
|
/** Create a stream view for a remote participants video feed. */
|
29431
29518
|
createStreamView(remoteUserId, options) {
|
29432
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29519
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29433
29520
|
return yield this.callAdapter.createStreamView(remoteUserId, options);
|
29434
29521
|
});
|
29435
29522
|
}
|
29436
29523
|
/** Dispose of a created stream view of a remote participants video feed. */
|
29437
29524
|
disposeStreamView(remoteUserId, options) {
|
29438
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29525
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29439
29526
|
yield this.callAdapter.disposeStreamView(remoteUserId, options);
|
29440
29527
|
});
|
29441
29528
|
}
|
29442
29529
|
/** Dispose of a remote screen share */
|
29443
29530
|
disposeScreenShareStreamView(remoteUserId) {
|
29444
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29531
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29445
29532
|
yield this.callAdapter.disposeScreenShareStreamView(remoteUserId);
|
29446
29533
|
});
|
29447
29534
|
}
|
29448
29535
|
/** Dispose of a remote video stream */
|
29449
29536
|
disposeRemoteVideoStreamView(remoteUserId) {
|
29450
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29537
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29451
29538
|
yield this.callAdapter.disposeRemoteVideoStreamView(remoteUserId);
|
29452
29539
|
});
|
29453
29540
|
}
|
29454
29541
|
/** Dispose of the local video stream */
|
29455
29542
|
disposeLocalVideoStreamView() {
|
29456
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29543
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29457
29544
|
yield this.callAdapter.disposeLocalVideoStreamView();
|
29458
29545
|
});
|
29459
29546
|
}
|
29460
29547
|
/** Fetch initial Call and Chat data such as chat messages. */
|
29461
29548
|
fetchInitialData() {
|
29462
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29549
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29463
29550
|
yield this.chatAdapter.fetchInitialData();
|
29464
29551
|
});
|
29465
29552
|
}
|
29466
29553
|
/** Send a chat message. */
|
29467
29554
|
sendMessage(content) {
|
29468
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29555
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29469
29556
|
yield this.chatAdapter.sendMessage(content);
|
29470
29557
|
});
|
29471
29558
|
}
|
29472
29559
|
/** Send a chat read receipt. */
|
29473
29560
|
sendReadReceipt(chatMessageId) {
|
29474
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29561
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29475
29562
|
yield this.chatAdapter.sendReadReceipt(chatMessageId);
|
29476
29563
|
});
|
29477
29564
|
}
|
29478
29565
|
/** Send an isTyping indicator. */
|
29479
29566
|
sendTypingIndicator() {
|
29480
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29567
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29481
29568
|
yield this.chatAdapter.sendTypingIndicator();
|
29482
29569
|
});
|
29483
29570
|
}
|
29484
29571
|
/** Load previous Chat messages. */
|
29485
29572
|
loadPreviousChatMessages(messagesToLoad) {
|
29486
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29573
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29487
29574
|
return yield this.chatAdapter.loadPreviousChatMessages(messagesToLoad);
|
29488
29575
|
});
|
29489
29576
|
}
|
29490
29577
|
/** Update an existing message. */
|
29491
29578
|
updateMessage(messageId, content, metadata) {
|
29492
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29579
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29493
29580
|
return yield this.chatAdapter.updateMessage(messageId, content, metadata);
|
29494
29581
|
});
|
29495
29582
|
}
|
29496
29583
|
/** Delete an existing message. */
|
29497
29584
|
deleteMessage(messageId) {
|
29498
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29585
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29499
29586
|
return yield this.chatAdapter.deleteMessage(messageId);
|
29500
29587
|
});
|
29501
29588
|
}
|
29502
29589
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
29503
29590
|
downloadAttachments(options) {
|
29504
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29591
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29505
29592
|
return yield this.chatAdapter.downloadAttachments(options);
|
29506
29593
|
});
|
29507
29594
|
}
|
29508
29595
|
/* @conditional-compile-remove(PSTN-calls) */
|
29509
29596
|
holdCall() {
|
29510
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29597
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29511
29598
|
return yield this.callAdapter.holdCall();
|
29512
29599
|
});
|
29513
29600
|
}
|
29514
29601
|
/* @conditional-compile-remove(PSTN-calls) */
|
29515
29602
|
resumeCall() {
|
29516
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29603
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29517
29604
|
return yield this.callAdapter.resumeCall();
|
29518
29605
|
});
|
29519
29606
|
}
|
29520
29607
|
/* @conditional-compile-remove(PSTN-calls) */
|
29521
29608
|
addParticipant(participant, options) {
|
29522
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29609
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29523
29610
|
if (communicationCommon.isCommunicationUserIdentifier(participant)) {
|
29524
29611
|
return yield this.callAdapter.addParticipant(participant);
|
29525
29612
|
}
|
@@ -29530,7 +29617,7 @@ class AzureCommunicationCallWithChatAdapter {
|
|
29530
29617
|
}
|
29531
29618
|
/* @conditional-compile-remove(PSTN-calls) */
|
29532
29619
|
sendDtmfTone(dtmfTone) {
|
29533
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29620
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29534
29621
|
return yield this.callAdapter.sendDtmfTone(dtmfTone);
|
29535
29622
|
});
|
29536
29623
|
}
|
@@ -29540,37 +29627,37 @@ class AzureCommunicationCallWithChatAdapter {
|
|
29540
29627
|
}
|
29541
29628
|
/* @conditional-compile-remove(close-captions) */
|
29542
29629
|
startCaptions(options) {
|
29543
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29630
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29544
29631
|
yield this.callAdapter.startCaptions(options);
|
29545
29632
|
});
|
29546
29633
|
}
|
29547
29634
|
/* @conditional-compile-remove(close-captions) */
|
29548
29635
|
stopCaptions() {
|
29549
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29636
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29550
29637
|
yield this.callAdapter.stopCaptions();
|
29551
29638
|
});
|
29552
29639
|
}
|
29553
29640
|
/* @conditional-compile-remove(close-captions) */
|
29554
29641
|
setCaptionLanguage(language) {
|
29555
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29642
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29556
29643
|
yield this.callAdapter.setCaptionLanguage(language);
|
29557
29644
|
});
|
29558
29645
|
}
|
29559
29646
|
/* @conditional-compile-remove(close-captions) */
|
29560
29647
|
setSpokenLanguage(language) {
|
29561
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29648
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29562
29649
|
yield this.callAdapter.setSpokenLanguage(language);
|
29563
29650
|
});
|
29564
29651
|
}
|
29565
29652
|
/* @conditional-compile-remove(video-background-effects) */
|
29566
29653
|
startVideoBackgroundEffect(videoBackgroundEffect) {
|
29567
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29654
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29568
29655
|
yield this.callAdapter.startVideoBackgroundEffect(videoBackgroundEffect);
|
29569
29656
|
});
|
29570
29657
|
}
|
29571
29658
|
/* @conditional-compile-remove(video-background-effects) */
|
29572
29659
|
stopVideoBackgroundEffects() {
|
29573
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29660
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29574
29661
|
return yield this.callAdapter.stopVideoBackgroundEffects();
|
29575
29662
|
});
|
29576
29663
|
}
|
@@ -29723,7 +29810,7 @@ class AzureCommunicationCallWithChatAdapter {
|
|
29723
29810
|
*/
|
29724
29811
|
const createAzureCommunicationCallWithChatAdapter = ({ userId, displayName, credential, endpoint, locator,
|
29725
29812
|
/* @conditional-compile-remove(PSTN-calls) */ alternateCallerId,
|
29726
|
-
/* @conditional-compile-remove(video-background-effects) */ callAdapterOptions }) => __awaiter(void 0, void 0, void 0, function* () {
|
29813
|
+
/* @conditional-compile-remove(video-background-effects) */ callAdapterOptions }) => __awaiter$2(void 0, void 0, void 0, function* () {
|
29727
29814
|
const callAdapterLocator = isTeamsMeetingLinkLocator(locator) ? locator : locator.callLocator;
|
29728
29815
|
const createCallAdapterPromise = createAzureCommunicationCallAdapter({
|
29729
29816
|
userId,
|
@@ -29799,7 +29886,7 @@ beforeDispose) => {
|
|
29799
29886
|
if (!credential || !displayName || !endpoint || !locator || !userId) {
|
29800
29887
|
return;
|
29801
29888
|
}
|
29802
|
-
(() => __awaiter(void 0, void 0, void 0, function* () {
|
29889
|
+
(() => __awaiter$2(void 0, void 0, void 0, function* () {
|
29803
29890
|
if (adapterRef.current) {
|
29804
29891
|
// Dispose the old adapter when a new one is created.
|
29805
29892
|
//
|
@@ -29844,7 +29931,7 @@ beforeDispose) => {
|
|
29844
29931
|
// Dispose any existing adapter when the component unmounts.
|
29845
29932
|
React.useEffect(() => {
|
29846
29933
|
return () => {
|
29847
|
-
(() => __awaiter(void 0, void 0, void 0, function* () {
|
29934
|
+
(() => __awaiter$2(void 0, void 0, void 0, function* () {
|
29848
29935
|
if (adapterRef.current) {
|
29849
29936
|
if (beforeDisposeRef.current) {
|
29850
29937
|
yield beforeDisposeRef.current(adapterRef.current);
|
@@ -29867,7 +29954,7 @@ beforeDispose) => {
|
|
29867
29954
|
*/
|
29868
29955
|
const createAzureCommunicationCallWithChatAdapterFromClients = ({ callClient, callAgent, callLocator, chatClient, chatThreadClient,
|
29869
29956
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
29870
|
-
options }) => __awaiter(void 0, void 0, void 0, function* () {
|
29957
|
+
options }) => __awaiter$2(void 0, void 0, void 0, function* () {
|
29871
29958
|
const createCallAdapterPromise = createAzureCommunicationCallAdapterFromClient(callClient, callAgent, callLocator);
|
29872
29959
|
const createChatAdapterPromise = createAzureCommunicationChatAdapterFromClient(chatClient, chatThreadClient,
|
29873
29960
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
@@ -29879,6 +29966,67 @@ const isTeamsMeetingLinkLocator = (locator) => {
|
|
29879
29966
|
return 'meetingLink' in locator;
|
29880
29967
|
};
|
29881
29968
|
|
29969
|
+
// Copyright (c) Microsoft Corporation.
|
29970
|
+
// Licensed under the MIT license.
|
29971
|
+
var __awaiter$1 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
29972
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
29973
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
29974
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
29975
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
29976
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
29977
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
29978
|
+
});
|
29979
|
+
};
|
29980
|
+
/* @conditional-compile-remove(video-background-effects) */
|
29981
|
+
/**
|
29982
|
+
*
|
29983
|
+
* Dependency resolution for video background effects using lazy loading.
|
29984
|
+
* @beta
|
29985
|
+
*/
|
29986
|
+
const onResolveVideoEffectDependencyLazy = () => __awaiter$1(void 0, void 0, void 0, function* () {
|
29987
|
+
const module = yield Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('@azure/communication-calling-effects')); });
|
29988
|
+
const createBackgroundBlurEffect = (config) => {
|
29989
|
+
return new module.BackgroundBlurEffect(config);
|
29990
|
+
};
|
29991
|
+
const createBackgroundReplacementEffect = (config) => {
|
29992
|
+
return new module.BackgroundReplacementEffect(config);
|
29993
|
+
};
|
29994
|
+
const VideoBackgroundEffectsDependency = {
|
29995
|
+
createBackgroundBlurEffect,
|
29996
|
+
createBackgroundReplacementEffect
|
29997
|
+
};
|
29998
|
+
return VideoBackgroundEffectsDependency;
|
29999
|
+
});
|
30000
|
+
|
30001
|
+
var __awaiter = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
30002
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
30003
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
30004
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
30005
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
30006
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
30007
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
30008
|
+
});
|
30009
|
+
};
|
30010
|
+
/* @conditional-compile-remove(video-background-effects) */
|
30011
|
+
/**
|
30012
|
+
* Dependency resolution for video background effects.
|
30013
|
+
*
|
30014
|
+
* @beta
|
30015
|
+
*/
|
30016
|
+
const onResolveVideoEffectDependency = () => __awaiter(void 0, void 0, void 0, function* () {
|
30017
|
+
const createBackgroundBlurEffect = (config) => {
|
30018
|
+
return new communicationCallingEffects.BackgroundBlurEffect(config);
|
30019
|
+
};
|
30020
|
+
const createBackgroundReplacementEffect = (config) => {
|
30021
|
+
return new communicationCallingEffects.BackgroundReplacementEffect(config);
|
30022
|
+
};
|
30023
|
+
const VideoBackgroundEffectsDependency = {
|
30024
|
+
createBackgroundBlurEffect,
|
30025
|
+
createBackgroundReplacementEffect
|
30026
|
+
};
|
30027
|
+
return VideoBackgroundEffectsDependency;
|
30028
|
+
});
|
30029
|
+
|
29882
30030
|
// Copyright (c) Microsoft Corporation.
|
29883
30031
|
/**
|
29884
30032
|
* Hook to obtain a selector for a specified component.
|
@@ -30050,6 +30198,8 @@ exports.fromFlatCommunicationIdentifier = fromFlatCommunicationIdentifier;
|
|
30050
30198
|
exports.getCallingSelector = getSelector$1;
|
30051
30199
|
exports.getChatSelector = getSelector;
|
30052
30200
|
exports.lightTheme = lightTheme;
|
30201
|
+
exports.onResolveVideoEffectDependency = onResolveVideoEffectDependency;
|
30202
|
+
exports.onResolveVideoEffectDependencyLazy = onResolveVideoEffectDependencyLazy;
|
30053
30203
|
exports.toFlatCommunicationIdentifier = toFlatCommunicationIdentifier;
|
30054
30204
|
exports.useAzureCommunicationCallAdapter = useAzureCommunicationCallAdapter;
|
30055
30205
|
exports.useAzureCommunicationCallWithChatAdapter = useAzureCommunicationCallWithChatAdapter;
|