@azure/communication-react 1.7.0-alpha-202308020013 → 1.7.0-alpha-202308040014
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 +543 -396
- 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/callControlSelectors.js +34 -8
- 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 +11 -5
- 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/SidePane/usePeoplePane.d.ts +3 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/usePeoplePane.js +4 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/usePeoplePane.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/useVideoEffectsPane.d.ts +3 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/useVideoEffectsPane.js +4 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/useVideoEffectsPane.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Camera.d.ts +3 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Camera.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Camera.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/ControlBar/CommonCallControlBar.d.ts +4 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +2 -2
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.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-202308040014';
|
182
182
|
|
183
183
|
// Copyright (c) Microsoft Corporation.
|
184
184
|
/**
|
@@ -454,7 +454,7 @@ const getSupportedSpokenLanguages = (state, props) => {
|
|
454
454
|
|
455
455
|
// Copyright (c) Microsoft Corporation.
|
456
456
|
// Licensed under the MIT license.
|
457
|
-
var __awaiter$
|
457
|
+
var __awaiter$L = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
458
458
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
459
459
|
return new (P || (P = Promise))(function (resolve, reject) {
|
460
460
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -493,7 +493,7 @@ const _isPreviewOn = (deviceManager) => {
|
|
493
493
|
*
|
494
494
|
* @private
|
495
495
|
*/
|
496
|
-
const disposeAllLocalPreviewViews = (callClient) => __awaiter$
|
496
|
+
const disposeAllLocalPreviewViews = (callClient) => __awaiter$L(void 0, void 0, void 0, function* () {
|
497
497
|
const unparentedViews = callClient.getState().deviceManager.unparentedViews;
|
498
498
|
for (const view of unparentedViews) {
|
499
499
|
yield callClient.disposeView(undefined, undefined, view);
|
@@ -548,10 +548,19 @@ const _isRingingPSTNParticipant = (participant) => {
|
|
548
548
|
*
|
549
549
|
* @public
|
550
550
|
*/
|
551
|
-
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) => {
|
552
560
|
const permission = deviceManager.deviceAccess ? deviceManager.deviceAccess.audio : true;
|
553
561
|
/* @conditional-compile-remove(capabilities) */
|
554
|
-
const incapable = (capabilities === null || capabilities === void 0 ? void 0 : capabilities.muteUnmuteMic.isPresent) === false
|
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';
|
555
564
|
return {
|
556
565
|
disabled: !callExists || !permission || /* @conditional-compile-remove(capabilities) */ incapable,
|
557
566
|
checked: callExists ? !isMuted : false,
|
@@ -566,12 +575,23 @@ const microphoneButtonSelector = reselect__namespace.createSelector([getCallExis
|
|
566
575
|
*
|
567
576
|
* @public
|
568
577
|
*/
|
569
|
-
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) => {
|
570
586
|
const previewOn = _isPreviewOn(deviceManager);
|
571
587
|
const localVideoFromCall = localVideoStreams === null || localVideoStreams === void 0 ? void 0 : localVideoStreams.find((stream) => stream.mediaStreamType === 'Video');
|
572
588
|
const permission = deviceManager.deviceAccess ? deviceManager.deviceAccess.video : true;
|
573
589
|
/* @conditional-compile-remove(capabilities) */
|
574
|
-
const incapable = (capabilities === null || capabilities === void 0 ? void 0 : capabilities.turnVideoOnOff.isPresent) === false
|
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';
|
575
595
|
return {
|
576
596
|
disabled: !deviceManager.selectedCamera ||
|
577
597
|
!permission ||
|
@@ -590,13 +610,19 @@ const cameraButtonSelector = reselect__namespace.createSelector([getLocalVideoSt
|
|
590
610
|
const screenShareButtonSelector = reselect__namespace.createSelector([
|
591
611
|
getIsScreenSharingOn,
|
592
612
|
/* @conditional-compile-remove(PSTN-calls) */ getCallState,
|
593
|
-
/* @conditional-compile-remove(capabilities) */ getCapabilites
|
613
|
+
/* @conditional-compile-remove(capabilities) */ getCapabilites,
|
614
|
+
/* @conditional-compile-remove(capabilities) */ getRole
|
594
615
|
], (isScreenSharingOn,
|
595
616
|
/* @conditional-compile-remove(PSTN-calls) */ callState,
|
596
|
-
/* @conditional-compile-remove(capabilities) */ capabilities
|
617
|
+
/* @conditional-compile-remove(capabilities) */ capabilities,
|
618
|
+
/* @conditional-compile-remove(capabilities) */ role) => {
|
597
619
|
let disabled = undefined;
|
598
620
|
/* @conditional-compile-remove(capabilities) */
|
599
|
-
disabled =
|
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';
|
600
626
|
/* @conditional-compile-remove(PSTN-calls) */
|
601
627
|
disabled = disabled || ['InLobby', 'Connecting'].includes(callState);
|
602
628
|
return {
|
@@ -635,7 +661,7 @@ const holdButtonSelector = reselect__namespace.createSelector([getCallState], (c
|
|
635
661
|
|
636
662
|
// Copyright (c) Microsoft Corporation.
|
637
663
|
// Licensed under the MIT license.
|
638
|
-
var __awaiter$
|
664
|
+
var __awaiter$K = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
639
665
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
640
666
|
return new (P || (P = Promise))(function (resolve, reject) {
|
641
667
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -655,8 +681,8 @@ const areStreamsEqual = (prevStream, newStream) => {
|
|
655
681
|
*
|
656
682
|
* @private
|
657
683
|
*/
|
658
|
-
const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callClient, deviceManager, call) => {
|
659
|
-
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* () {
|
660
686
|
// Before the call object creates a stream, dispose of any local preview streams.
|
661
687
|
// @TODO: is there any way to parent the unparented view to the call object instead
|
662
688
|
// of disposing and creating a new stream?
|
@@ -676,7 +702,7 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
676
702
|
yield call.startVideo(stream);
|
677
703
|
}
|
678
704
|
});
|
679
|
-
const onStopLocalVideo = (stream) => __awaiter$
|
705
|
+
const onStopLocalVideo = (stream) => __awaiter$K(void 0, void 0, void 0, function* () {
|
680
706
|
const callId = call === null || call === void 0 ? void 0 : call.id;
|
681
707
|
if (!callId) {
|
682
708
|
return;
|
@@ -685,7 +711,7 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
685
711
|
yield call.stopVideo(stream);
|
686
712
|
}
|
687
713
|
});
|
688
|
-
const onToggleCamera = (options) => __awaiter$
|
714
|
+
const onToggleCamera = (options) => __awaiter$K(void 0, void 0, void 0, function* () {
|
689
715
|
const previewOn = _isPreviewOn(callClient.getState().deviceManager);
|
690
716
|
if (previewOn && call && call.state === 'Connecting') {
|
691
717
|
// This is to workaround: https://skype.visualstudio.com/SPOOL/_workitems/edit/3030558.
|
@@ -733,19 +759,19 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
733
759
|
}
|
734
760
|
}
|
735
761
|
});
|
736
|
-
const onSelectMicrophone = (device) => __awaiter$
|
762
|
+
const onSelectMicrophone = (device) => __awaiter$K(void 0, void 0, void 0, function* () {
|
737
763
|
if (!deviceManager) {
|
738
764
|
return;
|
739
765
|
}
|
740
766
|
return deviceManager.selectMicrophone(device);
|
741
767
|
});
|
742
|
-
const onSelectSpeaker = (device) => __awaiter$
|
768
|
+
const onSelectSpeaker = (device) => __awaiter$K(void 0, void 0, void 0, function* () {
|
743
769
|
if (!deviceManager) {
|
744
770
|
return;
|
745
771
|
}
|
746
772
|
return deviceManager.selectSpeaker(device);
|
747
773
|
});
|
748
|
-
const onSelectCamera = (device, options) => __awaiter$
|
774
|
+
const onSelectCamera = (device, options) => __awaiter$K(void 0, void 0, void 0, function* () {
|
749
775
|
if (!deviceManager) {
|
750
776
|
return;
|
751
777
|
}
|
@@ -768,19 +794,19 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
768
794
|
}, options);
|
769
795
|
}
|
770
796
|
});
|
771
|
-
const onToggleMicrophone = () => __awaiter$
|
797
|
+
const onToggleMicrophone = () => __awaiter$K(void 0, void 0, void 0, function* () {
|
772
798
|
if (!call || !_isInCall(call.state)) {
|
773
799
|
throw new Error(`Please invoke onToggleMicrophone after call is started`);
|
774
800
|
}
|
775
801
|
return call.isMuted ? yield call.unmute() : yield call.mute();
|
776
802
|
});
|
777
|
-
const onStartScreenShare = () => __awaiter$
|
778
|
-
const onStopScreenShare = () => __awaiter$
|
779
|
-
const onToggleScreenShare = () => __awaiter$
|
780
|
-
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 })); });
|
781
807
|
/* @conditional-compile-remove(PSTN-calls) */
|
782
|
-
const onToggleHold = () => __awaiter$
|
783
|
-
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* () {
|
784
810
|
var _a;
|
785
811
|
if (!call || call.localVideoStreams.length === 0) {
|
786
812
|
return;
|
@@ -796,7 +822,7 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
796
822
|
const { view } = (_a = (yield callClient.createView(call.id, undefined, localStream, options))) !== null && _a !== void 0 ? _a : {};
|
797
823
|
return view ? { view } : undefined;
|
798
824
|
});
|
799
|
-
const onCreateRemoteStreamView = (userId, options = { scalingMode: 'Crop' }) => __awaiter$
|
825
|
+
const onCreateRemoteStreamView = (userId, options = { scalingMode: 'Crop' }) => __awaiter$K(void 0, void 0, void 0, function* () {
|
800
826
|
if (!call) {
|
801
827
|
return;
|
802
828
|
}
|
@@ -827,7 +853,7 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
827
853
|
}
|
828
854
|
return (createViewResult === null || createViewResult === void 0 ? void 0 : createViewResult.view) ? { view: createViewResult === null || createViewResult === void 0 ? void 0 : createViewResult.view } : undefined;
|
829
855
|
});
|
830
|
-
const onDisposeRemoteStreamView = (userId) => __awaiter$
|
856
|
+
const onDisposeRemoteStreamView = (userId) => __awaiter$K(void 0, void 0, void 0, function* () {
|
831
857
|
if (!call) {
|
832
858
|
return;
|
833
859
|
}
|
@@ -848,7 +874,7 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
848
874
|
callClient.disposeView(call.id, participant.identifier, screenShareStream);
|
849
875
|
}
|
850
876
|
});
|
851
|
-
const onDisposeRemoteVideoStreamView = (userId) => __awaiter$
|
877
|
+
const onDisposeRemoteVideoStreamView = (userId) => __awaiter$K(void 0, void 0, void 0, function* () {
|
852
878
|
if (!call) {
|
853
879
|
return;
|
854
880
|
}
|
@@ -865,7 +891,7 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
865
891
|
callClient.disposeView(call.id, participant.identifier, remoteVideoStream);
|
866
892
|
}
|
867
893
|
});
|
868
|
-
const onDisposeRemoteScreenShareStreamView = (userId) => __awaiter$
|
894
|
+
const onDisposeRemoteScreenShareStreamView = (userId) => __awaiter$K(void 0, void 0, void 0, function* () {
|
869
895
|
if (!call) {
|
870
896
|
return;
|
871
897
|
}
|
@@ -882,7 +908,7 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
882
908
|
callClient.disposeView(call.id, participant.identifier, screenShareStream);
|
883
909
|
}
|
884
910
|
});
|
885
|
-
const onDisposeLocalStreamView = () => __awaiter$
|
911
|
+
const onDisposeLocalStreamView = () => __awaiter$K(void 0, void 0, void 0, function* () {
|
886
912
|
// If the user is currently in a call, dispose of the local stream view attached to that call.
|
887
913
|
const callState = call && callClient.getState().calls[call.id];
|
888
914
|
const localStream = callState === null || callState === void 0 ? void 0 : callState.localVideoStreams.find((item) => item.mediaStreamType === 'Video');
|
@@ -895,56 +921,71 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
895
921
|
yield disposeAllLocalPreviewViews(callClient);
|
896
922
|
});
|
897
923
|
/* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */
|
898
|
-
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)); });
|
899
925
|
const notImplemented = () => {
|
900
926
|
throw new Error('Not implemented, cannot call a method from an abstract object');
|
901
927
|
};
|
902
928
|
/* @conditional-compile-remove(call-readiness) */
|
903
|
-
const askDevicePermission = (constrain) => __awaiter$
|
929
|
+
const askDevicePermission = (constrain) => __awaiter$K(void 0, void 0, void 0, function* () {
|
904
930
|
if (deviceManager) {
|
905
931
|
yield (deviceManager === null || deviceManager === void 0 ? void 0 : deviceManager.askDevicePermission(constrain));
|
906
932
|
}
|
907
933
|
});
|
908
934
|
/* @conditional-compile-remove(video-background-effects) */
|
909
|
-
const onRemoveVideoBackgroundEffects = () => __awaiter$
|
935
|
+
const onRemoveVideoBackgroundEffects = () => __awaiter$K(void 0, void 0, void 0, function* () {
|
910
936
|
const stream = (call === null || call === void 0 ? void 0 : call.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video')) ||
|
911
937
|
(deviceManager === null || deviceManager === void 0 ? void 0 : deviceManager.getUnparentedVideoStreams().find((stream) => stream.mediaStreamType === 'Video'));
|
912
938
|
if (stream) {
|
913
|
-
|
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
|
+
}
|
914
945
|
}
|
915
946
|
});
|
916
947
|
/* @conditional-compile-remove(video-background-effects) */
|
917
|
-
const onBlurVideoBackground = (backgroundBlurConfig) => __awaiter$
|
948
|
+
const onBlurVideoBackground = (backgroundBlurConfig) => __awaiter$K(void 0, void 0, void 0, function* () {
|
949
|
+
var _b;
|
918
950
|
const stream = (call === null || call === void 0 ? void 0 : call.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video')) ||
|
919
951
|
(deviceManager === null || deviceManager === void 0 ? void 0 : deviceManager.getUnparentedVideoStreams().find((stream) => stream.mediaStreamType === 'Video'));
|
920
952
|
if (stream) {
|
921
|
-
|
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));
|
922
959
|
}
|
923
960
|
});
|
924
961
|
/* @conditional-compile-remove(video-background-effects) */
|
925
|
-
const onReplaceVideoBackground = (backgroundReplacementConfig) => __awaiter$
|
962
|
+
const onReplaceVideoBackground = (backgroundReplacementConfig) => __awaiter$K(void 0, void 0, void 0, function* () {
|
963
|
+
var _c;
|
926
964
|
const stream = (call === null || call === void 0 ? void 0 : call.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video')) ||
|
927
965
|
(deviceManager === null || deviceManager === void 0 ? void 0 : deviceManager.getUnparentedVideoStreams().find((stream) => stream.mediaStreamType === 'Video'));
|
928
966
|
if (stream) {
|
929
|
-
|
930
|
-
|
931
|
-
|
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)));
|
932
973
|
}
|
933
974
|
});
|
934
975
|
/* @conditional-compile-remove(close-captions) */
|
935
|
-
const onStartCaptions = (options) => __awaiter$
|
976
|
+
const onStartCaptions = (options) => __awaiter$K(void 0, void 0, void 0, function* () {
|
936
977
|
yield (call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.TeamsCaptions).startCaptions(options));
|
937
978
|
});
|
938
979
|
/* @conditional-compile-remove(close-captions) */
|
939
|
-
const onStopCaptions = () => __awaiter$
|
980
|
+
const onStopCaptions = () => __awaiter$K(void 0, void 0, void 0, function* () {
|
940
981
|
yield (call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.TeamsCaptions).stopCaptions());
|
941
982
|
});
|
942
983
|
/* @conditional-compile-remove(close-captions) */
|
943
|
-
const onSetSpokenLanguage = (language) => __awaiter$
|
984
|
+
const onSetSpokenLanguage = (language) => __awaiter$K(void 0, void 0, void 0, function* () {
|
944
985
|
yield (call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.TeamsCaptions).setSpokenLanguage(language));
|
945
986
|
});
|
946
987
|
/* @conditional-compile-remove(close-captions) */
|
947
|
-
const onSetCaptionLanguage = (language) => __awaiter$
|
988
|
+
const onSetCaptionLanguage = (language) => __awaiter$K(void 0, void 0, void 0, function* () {
|
948
989
|
yield (call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.TeamsCaptions).setCaptionLanguage(language));
|
949
990
|
});
|
950
991
|
return {
|
@@ -992,7 +1033,7 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
992
1033
|
|
993
1034
|
// Copyright (c) Microsoft Corporation.
|
994
1035
|
// Licensed under the MIT license.
|
995
|
-
var __awaiter$
|
1036
|
+
var __awaiter$J = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
996
1037
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
997
1038
|
return new (P || (P = Promise))(function (resolve, reject) {
|
998
1039
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -1009,15 +1050,18 @@ var __awaiter$H = (window && window.__awaiter) || function (thisArg, _arguments,
|
|
1009
1050
|
*
|
1010
1051
|
* @public
|
1011
1052
|
*/
|
1012
|
-
const createDefaultCallingHandlers = memoizeOne__default['default']((
|
1013
|
-
|
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)), {
|
1014
1058
|
// FIXME: onStartCall API should use string, not the underlying SDK types.
|
1015
1059
|
onStartCall: (participants, options) => {
|
1016
1060
|
/* @conditional-compile-remove(teams-adhoc-call) */
|
1017
1061
|
return callAgent === null || callAgent === void 0 ? void 0 : callAgent.startCall(participants, options);
|
1018
1062
|
},
|
1019
1063
|
/* @conditional-compile-remove(PSTN-calls) */
|
1020
|
-
onAddParticipant: (userId, options) => __awaiter$
|
1064
|
+
onAddParticipant: (userId, options) => __awaiter$J(void 0, void 0, void 0, function* () {
|
1021
1065
|
const participant = _toCommunicationIdentifier(userId);
|
1022
1066
|
if (communicationCommon.isPhoneNumberIdentifier(participant)) {
|
1023
1067
|
call === null || call === void 0 ? void 0 : call.addParticipant(participant, options);
|
@@ -1025,7 +1069,7 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
|
|
1025
1069
|
else if (communicationCommon.isCommunicationUserIdentifier(participant) || communicationCommon.isMicrosoftTeamsUserIdentifier(participant)) {
|
1026
1070
|
call === null || call === void 0 ? void 0 : call.addParticipant(participant);
|
1027
1071
|
}
|
1028
|
-
}), onRemoveParticipant: (userId) => __awaiter$
|
1072
|
+
}), onRemoveParticipant: (userId) => __awaiter$J(void 0, void 0, void 0, function* () {
|
1029
1073
|
const participant = _toCommunicationIdentifier(userId);
|
1030
1074
|
yield (call === null || call === void 0 ? void 0 : call.removeParticipant(participant));
|
1031
1075
|
}) });
|
@@ -1033,7 +1077,7 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
|
|
1033
1077
|
|
1034
1078
|
// Copyright (c) Microsoft Corporation.
|
1035
1079
|
// Licensed under the MIT license.
|
1036
|
-
var __awaiter$
|
1080
|
+
var __awaiter$I = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
1037
1081
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
1038
1082
|
return new (P || (P = Promise))(function (resolve, reject) {
|
1039
1083
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -1050,8 +1094,8 @@ var __awaiter$G = (window && window.__awaiter) || function (thisArg, _arguments,
|
|
1050
1094
|
*
|
1051
1095
|
* @beta
|
1052
1096
|
*/
|
1053
|
-
const createDefaultTeamsCallingHandlers = memoizeOne__default['default']((callClient, callAgent, deviceManager, call) => {
|
1054
|
-
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) => {
|
1055
1099
|
/* @conditional-compile-remove(teams-identity-support) */
|
1056
1100
|
const threadId = options === null || options === void 0 ? void 0 : options.threadId;
|
1057
1101
|
if (!isTeamsCallParticipants(participants)) {
|
@@ -1065,7 +1109,7 @@ const createDefaultTeamsCallingHandlers = memoizeOne__default['default']((callCl
|
|
1065
1109
|
},
|
1066
1110
|
/* @conditional-compile-remove(teams-identity-support) */
|
1067
1111
|
/* @conditional-compile-remove(PSTN-calls) */
|
1068
|
-
onAddParticipant: (userId, options) => __awaiter$
|
1112
|
+
onAddParticipant: (userId, options) => __awaiter$I(void 0, void 0, void 0, function* () {
|
1069
1113
|
const participant = _toCommunicationIdentifier(userId);
|
1070
1114
|
/* @conditional-compile-remove(teams-identity-support) */
|
1071
1115
|
const threadId = options === null || options === void 0 ? void 0 : options.threadId;
|
@@ -1082,7 +1126,7 @@ const createDefaultTeamsCallingHandlers = memoizeOne__default['default']((callCl
|
|
1082
1126
|
}
|
1083
1127
|
/* @conditional-compile-remove(teams-identity-support) */
|
1084
1128
|
call === null || call === void 0 ? void 0 : call.addParticipant(participant);
|
1085
|
-
}), onRemoveParticipant: (userId) => __awaiter$
|
1129
|
+
}), onRemoveParticipant: (userId) => __awaiter$I(void 0, void 0, void 0, function* () {
|
1086
1130
|
const participant = _toCommunicationIdentifier(userId);
|
1087
1131
|
if (communicationCommon.isCommunicationUserIdentifier(participant)) {
|
1088
1132
|
throw new Error('CommunicationIdentifier in Teams call is not supported!');
|
@@ -1164,7 +1208,7 @@ const getCaptionsSpeakerIdentifier = (captions) => {
|
|
1164
1208
|
|
1165
1209
|
// Copyright (c) Microsoft Corporation.
|
1166
1210
|
// Licensed under the MIT license.
|
1167
|
-
var __awaiter$
|
1211
|
+
var __awaiter$H = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
1168
1212
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
1169
1213
|
return new (P || (P = Promise))(function (resolve, reject) {
|
1170
1214
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -1213,13 +1257,13 @@ class ProxyDeviceManager {
|
|
1213
1257
|
this.selectCamera = (videoDeviceInfo) => {
|
1214
1258
|
this._context.setDeviceManagerSelectedCamera(videoDeviceInfo);
|
1215
1259
|
};
|
1216
|
-
this.videoDevicesUpdated = () => __awaiter$
|
1260
|
+
this.videoDevicesUpdated = () => __awaiter$H(this, void 0, void 0, function* () {
|
1217
1261
|
// Device Manager always has a camera with '' name if there are no real camera devices available.
|
1218
1262
|
// We don't want to show that in the UI.
|
1219
1263
|
const realCameras = (yield this._deviceManager.getCameras()).filter((c) => !!c.name);
|
1220
1264
|
this._context.setDeviceManagerCameras(dedupeById(realCameras));
|
1221
1265
|
});
|
1222
|
-
this.audioDevicesUpdated = () => __awaiter$
|
1266
|
+
this.audioDevicesUpdated = () => __awaiter$H(this, void 0, void 0, function* () {
|
1223
1267
|
this._context.setDeviceManagerMicrophones(dedupeById(yield this._deviceManager.getMicrophones()));
|
1224
1268
|
this._context.setDeviceManagerSpeakers(dedupeById(yield this._deviceManager.getSpeakers()));
|
1225
1269
|
});
|
@@ -1607,7 +1651,7 @@ function convertFromSDKToDeclarativeVideoStreamVideoEffects(videoEffects) {
|
|
1607
1651
|
|
1608
1652
|
// Copyright (c) Microsoft Corporation.
|
1609
1653
|
// Licensed under the MIT license.
|
1610
|
-
var __awaiter$
|
1654
|
+
var __awaiter$G = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
1611
1655
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
1612
1656
|
return new (P || (P = Promise))(function (resolve, reject) {
|
1613
1657
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -2326,7 +2370,7 @@ class CallContext$2 {
|
|
2326
2370
|
* @throws CallError. Exceptions thrown from `f` are tagged with the failed `target.
|
2327
2371
|
*/
|
2328
2372
|
withAsyncErrorTeedToState(action, target) {
|
2329
|
-
return (...args) => __awaiter$
|
2373
|
+
return (...args) => __awaiter$G(this, void 0, void 0, function* () {
|
2330
2374
|
try {
|
2331
2375
|
return yield action(...args);
|
2332
2376
|
}
|
@@ -2746,7 +2790,7 @@ function _logStreamEvent(eventName, streamLogInfo, error) {
|
|
2746
2790
|
|
2747
2791
|
// Copyright (c) Microsoft Corporation.
|
2748
2792
|
// Licensed under the MIT license.
|
2749
|
-
var __awaiter$
|
2793
|
+
var __awaiter$F = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
2750
2794
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
2751
2795
|
return new (P || (P = Promise))(function (resolve, reject) {
|
2752
2796
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -2756,7 +2800,7 @@ var __awaiter$D = (window && window.__awaiter) || function (thisArg, _arguments,
|
|
2756
2800
|
});
|
2757
2801
|
};
|
2758
2802
|
function createViewVideo(context, internalContext, callId, stream, participantId, options) {
|
2759
|
-
return __awaiter$
|
2803
|
+
return __awaiter$F(this, void 0, void 0, function* () {
|
2760
2804
|
// we can only have 3 types of createView
|
2761
2805
|
let streamEventType;
|
2762
2806
|
// we will reuse these for local as well but we need to make sure the remote stream is passed in like before.
|
@@ -2878,7 +2922,7 @@ function createViewVideo(context, internalContext, callId, stream, participantId
|
|
2878
2922
|
});
|
2879
2923
|
}
|
2880
2924
|
function createViewUnparentedVideo(context, internalContext, stream, options) {
|
2881
|
-
return __awaiter$
|
2925
|
+
return __awaiter$F(this, void 0, void 0, function* () {
|
2882
2926
|
const renderInfo = internalContext.getUnparentedRenderInfo(stream);
|
2883
2927
|
if (renderInfo && renderInfo.status === 'Rendered') {
|
2884
2928
|
console.warn('Unparented LocalVideoStream is already rendered');
|
@@ -3046,7 +3090,7 @@ function createView(context, internalContext, callId, participantId, stream, opt
|
|
3046
3090
|
// Render LocalVideoStream that is not part of a Call
|
3047
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).
|
3048
3092
|
// We do not have a startLocalPreviewVideo function, so as a workaround we ensure any errors are propagated here.
|
3049
|
-
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')();
|
3050
3094
|
}
|
3051
3095
|
else {
|
3052
3096
|
_logStreamEvent(EventNames.CREATE_STREAM_INVALID_PARAMS, { streamType });
|
@@ -3594,7 +3638,7 @@ class CallSubscriber {
|
|
3594
3638
|
|
3595
3639
|
// Copyright (c) Microsoft Corporation.
|
3596
3640
|
// Licensed under the MIT license.
|
3597
|
-
var __awaiter$
|
3641
|
+
var __awaiter$E = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3598
3642
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3599
3643
|
return new (P || (P = Promise))(function (resolve, reject) {
|
3600
3644
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -3614,14 +3658,14 @@ class ProxyIncomingCall {
|
|
3614
3658
|
switch (prop) {
|
3615
3659
|
case 'accept': {
|
3616
3660
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3617
|
-
return __awaiter$
|
3661
|
+
return __awaiter$E(this, void 0, void 0, function* () {
|
3618
3662
|
return yield target.accept(...args);
|
3619
3663
|
});
|
3620
3664
|
}, 'IncomingCall.accept');
|
3621
3665
|
}
|
3622
3666
|
case 'reject': {
|
3623
3667
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3624
|
-
return __awaiter$
|
3668
|
+
return __awaiter$E(this, void 0, void 0, function* () {
|
3625
3669
|
return yield target.reject(...args);
|
3626
3670
|
});
|
3627
3671
|
}, 'IncomingCall.reject');
|
@@ -3862,7 +3906,7 @@ const clearCallRelatedState = (context, internalContext) => {
|
|
3862
3906
|
|
3863
3907
|
// Copyright (c) Microsoft Corporation.
|
3864
3908
|
// Licensed under the MIT license.
|
3865
|
-
var __awaiter$
|
3909
|
+
var __awaiter$D = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3866
3910
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3867
3911
|
return new (P || (P = Promise))(function (resolve, reject) {
|
3868
3912
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -3888,56 +3932,56 @@ class ProxyCallCommon {
|
|
3888
3932
|
switch (prop) {
|
3889
3933
|
case 'mute': {
|
3890
3934
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3891
|
-
return __awaiter$
|
3935
|
+
return __awaiter$D(this, void 0, void 0, function* () {
|
3892
3936
|
return yield target.mute(...args);
|
3893
3937
|
});
|
3894
3938
|
}, 'Call.mute');
|
3895
3939
|
}
|
3896
3940
|
case 'unmute': {
|
3897
3941
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3898
|
-
return __awaiter$
|
3942
|
+
return __awaiter$D(this, void 0, void 0, function* () {
|
3899
3943
|
return yield target.unmute(...args);
|
3900
3944
|
});
|
3901
3945
|
}, 'Call.unmute');
|
3902
3946
|
}
|
3903
3947
|
case 'startVideo': {
|
3904
3948
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3905
|
-
return __awaiter$
|
3949
|
+
return __awaiter$D(this, void 0, void 0, function* () {
|
3906
3950
|
return yield target.startVideo(...args);
|
3907
3951
|
});
|
3908
3952
|
}, 'Call.startVideo');
|
3909
3953
|
}
|
3910
3954
|
case 'stopVideo': {
|
3911
3955
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3912
|
-
return __awaiter$
|
3956
|
+
return __awaiter$D(this, void 0, void 0, function* () {
|
3913
3957
|
return yield target.stopVideo(...args);
|
3914
3958
|
});
|
3915
3959
|
}, 'Call.stopVideo');
|
3916
3960
|
}
|
3917
3961
|
case 'startScreenSharing': {
|
3918
3962
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3919
|
-
return __awaiter$
|
3963
|
+
return __awaiter$D(this, void 0, void 0, function* () {
|
3920
3964
|
return yield target.startScreenSharing(...args);
|
3921
3965
|
});
|
3922
3966
|
}, 'Call.startScreenSharing');
|
3923
3967
|
}
|
3924
3968
|
case 'stopScreenSharing': {
|
3925
3969
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3926
|
-
return __awaiter$
|
3970
|
+
return __awaiter$D(this, void 0, void 0, function* () {
|
3927
3971
|
return yield target.stopScreenSharing(...args);
|
3928
3972
|
});
|
3929
3973
|
}, 'Call.stopScreenSharing');
|
3930
3974
|
}
|
3931
3975
|
case 'hold': {
|
3932
3976
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3933
|
-
return __awaiter$
|
3977
|
+
return __awaiter$D(this, void 0, void 0, function* () {
|
3934
3978
|
return yield target.hold(...args);
|
3935
3979
|
});
|
3936
3980
|
}, 'Call.hold');
|
3937
3981
|
}
|
3938
3982
|
case 'resume': {
|
3939
3983
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3940
|
-
return __awaiter$
|
3984
|
+
return __awaiter$D(this, void 0, void 0, function* () {
|
3941
3985
|
return yield target.resume(...args);
|
3942
3986
|
});
|
3943
3987
|
}, 'Call.resume');
|
@@ -3977,7 +4021,7 @@ class ProxyTeamsCaptionsFeature {
|
|
3977
4021
|
get(target, prop) {
|
3978
4022
|
switch (prop) {
|
3979
4023
|
case 'startCaptions':
|
3980
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
4024
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$D(this, void 0, void 0, function* () {
|
3981
4025
|
var _a, _b;
|
3982
4026
|
this._context.setStartCaptionsInProgress(this._call.id, true);
|
3983
4027
|
const ret = yield target.startCaptions(...args);
|
@@ -3985,20 +4029,20 @@ class ProxyTeamsCaptionsFeature {
|
|
3985
4029
|
return ret;
|
3986
4030
|
}), 'Call.feature');
|
3987
4031
|
case 'stopCaptions':
|
3988
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
4032
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$D(this, void 0, void 0, function* () {
|
3989
4033
|
const ret = yield target.stopCaptions(...args);
|
3990
4034
|
this._context.setIsCaptionActive(this._call.id, false);
|
3991
4035
|
this._context.setStartCaptionsInProgress(this._call.id, false);
|
3992
4036
|
return ret;
|
3993
4037
|
}), 'Call.feature');
|
3994
4038
|
case 'setSpokenLanguage':
|
3995
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
4039
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$D(this, void 0, void 0, function* () {
|
3996
4040
|
const ret = yield target.setSpokenLanguage(...args);
|
3997
4041
|
this._context.setSelectedSpokenLanguage(this._call.id, args[0]);
|
3998
4042
|
return ret;
|
3999
4043
|
}), 'Call.feature');
|
4000
4044
|
case 'setCaptionLanguage':
|
4001
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
4045
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$D(this, void 0, void 0, function* () {
|
4002
4046
|
const ret = yield target.setCaptionLanguage(...args);
|
4003
4047
|
this._context.setSelectedCaptionLanguage(this._call.id, args[0]);
|
4004
4048
|
return ret;
|
@@ -4046,7 +4090,7 @@ class ProxyTransferCallFeature {
|
|
4046
4090
|
|
4047
4091
|
// Copyright (c) Microsoft Corporation.
|
4048
4092
|
// Licensed under the MIT license.
|
4049
|
-
var __awaiter$
|
4093
|
+
var __awaiter$C = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
4050
4094
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4051
4095
|
return new (P || (P = Promise))(function (resolve, reject) {
|
4052
4096
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -4060,7 +4104,7 @@ class ProxyCall extends ProxyCallCommon {
|
|
4060
4104
|
switch (prop) {
|
4061
4105
|
case 'addParticipant': {
|
4062
4106
|
return this.getContext().withAsyncErrorTeedToState(function (...args) {
|
4063
|
-
return __awaiter$
|
4107
|
+
return __awaiter$C(this, void 0, void 0, function* () {
|
4064
4108
|
return yield target.addParticipant(...args);
|
4065
4109
|
});
|
4066
4110
|
}, 'Call.addParticipant');
|
@@ -4281,7 +4325,7 @@ class InternalCallContext {
|
|
4281
4325
|
|
4282
4326
|
// Copyright (c) Microsoft Corporation.
|
4283
4327
|
// Licensed under the MIT license.
|
4284
|
-
var __awaiter$
|
4328
|
+
var __awaiter$B = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
4285
4329
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4286
4330
|
return new (P || (P = Promise))(function (resolve, reject) {
|
4287
4331
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -4296,7 +4340,7 @@ class ProxyTeamsCall extends ProxyCallCommon {
|
|
4296
4340
|
switch (prop) {
|
4297
4341
|
case 'addParticipant': {
|
4298
4342
|
return this.getContext().withAsyncErrorTeedToState(function (...args) {
|
4299
|
-
return __awaiter$
|
4343
|
+
return __awaiter$B(this, void 0, void 0, function* () {
|
4300
4344
|
return yield target.addParticipant(...args);
|
4301
4345
|
});
|
4302
4346
|
}, 'TeamsCall.addParticipant');
|
@@ -4411,7 +4455,7 @@ const teamsCallAgentDeclaratify = (callAgent, context, internalContext) => {
|
|
4411
4455
|
|
4412
4456
|
// Copyright (c) Microsoft Corporation.
|
4413
4457
|
// Licensed under the MIT license.
|
4414
|
-
var __awaiter$
|
4458
|
+
var __awaiter$A = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
4415
4459
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4416
4460
|
return new (P || (P = Promise))(function (resolve, reject) {
|
4417
4461
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -4433,7 +4477,7 @@ class ProxyVideoStreamRendererView {
|
|
4433
4477
|
get(target, prop) {
|
4434
4478
|
switch (prop) {
|
4435
4479
|
case 'updateScalingMode': {
|
4436
|
-
return (...args) => __awaiter$
|
4480
|
+
return (...args) => __awaiter$A(this, void 0, void 0, function* () {
|
4437
4481
|
yield target.updateScalingMode(...args);
|
4438
4482
|
this._context.setRemoteVideoStreamViewScalingMode(this._callId, this._participantId, this._streamId, args[0]);
|
4439
4483
|
});
|
@@ -4454,7 +4498,7 @@ const videoStreamRendererViewDeclaratify = (view, context, callId, participantId
|
|
4454
4498
|
|
4455
4499
|
// Copyright (c) Microsoft Corporation.
|
4456
4500
|
// Licensed under the MIT license.
|
4457
|
-
var __awaiter$
|
4501
|
+
var __awaiter$z = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
4458
4502
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4459
4503
|
return new (P || (P = Promise))(function (resolve, reject) {
|
4460
4504
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -4476,7 +4520,7 @@ class ProxyCallClient {
|
|
4476
4520
|
get(target, prop) {
|
4477
4521
|
switch (prop) {
|
4478
4522
|
case 'createCallAgent': {
|
4479
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
4523
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$z(this, void 0, void 0, function* () {
|
4480
4524
|
// createCallAgent will throw an exception if the previous callAgent was not disposed. If the previous
|
4481
4525
|
// callAgent was disposed then it would have unsubscribed to events so we can just create a new declarative
|
4482
4526
|
// callAgent if the createCallAgent succeeds.
|
@@ -4489,7 +4533,7 @@ class ProxyCallClient {
|
|
4489
4533
|
}), 'CallClient.createCallAgent');
|
4490
4534
|
}
|
4491
4535
|
case 'createTeamsCallAgent': {
|
4492
|
-
/* @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* () {
|
4493
4537
|
// createCallAgent will throw an exception if the previous callAgent was not disposed. If the previous
|
4494
4538
|
// callAgent was disposed then it would have unsubscribed to events so we can just create a new declarative
|
4495
4539
|
// callAgent if the createCallAgent succeeds.
|
@@ -4502,7 +4546,7 @@ class ProxyCallClient {
|
|
4502
4546
|
}), 'CallClient.createTeamsCallAgent');
|
4503
4547
|
}
|
4504
4548
|
case 'getDeviceManager': {
|
4505
|
-
return this._context.withAsyncErrorTeedToState(() => __awaiter$
|
4549
|
+
return this._context.withAsyncErrorTeedToState(() => __awaiter$z(this, void 0, void 0, function* () {
|
4506
4550
|
// As of writing, the SDK always returns the same instance of DeviceManager so we keep a reference of
|
4507
4551
|
// DeviceManager and if it does not change we return the cached DeclarativeDeviceManager. If it does not we'll
|
4508
4552
|
// throw an error that indicate we need to fix this issue as our implementation has diverged from the SDK.
|
@@ -4531,7 +4575,7 @@ class ProxyCallClient {
|
|
4531
4575
|
/**
|
4532
4576
|
* add to this object if we want to proxy anything else off the DebugInfo feature object.
|
4533
4577
|
*/
|
4534
|
-
return Object.assign(Object.assign({}, feature), { getEnvironmentInfo: () => __awaiter$
|
4578
|
+
return Object.assign(Object.assign({}, feature), { getEnvironmentInfo: () => __awaiter$z(this, void 0, void 0, function* () {
|
4535
4579
|
const environmentInfo = yield feature.getEnvironmentInfo();
|
4536
4580
|
this._context.setEnvironmentInfo(environmentInfo);
|
4537
4581
|
return environmentInfo;
|
@@ -4584,7 +4628,7 @@ const createStatefulCallClientWithDeps = (callClient, context, internalContext)
|
|
4584
4628
|
});
|
4585
4629
|
Object.defineProperty(callClient, 'createView', {
|
4586
4630
|
configurable: false,
|
4587
|
-
value: (callId, participantId, stream, options) => __awaiter$
|
4631
|
+
value: (callId, participantId, stream, options) => __awaiter$z(void 0, void 0, void 0, function* () {
|
4588
4632
|
const participantIdKind = participantId ? communicationCommon.getIdentifierKind(participantId) : undefined;
|
4589
4633
|
const result = yield createView(context, internalContext, callId, participantIdKind, stream, options);
|
4590
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.
|
@@ -7286,7 +7330,7 @@ const _MentionPopover = (props) => {
|
|
7286
7330
|
|
7287
7331
|
// Copyright (c) Microsoft Corporation.
|
7288
7332
|
// Licensed under the MIT license.
|
7289
|
-
var __awaiter$
|
7333
|
+
var __awaiter$y = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
7290
7334
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
7291
7335
|
return new (P || (P = Promise))(function (resolve, reject) {
|
7292
7336
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -7461,7 +7505,7 @@ const TextFieldWithMention = (props) => {
|
|
7461
7505
|
onSuggestionSelected,
|
7462
7506
|
updateMentionSuggestions
|
7463
7507
|
]);
|
7464
|
-
const debouncedQueryUpdate = useDebounce.useDebouncedCallback((query) => __awaiter$
|
7508
|
+
const debouncedQueryUpdate = useDebounce.useDebouncedCallback((query) => __awaiter$y(void 0, void 0, void 0, function* () {
|
7465
7509
|
var _a;
|
7466
7510
|
let suggestions = (_a = (yield (mentionLookupOptions === null || mentionLookupOptions === void 0 ? void 0 : mentionLookupOptions.onQueryUpdated(query)))) !== null && _a !== void 0 ? _a : [];
|
7467
7511
|
suggestions = suggestions.filter((suggestion) => suggestion.displayText.trim() !== '');
|
@@ -7638,7 +7682,7 @@ const TextFieldWithMention = (props) => {
|
|
7638
7682
|
});
|
7639
7683
|
}
|
7640
7684
|
}, [updateSelectionIndexesWithMentionIfNeeded, setSelectionStartValue, setSelectionEndValue]);
|
7641
|
-
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* () {
|
7642
7686
|
var _b;
|
7643
7687
|
debouncedQueryUpdate.cancel();
|
7644
7688
|
if (event.currentTarget === null) {
|
@@ -9386,7 +9430,7 @@ const chatMessageActionMenuProps = (menuProps) => {
|
|
9386
9430
|
return actionMenuProps;
|
9387
9431
|
};
|
9388
9432
|
|
9389
|
-
var __awaiter$
|
9433
|
+
var __awaiter$x = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
9390
9434
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
9391
9435
|
return new (P || (P = Promise))(function (resolve, reject) {
|
9392
9436
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -9429,7 +9473,7 @@ const _FileDownloadCards = (props) => {
|
|
9429
9473
|
fileCount: `${fileMetadata.filter(isFileSharingAttachment).length}`
|
9430
9474
|
});
|
9431
9475
|
}, [(_b = props.strings) === null || _b === void 0 ? void 0 : _b.fileCardGroupMessage, localeStrings.fileCardGroupMessage, fileMetadata, isFileSharingAttachment]);
|
9432
|
-
const fileDownloadHandler = React.useCallback((userId, file) => __awaiter$
|
9476
|
+
const fileDownloadHandler = React.useCallback((userId, file) => __awaiter$x(void 0, void 0, void 0, function* () {
|
9433
9477
|
if (!props.downloadHandler) {
|
9434
9478
|
window.open(file.url, '_blank', 'noopener,noreferrer');
|
9435
9479
|
}
|
@@ -9599,7 +9643,7 @@ const ChatMessageComponentAsMessageBubble = React__default['default'].memo(Messa
|
|
9599
9643
|
|
9600
9644
|
// Copyright (c) Microsoft Corporation.
|
9601
9645
|
// Licensed under the MIT license.
|
9602
|
-
var __awaiter$
|
9646
|
+
var __awaiter$w = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
9603
9647
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
9604
9648
|
return new (P || (P = Promise))(function (resolve, reject) {
|
9605
9649
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -9632,7 +9676,7 @@ const ChatMessageComponent = (props) => {
|
|
9632
9676
|
onSendMessage && onSendMessage(content !== undefined ? content : '');
|
9633
9677
|
}, [clientMessageId, content, onSendMessage, onDeleteMessage]);
|
9634
9678
|
if (isEditing && message.messageType === 'chat') {
|
9635
|
-
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* () {
|
9636
9680
|
props.onUpdateMessage &&
|
9637
9681
|
message.messageId &&
|
9638
9682
|
(yield props.onUpdateMessage(message.messageId, text, metadata, options));
|
@@ -9821,7 +9865,7 @@ const LiveAnnouncer = (props) => {
|
|
9821
9865
|
|
9822
9866
|
// Copyright (c) Microsoft Corporation.
|
9823
9867
|
// Licensed under the MIT license.
|
9824
|
-
var __awaiter$
|
9868
|
+
var __awaiter$v = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
9825
9869
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
9826
9870
|
return new (P || (P = Promise))(function (resolve, reject) {
|
9827
9871
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -10043,7 +10087,7 @@ const MessageThread = (props) => {
|
|
10043
10087
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
10044
10088
|
const [inlineAttachments, setInlineAttachments] = React.useState({});
|
10045
10089
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
10046
|
-
const onFetchInlineAttachment = React.useCallback((attachment) => __awaiter$
|
10090
|
+
const onFetchInlineAttachment = React.useCallback((attachment) => __awaiter$v(void 0, void 0, void 0, function* () {
|
10047
10091
|
if (!onFetchAttachments || attachment.attachmentType !== 'inlineImage' || attachment.id in inlineAttachments) {
|
10048
10092
|
return;
|
10049
10093
|
}
|
@@ -10092,7 +10136,7 @@ const MessageThread = (props) => {
|
|
10092
10136
|
setChatMessagesInitialized(chatMessagesInitialized);
|
10093
10137
|
};
|
10094
10138
|
// we try to only send those message status if user is scrolled to the bottom.
|
10095
|
-
const sendMessageStatusIfAtBottom = React.useCallback(() => __awaiter$
|
10139
|
+
const sendMessageStatusIfAtBottom = React.useCallback(() => __awaiter$v(void 0, void 0, void 0, function* () {
|
10096
10140
|
if (!isAtBottomOfScrollRef.current ||
|
10097
10141
|
!document.hasFocus() ||
|
10098
10142
|
!messagesRef.current ||
|
@@ -10143,7 +10187,7 @@ const MessageThread = (props) => {
|
|
10143
10187
|
setIsAtBottomOfScrollRef(atBottom);
|
10144
10188
|
}, [scrollToBottom, sendMessageStatusIfAtBottom]);
|
10145
10189
|
// Infinite scrolling + threadInitialize function
|
10146
|
-
const fetchNewMessageWhenAtTop = React.useCallback(() => __awaiter$
|
10190
|
+
const fetchNewMessageWhenAtTop = React.useCallback(() => __awaiter$v(void 0, void 0, void 0, function* () {
|
10147
10191
|
if (!isLoadingChatMessagesRef.current) {
|
10148
10192
|
if (onLoadPreviousChatMessages) {
|
10149
10193
|
isLoadingChatMessagesRef.current = true;
|
@@ -14506,7 +14550,7 @@ const DevicesButton = (props) => {
|
|
14506
14550
|
|
14507
14551
|
// Copyright (c) Microsoft Corporation.
|
14508
14552
|
// Licensed under the MIT license.
|
14509
|
-
var __awaiter$
|
14553
|
+
var __awaiter$u = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
14510
14554
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
14511
14555
|
return new (P || (P = Promise))(function (resolve, reject) {
|
14512
14556
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -14544,7 +14588,7 @@ const CameraButton = (props) => {
|
|
14544
14588
|
const toggleAnnouncerString = React.useCallback((isCameraOn) => {
|
14545
14589
|
setAnnouncerString(!isCameraOn ? strings.cameraActionTurnedOffAnnouncement : strings.cameraActionTurnedOnAnnouncement);
|
14546
14590
|
}, [strings.cameraActionTurnedOffAnnouncement, strings.cameraActionTurnedOnAnnouncement]);
|
14547
|
-
const onToggleClick = React.useCallback(() => __awaiter$
|
14591
|
+
const onToggleClick = React.useCallback(() => __awaiter$u(void 0, void 0, void 0, function* () {
|
14548
14592
|
// Throttle click on camera, need to await onToggleCamera then allow another click
|
14549
14593
|
if (onToggleCamera) {
|
14550
14594
|
setWaitForCamera(true);
|
@@ -14712,7 +14756,7 @@ const lightThemeCallButtonStyles = {
|
|
14712
14756
|
|
14713
14757
|
// Copyright (c) Microsoft Corporation.
|
14714
14758
|
// Licensed under the MIT license.
|
14715
|
-
var __awaiter$
|
14759
|
+
var __awaiter$t = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
14716
14760
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
14717
14761
|
return new (P || (P = Promise))(function (resolve, reject) {
|
14718
14762
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -14753,7 +14797,7 @@ const MicrophoneButton = (props) => {
|
|
14753
14797
|
const toggleAnnouncerString = React.useCallback((isMicOn) => {
|
14754
14798
|
setAnnouncerString(!isMicOn ? strings.microphoneActionTurnedOffAnnouncement : strings.microphoneActionTurnedOnAnnouncement);
|
14755
14799
|
}, [strings.microphoneActionTurnedOffAnnouncement, strings.microphoneActionTurnedOnAnnouncement]);
|
14756
|
-
const onToggleClick = React.useCallback(() => __awaiter$
|
14800
|
+
const onToggleClick = React.useCallback(() => __awaiter$t(void 0, void 0, void 0, function* () {
|
14757
14801
|
if (onToggleMicrophone) {
|
14758
14802
|
try {
|
14759
14803
|
yield onToggleMicrophone();
|
@@ -15649,7 +15693,7 @@ const formatPhoneNumber = (phoneNumber) => {
|
|
15649
15693
|
|
15650
15694
|
// Copyright (c) Microsoft Corporation.
|
15651
15695
|
// Licensed under the MIT license.
|
15652
|
-
var __awaiter$
|
15696
|
+
var __awaiter$s = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
15653
15697
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
15654
15698
|
return new (P || (P = Promise))(function (resolve, reject) {
|
15655
15699
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -15691,10 +15735,10 @@ const DialpadButton = (props) => {
|
|
15691
15735
|
const theme = react.useTheme();
|
15692
15736
|
const { digit, index, onClick, onLongPress, isMobile = false } = props;
|
15693
15737
|
const useLongPressProps = React__default['default'].useMemo(() => ({
|
15694
|
-
onClick: () => __awaiter$
|
15738
|
+
onClick: () => __awaiter$s(void 0, void 0, void 0, function* () {
|
15695
15739
|
onClick(digit, index);
|
15696
15740
|
}),
|
15697
|
-
onLongPress: () => __awaiter$
|
15741
|
+
onLongPress: () => __awaiter$s(void 0, void 0, void 0, function* () {
|
15698
15742
|
onLongPress(digit, index);
|
15699
15743
|
}),
|
15700
15744
|
touchEventsOnly: isMobile
|
@@ -16468,7 +16512,7 @@ const dropdownStyles = {
|
|
16468
16512
|
callout: Object.assign({ height: _pxToRem(300), overflow: 'auto' }, scrollbarStyles)
|
16469
16513
|
};
|
16470
16514
|
|
16471
|
-
var __awaiter$
|
16515
|
+
var __awaiter$r = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
16472
16516
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
16473
16517
|
return new (P || (P = Promise))(function (resolve, reject) {
|
16474
16518
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -16503,7 +16547,7 @@ const _CaptionsSettingsModal = (props) => {
|
|
16503
16547
|
setHasSetSpokenLanguage(true);
|
16504
16548
|
}
|
16505
16549
|
}, [isCaptionsFeatureActive, onSetSpokenLanguage, selectedItem.key, hasSetSpokenLanguage]);
|
16506
|
-
const onConfirm = React.useCallback(() => __awaiter$
|
16550
|
+
const onConfirm = React.useCallback(() => __awaiter$r(void 0, void 0, void 0, function* () {
|
16507
16551
|
const languageCode = selectedItem.key.toString();
|
16508
16552
|
if (isCaptionsFeatureActive) {
|
16509
16553
|
onSetSpokenLanguage(languageCode);
|
@@ -17135,7 +17179,7 @@ const findConditionalCompiledSelector = (component) => {
|
|
17135
17179
|
|
17136
17180
|
// Copyright (c) Microsoft Corporation.
|
17137
17181
|
// Licensed under the MIT license.
|
17138
|
-
var __awaiter$
|
17182
|
+
var __awaiter$q = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
17139
17183
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
17140
17184
|
return new (P || (P = Promise))(function (resolve, reject) {
|
17141
17185
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -17158,35 +17202,35 @@ const createDefaultChatHandlers = memoizeOne__default['default']((chatClient, ch
|
|
17158
17202
|
let messageIterator = undefined;
|
17159
17203
|
let readReceiptIterator = undefined;
|
17160
17204
|
return {
|
17161
|
-
onSendMessage: (content, options) => __awaiter$
|
17205
|
+
onSendMessage: (content, options) => __awaiter$q(void 0, void 0, void 0, function* () {
|
17162
17206
|
const sendMessageRequest = {
|
17163
17207
|
content,
|
17164
17208
|
senderDisplayName: chatClient.getState().displayName
|
17165
17209
|
};
|
17166
17210
|
yield chatThreadClient.sendMessage(sendMessageRequest, options);
|
17167
17211
|
}),
|
17168
|
-
onUpdateMessage: (messageId, content, metadata, options) => __awaiter$
|
17212
|
+
onUpdateMessage: (messageId, content, metadata, options) => __awaiter$q(void 0, void 0, void 0, function* () {
|
17169
17213
|
const updatedMetadata = metadata ? Object.assign({}, metadata) : {};
|
17170
17214
|
updatedMetadata['fileSharingMetadata'] = JSON.stringify((options === null || options === void 0 ? void 0 : options.attachedFilesMetadata) || []);
|
17171
17215
|
yield chatThreadClient.updateMessage(messageId, { content, metadata: updatedMetadata });
|
17172
17216
|
}),
|
17173
|
-
onDeleteMessage: (messageId) => __awaiter$
|
17217
|
+
onDeleteMessage: (messageId) => __awaiter$q(void 0, void 0, void 0, function* () {
|
17174
17218
|
yield chatThreadClient.deleteMessage(messageId);
|
17175
17219
|
}),
|
17176
17220
|
// This handler is designed for chatThread to consume
|
17177
|
-
onMessageSeen: (chatMessageId) => __awaiter$
|
17221
|
+
onMessageSeen: (chatMessageId) => __awaiter$q(void 0, void 0, void 0, function* () {
|
17178
17222
|
yield chatThreadClient.sendReadReceipt({ chatMessageId });
|
17179
17223
|
}),
|
17180
|
-
onTyping: () => __awaiter$
|
17224
|
+
onTyping: () => __awaiter$q(void 0, void 0, void 0, function* () {
|
17181
17225
|
yield chatThreadClient.sendTypingNotification();
|
17182
17226
|
}),
|
17183
|
-
onRemoveParticipant: (userId) => __awaiter$
|
17227
|
+
onRemoveParticipant: (userId) => __awaiter$q(void 0, void 0, void 0, function* () {
|
17184
17228
|
yield chatThreadClient.removeParticipant(fromFlatCommunicationIdentifier(userId));
|
17185
17229
|
}),
|
17186
|
-
updateThreadTopicName: (topicName) => __awaiter$
|
17230
|
+
updateThreadTopicName: (topicName) => __awaiter$q(void 0, void 0, void 0, function* () {
|
17187
17231
|
yield chatThreadClient.updateTopic(topicName);
|
17188
17232
|
}),
|
17189
|
-
onLoadPreviousChatMessages: (messagesToLoad) => __awaiter$
|
17233
|
+
onLoadPreviousChatMessages: (messagesToLoad) => __awaiter$q(void 0, void 0, void 0, function* () {
|
17190
17234
|
var _a, _b, _c;
|
17191
17235
|
if (messageIterator === undefined) {
|
17192
17236
|
// Lazy definition so that errors in the method call are reported correctly.
|
@@ -18053,7 +18097,7 @@ const chatStatefulLogger = logger.createClientLogger('communication-react:chat-s
|
|
18053
18097
|
|
18054
18098
|
// Copyright (c) Microsoft Corporation.
|
18055
18099
|
// Licensed under the MIT license.
|
18056
|
-
var __awaiter$
|
18100
|
+
var __awaiter$p = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
18057
18101
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
18058
18102
|
return new (P || (P = Promise))(function (resolve, reject) {
|
18059
18103
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -18328,7 +18372,7 @@ class ChatContext$1 {
|
|
18328
18372
|
* @throws ChatError. Exceptions thrown from `f` are tagged with the failed `target.
|
18329
18373
|
*/
|
18330
18374
|
withAsyncErrorTeedToState(f, target) {
|
18331
|
-
return (...args) => __awaiter$
|
18375
|
+
return (...args) => __awaiter$p(this, void 0, void 0, function* () {
|
18332
18376
|
try {
|
18333
18377
|
return yield f(...args);
|
18334
18378
|
}
|
@@ -18440,7 +18484,7 @@ const convertChatMessage = (message, status = 'delivered', clientMessageId) => {
|
|
18440
18484
|
|
18441
18485
|
// Copyright (c) Microsoft Corporation.
|
18442
18486
|
// Licensed under the MIT license.
|
18443
|
-
var __awaiter$
|
18487
|
+
var __awaiter$o = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
18444
18488
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
18445
18489
|
return new (P || (P = Promise))(function (resolve, reject) {
|
18446
18490
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -18529,7 +18573,7 @@ class EventSubscriber {
|
|
18529
18573
|
};
|
18530
18574
|
// This is a temporary fix that no participant message is received for onChatMessageReceived event, which should be handled by JS SDK.
|
18531
18575
|
// Without the temporary fix, there are missing 'participant joined' and 'participant left' system messages in the chat thread.
|
18532
|
-
this.fetchLastParticipantMessage = (threadId, actionType) => __awaiter$
|
18576
|
+
this.fetchLastParticipantMessage = (threadId, actionType) => __awaiter$o(this, void 0, void 0, function* () {
|
18533
18577
|
var e_1, _a;
|
18534
18578
|
try {
|
18535
18579
|
for (var _b = __asyncValues$1(this.chatClient
|
@@ -18621,7 +18665,7 @@ class EventSubscriber {
|
|
18621
18665
|
|
18622
18666
|
// Copyright (c) Microsoft Corporation.
|
18623
18667
|
// Licensed under the MIT license.
|
18624
|
-
var __awaiter$
|
18668
|
+
var __awaiter$n = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
18625
18669
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
18626
18670
|
return new (P || (P = Promise))(function (resolve, reject) {
|
18627
18671
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -18643,7 +18687,7 @@ const createDecoratedIterator = (iteratorCreator, context, decorateFn) => {
|
|
18643
18687
|
const threadsIterator = iteratorCreator(...args);
|
18644
18688
|
return {
|
18645
18689
|
next() {
|
18646
|
-
return __awaiter$
|
18690
|
+
return __awaiter$n(this, void 0, void 0, function* () {
|
18647
18691
|
const result = yield threadsIterator.next();
|
18648
18692
|
if (!result.done && result.value) {
|
18649
18693
|
decorateFn(result.value, context);
|
@@ -18658,7 +18702,7 @@ const createDecoratedIterator = (iteratorCreator, context, decorateFn) => {
|
|
18658
18702
|
const pages = threadsIterator.byPage(settings);
|
18659
18703
|
return {
|
18660
18704
|
next() {
|
18661
|
-
return __awaiter$
|
18705
|
+
return __awaiter$n(this, void 0, void 0, function* () {
|
18662
18706
|
const result = yield pages.next();
|
18663
18707
|
const page = result.value;
|
18664
18708
|
if (!result.done && result.value) {
|
@@ -18742,7 +18786,7 @@ const createDecoratedListParticipants = (chatThreadClient, context) => {
|
|
18742
18786
|
|
18743
18787
|
// Copyright (c) Microsoft Corporation.
|
18744
18788
|
// Licensed under the MIT license.
|
18745
|
-
var __awaiter$
|
18789
|
+
var __awaiter$m = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
18746
18790
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
18747
18791
|
return new (P || (P = Promise))(function (resolve, reject) {
|
18748
18792
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -18761,14 +18805,14 @@ class ProxyChatThreadClient {
|
|
18761
18805
|
return createDecoratedListMessages(chatThreadClient, this._context);
|
18762
18806
|
}
|
18763
18807
|
case 'getMessage': {
|
18764
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
18808
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$m(this, void 0, void 0, function* () {
|
18765
18809
|
const message = yield chatThreadClient.getMessage(...args);
|
18766
18810
|
this._context.setChatMessage(chatThreadClient.threadId, convertChatMessage(message));
|
18767
18811
|
return message;
|
18768
18812
|
}), 'ChatThreadClient.getMessage');
|
18769
18813
|
}
|
18770
18814
|
case 'sendMessage': {
|
18771
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
18815
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$m(this, void 0, void 0, function* () {
|
18772
18816
|
// Retry logic?
|
18773
18817
|
const [request, options] = args;
|
18774
18818
|
const { content } = request;
|
@@ -18808,7 +18852,7 @@ class ProxyChatThreadClient {
|
|
18808
18852
|
}), 'ChatThreadClient.sendMessage');
|
18809
18853
|
}
|
18810
18854
|
case 'addParticipants': {
|
18811
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
18855
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$m(this, void 0, void 0, function* () {
|
18812
18856
|
const result = yield chatThreadClient.addParticipants(...args);
|
18813
18857
|
const [addRequest] = args;
|
18814
18858
|
const participantsToAdd = addRequest.participants;
|
@@ -18817,7 +18861,7 @@ class ProxyChatThreadClient {
|
|
18817
18861
|
}), 'ChatThreadClient.addParticipants');
|
18818
18862
|
}
|
18819
18863
|
case 'deleteMessage': {
|
18820
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
18864
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$m(this, void 0, void 0, function* () {
|
18821
18865
|
// DeleteMessage is able to either delete local one(for failed message) or synced message
|
18822
18866
|
const [messageId] = args;
|
18823
18867
|
if (this._context.deleteLocalMessage(chatThreadClient.threadId, messageId)) {
|
@@ -18835,12 +18879,12 @@ class ProxyChatThreadClient {
|
|
18835
18879
|
return createDecoratedListReadReceipts(chatThreadClient, this._context);
|
18836
18880
|
}
|
18837
18881
|
case 'sendTypingNotification': {
|
18838
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
18882
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$m(this, void 0, void 0, function* () {
|
18839
18883
|
return yield chatThreadClient.sendTypingNotification(...args);
|
18840
18884
|
}), 'ChatThreadClient.sendTypingNotification');
|
18841
18885
|
}
|
18842
18886
|
case 'removeParticipant': {
|
18843
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
18887
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$m(this, void 0, void 0, function* () {
|
18844
18888
|
const result = yield chatThreadClient.removeParticipant(...args);
|
18845
18889
|
const [removeIdentifier] = args;
|
18846
18890
|
this._context.deleteParticipant(chatThreadClient.threadId, communicationCommon.getIdentifierKind(removeIdentifier));
|
@@ -18848,7 +18892,7 @@ class ProxyChatThreadClient {
|
|
18848
18892
|
}), 'ChatThreadClient.removeParticipant');
|
18849
18893
|
}
|
18850
18894
|
case 'updateMessage': {
|
18851
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
18895
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$m(this, void 0, void 0, function* () {
|
18852
18896
|
const result = yield chatThreadClient.updateMessage(...args);
|
18853
18897
|
const [messageId, updateOption] = args;
|
18854
18898
|
this._context.updateChatMessageContent(chatThreadClient.threadId, messageId, updateOption === null || updateOption === void 0 ? void 0 : updateOption.content);
|
@@ -18856,7 +18900,7 @@ class ProxyChatThreadClient {
|
|
18856
18900
|
}), 'ChatThreadClient.updateMessage');
|
18857
18901
|
}
|
18858
18902
|
case 'updateTopic': {
|
18859
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
18903
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$m(this, void 0, void 0, function* () {
|
18860
18904
|
const result = yield chatThreadClient.updateTopic(...args);
|
18861
18905
|
const [topic] = args;
|
18862
18906
|
this._context.updateThreadTopic(chatThreadClient.threadId, topic);
|
@@ -18864,7 +18908,7 @@ class ProxyChatThreadClient {
|
|
18864
18908
|
}), 'ChatThreadClient.updateTopic');
|
18865
18909
|
}
|
18866
18910
|
case 'getProperties': {
|
18867
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
18911
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$m(this, void 0, void 0, function* () {
|
18868
18912
|
const result = yield chatThreadClient.getProperties(...args);
|
18869
18913
|
this._context.updateThread(chatThreadClient.threadId, result);
|
18870
18914
|
return result;
|
@@ -18901,7 +18945,7 @@ const createDecoratedListThreads = (chatClient, context) => {
|
|
18901
18945
|
|
18902
18946
|
// Copyright (c) Microsoft Corporation.
|
18903
18947
|
// Licensed under the MIT license.
|
18904
|
-
var __awaiter$
|
18948
|
+
var __awaiter$l = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
18905
18949
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
18906
18950
|
return new (P || (P = Promise))(function (resolve, reject) {
|
18907
18951
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -18920,7 +18964,7 @@ const proxyChatClient = {
|
|
18920
18964
|
switch (prop) {
|
18921
18965
|
case 'createChatThread': {
|
18922
18966
|
return context.withAsyncErrorTeedToState(function (...args) {
|
18923
|
-
return __awaiter$
|
18967
|
+
return __awaiter$l(this, void 0, void 0, function* () {
|
18924
18968
|
const result = yield chatClient.createChatThread(...args);
|
18925
18969
|
const thread = result.chatThread;
|
18926
18970
|
if (thread) {
|
@@ -18933,7 +18977,7 @@ const proxyChatClient = {
|
|
18933
18977
|
}
|
18934
18978
|
case 'deleteChatThread': {
|
18935
18979
|
return context.withAsyncErrorTeedToState(function (...args) {
|
18936
|
-
return __awaiter$
|
18980
|
+
return __awaiter$l(this, void 0, void 0, function* () {
|
18937
18981
|
const result = yield chatClient.deleteChatThread(...args);
|
18938
18982
|
context.deleteThread(args[0]);
|
18939
18983
|
return result;
|
@@ -18953,7 +18997,7 @@ const proxyChatClient = {
|
|
18953
18997
|
}
|
18954
18998
|
case 'startRealtimeNotifications': {
|
18955
18999
|
return context.withAsyncErrorTeedToState(function (...args) {
|
18956
|
-
return __awaiter$
|
19000
|
+
return __awaiter$l(this, void 0, void 0, function* () {
|
18957
19001
|
const ret = yield chatClient.startRealtimeNotifications(...args);
|
18958
19002
|
if (!receiver.eventSubscriber) {
|
18959
19003
|
receiver.eventSubscriber = new EventSubscriber(chatClient, context);
|
@@ -18964,7 +19008,7 @@ const proxyChatClient = {
|
|
18964
19008
|
}
|
18965
19009
|
case 'stopRealtimeNotifications': {
|
18966
19010
|
return context.withAsyncErrorTeedToState(function (...args) {
|
18967
|
-
return __awaiter$
|
19011
|
+
return __awaiter$l(this, void 0, void 0, function* () {
|
18968
19012
|
const ret = yield chatClient.stopRealtimeNotifications(...args);
|
18969
19013
|
if (receiver.eventSubscriber) {
|
18970
19014
|
receiver.eventSubscriber.unsubscribe();
|
@@ -19114,7 +19158,7 @@ const COMPOSITE_ONLY_ICONS = {
|
|
19114
19158
|
/* @conditional-compile-remove(PSTN-calls) */
|
19115
19159
|
DialpadStartCall: React__default['default'].createElement(reactIcons.Call20Regular, null),
|
19116
19160
|
/* @conditional-compile-remove(rooms) */
|
19117
|
-
|
19161
|
+
NoticePageAccessDeniedRoomsCall: React__default['default'].createElement(reactIcons.Info20Filled, null),
|
19118
19162
|
/* @conditional-compile-remove(video-background-effects) */
|
19119
19163
|
BlurVideoBackground: React__default['default'].createElement(reactIcons.VideoBackgroundEffect20Regular, null),
|
19120
19164
|
/* @conditional-compile-remove(video-background-effects) */
|
@@ -19630,7 +19674,7 @@ const convertObservableFileUploadToFileUploadsUiState = (fileUploads) => {
|
|
19630
19674
|
|
19631
19675
|
// Copyright (c) Microsoft Corporation.
|
19632
19676
|
// Licensed under the MIT license.
|
19633
|
-
var __awaiter$
|
19677
|
+
var __awaiter$k = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
19634
19678
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
19635
19679
|
return new (P || (P = Promise))(function (resolve, reject) {
|
19636
19680
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -19765,9 +19809,9 @@ class AzureCommunicationChatAdapter {
|
|
19765
19809
|
this.unsubscribeAllEvents();
|
19766
19810
|
}
|
19767
19811
|
fetchInitialData() {
|
19768
|
-
return __awaiter$
|
19812
|
+
return __awaiter$k(this, void 0, void 0, function* () {
|
19769
19813
|
// If get properties fails we dont want to try to get the participants after.
|
19770
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
19814
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$k(this, void 0, void 0, function* () {
|
19771
19815
|
var e_1, _a;
|
19772
19816
|
yield this.chatThreadClient.getProperties();
|
19773
19817
|
try {
|
@@ -19801,8 +19845,8 @@ class AzureCommunicationChatAdapter {
|
|
19801
19845
|
this.context.offStateChange(handler);
|
19802
19846
|
}
|
19803
19847
|
sendMessage(content, options = {}) {
|
19804
|
-
return __awaiter$
|
19805
|
-
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* () {
|
19806
19850
|
/* @conditional-compile-remove(file-sharing) */
|
19807
19851
|
options.metadata = Object.assign(Object.assign({}, options.metadata), convertFileUploadsUiStateToMessageMetadata(this.context.getState().fileUploads));
|
19808
19852
|
/* @conditional-compile-remove(file-sharing) */
|
@@ -19819,51 +19863,51 @@ class AzureCommunicationChatAdapter {
|
|
19819
19863
|
});
|
19820
19864
|
}
|
19821
19865
|
sendReadReceipt(chatMessageId) {
|
19822
|
-
return __awaiter$
|
19823
|
-
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* () {
|
19824
19868
|
yield this.handlers.onMessageSeen(chatMessageId);
|
19825
19869
|
}));
|
19826
19870
|
});
|
19827
19871
|
}
|
19828
19872
|
sendTypingIndicator() {
|
19829
|
-
return __awaiter$
|
19830
|
-
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* () {
|
19831
19875
|
yield this.handlers.onTyping();
|
19832
19876
|
}));
|
19833
19877
|
});
|
19834
19878
|
}
|
19835
19879
|
removeParticipant(userId) {
|
19836
|
-
return __awaiter$
|
19837
|
-
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* () {
|
19838
19882
|
yield this.handlers.onRemoveParticipant(userId);
|
19839
19883
|
}));
|
19840
19884
|
});
|
19841
19885
|
}
|
19842
19886
|
setTopic(topicName) {
|
19843
|
-
return __awaiter$
|
19844
|
-
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* () {
|
19845
19889
|
yield this.handlers.updateThreadTopicName(topicName);
|
19846
19890
|
}));
|
19847
19891
|
});
|
19848
19892
|
}
|
19849
19893
|
loadPreviousChatMessages(messagesToLoad) {
|
19850
|
-
return __awaiter$
|
19851
|
-
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* () {
|
19852
19896
|
return yield this.handlers.onLoadPreviousChatMessages(messagesToLoad);
|
19853
19897
|
}));
|
19854
19898
|
});
|
19855
19899
|
}
|
19856
19900
|
updateMessage(messageId, content, metadata, options) {
|
19857
|
-
return __awaiter$
|
19858
|
-
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* () {
|
19859
19903
|
/* @conditional-compile-remove(file-sharing) */
|
19860
19904
|
return yield this.handlers.onUpdateMessage(messageId, content, metadata, options);
|
19861
19905
|
}));
|
19862
19906
|
});
|
19863
19907
|
}
|
19864
19908
|
deleteMessage(messageId) {
|
19865
|
-
return __awaiter$
|
19866
|
-
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* () {
|
19867
19911
|
return yield this.handlers.onDeleteMessage(messageId);
|
19868
19912
|
}));
|
19869
19913
|
});
|
@@ -19898,8 +19942,8 @@ class AzureCommunicationChatAdapter {
|
|
19898
19942
|
}
|
19899
19943
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
19900
19944
|
downloadAttachments(options) {
|
19901
|
-
return __awaiter$
|
19902
|
-
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* () {
|
19903
19947
|
if (this.credential === undefined) {
|
19904
19948
|
const e = new Error();
|
19905
19949
|
e['target'] = 'ChatThreadClient.getMessage';
|
@@ -19919,9 +19963,9 @@ class AzureCommunicationChatAdapter {
|
|
19919
19963
|
}
|
19920
19964
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
19921
19965
|
downloadAuthenticatedFile(accessToken, options) {
|
19922
|
-
return __awaiter$
|
19966
|
+
return __awaiter$k(this, void 0, void 0, function* () {
|
19923
19967
|
function fetchWithAuthentication(url, token) {
|
19924
|
-
return __awaiter$
|
19968
|
+
return __awaiter$k(this, void 0, void 0, function* () {
|
19925
19969
|
const headers = new Headers();
|
19926
19970
|
headers.append('Authorization', `Bearer ${token}`);
|
19927
19971
|
try {
|
@@ -19993,7 +20037,7 @@ class AzureCommunicationChatAdapter {
|
|
19993
20037
|
this.emitter.off(event, listener);
|
19994
20038
|
}
|
19995
20039
|
asyncTeeErrorToEventEmitter(f) {
|
19996
|
-
return __awaiter$
|
20040
|
+
return __awaiter$k(this, void 0, void 0, function* () {
|
19997
20041
|
try {
|
19998
20042
|
return yield f();
|
19999
20043
|
}
|
@@ -20035,7 +20079,7 @@ const convertEventType = (type) => {
|
|
20035
20079
|
*
|
20036
20080
|
* @public
|
20037
20081
|
*/
|
20038
|
-
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* () {
|
20039
20083
|
if (!_isValidIdentifier(userId)) {
|
20040
20084
|
throw new Error('Provided userId is invalid. Please provide valid identifier object.');
|
20041
20085
|
}
|
@@ -20104,7 +20148,7 @@ beforeDispose) => {
|
|
20104
20148
|
if (!credential || !displayName || !endpoint || !threadId || !userId) {
|
20105
20149
|
return;
|
20106
20150
|
}
|
20107
|
-
(() => __awaiter$
|
20151
|
+
(() => __awaiter$k(void 0, void 0, void 0, function* () {
|
20108
20152
|
if (adapterRef.current) {
|
20109
20153
|
// Dispose the old adapter when a new one is created.
|
20110
20154
|
//
|
@@ -20136,7 +20180,7 @@ beforeDispose) => {
|
|
20136
20180
|
// Dispose any existing adapter when the component unmounts.
|
20137
20181
|
React.useEffect(() => {
|
20138
20182
|
return () => {
|
20139
|
-
(() => __awaiter$
|
20183
|
+
(() => __awaiter$k(void 0, void 0, void 0, function* () {
|
20140
20184
|
if (adapterRef.current) {
|
20141
20185
|
if (beforeDisposeRef.current) {
|
20142
20186
|
yield beforeDisposeRef.current(adapterRef.current);
|
@@ -20160,7 +20204,7 @@ beforeDispose) => {
|
|
20160
20204
|
function createAzureCommunicationChatAdapterFromClient(chatClient, chatThreadClient,
|
20161
20205
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
20162
20206
|
options) {
|
20163
|
-
return __awaiter$
|
20207
|
+
return __awaiter$k(this, void 0, void 0, function* () {
|
20164
20208
|
return new AzureCommunicationChatAdapter(chatClient, chatThreadClient,
|
20165
20209
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */ options);
|
20166
20210
|
});
|
@@ -20373,7 +20417,7 @@ const sendboxContainerStyles = {
|
|
20373
20417
|
|
20374
20418
|
// Copyright (c) Microsoft Corporation.
|
20375
20419
|
// Licensed under the MIT license.
|
20376
|
-
var __awaiter$
|
20420
|
+
var __awaiter$j = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
20377
20421
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
20378
20422
|
return new (P || (P = Promise))(function (resolve, reject) {
|
20379
20423
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -20394,7 +20438,7 @@ const AvatarPersona = (props) => {
|
|
20394
20438
|
const { userId, dataProvider, text, imageUrl, imageInitials, initialsColor, initialsTextColor, showOverflowTooltip } = props;
|
20395
20439
|
const [data, setData] = React.useState();
|
20396
20440
|
React.useEffect(() => {
|
20397
|
-
(() => __awaiter$
|
20441
|
+
(() => __awaiter$j(void 0, void 0, void 0, function* () {
|
20398
20442
|
if (dataProvider && userId) {
|
20399
20443
|
const newData = yield dataProvider(userId);
|
20400
20444
|
if (avatarDeepDifferenceCheck(data, newData)) {
|
@@ -20775,7 +20819,7 @@ const FileDownloadErrorBar = (props) => {
|
|
20775
20819
|
|
20776
20820
|
// Copyright (c) Microsoft Corporation.
|
20777
20821
|
// Licensed under the MIT license.
|
20778
|
-
var __awaiter$
|
20822
|
+
var __awaiter$i = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
20779
20823
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
20780
20824
|
return new (P || (P = Promise))(function (resolve, reject) {
|
20781
20825
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -20796,7 +20840,7 @@ const ChatScreen = (props) => {
|
|
20796
20840
|
const theme = useTheme();
|
20797
20841
|
React.useEffect(() => {
|
20798
20842
|
// Initial data should be always fetched by the composite(or external caller) instead of the adapter
|
20799
|
-
const fetchData = () => __awaiter$
|
20843
|
+
const fetchData = () => __awaiter$i(void 0, void 0, void 0, function* () {
|
20800
20844
|
// Fetch initial data for adapter
|
20801
20845
|
yield adapter.fetchInitialData();
|
20802
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.
|
@@ -20830,7 +20874,7 @@ const ChatScreen = (props) => {
|
|
20830
20874
|
setDownloadErrorMessage(errorMessage);
|
20831
20875
|
} })), [fileSharing === null || fileSharing === void 0 ? void 0 : fileSharing.downloadHandler]);
|
20832
20876
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
20833
|
-
const onRenderInlineAttachment = React.useCallback((attachment) => __awaiter$
|
20877
|
+
const onRenderInlineAttachment = React.useCallback((attachment) => __awaiter$i(void 0, void 0, void 0, function* () {
|
20834
20878
|
if (attachment.attachmentType === 'inlineImage' && attachment.previewUrl) {
|
20835
20879
|
const blob = yield adapter.downloadAttachments({ attachmentUrls: [attachment.previewUrl] });
|
20836
20880
|
return blob;
|
@@ -21065,7 +21109,7 @@ const END_CALL_PAGES = [
|
|
21065
21109
|
|
21066
21110
|
// Copyright (c) Microsoft Corporation.
|
21067
21111
|
// Licensed under the MIT license.
|
21068
|
-
var __awaiter$
|
21112
|
+
var __awaiter$h = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
21069
21113
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
21070
21114
|
return new (P || (P = Promise))(function (resolve, reject) {
|
21071
21115
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -21295,7 +21339,7 @@ const isDisabled$2 = (option) => {
|
|
21295
21339
|
/**
|
21296
21340
|
* @returns Permissions state for the camera.
|
21297
21341
|
*/
|
21298
|
-
const queryCameraPermissionFromPermissionsAPI = () => __awaiter$
|
21342
|
+
const queryCameraPermissionFromPermissionsAPI = () => __awaiter$h(void 0, void 0, void 0, function* () {
|
21299
21343
|
try {
|
21300
21344
|
return (yield navigator.permissions.query({ name: 'camera' })).state;
|
21301
21345
|
}
|
@@ -21308,7 +21352,7 @@ const queryCameraPermissionFromPermissionsAPI = () => __awaiter$f(void 0, void 0
|
|
21308
21352
|
/**
|
21309
21353
|
* @returns Permissions state for the microphone.
|
21310
21354
|
*/
|
21311
|
-
const queryMicrophonePermissionFromPermissionsAPI = () => __awaiter$
|
21355
|
+
const queryMicrophonePermissionFromPermissionsAPI = () => __awaiter$h(void 0, void 0, void 0, function* () {
|
21312
21356
|
try {
|
21313
21357
|
return (yield navigator.permissions.query({ name: 'microphone' })).state;
|
21314
21358
|
}
|
@@ -21325,7 +21369,7 @@ const queryMicrophonePermissionFromPermissionsAPI = () => __awaiter$f(void 0, vo
|
|
21325
21369
|
* If permission API is not supported on this browser, permission state is set to unsupported.
|
21326
21370
|
* @private
|
21327
21371
|
*/
|
21328
|
-
const getDevicePermissionState = (setVideoState, setAudioState) => __awaiter$
|
21372
|
+
const getDevicePermissionState = (setVideoState, setAudioState) => __awaiter$h(void 0, void 0, void 0, function* () {
|
21329
21373
|
const [cameraResult, microphoneResult] = yield Promise.all([
|
21330
21374
|
queryCameraPermissionFromPermissionsAPI(),
|
21331
21375
|
queryMicrophonePermissionFromPermissionsAPI()
|
@@ -21388,10 +21432,12 @@ const createParticipantModifier = (createModifiedParticipant) => {
|
|
21388
21432
|
};
|
21389
21433
|
/* @conditional-compile-remove(video-background-effects) */
|
21390
21434
|
/** @private */
|
21391
|
-
const getBackgroundEffectFromSelectedEffect = (selectedEffect) => (selectedEffect === null || selectedEffect === void 0 ? void 0 : selectedEffect.effectName) === 'blur'
|
21392
|
-
?
|
21435
|
+
const getBackgroundEffectFromSelectedEffect = (selectedEffect, VideoBackgroundEffectsDependency) => (selectedEffect === null || selectedEffect === void 0 ? void 0 : selectedEffect.effectName) === 'blur'
|
21436
|
+
? VideoBackgroundEffectsDependency.createBackgroundBlurEffect()
|
21393
21437
|
: (selectedEffect === null || selectedEffect === void 0 ? void 0 : selectedEffect.effectName) === 'replacement'
|
21394
|
-
?
|
21438
|
+
? VideoBackgroundEffectsDependency.createBackgroundReplacementEffect({
|
21439
|
+
backgroundImageUrl: selectedEffect.backgroundImageUrl
|
21440
|
+
})
|
21395
21441
|
: undefined;
|
21396
21442
|
/**
|
21397
21443
|
* @remarks this logic should mimic the onToggleCamera in the common call handlers.
|
@@ -21401,7 +21447,7 @@ const getSelectedCameraFromAdapterState = (state) => state.devices.selectedCamer
|
|
21401
21447
|
|
21402
21448
|
// Copyright (c) Microsoft Corporation.
|
21403
21449
|
// Licensed under the MIT license.
|
21404
|
-
var __awaiter$
|
21450
|
+
var __awaiter$g = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
21405
21451
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
21406
21452
|
return new (P || (P = Promise))(function (resolve, reject) {
|
21407
21453
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -21420,112 +21466,112 @@ _component) => {
|
|
21420
21466
|
return createCompositeHandlers(useAdapter());
|
21421
21467
|
};
|
21422
21468
|
const createCompositeHandlers = memoizeOne__default['default']((adapter) => ({
|
21423
|
-
onCreateLocalStreamView: (options) => __awaiter$
|
21469
|
+
onCreateLocalStreamView: (options) => __awaiter$g(void 0, void 0, void 0, function* () {
|
21424
21470
|
return yield adapter.createStreamView(undefined, options);
|
21425
21471
|
}),
|
21426
|
-
onCreateRemoteStreamView: (userId, options) => __awaiter$
|
21472
|
+
onCreateRemoteStreamView: (userId, options) => __awaiter$g(void 0, void 0, void 0, function* () {
|
21427
21473
|
return yield adapter.createStreamView(userId, options);
|
21428
21474
|
}),
|
21429
|
-
onHangUp: (forEveryone) => __awaiter$
|
21475
|
+
onHangUp: (forEveryone) => __awaiter$g(void 0, void 0, void 0, function* () {
|
21430
21476
|
yield adapter.leaveCall(forEveryone);
|
21431
21477
|
}),
|
21432
21478
|
/* @conditional-compile-remove(PSTN-calls) */
|
21433
|
-
onToggleHold: () => __awaiter$
|
21479
|
+
onToggleHold: () => __awaiter$g(void 0, void 0, void 0, function* () {
|
21434
21480
|
var _a;
|
21435
21481
|
return ((_a = adapter.getState().call) === null || _a === void 0 ? void 0 : _a.state) === 'LocalHold' ? yield adapter.resumeCall() : yield adapter.holdCall();
|
21436
21482
|
}),
|
21437
21483
|
/* @conditional-compile-remove(PSTN-calls) */
|
21438
|
-
onAddParticipant: (participant, options) => __awaiter$
|
21484
|
+
onAddParticipant: (participant, options) => __awaiter$g(void 0, void 0, void 0, function* () {
|
21439
21485
|
return yield adapter.addParticipant(participant, options);
|
21440
21486
|
}),
|
21441
21487
|
/* @conditional-compile-remove(PSTN-calls) */
|
21442
|
-
onSendDtmfTone: (dtmfTone) => __awaiter$
|
21488
|
+
onSendDtmfTone: (dtmfTone) => __awaiter$g(void 0, void 0, void 0, function* () {
|
21443
21489
|
yield adapter.sendDtmfTone(dtmfTone);
|
21444
21490
|
}),
|
21445
|
-
onRemoveParticipant: (userId) => __awaiter$
|
21491
|
+
onRemoveParticipant: (userId) => __awaiter$g(void 0, void 0, void 0, function* () {
|
21446
21492
|
yield adapter.removeParticipant(userId);
|
21447
21493
|
}),
|
21448
|
-
onSelectCamera: (deviceInfo, options) => __awaiter$
|
21494
|
+
onSelectCamera: (deviceInfo, options) => __awaiter$g(void 0, void 0, void 0, function* () {
|
21449
21495
|
yield adapter.setCamera(deviceInfo, options);
|
21450
21496
|
}),
|
21451
|
-
onSelectMicrophone: (deviceInfo) => __awaiter$
|
21497
|
+
onSelectMicrophone: (deviceInfo) => __awaiter$g(void 0, void 0, void 0, function* () {
|
21452
21498
|
yield adapter.setMicrophone(deviceInfo);
|
21453
21499
|
}),
|
21454
|
-
onSelectSpeaker: (deviceInfo) => __awaiter$
|
21500
|
+
onSelectSpeaker: (deviceInfo) => __awaiter$g(void 0, void 0, void 0, function* () {
|
21455
21501
|
yield adapter.setSpeaker(deviceInfo);
|
21456
21502
|
}),
|
21457
21503
|
onStartCall: (participants, options) => {
|
21458
21504
|
const rawIds = participants.map((participant) => toFlatCommunicationIdentifier(participant));
|
21459
21505
|
return adapter.startCall(rawIds, options);
|
21460
21506
|
},
|
21461
|
-
onStartScreenShare: () => __awaiter$
|
21507
|
+
onStartScreenShare: () => __awaiter$g(void 0, void 0, void 0, function* () {
|
21462
21508
|
yield adapter.startScreenShare();
|
21463
21509
|
}),
|
21464
|
-
onStopScreenShare: () => __awaiter$
|
21510
|
+
onStopScreenShare: () => __awaiter$g(void 0, void 0, void 0, function* () {
|
21465
21511
|
yield adapter.stopScreenShare();
|
21466
21512
|
}),
|
21467
|
-
onToggleCamera: (options) => __awaiter$
|
21513
|
+
onToggleCamera: (options) => __awaiter$g(void 0, void 0, void 0, function* () {
|
21468
21514
|
isCameraOn(adapter.getState()) ? yield adapter.stopCamera() : yield adapter.startCamera(options);
|
21469
21515
|
}),
|
21470
|
-
onToggleMicrophone: () => __awaiter$
|
21516
|
+
onToggleMicrophone: () => __awaiter$g(void 0, void 0, void 0, function* () {
|
21471
21517
|
var _b;
|
21472
21518
|
return ((_b = adapter.getState().call) === null || _b === void 0 ? void 0 : _b.isMuted) ? yield adapter.unmute() : yield adapter.mute();
|
21473
21519
|
}),
|
21474
|
-
onToggleScreenShare: () => __awaiter$
|
21520
|
+
onToggleScreenShare: () => __awaiter$g(void 0, void 0, void 0, function* () {
|
21475
21521
|
var _c;
|
21476
21522
|
return ((_c = adapter.getState().call) === null || _c === void 0 ? void 0 : _c.isScreenSharingOn)
|
21477
21523
|
? yield adapter.stopScreenShare()
|
21478
21524
|
: yield adapter.startScreenShare();
|
21479
21525
|
}),
|
21480
|
-
onStartLocalVideo: () => __awaiter$
|
21526
|
+
onStartLocalVideo: () => __awaiter$g(void 0, void 0, void 0, function* () {
|
21481
21527
|
if (adapter.getState().call) {
|
21482
21528
|
return adapter.startCamera();
|
21483
21529
|
}
|
21484
21530
|
}),
|
21485
|
-
onDisposeLocalStreamView: () => __awaiter$
|
21531
|
+
onDisposeLocalStreamView: () => __awaiter$g(void 0, void 0, void 0, function* () {
|
21486
21532
|
return adapter.disposeLocalVideoStreamView();
|
21487
21533
|
}),
|
21488
|
-
onDisposeRemoteStreamView: (userId) => __awaiter$
|
21534
|
+
onDisposeRemoteStreamView: (userId) => __awaiter$g(void 0, void 0, void 0, function* () {
|
21489
21535
|
return adapter.disposeStreamView(userId);
|
21490
21536
|
}),
|
21491
|
-
onDisposeRemoteScreenShareStreamView: (userId) => __awaiter$
|
21537
|
+
onDisposeRemoteScreenShareStreamView: (userId) => __awaiter$g(void 0, void 0, void 0, function* () {
|
21492
21538
|
return adapter.disposeScreenShareStreamView(userId);
|
21493
21539
|
}),
|
21494
|
-
onDisposeRemoteVideoStreamView: (userId) => __awaiter$
|
21540
|
+
onDisposeRemoteVideoStreamView: (userId) => __awaiter$g(void 0, void 0, void 0, function* () {
|
21495
21541
|
return adapter.disposeRemoteVideoStreamView(userId);
|
21496
21542
|
}),
|
21497
21543
|
/* @conditional-compile-remove(call-readiness) */
|
21498
|
-
askDevicePermission: (constrain) => __awaiter$
|
21544
|
+
askDevicePermission: (constrain) => __awaiter$g(void 0, void 0, void 0, function* () {
|
21499
21545
|
return adapter.askDevicePermission(constrain);
|
21500
21546
|
}),
|
21501
21547
|
/* @conditional-compile-remove(video-background-effects) */
|
21502
|
-
onRemoveVideoBackgroundEffects: () => __awaiter$
|
21548
|
+
onRemoveVideoBackgroundEffects: () => __awaiter$g(void 0, void 0, void 0, function* () {
|
21503
21549
|
return yield adapter.stopVideoBackgroundEffects();
|
21504
21550
|
}),
|
21505
21551
|
/* @conditional-compile-remove(video-background-effects) */
|
21506
|
-
onBlurVideoBackground: (backgroundBlurConfig) => __awaiter$
|
21552
|
+
onBlurVideoBackground: (backgroundBlurConfig) => __awaiter$g(void 0, void 0, void 0, function* () {
|
21507
21553
|
const blurConfig = Object.assign({ effectName: 'blur' }, backgroundBlurConfig);
|
21508
21554
|
return yield adapter.startVideoBackgroundEffect(blurConfig);
|
21509
21555
|
}),
|
21510
21556
|
/* @conditional-compile-remove(video-background-effects) */
|
21511
|
-
onReplaceVideoBackground: (backgroundReplacementConfig) => __awaiter$
|
21557
|
+
onReplaceVideoBackground: (backgroundReplacementConfig) => __awaiter$g(void 0, void 0, void 0, function* () {
|
21512
21558
|
const replacementConfig = Object.assign({ effectName: 'replacement' }, backgroundReplacementConfig);
|
21513
21559
|
return yield adapter.startVideoBackgroundEffect(replacementConfig);
|
21514
21560
|
}),
|
21515
21561
|
/* @conditional-compile-remove(close-captions) */
|
21516
|
-
onStartCaptions: (options) => __awaiter$
|
21562
|
+
onStartCaptions: (options) => __awaiter$g(void 0, void 0, void 0, function* () {
|
21517
21563
|
yield adapter.startCaptions(options);
|
21518
21564
|
}),
|
21519
21565
|
/* @conditional-compile-remove(close-captions) */
|
21520
|
-
onStopCaptions: () => __awaiter$
|
21566
|
+
onStopCaptions: () => __awaiter$g(void 0, void 0, void 0, function* () {
|
21521
21567
|
yield adapter.stopCaptions();
|
21522
21568
|
}),
|
21523
21569
|
/* @conditional-compile-remove(close-captions) */
|
21524
|
-
onSetSpokenLanguage: (language) => __awaiter$
|
21570
|
+
onSetSpokenLanguage: (language) => __awaiter$g(void 0, void 0, void 0, function* () {
|
21525
21571
|
yield adapter.setSpokenLanguage(language);
|
21526
21572
|
}),
|
21527
21573
|
/* @conditional-compile-remove(close-captions) */
|
21528
|
-
onSetCaptionLanguage: (language) => __awaiter$
|
21574
|
+
onSetCaptionLanguage: (language) => __awaiter$g(void 0, void 0, void 0, function* () {
|
21529
21575
|
yield adapter.setCaptionLanguage(language);
|
21530
21576
|
})
|
21531
21577
|
}));
|
@@ -21656,7 +21702,7 @@ const MoreButton = (props) => {
|
|
21656
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'] })));
|
21657
21703
|
};
|
21658
21704
|
|
21659
|
-
var __awaiter$
|
21705
|
+
var __awaiter$f = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
21660
21706
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
21661
21707
|
return new (P || (P = Promise))(function (resolve, reject) {
|
21662
21708
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -21684,7 +21730,7 @@ const CaptionsBannerMoreButton = (props) => {
|
|
21684
21730
|
/* @conditional-compile-remove(close-captions) */
|
21685
21731
|
const moreButtonContextualMenuItems = [];
|
21686
21732
|
/* @conditional-compile-remove(close-captions) */
|
21687
|
-
const startCaptions = React.useCallback(() => __awaiter$
|
21733
|
+
const startCaptions = React.useCallback(() => __awaiter$f(void 0, void 0, void 0, function* () {
|
21688
21734
|
yield startCaptionsButtonHandlers.onStartCaptions({
|
21689
21735
|
spokenLanguage: startCaptionsButtonProps.currentSpokenLanguage
|
21690
21736
|
});
|
@@ -21826,7 +21872,7 @@ const Camera = (props) => {
|
|
21826
21872
|
props.disabled ||
|
21827
21873
|
/* @conditional-compile-remove(rooms) */ (isRoomsCall && ((_a = adapter.getState().call) === null || _a === void 0 ? void 0 : _a.role) === 'Unknown'),
|
21828
21874
|
/* @conditional-compile-remove(video-background-effects) */
|
21829
|
-
onShowVideoEffectsPicker: props.onShowVideoEffectsPicker })));
|
21875
|
+
onShowVideoEffectsPicker: props.onShowVideoEffectsPicker, componentRef: props.componentRef })));
|
21830
21876
|
};
|
21831
21877
|
|
21832
21878
|
// Copyright (c) Microsoft Corporation.
|
@@ -22551,7 +22597,7 @@ const onFetchCustomButtonPropsTrampoline = (options) => {
|
|
22551
22597
|
|
22552
22598
|
// Copyright (c) Microsoft Corporation.
|
22553
22599
|
// Licensed under the MIT license.
|
22554
|
-
var __awaiter$
|
22600
|
+
var __awaiter$e = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
22555
22601
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
22556
22602
|
return new (P || (P = Promise))(function (resolve, reject) {
|
22557
22603
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -22574,7 +22620,7 @@ const DesktopMoreButton = (props) => {
|
|
22574
22620
|
/* @conditional-compile-remove(close-captions) */
|
22575
22621
|
const startCaptionsButtonHandlers = useHandlers();
|
22576
22622
|
/* @conditional-compile-remove(close-captions) */
|
22577
|
-
const startCaptions = React.useCallback(() => __awaiter$
|
22623
|
+
const startCaptions = React.useCallback(() => __awaiter$e(void 0, void 0, void 0, function* () {
|
22578
22624
|
yield startCaptionsButtonHandlers.onStartCaptions({
|
22579
22625
|
spokenLanguage: startCaptionsButtonProps.currentSpokenLanguage
|
22580
22626
|
});
|
@@ -22875,7 +22921,7 @@ const CommonCallControlBar = (props) => {
|
|
22875
22921
|
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
22876
22922
|
disabled: props.disableButtonsForHoldScreen || isDisabled$2(options.cameraButton),
|
22877
22923
|
/* @conditional-compile-remove(video-background-effects) */
|
22878
|
-
onShowVideoEffectsPicker: props.onShowVideoEffectsPicker })),
|
22924
|
+
onShowVideoEffectsPicker: props.onShowVideoEffectsPicker, componentRef: props.cameraButtonRef })),
|
22879
22925
|
screenShareButtonIsEnabled && (React__default['default'].createElement(ScreenShare, { option: options.screenShareButton, displayType: options.displayType, styles: screenShareButtonStyles,
|
22880
22926
|
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
22881
22927
|
disabled: props.disableButtonsForHoldScreen || isDisabled$2(options.screenShareButton) })), (_a = customButtons['primary']) === null || _a === void 0 ? void 0 :
|
@@ -22900,7 +22946,7 @@ const CommonCallControlBar = (props) => {
|
|
22900
22946
|
React__default['default'].createElement(react.Stack, { horizontal: true, className: !props.mobileView ? react.mergeStyles(desktopButtonContainerStyle) : undefined },
|
22901
22947
|
isEnabled$1(options === null || options === void 0 ? void 0 : options.peopleButton) && (React__default['default'].createElement(PeopleButton, { checked: props.peopleButtonChecked, ariaLabel: peopleButtonStrings === null || peopleButtonStrings === void 0 ? void 0 : peopleButtonStrings.label, showLabel: options.displayType !== 'compact', onClick: props.onPeopleButtonClicked, "data-ui-id": "common-call-composite-people-button", disabled: props.disableButtonsForLobbyPage ||
|
22902
22948
|
props.disableButtonsForHoldScreen ||
|
22903
|
-
isDisabled$2(options.peopleButton), strings: peopleButtonStrings, styles: commonButtonStyles })), (_b = customButtons['secondary']) === null || _b === void 0 ? void 0 :
|
22949
|
+
isDisabled$2(options.peopleButton), strings: peopleButtonStrings, styles: commonButtonStyles, componentRef: props.peopleButtonRef })), (_b = customButtons['secondary']) === null || _b === void 0 ? void 0 :
|
22904
22950
|
_b.slice(0, CUSTOM_BUTTON_OPTIONS.MAX_SECONDARY_DESKTOP_CUSTOM_BUTTONS).map((CustomButton, i) => {
|
22905
22951
|
return (React__default['default'].createElement(CustomButton, { key: `secondary-custom-button-${i}`, styles: commonButtonStyles, showLabel: options.displayType !== 'compact' }));
|
22906
22952
|
}))))))));
|
@@ -23138,7 +23184,7 @@ const themedToggleButtonStyle = (theme, checked) => {
|
|
23138
23184
|
|
23139
23185
|
// Copyright (c) Microsoft Corporation.
|
23140
23186
|
// Licensed under the MIT license.
|
23141
|
-
var __awaiter$
|
23187
|
+
var __awaiter$d = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
23142
23188
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
23143
23189
|
return new (P || (P = Promise))(function (resolve, reject) {
|
23144
23190
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -23278,7 +23324,7 @@ const MoreDrawer = (props) => {
|
|
23278
23324
|
/* @conditional-compile-remove(close-captions) */
|
23279
23325
|
const [currentSpokenLanguage, setCurrentSpokenLanguage] = React.useState(startCaptionsButtonProps.currentSpokenLanguage);
|
23280
23326
|
/* @conditional-compile-remove(close-captions) */
|
23281
|
-
const onToggleChange = React.useCallback(() => __awaiter$
|
23327
|
+
const onToggleChange = React.useCallback(() => __awaiter$d(void 0, void 0, void 0, function* () {
|
23282
23328
|
if (!startCaptionsButtonProps.checked) {
|
23283
23329
|
yield startCaptionsButtonHandlers.onStartCaptions({
|
23284
23330
|
spokenLanguage: currentSpokenLanguage
|
@@ -23967,7 +24013,7 @@ const AddPeopleButton = (props) => {
|
|
23967
24013
|
|
23968
24014
|
// Copyright (c) Microsoft Corporation.
|
23969
24015
|
// Licensed under the MIT license.
|
23970
|
-
var __awaiter$
|
24016
|
+
var __awaiter$c = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
23971
24017
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
23972
24018
|
return new (P || (P = Promise))(function (resolve, reject) {
|
23973
24019
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -23989,11 +24035,11 @@ const PeoplePaneContent = (props) => {
|
|
23989
24035
|
return localeStrings.strings.call;
|
23990
24036
|
};
|
23991
24037
|
const strings = getStrings();
|
23992
|
-
const removeParticipantFromCall = React.useCallback((participantId) => __awaiter$
|
24038
|
+
const removeParticipantFromCall = React.useCallback((participantId) => __awaiter$c(void 0, void 0, void 0, function* () {
|
23993
24039
|
yield adapter.removeParticipant(participantId);
|
23994
24040
|
}), [adapter]);
|
23995
24041
|
/* @conditional-compile-remove(PSTN-calls) */
|
23996
|
-
const addParticipantToCall = React.useCallback((participant, options) => __awaiter$
|
24042
|
+
const addParticipantToCall = React.useCallback((participant, options) => __awaiter$c(void 0, void 0, void 0, function* () {
|
23997
24043
|
yield adapter.addParticipant(participant, options);
|
23998
24044
|
}), [adapter]);
|
23999
24045
|
/* @conditional-compile-remove(PSTN-calls) */
|
@@ -24020,7 +24066,7 @@ const PeoplePaneContent = (props) => {
|
|
24020
24066
|
setDrawerMenuItems
|
24021
24067
|
]);
|
24022
24068
|
const participantListProps = React.useMemo(() => {
|
24023
|
-
const onRemoveAParticipant = (participantId) => __awaiter$
|
24069
|
+
const onRemoveAParticipant = (participantId) => __awaiter$c(void 0, void 0, void 0, function* () { return removeParticipantFromCall(participantId); });
|
24024
24070
|
return Object.assign(Object.assign({}, participantListDefaultProps), {
|
24025
24071
|
// Passing undefined callback for mobile to avoid context menus for participants in ParticipantList are clicked
|
24026
24072
|
onRemoveParticipant: props.mobileView ? undefined : onRemoveAParticipant,
|
@@ -24082,10 +24128,12 @@ const hasRemoveParticipantsPermissionTrampoline = (adapter) => {
|
|
24082
24128
|
const PEOPLE_SIDE_PANE_ID = 'people';
|
24083
24129
|
/** @private */
|
24084
24130
|
const usePeoplePane = (props) => {
|
24085
|
-
const { updateSidePaneRenderer, inviteLink, onFetchAvatarPersonaData, onFetchParticipantMenuItems, setDrawerMenuItems, mobileView } = props;
|
24131
|
+
const { updateSidePaneRenderer, inviteLink, onFetchAvatarPersonaData, onFetchParticipantMenuItems, setDrawerMenuItems, mobileView, peopleButtonRef } = props;
|
24086
24132
|
const closePane = React.useCallback(() => {
|
24133
|
+
var _a;
|
24087
24134
|
updateSidePaneRenderer(undefined);
|
24088
|
-
|
24135
|
+
(_a = peopleButtonRef === null || peopleButtonRef === void 0 ? void 0 : peopleButtonRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
24136
|
+
}, [peopleButtonRef, updateSidePaneRenderer]);
|
24089
24137
|
const localeStrings = localeTrampoline(useLocale());
|
24090
24138
|
const onRenderHeader = React.useCallback(() => (React__default['default'].createElement(SidePaneHeader, { onClose: closePane, headingText: localeStrings.peoplePaneTitle, dismissSidePaneButtonAriaLabel: localeStrings.dismissSidePaneButtonLabel, mobileView: mobileView !== null && mobileView !== void 0 ? mobileView : false })), [mobileView, closePane, localeStrings]);
|
24091
24139
|
const onRenderContent = React.useCallback(() => {
|
@@ -24154,7 +24202,7 @@ const localVideoSelector = reselect__namespace.createSelector([callStatusSelecto
|
|
24154
24202
|
};
|
24155
24203
|
});
|
24156
24204
|
|
24157
|
-
var __awaiter$
|
24205
|
+
var __awaiter$b = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
24158
24206
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
24159
24207
|
return new (P || (P = Promise))(function (resolve, reject) {
|
24160
24208
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -24223,7 +24271,7 @@ const VideoEffectsPaneContent = (props) => {
|
|
24223
24271
|
return videoEffects;
|
24224
24272
|
}, [strings, adapter]);
|
24225
24273
|
/* @conditional-compile-remove(video-background-effects) */
|
24226
|
-
const onEffectChange = React.useCallback((effectKey) => __awaiter$
|
24274
|
+
const onEffectChange = React.useCallback((effectKey) => __awaiter$b(void 0, void 0, void 0, function* () {
|
24227
24275
|
if (effectKey === 'blur') {
|
24228
24276
|
const blurEffect = {
|
24229
24277
|
effectName: effectKey
|
@@ -24304,10 +24352,12 @@ const VIDEO_EFFECTS_SIDE_PANE_ID = 'videoeffects';
|
|
24304
24352
|
/** @private */
|
24305
24353
|
const VIDEO_EFFECTS_SIDE_PANE_WIDTH_REM = 17.5;
|
24306
24354
|
/** @private */
|
24307
|
-
const useVideoEffectsPane = (updateSidePaneRenderer, mobileView, latestErrors, onDismissError) => {
|
24355
|
+
const useVideoEffectsPane = (updateSidePaneRenderer, mobileView, latestErrors, onDismissError, cameraButtonRef) => {
|
24308
24356
|
const closePane = React.useCallback(() => {
|
24357
|
+
var _a;
|
24309
24358
|
updateSidePaneRenderer(undefined);
|
24310
|
-
|
24359
|
+
(_a = cameraButtonRef === null || cameraButtonRef === void 0 ? void 0 : cameraButtonRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
24360
|
+
}, [cameraButtonRef, updateSidePaneRenderer]);
|
24311
24361
|
/* @conditional-compile-remove(video-background-effects) */
|
24312
24362
|
const locale = useLocale();
|
24313
24363
|
const onRenderHeader = React.useCallback(() => {
|
@@ -24640,6 +24690,8 @@ const CallArrangement = (props) => {
|
|
24640
24690
|
}, [props.mobileView]);
|
24641
24691
|
const theme = useTheme();
|
24642
24692
|
const callGalleryStyles = React.useMemo(() => galleryParentContainerStyles(theme.palette.neutralLighterAlt), [theme.palette.neutralLighterAlt]);
|
24693
|
+
const peopleButtonRef = React.useRef(null);
|
24694
|
+
const cameraButtonRef = React.useRef(null);
|
24643
24695
|
const containerRef = React.useRef(null);
|
24644
24696
|
const containerWidth = _useContainerWidth(containerRef);
|
24645
24697
|
const containerHeight = _useContainerHeight(containerRef);
|
@@ -24665,7 +24717,8 @@ const CallArrangement = (props) => {
|
|
24665
24717
|
/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
|
24666
24718
|
onFetchAvatarPersonaData: props.onFetchAvatarPersonaData,
|
24667
24719
|
onFetchParticipantMenuItems: (_a = props.callControlProps) === null || _a === void 0 ? void 0 : _a.onFetchParticipantMenuItems,
|
24668
|
-
mobileView: props.mobileView
|
24720
|
+
mobileView: props.mobileView,
|
24721
|
+
peopleButtonRef
|
24669
24722
|
});
|
24670
24723
|
}, [
|
24671
24724
|
updateSidePaneRenderer,
|
@@ -24673,7 +24726,8 @@ const CallArrangement = (props) => {
|
|
24673
24726
|
(_a = props.callControlProps) === null || _a === void 0 ? void 0 : _a.onFetchParticipantMenuItems,
|
24674
24727
|
/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
|
24675
24728
|
props.onFetchAvatarPersonaData,
|
24676
|
-
props.mobileView
|
24729
|
+
props.mobileView,
|
24730
|
+
peopleButtonRef
|
24677
24731
|
]);
|
24678
24732
|
const { isPeoplePaneOpen, openPeoplePane, closePeoplePane } = usePeoplePane(peoplePaneProps);
|
24679
24733
|
const togglePeoplePane = React.useCallback(() => {
|
@@ -24704,7 +24758,9 @@ const CallArrangement = (props) => {
|
|
24704
24758
|
placeholderText: callWithChatStrings.dtmfDialpadPlaceholderText
|
24705
24759
|
}), [callWithChatStrings]);
|
24706
24760
|
/* @conditional-compile-remove(video-background-effects) */
|
24707
|
-
const
|
24761
|
+
const onResolveVideoEffectDependency = adapter.getState().onResolveVideoEffectDependency;
|
24762
|
+
/* @conditional-compile-remove(video-background-effects) */
|
24763
|
+
const { openVideoEffectsPane } = useVideoEffectsPane(props.updateSidePaneRenderer, props.mobileView, props.latestErrors, props.onDismissError, cameraButtonRef);
|
24708
24764
|
const [showDrawer, setShowDrawer] = React.useState(false);
|
24709
24765
|
const onMoreButtonClicked = React.useCallback(() => {
|
24710
24766
|
setShowDrawer(true);
|
@@ -24771,9 +24827,9 @@ const CallArrangement = (props) => {
|
|
24771
24827
|
/* @conditional-compile-remove(close-captions) */
|
24772
24828
|
isCaptionsSupported: isTeamsCall && hasJoinedCall,
|
24773
24829
|
/* @conditional-compile-remove(video-background-effects) */
|
24774
|
-
onShowVideoEffectsPicker: openVideoEffectsPane,
|
24830
|
+
onShowVideoEffectsPicker: onResolveVideoEffectDependency ? openVideoEffectsPane : undefined,
|
24775
24831
|
/* @conditional-compile-remove(PSTN-calls) */
|
24776
|
-
onClickShowDialpad: alternateCallerId ? onClickShowDialpad : undefined, displayVertical: verticalControlBar }))))),
|
24832
|
+
onClickShowDialpad: alternateCallerId ? onClickShowDialpad : undefined, displayVertical: verticalControlBar, peopleButtonRef: peopleButtonRef, cameraButtonRef: cameraButtonRef }))))),
|
24777
24833
|
((_e = props.callControlProps) === null || _e === void 0 ? void 0 : _e.options) !== false && showDrawer && (React__default['default'].createElement(react.Stack, { styles: drawerContainerStylesValue },
|
24778
24834
|
React__default['default'].createElement(PreparedMoreDrawer, { callControls: props.callControlProps.options, onLightDismiss: closeDrawer, onPeopleButtonClicked: onMoreDrawerPeopleClicked,
|
24779
24835
|
/* @conditional-compile-remove(PSTN-calls) */
|
@@ -25612,8 +25668,10 @@ const LocalDeviceSettings = (props) => {
|
|
25612
25668
|
var _a, _b;
|
25613
25669
|
const theme = useTheme();
|
25614
25670
|
const locale = useLocale();
|
25615
|
-
/* @conditional-compile-remove(call-readiness) */ /* @conditional-compile-remove(rooms) */
|
25671
|
+
/* @conditional-compile-remove(call-readiness) */ /* @conditional-compile-remove(video-background-effects) */ /* @conditional-compile-remove(rooms) */
|
25616
25672
|
const adapter = useAdapter();
|
25673
|
+
/* @conditional-compile-remove(video-background-effects) */
|
25674
|
+
const onResolveVideoEffectDependency = adapter.getState().onResolveVideoEffectDependency;
|
25617
25675
|
const defaultPlaceHolder = locale.strings.call.defaultPlaceHolder;
|
25618
25676
|
const cameraLabel = locale.strings.call.cameraLabel;
|
25619
25677
|
const soundLabel = locale.strings.call.soundLabel;
|
@@ -25673,7 +25731,7 @@ const LocalDeviceSettings = (props) => {
|
|
25673
25731
|
React__default['default'].createElement(react.Stack, { horizontal: true, horizontalAlign: "space-between", styles: cameraAndVideoEffectsContainerStyleDesktop },
|
25674
25732
|
React__default['default'].createElement(react.Label, { id: 'call-composite-local-camera-settings-label', className: react.mergeStyles(dropDownStyles(theme).label), disabled: !cameraPermissionGranted }, cameraLabel),
|
25675
25733
|
/* @conditional-compile-remove(video-background-effects) */
|
25676
|
-
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)),
|
25734
|
+
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))),
|
25677
25735
|
React__default['default'].createElement(ConfigurationPageCameraDropdown, { cameraGrantedDropdown: cameraGrantedDropdown, cameraPermissionGranted: cameraPermissionGranted !== null && cameraPermissionGranted !== void 0 ? cameraPermissionGranted : false,
|
25678
25736
|
/* @conditional-compile-remove(call-readiness) */
|
25679
25737
|
dropdownProps: dropdownProps,
|
@@ -25813,7 +25871,7 @@ const localPreviewButtonStyle = {
|
|
25813
25871
|
|
25814
25872
|
// Copyright (c) Microsoft Corporation.
|
25815
25873
|
// Licensed under the MIT license.
|
25816
|
-
var __awaiter$
|
25874
|
+
var __awaiter$a = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
25817
25875
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
25818
25876
|
return new (P || (P = Promise))(function (resolve, reject) {
|
25819
25877
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -25833,7 +25891,7 @@ const LocalPreview = (props) => {
|
|
25833
25891
|
const { audio: microphonePermissionGranted, video: cameraPermissionGranted } = useSelector$1(devicePermissionSelector);
|
25834
25892
|
const isLocalMicrophoneEnabled = useSelector$1(getLocalMicrophoneEnabled);
|
25835
25893
|
const adapter = useAdapter();
|
25836
|
-
const onToggleMic = React.useCallback(() => __awaiter$
|
25894
|
+
const onToggleMic = React.useCallback(() => __awaiter$a(void 0, void 0, void 0, function* () {
|
25837
25895
|
isLocalMicrophoneEnabled ? adapter.mute() : adapter.unmute();
|
25838
25896
|
}), [adapter, isLocalMicrophoneEnabled]);
|
25839
25897
|
const hasNoDevices = devicesButtonProps.cameras.length === 0 &&
|
@@ -26101,7 +26159,7 @@ const CallReadinessModalFallBack = (props) => {
|
|
26101
26159
|
|
26102
26160
|
// Copyright (c) Microsoft Corporation.
|
26103
26161
|
// Licensed under the MIT license.
|
26104
|
-
var __awaiter$
|
26162
|
+
var __awaiter$9 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
26105
26163
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
26106
26164
|
return new (P || (P = Promise))(function (resolve, reject) {
|
26107
26165
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -26210,7 +26268,7 @@ const ConfigurationPage = (props) => {
|
|
26210
26268
|
const forceShowingCheckPermissions = !minimumFallbackTimerElapsed;
|
26211
26269
|
/* @conditional-compile-remove(video-background-effects) */
|
26212
26270
|
const { toggleVideoEffectsPane, closeVideoEffectsPane, isVideoEffectsPaneOpen } = useVideoEffectsPane(props.updateSidePaneRenderer, mobileView, props.latestErrors, props.onDismissError);
|
26213
|
-
const startCall = React.useCallback(() => __awaiter$
|
26271
|
+
const startCall = React.useCallback(() => __awaiter$9(void 0, void 0, void 0, function* () {
|
26214
26272
|
/* @conditional-compile-remove(video-background-effects) */
|
26215
26273
|
closeVideoEffectsPane();
|
26216
26274
|
startCallHandler();
|
@@ -26696,7 +26754,7 @@ const holdPaneContentStyles = {
|
|
26696
26754
|
|
26697
26755
|
// Copyright (c) Microsoft Corporation.
|
26698
26756
|
// Licensed under the MIT license.
|
26699
|
-
var __awaiter$
|
26757
|
+
var __awaiter$8 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
26700
26758
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
26701
26759
|
return new (P || (P = Promise))(function (resolve, reject) {
|
26702
26760
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -26731,7 +26789,7 @@ const HoldPane = () => {
|
|
26731
26789
|
React__default['default'].createElement(react.Stack, { horizontal: true, styles: holdPaneContentStyles },
|
26732
26790
|
React__default['default'].createElement(react.Text, { styles: holdPaneTimerStyles }, elapsedTime),
|
26733
26791
|
React__default['default'].createElement(react.Text, { styles: holdPaneLabelStyles }, strings.holdScreenLabel),
|
26734
|
-
React__default['default'].createElement(react.PrimaryButton, { text: !resumingCall ? strings.resumeCallButtonLabel : strings.resumingCallButtonLabel, ariaLabel: !resumingCall ? strings.resumeCallButtonAriaLabel : strings.resumingCallButtonAriaLabel, styles: resumeButtonStyles, disabled: resumingCall, onClick: () => __awaiter$
|
26792
|
+
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* () {
|
26735
26793
|
setResumingCall(true);
|
26736
26794
|
try {
|
26737
26795
|
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
@@ -26845,7 +26903,7 @@ const containerStyles = {
|
|
26845
26903
|
|
26846
26904
|
// Copyright (c) Microsoft Corporation.
|
26847
26905
|
// Licensed under the MIT license.
|
26848
|
-
var __awaiter$
|
26906
|
+
var __awaiter$7 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
26849
26907
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
26850
26908
|
return new (P || (P = Promise))(function (resolve, reject) {
|
26851
26909
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -26898,10 +26956,10 @@ const MainScreen = (props) => {
|
|
26898
26956
|
/* @conditional-compile-remove(rooms) */
|
26899
26957
|
switch (page) {
|
26900
26958
|
case 'roomNotFound':
|
26901
|
-
pageElement = (React__default['default'].createElement(NoticePage, { iconName: "
|
26959
|
+
pageElement = (React__default['default'].createElement(NoticePage, { iconName: "NoticePageAccessDeniedRoomsCall", title: locale.strings.call.roomNotFoundTitle, moreDetails: locale.strings.call.roomNotFoundDetails, dataUiId: 'room-not-found-page' }));
|
26902
26960
|
break;
|
26903
26961
|
case 'deniedPermissionToRoom':
|
26904
|
-
pageElement = (React__default['default'].createElement(NoticePage, { iconName: "
|
26962
|
+
pageElement = (React__default['default'].createElement(NoticePage, { iconName: "NoticePageAccessDeniedRoomsCall", title: locale.strings.call.deniedPermissionToRoomTitle, moreDetails: locale.strings.call.deniedPermissionToRoomDetails, dataUiId: 'not-invited-to-room-page' }));
|
26905
26963
|
break;
|
26906
26964
|
}
|
26907
26965
|
switch (page) {
|
@@ -26975,7 +27033,7 @@ const CallComposite = (props) => React__default['default'].createElement(CallCom
|
|
26975
27033
|
const CallCompositeInner = (props) => {
|
26976
27034
|
const { adapter, callInvitationUrl, onFetchAvatarPersonaData, onFetchParticipantMenuItems, options, formFactor = 'desktop' } = props;
|
26977
27035
|
React.useEffect(() => {
|
26978
|
-
(() => __awaiter$
|
27036
|
+
(() => __awaiter$7(void 0, void 0, void 0, function* () {
|
26979
27037
|
var _a;
|
26980
27038
|
const constrain = getQueryOptions({
|
26981
27039
|
/* @conditional-compile-remove(rooms) */ role: (_a = adapter.getState().call) === null || _a === void 0 ? void 0 : _a.role
|
@@ -27138,21 +27196,27 @@ class DiagnosticsForwarder {
|
|
27138
27196
|
*
|
27139
27197
|
* This is used to create correct handler for generic agent type
|
27140
27198
|
*/
|
27141
|
-
|
27199
|
+
function createHandlers(callClient, callAgent, deviceManager, call,
|
27200
|
+
/* @conditional-compile-remove(video-background-effects) */
|
27201
|
+
options) {
|
27142
27202
|
// Call can be either undefined or ACS Call
|
27143
27203
|
if (_isACSCallAgent(callAgent) && (!call || (call && _isACSCall(call)))) {
|
27144
|
-
return createDefaultCallingHandlers(callClient, callAgent, deviceManager, call
|
27204
|
+
return createDefaultCallingHandlers(callClient, callAgent, deviceManager, call,
|
27205
|
+
/* @conditional-compile-remove(video-background-effects) */
|
27206
|
+
options);
|
27145
27207
|
}
|
27146
27208
|
/* @conditional-compile-remove(teams-identity-support) */
|
27147
27209
|
if (_isTeamsCallAgent(callAgent) && (!call || (call && _isTeamsCall(call)))) {
|
27148
|
-
return createDefaultTeamsCallingHandlers(callClient, callAgent, deviceManager, call
|
27210
|
+
return createDefaultTeamsCallingHandlers(callClient, callAgent, deviceManager, call,
|
27211
|
+
/* @conditional-compile-remove(video-background-effects) */
|
27212
|
+
options);
|
27149
27213
|
}
|
27150
27214
|
throw new Error('Unhandled agent type');
|
27151
|
-
}
|
27215
|
+
}
|
27152
27216
|
|
27153
27217
|
// Copyright (c) Microsoft Corporation.
|
27154
27218
|
// Licensed under the MIT license.
|
27155
|
-
var __awaiter$
|
27219
|
+
var __awaiter$6 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
27156
27220
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
27157
27221
|
return new (P || (P = Promise))(function (resolve, reject) {
|
27158
27222
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -27169,7 +27233,7 @@ const createProfileStateModifier = (onFetchProfile, notifyUpdate) => {
|
|
27169
27233
|
return (state) => {
|
27170
27234
|
var _a;
|
27171
27235
|
const originalParticipants = (_a = state.call) === null || _a === void 0 ? void 0 : _a.remoteParticipants;
|
27172
|
-
(() => __awaiter$
|
27236
|
+
(() => __awaiter$6(void 0, void 0, void 0, function* () {
|
27173
27237
|
let shouldNotifyUpdates = false;
|
27174
27238
|
for (const key in originalParticipants) {
|
27175
27239
|
if (cachedDisplayName[key]) {
|
@@ -27196,7 +27260,7 @@ const createProfileStateModifier = (onFetchProfile, notifyUpdate) => {
|
|
27196
27260
|
|
27197
27261
|
// Copyright (c) Microsoft Corporation.
|
27198
27262
|
// Licensed under the MIT license.
|
27199
|
-
var __awaiter$
|
27263
|
+
var __awaiter$5 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
27200
27264
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
27201
27265
|
return new (P || (P = Promise))(function (resolve, reject) {
|
27202
27266
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -27210,7 +27274,7 @@ class CallContext {
|
|
27210
27274
|
constructor(clientState, isTeamsCall,
|
27211
27275
|
/* @conditional-compile-remove(rooms) */
|
27212
27276
|
isRoomsCall, options) {
|
27213
|
-
var _a, _b;
|
27277
|
+
var _a, _b, _c, _d;
|
27214
27278
|
this.emitter = new EventEmitter.EventEmitter();
|
27215
27279
|
this.state = {
|
27216
27280
|
isLocalPreviewMicrophoneEnabled: false,
|
@@ -27225,11 +27289,13 @@ class CallContext {
|
|
27225
27289
|
/* @conditional-compile-remove(PSTN-calls) */ alternateCallerId: clientState.alternateCallerId,
|
27226
27290
|
/* @conditional-compile-remove(unsupported-browser) */ environmentInfo: clientState.environmentInfo,
|
27227
27291
|
/* @conditional-compile-remove(unsupported-browser) */ unsupportedBrowserVersionsAllowed: false,
|
27228
|
-
/* @conditional-compile-remove(video-background-effects) */ videoBackgroundImages: options === null || options === void 0 ? void 0 : options.videoBackgroundImages,
|
27292
|
+
/* @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,
|
27293
|
+
/* @conditional-compile-remove(video-background-effects) */
|
27294
|
+
onResolveVideoEffectDependency: (_c = options === null || options === void 0 ? void 0 : options.videoBackgroundOptions) === null || _c === void 0 ? void 0 : _c.onResolveDependency,
|
27229
27295
|
/* @conditional-compile-remove(video-background-effects) */ selectedVideoBackgroundEffect: undefined,
|
27230
27296
|
cameraStatus: undefined
|
27231
27297
|
};
|
27232
|
-
this.emitter.setMaxListeners((
|
27298
|
+
this.emitter.setMaxListeners((_d = options === null || options === void 0 ? void 0 : options.maxListeners) !== null && _d !== void 0 ? _d : 50);
|
27233
27299
|
this.bindPublicMethods();
|
27234
27300
|
this.displayNameModifier = (options === null || options === void 0 ? void 0 : options.onFetchProfile)
|
27235
27301
|
? createProfileStateModifier(options.onFetchProfile, () => {
|
@@ -27353,6 +27419,7 @@ const findLatestAcceptedTransfer = (acceptedTransfers) => {
|
|
27353
27419
|
*/
|
27354
27420
|
class AzureCommunicationCallAdapter {
|
27355
27421
|
constructor(callClient, locator, callAgent, deviceManager, options) {
|
27422
|
+
var _a;
|
27356
27423
|
this.participantSubscribers = new Map();
|
27357
27424
|
this.emitter = new EventEmitter.EventEmitter();
|
27358
27425
|
this.isMyMutedChanged = () => {
|
@@ -27370,6 +27437,8 @@ class AzureCommunicationCallAdapter {
|
|
27370
27437
|
const isTeamsMeeting = 'meetingLink' in this.locator;
|
27371
27438
|
/* @conditional-compile-remove(rooms) */
|
27372
27439
|
const isRoomsCall = 'roomId' in this.locator;
|
27440
|
+
/* @conditional-compile-remove(video-background-effects) */
|
27441
|
+
this.onResolveVideoBackgroundEffectsDependency = (_a = options === null || options === void 0 ? void 0 : options.videoBackgroundOptions) === null || _a === void 0 ? void 0 : _a.onResolveDependency;
|
27373
27442
|
this.context = new CallContext(callClient.getState(), isTeamsMeeting,
|
27374
27443
|
/* @conditional-compile-remove(rooms) */ isRoomsCall,
|
27375
27444
|
/* @conditional-compile-remove(video-background-effects) */ options);
|
@@ -27416,7 +27485,10 @@ class AzureCommunicationCallAdapter {
|
|
27416
27485
|
}
|
27417
27486
|
}
|
27418
27487
|
};
|
27419
|
-
this.handlers = createHandlers(callClient, callAgent, deviceManager, undefined
|
27488
|
+
this.handlers = createHandlers(callClient, callAgent, deviceManager, undefined,
|
27489
|
+
/* @conditional-compile-remove(video-background-effects) */ {
|
27490
|
+
onResolveVideoBackgroundEffectsDependency: this.onResolveVideoBackgroundEffectsDependency
|
27491
|
+
});
|
27420
27492
|
this.onClientStateChange = onStateChange;
|
27421
27493
|
this.subscribeDeviceManagerEvents();
|
27422
27494
|
this.callClient.onStateChange(onStateChange);
|
@@ -27534,9 +27606,9 @@ class AzureCommunicationCallAdapter {
|
|
27534
27606
|
this.callAgent.dispose();
|
27535
27607
|
}
|
27536
27608
|
queryCameras() {
|
27537
|
-
return __awaiter$
|
27609
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27538
27610
|
const startTime = new Date().getTime();
|
27539
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
27611
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
27540
27612
|
const cameras = yield this.deviceManager.getCameras();
|
27541
27613
|
const endTime = new Date().getTime();
|
27542
27614
|
compositeLogger.info('time to query cameras', endTime - startTime, 'ms');
|
@@ -27545,9 +27617,9 @@ class AzureCommunicationCallAdapter {
|
|
27545
27617
|
});
|
27546
27618
|
}
|
27547
27619
|
queryMicrophones() {
|
27548
|
-
return __awaiter$
|
27620
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27549
27621
|
const startTime = new Date().getTime();
|
27550
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
27622
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
27551
27623
|
const microphones = yield this.deviceManager.getMicrophones();
|
27552
27624
|
const endTime = new Date().getTime();
|
27553
27625
|
compositeLogger.info('time to query microphones', endTime - startTime, 'ms');
|
@@ -27556,9 +27628,9 @@ class AzureCommunicationCallAdapter {
|
|
27556
27628
|
});
|
27557
27629
|
}
|
27558
27630
|
querySpeakers() {
|
27559
|
-
return __awaiter$
|
27631
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27560
27632
|
const startTime = new Date().getTime();
|
27561
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
27633
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
27562
27634
|
const speakers = (yield this.deviceManager.isSpeakerSelectionAvailable) ? this.deviceManager.getSpeakers() : [];
|
27563
27635
|
const endTime = new Date().getTime();
|
27564
27636
|
compositeLogger.info('time to query speakers', endTime - startTime, 'ms');
|
@@ -27567,9 +27639,9 @@ class AzureCommunicationCallAdapter {
|
|
27567
27639
|
});
|
27568
27640
|
}
|
27569
27641
|
askDevicePermission(constrain) {
|
27570
|
-
return __awaiter$
|
27642
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27571
27643
|
const startTime = new Date().getTime();
|
27572
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
27644
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
27573
27645
|
yield this.deviceManager.askDevicePermission(constrain);
|
27574
27646
|
const endTime = new Date().getTime();
|
27575
27647
|
compositeLogger.info('time to query askDevicePermissions', endTime - startTime, 'ms');
|
@@ -27660,7 +27732,7 @@ class AzureCommunicationCallAdapter {
|
|
27660
27732
|
});
|
27661
27733
|
}
|
27662
27734
|
createStreamView(remoteUserId, options) {
|
27663
|
-
return __awaiter$
|
27735
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27664
27736
|
if (remoteUserId === undefined) {
|
27665
27737
|
return yield this.handlers.onCreateLocalStreamView(options);
|
27666
27738
|
}
|
@@ -27670,7 +27742,7 @@ class AzureCommunicationCallAdapter {
|
|
27670
27742
|
});
|
27671
27743
|
}
|
27672
27744
|
disposeStreamView(remoteUserId) {
|
27673
|
-
return __awaiter$
|
27745
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27674
27746
|
if (remoteUserId === undefined) {
|
27675
27747
|
yield this.handlers.onDisposeLocalStreamView();
|
27676
27748
|
}
|
@@ -27680,25 +27752,28 @@ class AzureCommunicationCallAdapter {
|
|
27680
27752
|
});
|
27681
27753
|
}
|
27682
27754
|
disposeScreenShareStreamView(remoteUserId) {
|
27683
|
-
return __awaiter$
|
27755
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27684
27756
|
yield this.handlers.onDisposeRemoteScreenShareStreamView(remoteUserId);
|
27685
27757
|
});
|
27686
27758
|
}
|
27687
27759
|
disposeRemoteVideoStreamView(remoteUserId) {
|
27688
|
-
return __awaiter$
|
27760
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27689
27761
|
yield this.handlers.onDisposeRemoteVideoStreamView(remoteUserId);
|
27690
27762
|
});
|
27691
27763
|
}
|
27692
27764
|
disposeLocalVideoStreamView() {
|
27693
|
-
return __awaiter$
|
27765
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27694
27766
|
yield this.handlers.onDisposeLocalStreamView();
|
27695
27767
|
});
|
27696
27768
|
}
|
27697
27769
|
leaveCall(forEveryone) {
|
27698
|
-
return __awaiter$
|
27770
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27699
27771
|
yield this.handlers.onHangUp(forEveryone);
|
27700
27772
|
this.unsubscribeCallEvents();
|
27701
|
-
this.handlers = createHandlers(this.callClient, this.callAgent, this.deviceManager, undefined
|
27773
|
+
this.handlers = createHandlers(this.callClient, this.callAgent, this.deviceManager, undefined,
|
27774
|
+
/* @conditional-compile-remove(video-background-effects) */ {
|
27775
|
+
onResolveVideoBackgroundEffectsDependency: this.onResolveVideoBackgroundEffectsDependency
|
27776
|
+
});
|
27702
27777
|
// We set the adapter.call object to undefined immediately when a call is ended.
|
27703
27778
|
// We do not set the context.callId to undefined because it is a part of the immutable data flow loop.
|
27704
27779
|
this.call = undefined;
|
@@ -27707,29 +27782,29 @@ class AzureCommunicationCallAdapter {
|
|
27707
27782
|
});
|
27708
27783
|
}
|
27709
27784
|
setCamera(device, options) {
|
27710
|
-
return __awaiter$
|
27711
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
27785
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27786
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
27712
27787
|
yield this.handlers.onSelectCamera(device, options);
|
27713
27788
|
}));
|
27714
27789
|
});
|
27715
27790
|
}
|
27716
27791
|
setMicrophone(device) {
|
27717
|
-
return __awaiter$
|
27718
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
27792
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27793
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
27719
27794
|
yield this.handlers.onSelectMicrophone(device);
|
27720
27795
|
}));
|
27721
27796
|
});
|
27722
27797
|
}
|
27723
27798
|
setSpeaker(device) {
|
27724
|
-
return __awaiter$
|
27725
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
27799
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27800
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
27726
27801
|
yield this.handlers.onSelectSpeaker(device);
|
27727
27802
|
}));
|
27728
27803
|
});
|
27729
27804
|
}
|
27730
27805
|
startCamera(options) {
|
27731
|
-
return __awaiter$
|
27732
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
27806
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27807
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
27733
27808
|
if (!isCameraOn(this.getState())) {
|
27734
27809
|
// First kick off the effect on the local device before starting the camera in the call.
|
27735
27810
|
// This prevents the effect not being applied for a brief moment when the camera is started.
|
@@ -27737,9 +27812,9 @@ class AzureCommunicationCallAdapter {
|
|
27737
27812
|
{
|
27738
27813
|
const selectedEffect = this.getState().selectedVideoBackgroundEffect;
|
27739
27814
|
const selectedCamera = getSelectedCameraFromAdapterState(this.getState());
|
27740
|
-
if (selectedEffect && selectedCamera) {
|
27815
|
+
if (selectedEffect && selectedCamera && this.onResolveVideoBackgroundEffectsDependency) {
|
27741
27816
|
const stream = new communicationCalling.LocalVideoStream(selectedCamera);
|
27742
|
-
const effect = getBackgroundEffectFromSelectedEffect(selectedEffect);
|
27817
|
+
const effect = getBackgroundEffectFromSelectedEffect(selectedEffect, yield this.onResolveVideoBackgroundEffectsDependency());
|
27743
27818
|
if (effect) {
|
27744
27819
|
yield stream.feature(communicationCalling.Features.VideoEffects).startEffects(effect);
|
27745
27820
|
}
|
@@ -27754,8 +27829,8 @@ class AzureCommunicationCallAdapter {
|
|
27754
27829
|
});
|
27755
27830
|
}
|
27756
27831
|
stopCamera() {
|
27757
|
-
return __awaiter$
|
27758
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
27832
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27833
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
27759
27834
|
if (isCameraOn(this.getState())) {
|
27760
27835
|
yield this.handlers.onToggleCamera();
|
27761
27836
|
}
|
@@ -27763,8 +27838,8 @@ class AzureCommunicationCallAdapter {
|
|
27763
27838
|
});
|
27764
27839
|
}
|
27765
27840
|
mute() {
|
27766
|
-
return __awaiter$
|
27767
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
27841
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27842
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
27768
27843
|
var _a, _b;
|
27769
27844
|
this.context.setIsLocalMicrophoneEnabled(false);
|
27770
27845
|
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 +27849,8 @@ class AzureCommunicationCallAdapter {
|
|
27774
27849
|
});
|
27775
27850
|
}
|
27776
27851
|
unmute() {
|
27777
|
-
return __awaiter$
|
27778
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
27852
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27853
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
27779
27854
|
var _a, _b;
|
27780
27855
|
this.context.setIsLocalMicrophoneEnabled(true);
|
27781
27856
|
if (_isInCall((_a = this.call) === null || _a === void 0 ? void 0 : _a.state) && ((_b = this.call) === null || _b === void 0 ? void 0 : _b.isMuted)) {
|
@@ -27785,8 +27860,8 @@ class AzureCommunicationCallAdapter {
|
|
27785
27860
|
});
|
27786
27861
|
}
|
27787
27862
|
startScreenShare() {
|
27788
|
-
return __awaiter$
|
27789
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
27863
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27864
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
27790
27865
|
var _a;
|
27791
27866
|
if (!((_a = this.call) === null || _a === void 0 ? void 0 : _a.isScreenSharingOn)) {
|
27792
27867
|
yield this.handlers.onToggleScreenShare();
|
@@ -27795,8 +27870,8 @@ class AzureCommunicationCallAdapter {
|
|
27795
27870
|
});
|
27796
27871
|
}
|
27797
27872
|
stopScreenShare() {
|
27798
|
-
return __awaiter$
|
27799
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
27873
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27874
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
27800
27875
|
var _a;
|
27801
27876
|
if ((_a = this.call) === null || _a === void 0 ? void 0 : _a.isScreenSharingOn) {
|
27802
27877
|
yield this.handlers.onToggleScreenShare();
|
@@ -27811,7 +27886,7 @@ class AzureCommunicationCallAdapter {
|
|
27811
27886
|
}
|
27812
27887
|
/* @conditional-compile-remove(video-background-effects) */
|
27813
27888
|
startVideoBackgroundEffect(videoBackgroundEffect) {
|
27814
|
-
return __awaiter$
|
27889
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27815
27890
|
if (this.isBlurEffect(videoBackgroundEffect)) {
|
27816
27891
|
const blurConfig = videoBackgroundEffect;
|
27817
27892
|
yield this.handlers.onBlurVideoBackground(blurConfig);
|
@@ -27824,7 +27899,7 @@ class AzureCommunicationCallAdapter {
|
|
27824
27899
|
}
|
27825
27900
|
/* @conditional-compile-remove(video-background-effects) */
|
27826
27901
|
stopVideoBackgroundEffects() {
|
27827
|
-
return __awaiter$
|
27902
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27828
27903
|
yield this.handlers.onRemoveVideoBackgroundEffects();
|
27829
27904
|
});
|
27830
27905
|
}
|
@@ -27868,7 +27943,10 @@ class AzureCommunicationCallAdapter {
|
|
27868
27943
|
this.context.setCurrentCallId(call.id);
|
27869
27944
|
// Resync state after callId is set
|
27870
27945
|
this.context.updateClientState(this.callClient.getState());
|
27871
|
-
this.handlers = createHandlers(this.callClient, this.callAgent, this.deviceManager, this.call
|
27946
|
+
this.handlers = createHandlers(this.callClient, this.callAgent, this.deviceManager, this.call,
|
27947
|
+
/* @conditional-compile-remove(video-background-effects) */ {
|
27948
|
+
onResolveVideoBackgroundEffectsDependency: this.onResolveVideoBackgroundEffectsDependency
|
27949
|
+
});
|
27872
27950
|
this.subscribeCallEvents();
|
27873
27951
|
}
|
27874
27952
|
/* @conditional-compile-remove(video-background-effects) */
|
@@ -27880,7 +27958,7 @@ class AzureCommunicationCallAdapter {
|
|
27880
27958
|
return effect.effectName === 'replacement';
|
27881
27959
|
}
|
27882
27960
|
removeParticipant(userId) {
|
27883
|
-
return __awaiter$
|
27961
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27884
27962
|
let participant = userId;
|
27885
27963
|
/* @conditional-compile-remove(PSTN-calls) */
|
27886
27964
|
participant = _toCommunicationIdentifier(userId);
|
@@ -27889,7 +27967,7 @@ class AzureCommunicationCallAdapter {
|
|
27889
27967
|
}
|
27890
27968
|
/* @conditional-compile-remove(PSTN-calls) */
|
27891
27969
|
addParticipant(participant, options) {
|
27892
|
-
return __awaiter$
|
27970
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27893
27971
|
if (communicationCommon.isPhoneNumberIdentifier(participant) && options) {
|
27894
27972
|
this.handlers.onAddParticipant(participant, options);
|
27895
27973
|
}
|
@@ -27901,7 +27979,7 @@ class AzureCommunicationCallAdapter {
|
|
27901
27979
|
/* @conditional-compile-remove(PSTN-calls) */
|
27902
27980
|
holdCall() {
|
27903
27981
|
var _a;
|
27904
|
-
return __awaiter$
|
27982
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27905
27983
|
if (((_a = this.call) === null || _a === void 0 ? void 0 : _a.state) !== 'LocalHold') {
|
27906
27984
|
this.handlers.onToggleHold();
|
27907
27985
|
}
|
@@ -27910,7 +27988,7 @@ class AzureCommunicationCallAdapter {
|
|
27910
27988
|
/* @conditional-compile-remove(PSTN-calls) */
|
27911
27989
|
resumeCall() {
|
27912
27990
|
var _a;
|
27913
|
-
return __awaiter$
|
27991
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27914
27992
|
if (((_a = this.call) === null || _a === void 0 ? void 0 : _a.state) === 'LocalHold') {
|
27915
27993
|
this.handlers.onToggleHold();
|
27916
27994
|
}
|
@@ -27918,31 +27996,31 @@ class AzureCommunicationCallAdapter {
|
|
27918
27996
|
}
|
27919
27997
|
/* @conditional-compile-remove(PSTN-calls) */
|
27920
27998
|
sendDtmfTone(dtmfTone) {
|
27921
|
-
return __awaiter$
|
27999
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27922
28000
|
this.handlers.onSendDtmfTone(dtmfTone);
|
27923
28001
|
});
|
27924
28002
|
}
|
27925
28003
|
/* @conditional-compile-remove(close-captions) */
|
27926
28004
|
startCaptions(options) {
|
27927
|
-
return __awaiter$
|
28005
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27928
28006
|
this.handlers.onStartCaptions(options);
|
27929
28007
|
});
|
27930
28008
|
}
|
27931
28009
|
/* @conditional-compile-remove(close-captions) */
|
27932
28010
|
stopCaptions() {
|
27933
|
-
return __awaiter$
|
28011
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27934
28012
|
this.handlers.onStopCaptions();
|
27935
28013
|
});
|
27936
28014
|
}
|
27937
28015
|
/* @conditional-compile-remove(close-captions) */
|
27938
28016
|
setCaptionLanguage(language) {
|
27939
|
-
return __awaiter$
|
28017
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27940
28018
|
this.handlers.onSetCaptionLanguage(language);
|
27941
28019
|
});
|
27942
28020
|
}
|
27943
28021
|
/* @conditional-compile-remove(close-captions) */
|
27944
28022
|
setSpokenLanguage(language) {
|
27945
|
-
return __awaiter$
|
28023
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
27946
28024
|
this.handlers.onSetSpokenLanguage(language);
|
27947
28025
|
});
|
27948
28026
|
}
|
@@ -28065,7 +28143,7 @@ class AzureCommunicationCallAdapter {
|
|
28065
28143
|
this.emitter.off(event, listener);
|
28066
28144
|
}
|
28067
28145
|
asyncTeeErrorToEventEmitter(f) {
|
28068
|
-
return __awaiter$
|
28146
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
28069
28147
|
try {
|
28070
28148
|
return yield f();
|
28071
28149
|
}
|
@@ -28100,7 +28178,7 @@ class AzureCommunicationCallAdapter {
|
|
28100
28178
|
*/
|
28101
28179
|
const createAzureCommunicationCallAdapter = ({ userId, displayName, credential, locator,
|
28102
28180
|
/* @conditional-compile-remove(PSTN-calls) */ alternateCallerId,
|
28103
|
-
/* @conditional-compile-remove(video-background-effects) */ options }) => __awaiter$
|
28181
|
+
/* @conditional-compile-remove(video-background-effects) */ options }) => __awaiter$5(void 0, void 0, void 0, function* () {
|
28104
28182
|
if (!_isValidIdentifier(userId)) {
|
28105
28183
|
throw new Error('Invalid identifier. Please provide valid identifier object.');
|
28106
28184
|
}
|
@@ -28119,7 +28197,7 @@ const createAzureCommunicationCallAdapter = ({ userId, displayName, credential,
|
|
28119
28197
|
/**
|
28120
28198
|
* @beta
|
28121
28199
|
*/
|
28122
|
-
const createTeamsCallAdapter = ({ userId, credential, locator, options }) => __awaiter$
|
28200
|
+
const createTeamsCallAdapter = ({ userId, credential, locator, options }) => __awaiter$5(void 0, void 0, void 0, function* () {
|
28123
28201
|
const callClient = createStatefulCallClient({
|
28124
28202
|
userId
|
28125
28203
|
});
|
@@ -28159,7 +28237,7 @@ const useAzureCommunicationCallAdapterGeneric = (args, afterCreate, beforeDispos
|
|
28159
28237
|
if (adapterKind === 'AzureCommunication' && !displayName) {
|
28160
28238
|
return;
|
28161
28239
|
}
|
28162
|
-
(() => __awaiter$
|
28240
|
+
(() => __awaiter$5(void 0, void 0, void 0, function* () {
|
28163
28241
|
if (adapterRef.current) {
|
28164
28242
|
// Dispose the old adapter when a new one is created.
|
28165
28243
|
//
|
@@ -28238,7 +28316,7 @@ const useAzureCommunicationCallAdapterGeneric = (args, afterCreate, beforeDispos
|
|
28238
28316
|
// Dispose any existing adapter when the component unmounts.
|
28239
28317
|
React.useEffect(() => {
|
28240
28318
|
return () => {
|
28241
|
-
(() => __awaiter$
|
28319
|
+
(() => __awaiter$5(void 0, void 0, void 0, function* () {
|
28242
28320
|
if (adapterRef.current) {
|
28243
28321
|
if (beforeDisposeRef.current) {
|
28244
28322
|
yield beforeDisposeRef.current(adapterRef.current);
|
@@ -28332,7 +28410,7 @@ beforeDispose) => {
|
|
28332
28410
|
*
|
28333
28411
|
* @public
|
28334
28412
|
*/
|
28335
|
-
const createAzureCommunicationCallAdapterFromClient = (callClient, callAgent, locator, options) => __awaiter$
|
28413
|
+
const createAzureCommunicationCallAdapterFromClient = (callClient, callAgent, locator, options) => __awaiter$5(void 0, void 0, void 0, function* () {
|
28336
28414
|
const deviceManager = (yield callClient.getDeviceManager());
|
28337
28415
|
yield Promise.all([deviceManager.getCameras(), deviceManager.getMicrophones()]);
|
28338
28416
|
if (deviceManager.isSpeakerSelectionAvailable) {
|
@@ -28352,7 +28430,7 @@ const createAzureCommunicationCallAdapterFromClient = (callClient, callAgent, lo
|
|
28352
28430
|
*
|
28353
28431
|
* @beta
|
28354
28432
|
*/
|
28355
|
-
const createTeamsCallAdapterFromClient = (callClient, callAgent, locator, options) => __awaiter$
|
28433
|
+
const createTeamsCallAdapterFromClient = (callClient, callAgent, locator, options) => __awaiter$5(void 0, void 0, void 0, function* () {
|
28356
28434
|
const deviceManager = (yield callClient.getDeviceManager());
|
28357
28435
|
yield Promise.all([deviceManager.getCameras(), deviceManager.getMicrophones()]);
|
28358
28436
|
if (deviceManager.isSpeakerSelectionAvailable) {
|
@@ -28395,7 +28473,7 @@ const callCompositeContainerStyles = (isMobile) => ({
|
|
28395
28473
|
|
28396
28474
|
// Copyright (c) Microsoft Corporation.
|
28397
28475
|
// Licensed under the MIT license.
|
28398
|
-
var __awaiter$
|
28476
|
+
var __awaiter$4 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
28399
28477
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
28400
28478
|
return new (P || (P = Promise))(function (resolve, reject) {
|
28401
28479
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -28461,44 +28539,44 @@ class CallWithChatBackedCallAdapter {
|
|
28461
28539
|
return this.callWithChatAdapter.joinCall(options);
|
28462
28540
|
}
|
28463
28541
|
};
|
28464
|
-
this.leaveCall = (forEveryone) => __awaiter$
|
28542
|
+
this.leaveCall = (forEveryone) => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.leaveCall(forEveryone); });
|
28465
28543
|
this.startCall = (participants, options) => {
|
28466
28544
|
let communicationParticipants = participants;
|
28467
28545
|
/* @conditional-compile-remove(PSTN-calls) */
|
28468
28546
|
communicationParticipants = participants.map(_toCommunicationIdentifier);
|
28469
28547
|
return this.callWithChatAdapter.startCall(communicationParticipants, options);
|
28470
28548
|
};
|
28471
|
-
this.setCamera = (sourceId, options) => __awaiter$
|
28472
|
-
this.setMicrophone = (sourceId) => __awaiter$
|
28473
|
-
this.setSpeaker = (sourceId) => __awaiter$
|
28474
|
-
this.askDevicePermission = (constraints) => __awaiter$
|
28475
|
-
this.queryCameras = () => __awaiter$
|
28476
|
-
this.queryMicrophones = () => __awaiter$
|
28477
|
-
this.querySpeakers = () => __awaiter$
|
28478
|
-
this.startCamera = (options) => __awaiter$
|
28479
|
-
this.stopCamera = () => __awaiter$
|
28480
|
-
this.mute = () => __awaiter$
|
28481
|
-
this.unmute = () => __awaiter$
|
28482
|
-
this.startScreenShare = () => __awaiter$
|
28483
|
-
this.stopScreenShare = () => __awaiter$
|
28484
|
-
this.removeParticipant = (userId) => __awaiter$
|
28549
|
+
this.setCamera = (sourceId, options) => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.setCamera(sourceId, options); });
|
28550
|
+
this.setMicrophone = (sourceId) => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.setMicrophone(sourceId); });
|
28551
|
+
this.setSpeaker = (sourceId) => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.setSpeaker(sourceId); });
|
28552
|
+
this.askDevicePermission = (constraints) => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.askDevicePermission(constraints); });
|
28553
|
+
this.queryCameras = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.queryCameras(); });
|
28554
|
+
this.queryMicrophones = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.queryMicrophones(); });
|
28555
|
+
this.querySpeakers = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.querySpeakers(); });
|
28556
|
+
this.startCamera = (options) => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.startCamera(options); });
|
28557
|
+
this.stopCamera = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.stopCamera(); });
|
28558
|
+
this.mute = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.mute(); });
|
28559
|
+
this.unmute = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.unmute(); });
|
28560
|
+
this.startScreenShare = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.startScreenShare(); });
|
28561
|
+
this.stopScreenShare = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.stopScreenShare(); });
|
28562
|
+
this.removeParticipant = (userId) => __awaiter$4(this, void 0, void 0, function* () {
|
28485
28563
|
let participant = userId;
|
28486
28564
|
/* @conditional-compile-remove(PSTN-calls) */
|
28487
28565
|
participant = _toCommunicationIdentifier(userId);
|
28488
28566
|
yield this.callWithChatAdapter.removeParticipant(participant);
|
28489
28567
|
});
|
28490
|
-
this.createStreamView = (remoteUserId, options) => __awaiter$
|
28491
|
-
this.disposeStreamView = (remoteUserId, options) => __awaiter$
|
28568
|
+
this.createStreamView = (remoteUserId, options) => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.createStreamView(remoteUserId, options); });
|
28569
|
+
this.disposeStreamView = (remoteUserId, options) => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.disposeStreamView(remoteUserId, options); });
|
28492
28570
|
/* @conditional-compile-remove(PSTN-calls) */
|
28493
|
-
this.holdCall = () => __awaiter$
|
28571
|
+
this.holdCall = () => __awaiter$4(this, void 0, void 0, function* () {
|
28494
28572
|
yield this.callWithChatAdapter.holdCall();
|
28495
28573
|
});
|
28496
28574
|
/* @conditional-compile-remove(PSTN-calls) */
|
28497
|
-
this.resumeCall = () => __awaiter$
|
28575
|
+
this.resumeCall = () => __awaiter$4(this, void 0, void 0, function* () {
|
28498
28576
|
yield this.callWithChatAdapter.resumeCall();
|
28499
28577
|
});
|
28500
28578
|
/* @conditional-compile-remove(PSTN-calls) */
|
28501
|
-
this.sendDtmfTone = (dtmfTone) => __awaiter$
|
28579
|
+
this.sendDtmfTone = (dtmfTone) => __awaiter$4(this, void 0, void 0, function* () {
|
28502
28580
|
yield this.callWithChatAdapter.sendDtmfTone(dtmfTone);
|
28503
28581
|
});
|
28504
28582
|
this.callWithChatAdapter = callWithChatAdapter;
|
@@ -28514,7 +28592,7 @@ class CallWithChatBackedCallAdapter {
|
|
28514
28592
|
}
|
28515
28593
|
/* @conditional-compile-remove(PSTN-calls) */
|
28516
28594
|
addParticipant(participant, options) {
|
28517
|
-
return __awaiter$
|
28595
|
+
return __awaiter$4(this, void 0, void 0, function* () {
|
28518
28596
|
if (communicationCommon.isPhoneNumberIdentifier(participant) && options) {
|
28519
28597
|
return this.callWithChatAdapter.addParticipant(participant, options);
|
28520
28598
|
}
|
@@ -28529,37 +28607,37 @@ class CallWithChatBackedCallAdapter {
|
|
28529
28607
|
}
|
28530
28608
|
/* @conditional-compile-remove(close-captions) */
|
28531
28609
|
startCaptions(options) {
|
28532
|
-
return __awaiter$
|
28610
|
+
return __awaiter$4(this, void 0, void 0, function* () {
|
28533
28611
|
this.callWithChatAdapter.startCaptions(options);
|
28534
28612
|
});
|
28535
28613
|
}
|
28536
28614
|
/* @conditional-compile-remove(close-captions) */
|
28537
28615
|
stopCaptions() {
|
28538
|
-
return __awaiter$
|
28616
|
+
return __awaiter$4(this, void 0, void 0, function* () {
|
28539
28617
|
this.callWithChatAdapter.stopCaptions();
|
28540
28618
|
});
|
28541
28619
|
}
|
28542
28620
|
/* @conditional-compile-remove(close-captions) */
|
28543
28621
|
setCaptionLanguage(language) {
|
28544
|
-
return __awaiter$
|
28622
|
+
return __awaiter$4(this, void 0, void 0, function* () {
|
28545
28623
|
this.callWithChatAdapter.setCaptionLanguage(language);
|
28546
28624
|
});
|
28547
28625
|
}
|
28548
28626
|
/* @conditional-compile-remove(close-captions) */
|
28549
28627
|
setSpokenLanguage(language) {
|
28550
|
-
return __awaiter$
|
28628
|
+
return __awaiter$4(this, void 0, void 0, function* () {
|
28551
28629
|
this.callWithChatAdapter.setSpokenLanguage(language);
|
28552
28630
|
});
|
28553
28631
|
}
|
28554
28632
|
/* @conditional-compile-remove(video-background-effects) */
|
28555
28633
|
startVideoBackgroundEffect(videoBackgroundEffect) {
|
28556
|
-
return __awaiter$
|
28634
|
+
return __awaiter$4(this, void 0, void 0, function* () {
|
28557
28635
|
yield this.callWithChatAdapter.startVideoBackgroundEffect(videoBackgroundEffect);
|
28558
28636
|
});
|
28559
28637
|
}
|
28560
28638
|
/* @conditional-compile-remove(video-background-effects) */
|
28561
28639
|
stopVideoBackgroundEffects() {
|
28562
|
-
return __awaiter$
|
28640
|
+
return __awaiter$4(this, void 0, void 0, function* () {
|
28563
28641
|
yield this.callWithChatAdapter.stopVideoBackgroundEffects();
|
28564
28642
|
});
|
28565
28643
|
}
|
@@ -28591,13 +28669,15 @@ function callAdapterStateFromCallWithChatAdapterState(callWithChatAdapterState)
|
|
28591
28669
|
/* @conditional-compile-remove(video-background-effects) */
|
28592
28670
|
videoBackgroundImages: callWithChatAdapterState.videoBackgroundImages,
|
28593
28671
|
/* @conditional-compile-remove(video-background-effects) */
|
28672
|
+
onResolveVideoEffectDependency: callWithChatAdapterState.onResolveVideoEffectDependency,
|
28673
|
+
/* @conditional-compile-remove(video-background-effects) */
|
28594
28674
|
selectedVideoBackgroundEffect: callWithChatAdapterState.selectedVideoBackgroundEffect
|
28595
28675
|
};
|
28596
28676
|
}
|
28597
28677
|
|
28598
28678
|
// Copyright (c) Microsoft Corporation.
|
28599
28679
|
// Licensed under the MIT license.
|
28600
|
-
var __awaiter$
|
28680
|
+
var __awaiter$3 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
28601
28681
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
28602
28682
|
return new (P || (P = Promise))(function (resolve, reject) {
|
28603
28683
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -28618,12 +28698,12 @@ class CallWithChatBackedChatAdapter {
|
|
28618
28698
|
// For onStateChange we must convert CallWithChat state to chat state. This involves creating a new handler to be passed into the onStateChange.
|
28619
28699
|
// In order to unsubscribe the handler when offStateChange is called we must have a mapping of the original handler to the newly created handler.
|
28620
28700
|
this.eventStore = new Map();
|
28621
|
-
this.fetchInitialData = () => __awaiter$
|
28622
|
-
this.sendMessage = (content) => __awaiter$
|
28623
|
-
this.sendReadReceipt = (chatMessageId) => __awaiter$
|
28624
|
-
this.sendTypingIndicator = () => __awaiter$
|
28625
|
-
this.removeParticipant = (userId) => __awaiter$
|
28626
|
-
this.loadPreviousChatMessages = (messagesToLoad) => __awaiter$
|
28701
|
+
this.fetchInitialData = () => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.fetchInitialData(); });
|
28702
|
+
this.sendMessage = (content) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.sendMessage(content); });
|
28703
|
+
this.sendReadReceipt = (chatMessageId) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.sendReadReceipt(chatMessageId); });
|
28704
|
+
this.sendTypingIndicator = () => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.sendTypingIndicator(); });
|
28705
|
+
this.removeParticipant = (userId) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.removeParticipant(userId); });
|
28706
|
+
this.loadPreviousChatMessages = (messagesToLoad) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.loadPreviousChatMessages(messagesToLoad); });
|
28627
28707
|
this.dispose = () => this.callWithChatAdapter.dispose();
|
28628
28708
|
this.onStateChange = (handler) => {
|
28629
28709
|
const convertedHandler = (state) => {
|
@@ -28662,12 +28742,12 @@ class CallWithChatBackedChatAdapter {
|
|
28662
28742
|
return this.callWithChatAdapter.off(event, listener);
|
28663
28743
|
}
|
28664
28744
|
};
|
28665
|
-
this.updateMessage = (messageId, content, metadata) => __awaiter$
|
28666
|
-
this.deleteMessage = (messageId) => __awaiter$
|
28745
|
+
this.updateMessage = (messageId, content, metadata) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.updateMessage(messageId, content, metadata); });
|
28746
|
+
this.deleteMessage = (messageId) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.deleteMessage(messageId); });
|
28667
28747
|
this.clearErrors = (errorTypes) => {
|
28668
28748
|
throw new Error(`Method not supported in CallWithChatComposite.`);
|
28669
28749
|
};
|
28670
|
-
this.setTopic = (topicName) => __awaiter$
|
28750
|
+
this.setTopic = (topicName) => __awaiter$3(this, void 0, void 0, function* () {
|
28671
28751
|
throw new Error(`Chat Topics are not supported in CallWithChatComposite.`);
|
28672
28752
|
});
|
28673
28753
|
/* @conditional-compile-remove(file-sharing) */
|
@@ -28702,7 +28782,7 @@ class CallWithChatBackedChatAdapter {
|
|
28702
28782
|
}
|
28703
28783
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
28704
28784
|
downloadAttachments(options) {
|
28705
|
-
return __awaiter$
|
28785
|
+
return __awaiter$3(this, void 0, void 0, function* () {
|
28706
28786
|
return yield this.callWithChatAdapter.downloadAttachments(options);
|
28707
28787
|
});
|
28708
28788
|
}
|
@@ -29086,6 +29166,8 @@ function callWithChatAdapterStateFromBackingStates(callAdapter, chatAdapter) {
|
|
29086
29166
|
/* @conditional-compile-remove(video-background-effects) */
|
29087
29167
|
videoBackgroundImages: callAdapterState.videoBackgroundImages,
|
29088
29168
|
/* @conditional-compile-remove(video-background-effects) */
|
29169
|
+
onResolveVideoEffectDependency: callAdapterState.onResolveVideoEffectDependency,
|
29170
|
+
/* @conditional-compile-remove(video-background-effects) */
|
29089
29171
|
selectedVideoBackgroundEffect: callAdapterState.selectedVideoBackgroundEffect
|
29090
29172
|
};
|
29091
29173
|
}
|
@@ -29105,6 +29187,8 @@ function mergeCallAdapterStateIntoCallWithChatAdapterState(existingCallWithChatA
|
|
29105
29187
|
/* @conditional-compile-remove(video-background-effects) */
|
29106
29188
|
videoBackgroundImages: callAdapterState.videoBackgroundImages,
|
29107
29189
|
/* @conditional-compile-remove(video-background-effects) */
|
29190
|
+
onResolveVideoEffectDependency: callAdapterState.onResolveVideoEffectDependency,
|
29191
|
+
/* @conditional-compile-remove(video-background-effects) */
|
29108
29192
|
selectedVideoBackgroundEffect: callAdapterState.selectedVideoBackgroundEffect });
|
29109
29193
|
}
|
29110
29194
|
|
@@ -29144,7 +29228,7 @@ const getChatThreadFromTeamsLink = (teamsMeetingLink) => {
|
|
29144
29228
|
|
29145
29229
|
// Copyright (c) Microsoft Corporation.
|
29146
29230
|
// Licensed under the MIT license.
|
29147
|
-
var __awaiter = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
29231
|
+
var __awaiter$2 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
29148
29232
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
29149
29233
|
return new (P || (P = Promise))(function (resolve, reject) {
|
29150
29234
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -29316,7 +29400,7 @@ class AzureCommunicationCallWithChatAdapter {
|
|
29316
29400
|
}
|
29317
29401
|
/** Leave current Call. */
|
29318
29402
|
leaveCall(forEveryone) {
|
29319
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29403
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29320
29404
|
// Only remove self from the GroupCall. Contoso must manage access to Chat.
|
29321
29405
|
yield this.callAdapter.leaveCall(forEveryone);
|
29322
29406
|
});
|
@@ -29355,7 +29439,7 @@ class AzureCommunicationCallWithChatAdapter {
|
|
29355
29439
|
}
|
29356
29440
|
/** Remove a participant from the Call only. */
|
29357
29441
|
removeParticipant(userId) {
|
29358
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29442
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29359
29443
|
let participant = userId;
|
29360
29444
|
/* @conditional-compile-remove(PSTN-calls) */
|
29361
29445
|
participant = _toCommunicationIdentifier(userId);
|
@@ -29363,174 +29447,174 @@ class AzureCommunicationCallWithChatAdapter {
|
|
29363
29447
|
});
|
29364
29448
|
}
|
29365
29449
|
setCamera(device, options) {
|
29366
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29450
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29367
29451
|
yield this.callAdapter.setCamera(device, options);
|
29368
29452
|
});
|
29369
29453
|
}
|
29370
29454
|
/** Set the microphone to be used in the Call. */
|
29371
29455
|
setMicrophone(device) {
|
29372
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29456
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29373
29457
|
yield this.callAdapter.setMicrophone(device);
|
29374
29458
|
});
|
29375
29459
|
}
|
29376
29460
|
/** Set the speaker to be used in the Call. */
|
29377
29461
|
setSpeaker(device) {
|
29378
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29462
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29379
29463
|
yield this.callAdapter.setSpeaker(device);
|
29380
29464
|
});
|
29381
29465
|
}
|
29382
29466
|
askDevicePermission(constraints) {
|
29383
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29467
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29384
29468
|
yield this.callAdapter.askDevicePermission(constraints);
|
29385
29469
|
});
|
29386
29470
|
}
|
29387
29471
|
/** Query for available cameras. */
|
29388
29472
|
queryCameras() {
|
29389
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29473
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29390
29474
|
return yield this.callAdapter.queryCameras();
|
29391
29475
|
});
|
29392
29476
|
}
|
29393
29477
|
/** Query for available microphones. */
|
29394
29478
|
queryMicrophones() {
|
29395
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29479
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29396
29480
|
return yield this.callAdapter.queryMicrophones();
|
29397
29481
|
});
|
29398
29482
|
}
|
29399
29483
|
/** Query for available speakers. */
|
29400
29484
|
querySpeakers() {
|
29401
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29485
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29402
29486
|
return yield this.callAdapter.querySpeakers();
|
29403
29487
|
});
|
29404
29488
|
}
|
29405
29489
|
/** Start the camera for the user in the Call. */
|
29406
29490
|
startCamera(options) {
|
29407
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29491
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29408
29492
|
yield this.callAdapter.startCamera(options);
|
29409
29493
|
});
|
29410
29494
|
}
|
29411
29495
|
/** Stop the camera for the user in the Call. */
|
29412
29496
|
stopCamera() {
|
29413
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29497
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29414
29498
|
yield this.callAdapter.stopCamera();
|
29415
29499
|
});
|
29416
29500
|
}
|
29417
29501
|
/** Mute the user in the Call. */
|
29418
29502
|
mute() {
|
29419
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29503
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29420
29504
|
yield this.callAdapter.mute();
|
29421
29505
|
});
|
29422
29506
|
}
|
29423
29507
|
/** Unmute the user in the Call. */
|
29424
29508
|
unmute() {
|
29425
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29509
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29426
29510
|
yield this.callAdapter.unmute();
|
29427
29511
|
});
|
29428
29512
|
}
|
29429
29513
|
/** Trigger the user to start screen share. */
|
29430
29514
|
startScreenShare() {
|
29431
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29515
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29432
29516
|
yield this.callAdapter.startScreenShare();
|
29433
29517
|
});
|
29434
29518
|
}
|
29435
29519
|
/** Stop the current active screen share. */
|
29436
29520
|
stopScreenShare() {
|
29437
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29521
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29438
29522
|
yield this.callAdapter.stopScreenShare();
|
29439
29523
|
});
|
29440
29524
|
}
|
29441
29525
|
/** Create a stream view for a remote participants video feed. */
|
29442
29526
|
createStreamView(remoteUserId, options) {
|
29443
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29527
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29444
29528
|
return yield this.callAdapter.createStreamView(remoteUserId, options);
|
29445
29529
|
});
|
29446
29530
|
}
|
29447
29531
|
/** Dispose of a created stream view of a remote participants video feed. */
|
29448
29532
|
disposeStreamView(remoteUserId, options) {
|
29449
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29533
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29450
29534
|
yield this.callAdapter.disposeStreamView(remoteUserId, options);
|
29451
29535
|
});
|
29452
29536
|
}
|
29453
29537
|
/** Dispose of a remote screen share */
|
29454
29538
|
disposeScreenShareStreamView(remoteUserId) {
|
29455
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29539
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29456
29540
|
yield this.callAdapter.disposeScreenShareStreamView(remoteUserId);
|
29457
29541
|
});
|
29458
29542
|
}
|
29459
29543
|
/** Dispose of a remote video stream */
|
29460
29544
|
disposeRemoteVideoStreamView(remoteUserId) {
|
29461
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29545
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29462
29546
|
yield this.callAdapter.disposeRemoteVideoStreamView(remoteUserId);
|
29463
29547
|
});
|
29464
29548
|
}
|
29465
29549
|
/** Dispose of the local video stream */
|
29466
29550
|
disposeLocalVideoStreamView() {
|
29467
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29551
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29468
29552
|
yield this.callAdapter.disposeLocalVideoStreamView();
|
29469
29553
|
});
|
29470
29554
|
}
|
29471
29555
|
/** Fetch initial Call and Chat data such as chat messages. */
|
29472
29556
|
fetchInitialData() {
|
29473
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29557
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29474
29558
|
yield this.chatAdapter.fetchInitialData();
|
29475
29559
|
});
|
29476
29560
|
}
|
29477
29561
|
/** Send a chat message. */
|
29478
29562
|
sendMessage(content) {
|
29479
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29563
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29480
29564
|
yield this.chatAdapter.sendMessage(content);
|
29481
29565
|
});
|
29482
29566
|
}
|
29483
29567
|
/** Send a chat read receipt. */
|
29484
29568
|
sendReadReceipt(chatMessageId) {
|
29485
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29569
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29486
29570
|
yield this.chatAdapter.sendReadReceipt(chatMessageId);
|
29487
29571
|
});
|
29488
29572
|
}
|
29489
29573
|
/** Send an isTyping indicator. */
|
29490
29574
|
sendTypingIndicator() {
|
29491
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29575
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29492
29576
|
yield this.chatAdapter.sendTypingIndicator();
|
29493
29577
|
});
|
29494
29578
|
}
|
29495
29579
|
/** Load previous Chat messages. */
|
29496
29580
|
loadPreviousChatMessages(messagesToLoad) {
|
29497
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29581
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29498
29582
|
return yield this.chatAdapter.loadPreviousChatMessages(messagesToLoad);
|
29499
29583
|
});
|
29500
29584
|
}
|
29501
29585
|
/** Update an existing message. */
|
29502
29586
|
updateMessage(messageId, content, metadata) {
|
29503
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29587
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29504
29588
|
return yield this.chatAdapter.updateMessage(messageId, content, metadata);
|
29505
29589
|
});
|
29506
29590
|
}
|
29507
29591
|
/** Delete an existing message. */
|
29508
29592
|
deleteMessage(messageId) {
|
29509
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29593
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29510
29594
|
return yield this.chatAdapter.deleteMessage(messageId);
|
29511
29595
|
});
|
29512
29596
|
}
|
29513
29597
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
29514
29598
|
downloadAttachments(options) {
|
29515
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29599
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29516
29600
|
return yield this.chatAdapter.downloadAttachments(options);
|
29517
29601
|
});
|
29518
29602
|
}
|
29519
29603
|
/* @conditional-compile-remove(PSTN-calls) */
|
29520
29604
|
holdCall() {
|
29521
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29605
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29522
29606
|
return yield this.callAdapter.holdCall();
|
29523
29607
|
});
|
29524
29608
|
}
|
29525
29609
|
/* @conditional-compile-remove(PSTN-calls) */
|
29526
29610
|
resumeCall() {
|
29527
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29611
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29528
29612
|
return yield this.callAdapter.resumeCall();
|
29529
29613
|
});
|
29530
29614
|
}
|
29531
29615
|
/* @conditional-compile-remove(PSTN-calls) */
|
29532
29616
|
addParticipant(participant, options) {
|
29533
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29617
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29534
29618
|
if (communicationCommon.isCommunicationUserIdentifier(participant)) {
|
29535
29619
|
return yield this.callAdapter.addParticipant(participant);
|
29536
29620
|
}
|
@@ -29541,7 +29625,7 @@ class AzureCommunicationCallWithChatAdapter {
|
|
29541
29625
|
}
|
29542
29626
|
/* @conditional-compile-remove(PSTN-calls) */
|
29543
29627
|
sendDtmfTone(dtmfTone) {
|
29544
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29628
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29545
29629
|
return yield this.callAdapter.sendDtmfTone(dtmfTone);
|
29546
29630
|
});
|
29547
29631
|
}
|
@@ -29551,37 +29635,37 @@ class AzureCommunicationCallWithChatAdapter {
|
|
29551
29635
|
}
|
29552
29636
|
/* @conditional-compile-remove(close-captions) */
|
29553
29637
|
startCaptions(options) {
|
29554
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29638
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29555
29639
|
yield this.callAdapter.startCaptions(options);
|
29556
29640
|
});
|
29557
29641
|
}
|
29558
29642
|
/* @conditional-compile-remove(close-captions) */
|
29559
29643
|
stopCaptions() {
|
29560
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29644
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29561
29645
|
yield this.callAdapter.stopCaptions();
|
29562
29646
|
});
|
29563
29647
|
}
|
29564
29648
|
/* @conditional-compile-remove(close-captions) */
|
29565
29649
|
setCaptionLanguage(language) {
|
29566
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29650
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29567
29651
|
yield this.callAdapter.setCaptionLanguage(language);
|
29568
29652
|
});
|
29569
29653
|
}
|
29570
29654
|
/* @conditional-compile-remove(close-captions) */
|
29571
29655
|
setSpokenLanguage(language) {
|
29572
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29656
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29573
29657
|
yield this.callAdapter.setSpokenLanguage(language);
|
29574
29658
|
});
|
29575
29659
|
}
|
29576
29660
|
/* @conditional-compile-remove(video-background-effects) */
|
29577
29661
|
startVideoBackgroundEffect(videoBackgroundEffect) {
|
29578
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29662
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29579
29663
|
yield this.callAdapter.startVideoBackgroundEffect(videoBackgroundEffect);
|
29580
29664
|
});
|
29581
29665
|
}
|
29582
29666
|
/* @conditional-compile-remove(video-background-effects) */
|
29583
29667
|
stopVideoBackgroundEffects() {
|
29584
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29668
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
29585
29669
|
return yield this.callAdapter.stopVideoBackgroundEffects();
|
29586
29670
|
});
|
29587
29671
|
}
|
@@ -29734,7 +29818,7 @@ class AzureCommunicationCallWithChatAdapter {
|
|
29734
29818
|
*/
|
29735
29819
|
const createAzureCommunicationCallWithChatAdapter = ({ userId, displayName, credential, endpoint, locator,
|
29736
29820
|
/* @conditional-compile-remove(PSTN-calls) */ alternateCallerId,
|
29737
|
-
/* @conditional-compile-remove(video-background-effects) */ callAdapterOptions }) => __awaiter(void 0, void 0, void 0, function* () {
|
29821
|
+
/* @conditional-compile-remove(video-background-effects) */ callAdapterOptions }) => __awaiter$2(void 0, void 0, void 0, function* () {
|
29738
29822
|
const callAdapterLocator = isTeamsMeetingLinkLocator(locator) ? locator : locator.callLocator;
|
29739
29823
|
const createCallAdapterPromise = createAzureCommunicationCallAdapter({
|
29740
29824
|
userId,
|
@@ -29810,7 +29894,7 @@ beforeDispose) => {
|
|
29810
29894
|
if (!credential || !displayName || !endpoint || !locator || !userId) {
|
29811
29895
|
return;
|
29812
29896
|
}
|
29813
|
-
(() => __awaiter(void 0, void 0, void 0, function* () {
|
29897
|
+
(() => __awaiter$2(void 0, void 0, void 0, function* () {
|
29814
29898
|
if (adapterRef.current) {
|
29815
29899
|
// Dispose the old adapter when a new one is created.
|
29816
29900
|
//
|
@@ -29855,7 +29939,7 @@ beforeDispose) => {
|
|
29855
29939
|
// Dispose any existing adapter when the component unmounts.
|
29856
29940
|
React.useEffect(() => {
|
29857
29941
|
return () => {
|
29858
|
-
(() => __awaiter(void 0, void 0, void 0, function* () {
|
29942
|
+
(() => __awaiter$2(void 0, void 0, void 0, function* () {
|
29859
29943
|
if (adapterRef.current) {
|
29860
29944
|
if (beforeDisposeRef.current) {
|
29861
29945
|
yield beforeDisposeRef.current(adapterRef.current);
|
@@ -29878,7 +29962,7 @@ beforeDispose) => {
|
|
29878
29962
|
*/
|
29879
29963
|
const createAzureCommunicationCallWithChatAdapterFromClients = ({ callClient, callAgent, callLocator, chatClient, chatThreadClient,
|
29880
29964
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
29881
|
-
options }) => __awaiter(void 0, void 0, void 0, function* () {
|
29965
|
+
options }) => __awaiter$2(void 0, void 0, void 0, function* () {
|
29882
29966
|
const createCallAdapterPromise = createAzureCommunicationCallAdapterFromClient(callClient, callAgent, callLocator);
|
29883
29967
|
const createChatAdapterPromise = createAzureCommunicationChatAdapterFromClient(chatClient, chatThreadClient,
|
29884
29968
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
@@ -29890,6 +29974,67 @@ const isTeamsMeetingLinkLocator = (locator) => {
|
|
29890
29974
|
return 'meetingLink' in locator;
|
29891
29975
|
};
|
29892
29976
|
|
29977
|
+
// Copyright (c) Microsoft Corporation.
|
29978
|
+
// Licensed under the MIT license.
|
29979
|
+
var __awaiter$1 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
29980
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
29981
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
29982
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
29983
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
29984
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
29985
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
29986
|
+
});
|
29987
|
+
};
|
29988
|
+
/* @conditional-compile-remove(video-background-effects) */
|
29989
|
+
/**
|
29990
|
+
*
|
29991
|
+
* Dependency resolution for video background effects using lazy loading.
|
29992
|
+
* @beta
|
29993
|
+
*/
|
29994
|
+
const onResolveVideoEffectDependencyLazy = () => __awaiter$1(void 0, void 0, void 0, function* () {
|
29995
|
+
const module = yield Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('@azure/communication-calling-effects')); });
|
29996
|
+
const createBackgroundBlurEffect = (config) => {
|
29997
|
+
return new module.BackgroundBlurEffect(config);
|
29998
|
+
};
|
29999
|
+
const createBackgroundReplacementEffect = (config) => {
|
30000
|
+
return new module.BackgroundReplacementEffect(config);
|
30001
|
+
};
|
30002
|
+
const VideoBackgroundEffectsDependency = {
|
30003
|
+
createBackgroundBlurEffect,
|
30004
|
+
createBackgroundReplacementEffect
|
30005
|
+
};
|
30006
|
+
return VideoBackgroundEffectsDependency;
|
30007
|
+
});
|
30008
|
+
|
30009
|
+
var __awaiter = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
30010
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
30011
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
30012
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
30013
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
30014
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
30015
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
30016
|
+
});
|
30017
|
+
};
|
30018
|
+
/* @conditional-compile-remove(video-background-effects) */
|
30019
|
+
/**
|
30020
|
+
* Dependency resolution for video background effects.
|
30021
|
+
*
|
30022
|
+
* @beta
|
30023
|
+
*/
|
30024
|
+
const onResolveVideoEffectDependency = () => __awaiter(void 0, void 0, void 0, function* () {
|
30025
|
+
const createBackgroundBlurEffect = (config) => {
|
30026
|
+
return new communicationCallingEffects.BackgroundBlurEffect(config);
|
30027
|
+
};
|
30028
|
+
const createBackgroundReplacementEffect = (config) => {
|
30029
|
+
return new communicationCallingEffects.BackgroundReplacementEffect(config);
|
30030
|
+
};
|
30031
|
+
const VideoBackgroundEffectsDependency = {
|
30032
|
+
createBackgroundBlurEffect,
|
30033
|
+
createBackgroundReplacementEffect
|
30034
|
+
};
|
30035
|
+
return VideoBackgroundEffectsDependency;
|
30036
|
+
});
|
30037
|
+
|
29893
30038
|
// Copyright (c) Microsoft Corporation.
|
29894
30039
|
/**
|
29895
30040
|
* Hook to obtain a selector for a specified component.
|
@@ -30061,6 +30206,8 @@ exports.fromFlatCommunicationIdentifier = fromFlatCommunicationIdentifier;
|
|
30061
30206
|
exports.getCallingSelector = getSelector$1;
|
30062
30207
|
exports.getChatSelector = getSelector;
|
30063
30208
|
exports.lightTheme = lightTheme;
|
30209
|
+
exports.onResolveVideoEffectDependency = onResolveVideoEffectDependency;
|
30210
|
+
exports.onResolveVideoEffectDependencyLazy = onResolveVideoEffectDependencyLazy;
|
30064
30211
|
exports.toFlatCommunicationIdentifier = toFlatCommunicationIdentifier;
|
30065
30212
|
exports.useAzureCommunicationCallAdapter = useAzureCommunicationCallAdapter;
|
30066
30213
|
exports.useAzureCommunicationCallWithChatAdapter = useAzureCommunicationCallWithChatAdapter;
|