@azure/communication-react 1.7.0-alpha-202307280013 → 1.7.0-alpha-202308010015
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 +35 -22
- package/dist/dist-cjs/communication-react/index.js +274 -244
- package/dist/dist-cjs/communication-react/index.js.map +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js +6 -2
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.js +19 -6
- package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js +19 -5
- package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.d.ts +2 -3
- package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.js +10 -8
- package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.d.ts +2 -1
- package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js +5 -2
- package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js +11 -3
- package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +25 -0
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.js +1 -0
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +3 -0
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js +26 -0
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.d.ts +1 -0
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +7 -1
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/Converter.js +5 -1
- package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/RaiseHandSubscriber.d.ts +17 -0
- package/dist/dist-esm/calling-stateful-client/src/RaiseHandSubscriber.js +35 -0
- package/dist/dist-esm/calling-stateful-client/src/RaiseHandSubscriber.js.map +1 -0
- package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.d.ts +2 -0
- package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/index-public.d.ts +1 -0
- package/dist/dist-esm/calling-stateful-client/src/index-public.js.map +1 -1
- package/dist/dist-esm/communication-react/src/index.d.ts +0 -1
- package/dist/dist-esm/communication-react/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ParticipantList.js +1 -5
- package/dist/dist-esm/react-components/src/components/ParticipantList.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ParticipantsButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery.js +7 -10
- package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/index.d.ts +0 -2
- package/dist/dist-esm/react-components/src/index.js +0 -2
- package/dist/dist-esm/react-components/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/types/ParticipantListParticipant.d.ts +0 -3
- package/dist/dist-esm/react-components/src/types/ParticipantListParticipant.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +5 -20
- 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 +1 -9
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +10 -18
- 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 +4 -7
- 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/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +9 -11
- 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/CallControls.d.ts +2 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js +9 -19
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js +8 -10
- 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/MediaGallery.js +32 -18
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Camera.js +10 -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/components/buttons/Devices.js +13 -10
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Devices.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.js +10 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/People.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/ScreenShare.js +10 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/ScreenShare.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +7 -10
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +5 -5
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.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 +2 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js +2 -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.js +3 -13
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ModalLocalAndRemotePIP.js +11 -11
- package/dist/dist-esm/react-composites/src/composites/common/ModalLocalAndRemotePIP.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js +4 -5
- package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js.map +1 -1
- package/package.json +8 -8
- package/dist/dist-esm/react-components/src/permissions/PermissionsProvider.d.ts +0 -61
- package/dist/dist-esm/react-components/src/permissions/PermissionsProvider.js +0 -74
- package/dist/dist-esm/react-components/src/permissions/PermissionsProvider.js.map +0 -1
- package/dist/dist-esm/react-components/src/permissions/index.d.ts +0 -2
- package/dist/dist-esm/react-components/src/permissions/index.js +0 -4
- package/dist/dist-esm/react-components/src/permissions/index.js.map +0 -1
@@ -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-202308010015';
|
182
182
|
|
183
183
|
// Copyright (c) Microsoft Corporation.
|
184
184
|
/**
|
@@ -332,6 +332,14 @@ const _logEvent = (logger, event) => {
|
|
332
332
|
* @private
|
333
333
|
*/
|
334
334
|
const getDeviceManager$1 = (state) => state.deviceManager;
|
335
|
+
/**
|
336
|
+
* @private
|
337
|
+
*/
|
338
|
+
const getRole = (state, props) => {
|
339
|
+
var _a;
|
340
|
+
/* @conditional-compile-remove(rooms) */
|
341
|
+
return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.role;
|
342
|
+
};
|
335
343
|
/**
|
336
344
|
* @private
|
337
345
|
*/
|
@@ -535,10 +543,10 @@ const _isRingingPSTNParticipant = (participant) => {
|
|
535
543
|
*
|
536
544
|
* @public
|
537
545
|
*/
|
538
|
-
const microphoneButtonSelector = reselect__namespace.createSelector([getCallExists, getIsMuted, getDeviceManager$1], (callExists, isMuted, deviceManager) => {
|
546
|
+
const microphoneButtonSelector = reselect__namespace.createSelector([getCallExists, getIsMuted, getDeviceManager$1, /* @conditional-compile-remove(rooms) */ getRole], (callExists, isMuted, deviceManager, /* @conditional-compile-remove(rooms) */ role) => {
|
539
547
|
const permission = deviceManager.deviceAccess ? deviceManager.deviceAccess.audio : true;
|
540
548
|
return {
|
541
|
-
disabled: !callExists || !permission,
|
549
|
+
disabled: !callExists || !permission || /* @conditional-compile-remove(rooms) */ role === 'Consumer',
|
542
550
|
checked: callExists ? !isMuted : false,
|
543
551
|
microphones: deviceManager.microphones,
|
544
552
|
speakers: deviceManager.speakers,
|
@@ -551,12 +559,15 @@ const microphoneButtonSelector = reselect__namespace.createSelector([getCallExis
|
|
551
559
|
*
|
552
560
|
* @public
|
553
561
|
*/
|
554
|
-
const cameraButtonSelector = reselect__namespace.createSelector([getLocalVideoStreams$1, getDeviceManager$1], (localVideoStreams, deviceManager) => {
|
562
|
+
const cameraButtonSelector = reselect__namespace.createSelector([getLocalVideoStreams$1, getDeviceManager$1, /* @conditional-compile-remove(rooms) */ getRole], (localVideoStreams, deviceManager, /* @conditional-compile-remove(rooms) */ role) => {
|
555
563
|
const previewOn = _isPreviewOn(deviceManager);
|
556
564
|
const localVideoFromCall = localVideoStreams === null || localVideoStreams === void 0 ? void 0 : localVideoStreams.find((stream) => stream.mediaStreamType === 'Video');
|
557
565
|
const permission = deviceManager.deviceAccess ? deviceManager.deviceAccess.video : true;
|
558
566
|
return {
|
559
|
-
disabled: !deviceManager.selectedCamera ||
|
567
|
+
disabled: !deviceManager.selectedCamera ||
|
568
|
+
!permission ||
|
569
|
+
!deviceManager.cameras.length ||
|
570
|
+
/* @conditional-compile-remove(rooms) */ role === 'Consumer',
|
560
571
|
checked: localVideoStreams !== undefined && localVideoStreams.length > 0 ? !!localVideoFromCall : previewOn,
|
561
572
|
cameras: deviceManager.cameras,
|
562
573
|
selectedCamera: deviceManager.selectedCamera
|
@@ -567,12 +578,20 @@ const cameraButtonSelector = reselect__namespace.createSelector([getLocalVideoSt
|
|
567
578
|
*
|
568
579
|
* @public
|
569
580
|
*/
|
570
|
-
const screenShareButtonSelector = reselect__namespace.createSelector([
|
581
|
+
const screenShareButtonSelector = reselect__namespace.createSelector([
|
582
|
+
getIsScreenSharingOn,
|
583
|
+
/* @conditional-compile-remove(PSTN-calls) */ getCallState,
|
584
|
+
/* @conditional-compile-remove(rooms) */ getRole
|
585
|
+
], (isScreenSharingOn,
|
586
|
+
/* @conditional-compile-remove(PSTN-calls) */ callState,
|
587
|
+
/* @conditional-compile-remove(rooms) */ role) => {
|
571
588
|
var _a;
|
572
589
|
return {
|
573
590
|
checked: isScreenSharingOn,
|
574
591
|
/* @conditional-compile-remove(PSTN-calls) */
|
575
|
-
disabled: callState === 'InLobby' ? true : (_a = callState === 'Connecting') !== null && _a !== void 0 ? _a : false
|
592
|
+
disabled: (callState === 'InLobby' ? true : (_a = callState === 'Connecting') !== null && _a !== void 0 ? _a : false) ||
|
593
|
+
/* @conditional-compile-remove(rooms) */ role === 'Consumer' ||
|
594
|
+
/* @conditional-compile-remove(rooms) */ role === 'Attendee'
|
576
595
|
};
|
577
596
|
});
|
578
597
|
/**
|
@@ -1303,7 +1322,6 @@ const deviceManagerDeclaratify = (deviceManager, context, internalContext) => {
|
|
1303
1322
|
};
|
1304
1323
|
|
1305
1324
|
// Copyright (c) Microsoft Corporation.
|
1306
|
-
// Licensed under the MIT license.
|
1307
1325
|
/**
|
1308
1326
|
* Error thrown from failed stateful API methods.
|
1309
1327
|
*
|
@@ -1475,7 +1493,9 @@ function convertSdkParticipantToDeclarativeParticipant(participant) {
|
|
1475
1493
|
callEndReason: participant.callEndReason,
|
1476
1494
|
videoStreams: declarativeVideoStreams,
|
1477
1495
|
isMuted: participant.isMuted,
|
1478
|
-
isSpeaking: participant.isSpeaking
|
1496
|
+
isSpeaking: participant.isSpeaking,
|
1497
|
+
/* @conditional-compile-remove(raise-hand) */
|
1498
|
+
raisedHand: undefined
|
1479
1499
|
};
|
1480
1500
|
}
|
1481
1501
|
/**
|
@@ -1511,6 +1531,8 @@ function convertSdkCallToDeclarativeCall(call) {
|
|
1511
1531
|
remoteParticipants: declarativeRemoteParticipants,
|
1512
1532
|
remoteParticipantsEnded: {},
|
1513
1533
|
recording: { isRecordingActive: false },
|
1534
|
+
/* @conditional-compile-remove(raise-hand) */
|
1535
|
+
raiseHand: { raisedHands: [] },
|
1514
1536
|
transcription: { isTranscriptionActive: false },
|
1515
1537
|
screenShareRemoteParticipant: undefined,
|
1516
1538
|
startTime: new Date(),
|
@@ -1690,6 +1712,10 @@ class CallContext$2 {
|
|
1690
1712
|
/* @conditional-compile-remove(optimal-video-count) */
|
1691
1713
|
existingCall.optimalVideoCount.maxRemoteVideoStreams = call.optimalVideoCount.maxRemoteVideoStreams;
|
1692
1714
|
existingCall.recording.isRecordingActive = call.recording.isRecordingActive;
|
1715
|
+
/* @conditional-compile-remove(raise-hand) */
|
1716
|
+
existingCall.raiseHand.raisedHands = call.raiseHand.raisedHands;
|
1717
|
+
/* @conditional-compile-remove(raise-hand) */
|
1718
|
+
existingCall.raiseHand.localParticipantRaisedHand = call.raiseHand.localParticipantRaisedHand;
|
1693
1719
|
/* @conditional-compile-remove(rooms) */
|
1694
1720
|
existingCall.role = call.role;
|
1695
1721
|
/* @conditional-compile-remove(total-participant-count) */
|
@@ -1849,6 +1875,28 @@ class CallContext$2 {
|
|
1849
1875
|
}
|
1850
1876
|
});
|
1851
1877
|
}
|
1878
|
+
/* @conditional-compile-remove(raise-hand) */
|
1879
|
+
setCallRaisedHands(callId, raisedHands) {
|
1880
|
+
this.modifyState((draft) => {
|
1881
|
+
const call = draft.calls[this._callIdHistory.latestCallId(callId)];
|
1882
|
+
if (call) {
|
1883
|
+
call.raiseHand.raisedHands = raisedHands;
|
1884
|
+
call.raiseHand.localParticipantRaisedHand = raisedHands.find((raisedHand) => toFlatCommunicationIdentifier(raisedHand.identifier) === toFlatCommunicationIdentifier(this._state.userId));
|
1885
|
+
}
|
1886
|
+
});
|
1887
|
+
}
|
1888
|
+
/* @conditional-compile-remove(raise-hand) */
|
1889
|
+
setParticipantIsRaisedHand(callId, participantKey, raisedHand) {
|
1890
|
+
this.modifyState((draft) => {
|
1891
|
+
const call = draft.calls[this._callIdHistory.latestCallId(callId)];
|
1892
|
+
if (call) {
|
1893
|
+
const participant = call.remoteParticipants[participantKey];
|
1894
|
+
if (participant) {
|
1895
|
+
participant.raisedHand = raisedHand;
|
1896
|
+
}
|
1897
|
+
}
|
1898
|
+
});
|
1899
|
+
}
|
1852
1900
|
setCallTranscriptionActive(callId, isTranscriptionActive) {
|
1853
1901
|
this.modifyState((draft) => {
|
1854
1902
|
const call = draft.calls[this._callIdHistory.latestCallId(callId)];
|
@@ -3261,6 +3309,38 @@ const latestFromEvent = (args) => ({
|
|
3261
3309
|
valueType: args.valueType
|
3262
3310
|
});
|
3263
3311
|
|
3312
|
+
// Copyright (c) Microsoft Corporation.
|
3313
|
+
/* @conditional-compile-remove(raise-hand) */
|
3314
|
+
/**
|
3315
|
+
* @private
|
3316
|
+
*/
|
3317
|
+
class RaiseHandSubscriber {
|
3318
|
+
constructor(callIdRef, context, raiseHand) {
|
3319
|
+
this.subscribe = () => {
|
3320
|
+
this._raiseHand.on('raisedHandEvent', this.raisedHand);
|
3321
|
+
this._raiseHand.on('loweredHandEvent', this.loweredHand);
|
3322
|
+
};
|
3323
|
+
this.unsubscribe = () => {
|
3324
|
+
this._raiseHand.off('raisedHandEvent', this.raisedHand);
|
3325
|
+
this._raiseHand.off('loweredHandEvent', this.loweredHand);
|
3326
|
+
};
|
3327
|
+
this.raisedHand = () => {
|
3328
|
+
this._context.setCallRaisedHands(this._callIdRef.callId, this._raiseHand.getRaisedHands());
|
3329
|
+
for (const raisedHand of this._raiseHand.getRaisedHands()) {
|
3330
|
+
this._context.setParticipantIsRaisedHand(this._callIdRef.callId, toFlatCommunicationIdentifier(raisedHand.identifier), raisedHand);
|
3331
|
+
}
|
3332
|
+
};
|
3333
|
+
this.loweredHand = (event) => {
|
3334
|
+
this.raisedHand();
|
3335
|
+
this._context.setParticipantIsRaisedHand(this._callIdRef.callId, toFlatCommunicationIdentifier(event.identifier), undefined);
|
3336
|
+
};
|
3337
|
+
this._callIdRef = callIdRef;
|
3338
|
+
this._context = context;
|
3339
|
+
this._raiseHand = raiseHand;
|
3340
|
+
this.subscribe();
|
3341
|
+
}
|
3342
|
+
}
|
3343
|
+
|
3264
3344
|
/* @conditional-compile-remove(optimal-video-count) */
|
3265
3345
|
/**
|
3266
3346
|
* Subscribes to a Optimal Video Count Feature events and updates the call context appropriately.
|
@@ -3345,7 +3425,7 @@ class CallSubscriber {
|
|
3345
3425
|
}
|
3346
3426
|
};
|
3347
3427
|
this.unsubscribe = () => {
|
3348
|
-
var _a;
|
3428
|
+
var _a, _b;
|
3349
3429
|
this._call.off('stateChanged', this.stateChanged);
|
3350
3430
|
/* @conditional-compile-remove(close-captions) */
|
3351
3431
|
this._call.off('stateChanged', this.initCaptionSubscriber);
|
@@ -3375,6 +3455,8 @@ class CallSubscriber {
|
|
3375
3455
|
this._optimalVideoCountSubscriber.unsubscribe();
|
3376
3456
|
/* @conditional-compile-remove(close-captions) */
|
3377
3457
|
(_a = this._captionsSubscriber) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
3458
|
+
/* @conditional-compile-remove(raise-hand) */
|
3459
|
+
(_b = this._raiseHandSubscriber) === null || _b === void 0 ? void 0 : _b.unsubscribe();
|
3378
3460
|
/* @conditional-compile-remove(capabilities) */
|
3379
3461
|
this._capabilitiesSubscriber.unsubscribe();
|
3380
3462
|
};
|
@@ -3470,6 +3552,8 @@ class CallSubscriber {
|
|
3470
3552
|
this._participantSubscribers = new Map();
|
3471
3553
|
this._recordingSubscriber = new RecordingSubscriber(this._callIdRef, this._context, this._call.feature(communicationCalling.Features.Recording));
|
3472
3554
|
this._transcriptionSubscriber = new TranscriptionSubscriber(this._callIdRef, this._context, this._call.feature(communicationCalling.Features.Transcription));
|
3555
|
+
/* @conditional-compile-remove(raise-hand) */
|
3556
|
+
this._raiseHandSubscriber = new RaiseHandSubscriber(this._callIdRef, this._context, this._call.feature(communicationCalling.Features.RaiseHand));
|
3473
3557
|
/* @conditional-compile-remove(optimal-video-count) */
|
3474
3558
|
this._optimalVideoCountSubscriber = new OptimalVideoCountSubscriber({
|
3475
3559
|
callIdRef: this._callIdRef,
|
@@ -10555,78 +10639,6 @@ const participantStateStringTrampoline$1 = (props, strings) => {
|
|
10555
10639
|
: undefined;
|
10556
10640
|
};
|
10557
10641
|
|
10558
|
-
// Copyright (c) Microsoft Corporation.
|
10559
|
-
/**
|
10560
|
-
* @internal
|
10561
|
-
*/
|
10562
|
-
const defaultPermissions = {
|
10563
|
-
cameraButton: true,
|
10564
|
-
microphoneButton: true,
|
10565
|
-
screenShare: true,
|
10566
|
-
removeParticipantButton: true
|
10567
|
-
};
|
10568
|
-
/**
|
10569
|
-
* @internal
|
10570
|
-
*/
|
10571
|
-
const presenterPermissions = {
|
10572
|
-
role: 'Presenter',
|
10573
|
-
cameraButton: true,
|
10574
|
-
microphoneButton: true,
|
10575
|
-
screenShare: true,
|
10576
|
-
removeParticipantButton: true
|
10577
|
-
};
|
10578
|
-
/**
|
10579
|
-
* @internal
|
10580
|
-
*/
|
10581
|
-
const consumerPermissions = {
|
10582
|
-
role: 'Consumer',
|
10583
|
-
cameraButton: false,
|
10584
|
-
microphoneButton: false,
|
10585
|
-
screenShare: false,
|
10586
|
-
removeParticipantButton: false
|
10587
|
-
};
|
10588
|
-
/**
|
10589
|
-
* @internal
|
10590
|
-
*/
|
10591
|
-
const attendeePermissions = {
|
10592
|
-
role: 'Attendee',
|
10593
|
-
cameraButton: true,
|
10594
|
-
microphoneButton: true,
|
10595
|
-
screenShare: false,
|
10596
|
-
removeParticipantButton: false
|
10597
|
-
};
|
10598
|
-
/**
|
10599
|
-
* @internal
|
10600
|
-
*/
|
10601
|
-
const PermissionsContext = React.createContext(defaultPermissions);
|
10602
|
-
/**
|
10603
|
-
* @internal
|
10604
|
-
*/
|
10605
|
-
const _PermissionsProvider = (props) => {
|
10606
|
-
const { permissions, children } = props;
|
10607
|
-
return React__default['default'].createElement(PermissionsContext.Provider, { value: permissions }, children);
|
10608
|
-
};
|
10609
|
-
/**
|
10610
|
-
* @internal
|
10611
|
-
* React hook to access permissions
|
10612
|
-
*/
|
10613
|
-
const _usePermissions = () => React.useContext(PermissionsContext);
|
10614
|
-
/**
|
10615
|
-
* @internal
|
10616
|
-
*/
|
10617
|
-
const _getPermissions = (role) => {
|
10618
|
-
if (role === 'Consumer') {
|
10619
|
-
return consumerPermissions;
|
10620
|
-
}
|
10621
|
-
else if (role === 'Attendee') {
|
10622
|
-
return attendeePermissions;
|
10623
|
-
}
|
10624
|
-
else if (role === 'Presenter') {
|
10625
|
-
return presenterPermissions;
|
10626
|
-
}
|
10627
|
-
return defaultPermissions;
|
10628
|
-
};
|
10629
|
-
|
10630
10642
|
// Copyright (c) Microsoft Corporation.
|
10631
10643
|
/**
|
10632
10644
|
* @private
|
@@ -10715,9 +10727,7 @@ const ParticipantList = (props) => {
|
|
10715
10727
|
const createParticipantMenuItems = React.useCallback((participant) => {
|
10716
10728
|
var _a, _b;
|
10717
10729
|
let menuItems = [];
|
10718
|
-
|
10719
|
-
/* @conditional-compile-remove(rooms) */
|
10720
|
-
participantIsRemovable = _usePermissions().removeParticipantButton && participantIsRemovable;
|
10730
|
+
const participantIsRemovable = participant.isRemovable;
|
10721
10731
|
if (participant.userId !== myUserId && onRemoveParticipant && participantIsRemovable) {
|
10722
10732
|
menuItems.push({
|
10723
10733
|
key: 'remove',
|
@@ -13874,7 +13884,7 @@ const VideoGallery = (props) => {
|
|
13874
13884
|
remoteVideoTileMenuOptions = DEFAULT_REMOTE_VIDEO_TILE_MENU_OPTIONS,
|
13875
13885
|
/* @conditional-compile-remove(vertical-gallery) */
|
13876
13886
|
overflowGalleryPosition = 'HorizontalBottom',
|
13877
|
-
/* @conditional-compile-remove(
|
13887
|
+
/* @conditional-compile-remove(rooms) */
|
13878
13888
|
localVideoTileSize = 'followDeviceOrientation' } = props;
|
13879
13889
|
const ids = useIdentifiers();
|
13880
13890
|
const theme = useTheme();
|
@@ -13907,15 +13917,13 @@ const VideoGallery = (props) => {
|
|
13907
13917
|
/* @conditional-compile-remove(pinned-participants) */
|
13908
13918
|
// Use pinnedParticipants from props but if it is not defined use the maintained state of pinned participants
|
13909
13919
|
const pinnedParticipants = (_a = props.pinnedParticipants) !== null && _a !== void 0 ? _a : pinnedParticipantsState;
|
13910
|
-
/* @conditional-compile-remove(rooms) */
|
13911
|
-
const permissions = _usePermissions();
|
13912
13920
|
/**
|
13913
13921
|
* Utility function for memoized rendering of LocalParticipant.
|
13914
13922
|
*/
|
13915
13923
|
const localVideoTile = React.useMemo(() => {
|
13916
13924
|
var _a, _b;
|
13917
|
-
/* @conditional-compile-remove(
|
13918
|
-
if (
|
13925
|
+
/* @conditional-compile-remove(click-to-call) */
|
13926
|
+
if (localVideoTileSize === 'hidden') {
|
13919
13927
|
return undefined;
|
13920
13928
|
}
|
13921
13929
|
if (onRenderLocalVideoTile) {
|
@@ -13927,7 +13935,8 @@ const VideoGallery = (props) => {
|
|
13927
13935
|
const initialsName = !localParticipant.displayName ? '' : localParticipant.displayName;
|
13928
13936
|
return (React__default['default'].createElement(react.Stack, { styles: localVideoTileContainerStyles, key: "local-video-tile-key", tabIndex: 0, "aria-label": strings.localVideoMovementLabel, role: 'dialog' },
|
13929
13937
|
React__default['default'].createElement(_LocalVideoTile, { userId: localParticipant.userId, onCreateLocalStreamView: onCreateLocalStreamView, onDisposeLocalStreamView: onDisposeLocalStreamView, isAvailable: (_a = localParticipant === null || localParticipant === void 0 ? void 0 : localParticipant.videoStream) === null || _a === void 0 ? void 0 : _a.isAvailable, isMuted: localParticipant.isMuted, renderElement: (_b = localParticipant === null || localParticipant === void 0 ? void 0 : localParticipant.videoStream) === null || _b === void 0 ? void 0 : _b.renderElement, displayName: isNarrow ? '' : strings.localVideoLabel, initialsName: initialsName, localVideoViewOptions: localVideoViewOptions, onRenderAvatar: onRenderAvatar, showLabel: !((shouldFloatLocalVideo && isNarrow) ||
|
13930
|
-
/*@conditional-compile-remove(click-to-call) */
|
13938
|
+
/*@conditional-compile-remove(click-to-call) */ /* @conditional-compile-remove(rooms) */ localVideoTileSize ===
|
13939
|
+
'9:16'), showMuteIndicator: showMuteIndicator, showCameraSwitcherInLocalPreview: showCameraSwitcherInLocalPreview, localVideoCameraCycleButtonProps: localVideoCameraCycleButtonProps, localVideoCameraSwitcherLabel: strings.localVideoCameraSwitcherLabel, localVideoSelectedDescription: strings.localVideoSelectedDescription, styles: localVideoTileStyles })));
|
13931
13940
|
}, [
|
13932
13941
|
isNarrow,
|
13933
13942
|
localParticipant,
|
@@ -13946,8 +13955,8 @@ const VideoGallery = (props) => {
|
|
13946
13955
|
strings.localVideoSelectedDescription,
|
13947
13956
|
styles === null || styles === void 0 ? void 0 : styles.localVideo,
|
13948
13957
|
theme.effects.roundedCorner4,
|
13949
|
-
|
13950
|
-
|
13958
|
+
/*@conditional-compile-remove(click-to-call) */
|
13959
|
+
localVideoTileSize
|
13951
13960
|
]);
|
13952
13961
|
/* @conditional-compile-remove(pinned-participants) */
|
13953
13962
|
const onPinParticipant = React.useCallback((userId) => {
|
@@ -16615,7 +16624,8 @@ const convertRemoteVideoStreamToVideoGalleryStream = (stream) => {
|
|
16615
16624
|
};
|
16616
16625
|
};
|
16617
16626
|
/** @private */
|
16618
|
-
const memoizeLocalParticipant = memoizeOne__default['default']((identifier, displayName, isMuted, isScreenSharingOn, localVideoStream
|
16627
|
+
const memoizeLocalParticipant = memoizeOne__default['default']((identifier, displayName, isMuted, isScreenSharingOn, localVideoStream,
|
16628
|
+
/* @conditional-compile-remove(rooms) */ role) => {
|
16619
16629
|
var _a, _b;
|
16620
16630
|
return ({
|
16621
16631
|
userId: identifier,
|
@@ -16626,7 +16636,9 @@ const memoizeLocalParticipant = memoizeOne__default['default']((identifier, disp
|
|
16626
16636
|
isAvailable: !!localVideoStream,
|
16627
16637
|
isMirrored: (_a = localVideoStream === null || localVideoStream === void 0 ? void 0 : localVideoStream.view) === null || _a === void 0 ? void 0 : _a.isMirrored,
|
16628
16638
|
renderElement: (_b = localVideoStream === null || localVideoStream === void 0 ? void 0 : localVideoStream.view) === null || _b === void 0 ? void 0 : _b.target
|
16629
|
-
}
|
16639
|
+
},
|
16640
|
+
/* @conditional-compile-remove(rooms) */
|
16641
|
+
role
|
16630
16642
|
});
|
16631
16643
|
});
|
16632
16644
|
|
@@ -16645,10 +16657,14 @@ const videoGallerySelector = reselect.createSelector([
|
|
16645
16657
|
getIdentifier,
|
16646
16658
|
getDominantSpeakers,
|
16647
16659
|
/* @conditional-compile-remove(optimal-video-count) */
|
16648
|
-
getOptimalVideoCount
|
16660
|
+
getOptimalVideoCount,
|
16661
|
+
/* @conditional-compile-remove(rooms) */
|
16662
|
+
getRole
|
16649
16663
|
], (screenShareRemoteParticipantId, remoteParticipants, localVideoStreams, isMuted, isScreenSharingOn, displayName, identifier, dominantSpeakers,
|
16650
16664
|
/* @conditional-compile-remove(optimal-video-count) */
|
16651
|
-
optimalVideoCount
|
16665
|
+
optimalVideoCount,
|
16666
|
+
/* @conditional-compile-remove(rooms) */
|
16667
|
+
role) => {
|
16652
16668
|
const screenShareRemoteParticipant = screenShareRemoteParticipantId && remoteParticipants
|
16653
16669
|
? remoteParticipants[screenShareRemoteParticipantId]
|
16654
16670
|
: undefined;
|
@@ -16660,7 +16676,9 @@ optimalVideoCount) => {
|
|
16660
16676
|
screenShareParticipant: screenShareRemoteParticipant
|
16661
16677
|
? convertRemoteParticipantToVideoGalleryRemoteParticipant(toFlatCommunicationIdentifier(screenShareRemoteParticipant.identifier), screenShareRemoteParticipant.isMuted, checkIsSpeaking(screenShareRemoteParticipant), screenShareRemoteParticipant.videoStreams, screenShareRemoteParticipant.state, screenShareRemoteParticipant.displayName)
|
16662
16678
|
: undefined,
|
16663
|
-
localParticipant: memoizeLocalParticipant(identifier, displayName, isMuted, isScreenSharingOn, localVideoStream
|
16679
|
+
localParticipant: memoizeLocalParticipant(identifier, displayName, isMuted, isScreenSharingOn, localVideoStream,
|
16680
|
+
/* @conditional-compile-remove(rooms) */
|
16681
|
+
role),
|
16664
16682
|
remoteParticipants: _videoGalleryRemoteParticipantsMemo(updateUserDisplayNamesTrampoline$2(remoteParticipants ? Object.values(remoteParticipants) : noRemoteParticipants)),
|
16665
16683
|
dominantSpeakers: dominantSpeakerIds,
|
16666
16684
|
/* @conditional-compile-remove(optimal-video-count) */
|
@@ -16673,7 +16691,7 @@ const updateUserDisplayNamesTrampoline$2 = (remoteParticipants) => {
|
|
16673
16691
|
};
|
16674
16692
|
|
16675
16693
|
// Copyright (c) Microsoft Corporation.
|
16676
|
-
const convertRemoteParticipantToParticipantListParticipant = (userId, displayName, state, isMuted, isScreenSharing, isSpeaking) => {
|
16694
|
+
const convertRemoteParticipantToParticipantListParticipant = (userId, displayName, state, isMuted, isScreenSharing, isSpeaking, localUserCanRemoveOthers) => {
|
16677
16695
|
const identifier = fromFlatCommunicationIdentifier(userId);
|
16678
16696
|
return {
|
16679
16697
|
userId,
|
@@ -16684,23 +16702,25 @@ const convertRemoteParticipantToParticipantListParticipant = (userId, displayNam
|
|
16684
16702
|
isSpeaking,
|
16685
16703
|
// ACS users can not remove Teams users.
|
16686
16704
|
// Removing unknown types of users is undefined.
|
16687
|
-
isRemovable: communicationCommon.getIdentifierKind(identifier).kind === 'communicationUser' ||
|
16705
|
+
isRemovable: (communicationCommon.getIdentifierKind(identifier).kind === 'communicationUser' ||
|
16706
|
+
communicationCommon.getIdentifierKind(identifier).kind === 'phoneNumber') &&
|
16707
|
+
localUserCanRemoveOthers
|
16688
16708
|
};
|
16689
16709
|
};
|
16690
16710
|
/* @conditional-compile-remove(rooms) */
|
16691
16711
|
/**
|
16692
16712
|
* @private
|
16693
16713
|
*/
|
16694
|
-
const memoizedConvertAllremoteParticipantsBeta = memoizeFnAll((userId, displayName, state, isMuted, isScreenSharing, isSpeaking,
|
16695
|
-
return convertRemoteParticipantToParticipantListParticipantBeta(userId, displayName, state, isMuted, isScreenSharing, isSpeaking,
|
16714
|
+
const memoizedConvertAllremoteParticipantsBeta = memoizeFnAll((userId, displayName, state, isMuted, isScreenSharing, isSpeaking, localUserCanRemoveOthers) => {
|
16715
|
+
return convertRemoteParticipantToParticipantListParticipantBeta(userId, displayName, state, isMuted, isScreenSharing, isSpeaking, localUserCanRemoveOthers);
|
16696
16716
|
});
|
16697
16717
|
/* @conditional-compile-remove(rooms) */
|
16698
|
-
const convertRemoteParticipantToParticipantListParticipantBeta = (userId, displayName, state, isMuted, isScreenSharing, isSpeaking,
|
16699
|
-
return Object.assign(
|
16718
|
+
const convertRemoteParticipantToParticipantListParticipantBeta = (userId, displayName, state, isMuted, isScreenSharing, isSpeaking, localUserCanRemoveOthers) => {
|
16719
|
+
return Object.assign({}, convertRemoteParticipantToParticipantListParticipant(userId, displayName, state, isMuted, isScreenSharing, isSpeaking, localUserCanRemoveOthers));
|
16700
16720
|
};
|
16701
16721
|
|
16702
16722
|
// Copyright (c) Microsoft Corporation.
|
16703
|
-
const convertRemoteParticipantsToParticipantListParticipants = (remoteParticipants) => {
|
16723
|
+
const convertRemoteParticipantsToParticipantListParticipants = (remoteParticipants, localUserCanRemoveOthers) => {
|
16704
16724
|
/* eslint-disable @typescript-eslint/explicit-function-return-type */
|
16705
16725
|
const conversionCallback = (memoizeFn) => {
|
16706
16726
|
return (remoteParticipants
|
@@ -16724,8 +16744,7 @@ const convertRemoteParticipantsToParticipantListParticipants = (remoteParticipan
|
|
16724
16744
|
* and mapping their state to be 'Ringing'
|
16725
16745
|
*/
|
16726
16746
|
const state = _isRingingPSTNParticipant(participant);
|
16727
|
-
return memoizeFn(toFlatCommunicationIdentifier(participant.identifier), participant.displayName, state, participant.isMuted, isScreenSharing, participant.isSpeaking,
|
16728
|
-
/* @conditional-compile-remove(rooms) */ participant.role);
|
16747
|
+
return memoizeFn(toFlatCommunicationIdentifier(participant.identifier), participant.displayName, state, participant.isMuted, isScreenSharing, participant.isSpeaking, localUserCanRemoveOthers);
|
16729
16748
|
})
|
16730
16749
|
.sort((a, b) => {
|
16731
16750
|
var _a, _b;
|
@@ -16750,9 +16769,18 @@ const convertRemoteParticipantsToParticipantListParticipants = (remoteParticipan
|
|
16750
16769
|
*
|
16751
16770
|
* @public
|
16752
16771
|
*/
|
16753
|
-
const participantListSelector = reselect.createSelector([
|
16772
|
+
const participantListSelector = reselect.createSelector([
|
16773
|
+
getIdentifier,
|
16774
|
+
getDisplayName$2,
|
16775
|
+
getRemoteParticipants$1,
|
16776
|
+
getIsScreenSharingOn,
|
16777
|
+
getIsMuted,
|
16778
|
+
getRole,
|
16779
|
+
getParticipantCount
|
16780
|
+
], (userId, displayName, remoteParticipants, isScreenSharingOn, isMuted, role, partitipantCount) => {
|
16781
|
+
const localUserCanRemoveOthers = localUserCanRemoveOthersTrampoline(role);
|
16754
16782
|
const participants = remoteParticipants
|
16755
|
-
? convertRemoteParticipantsToParticipantListParticipants(updateUserDisplayNamesTrampoline$1(Object.values(remoteParticipants)))
|
16783
|
+
? convertRemoteParticipantsToParticipantListParticipants(updateUserDisplayNamesTrampoline$1(Object.values(remoteParticipants)), localUserCanRemoveOthers)
|
16756
16784
|
: [];
|
16757
16785
|
participants.push({
|
16758
16786
|
userId: userId,
|
@@ -16776,6 +16804,10 @@ const updateUserDisplayNamesTrampoline$1 = (remoteParticipants) => {
|
|
16776
16804
|
/* @conditional-compile-remove(PSTN-calls) */
|
16777
16805
|
return _updateUserDisplayNames(remoteParticipants);
|
16778
16806
|
};
|
16807
|
+
const localUserCanRemoveOthersTrampoline = (role) => {
|
16808
|
+
/* @conditional-compile-remove(rooms) */
|
16809
|
+
return role === 'Presenter' || role === 'Unknown' || role === undefined;
|
16810
|
+
};
|
16779
16811
|
|
16780
16812
|
// Copyright (c) Microsoft Corporation.
|
16781
16813
|
/**
|
@@ -21773,9 +21805,16 @@ const usePropsFor$1 = (component) => {
|
|
21773
21805
|
* @private
|
21774
21806
|
*/
|
21775
21807
|
const Camera = (props) => {
|
21808
|
+
var _a;
|
21776
21809
|
const cameraButtonProps = usePropsFor$1(CameraButton);
|
21777
21810
|
const styles = React.useMemo(() => { var _a; return concatButtonBaseStyles((_a = props.styles) !== null && _a !== void 0 ? _a : {}); }, [props.styles]);
|
21778
|
-
|
21811
|
+
/* @conditional-compile-remove(rooms) */
|
21812
|
+
const adapter = useAdapter();
|
21813
|
+
/* @conditional-compile-remove(rooms) */
|
21814
|
+
const isRoomsCall = adapter.getState().isRoomsCall;
|
21815
|
+
return (React__default['default'].createElement(CameraButton, Object.assign({ "data-ui-id": "call-composite-camera-button" }, cameraButtonProps, { showLabel: props.displayType !== 'compact', styles: styles, enableDeviceSelectionMenu: props.splitButtonsForDeviceSelection, disabled: cameraButtonProps.disabled ||
|
21816
|
+
props.disabled ||
|
21817
|
+
/* @conditional-compile-remove(rooms) */ (isRoomsCall && ((_a = adapter.getState().call) === null || _a === void 0 ? void 0 : _a.role) === 'Unknown'),
|
21779
21818
|
/* @conditional-compile-remove(video-background-effects) */
|
21780
21819
|
onShowVideoEffectsPicker: props.onShowVideoEffectsPicker })));
|
21781
21820
|
};
|
@@ -21813,17 +21852,20 @@ const onFetchCustomButtonPropsTrampoline$1 = (options) => {
|
|
21813
21852
|
// Copyright (c) Microsoft Corporation.
|
21814
21853
|
/** @private */
|
21815
21854
|
const Devices = (props) => {
|
21855
|
+
var _a, _b;
|
21816
21856
|
const devicesButtonProps = usePropsFor$1(DevicesButton);
|
21817
21857
|
/* @conditional-compile-remove(rooms) */
|
21818
|
-
const
|
21858
|
+
const adapter = useAdapter();
|
21859
|
+
/* @conditional-compile-remove(rooms) */
|
21860
|
+
const role = (_b = (_a = adapter.getState().call) === null || _a === void 0 ? void 0 : _a.role) !== null && _b !== void 0 ? _b : 'Unknown';
|
21819
21861
|
const augmentedDeviceButtonProps = React.useMemo(() => (Object.assign(Object.assign({}, devicesButtonProps), {
|
21820
21862
|
/* @conditional-compile-remove(rooms) */
|
21821
|
-
microphones:
|
21863
|
+
microphones: role === 'Consumer' ? [] : devicesButtonProps.microphones,
|
21822
21864
|
/* @conditional-compile-remove(rooms) */
|
21823
|
-
cameras:
|
21865
|
+
cameras: role === 'Consumer' ? [] : devicesButtonProps.cameras })), [
|
21824
21866
|
devicesButtonProps,
|
21825
21867
|
/* @conditional-compile-remove(rooms) */
|
21826
|
-
|
21868
|
+
role
|
21827
21869
|
]);
|
21828
21870
|
const styles = React.useMemo(() => {
|
21829
21871
|
var _a;
|
@@ -21832,7 +21874,7 @@ const Devices = (props) => {
|
|
21832
21874
|
/* @conditional-compile-remove(rooms) */
|
21833
21875
|
const locale = useLocale();
|
21834
21876
|
/* @conditional-compile-remove(rooms) */
|
21835
|
-
const onlyManageSpeakers =
|
21877
|
+
const onlyManageSpeakers = role === 'Consumer';
|
21836
21878
|
/* @conditional-compile-remove(rooms) */
|
21837
21879
|
const onRenderDevicesIcon = () => {
|
21838
21880
|
return React__default['default'].createElement(_HighContrastAwareIcon, { disabled: props.disabled, iconName: "OptionsSpeaker" });
|
@@ -21843,13 +21885,13 @@ const Devices = (props) => {
|
|
21843
21885
|
/* By setting `persistMenu?` to true, we prevent options menu from getting hidden every time a participant joins or leaves. */
|
21844
21886
|
persistMenu: true }, augmentedDeviceButtonProps, { showLabel: props.displayType !== 'compact', styles: styles, "data-ui-id": "calling-composite-devices-button", disabled: props.disabled,
|
21845
21887
|
/* @conditional-compile-remove(rooms) */
|
21846
|
-
strings:
|
21888
|
+
strings: getLabelFromRole(role, locale),
|
21847
21889
|
/* @conditional-compile-remove(rooms) */
|
21848
21890
|
onRenderIcon: onlyManageSpeakers ? onRenderDevicesIcon : undefined })));
|
21849
21891
|
};
|
21850
21892
|
/* @conditional-compile-remove(rooms) */
|
21851
|
-
const
|
21852
|
-
if (
|
21893
|
+
const getLabelFromRole = (role, locale) => {
|
21894
|
+
if (role === 'Consumer') {
|
21853
21895
|
return { label: locale.component.strings.microphoneButton.speakerMenuTitle };
|
21854
21896
|
}
|
21855
21897
|
return undefined;
|
@@ -21901,11 +21943,6 @@ const getIsScreenShareOn = (state) => { var _a, _b; return (_b = (_a = state.cal
|
|
21901
21943
|
* @private
|
21902
21944
|
*/
|
21903
21945
|
const getIsPreviewCameraOn = (state) => _isPreviewOn(state.devices);
|
21904
|
-
/* @conditional-compile-remove(rooms) */
|
21905
|
-
/**
|
21906
|
-
* @private
|
21907
|
-
*/
|
21908
|
-
const getRole = (state) => { var _a; return (_a = state.call) === null || _a === void 0 ? void 0 : _a.role; };
|
21909
21946
|
/**
|
21910
21947
|
* @private
|
21911
21948
|
*/
|
@@ -21959,10 +21996,15 @@ const getIsTeamsCall = (state) => state.isTeamsCall;
|
|
21959
21996
|
* @private
|
21960
21997
|
*/
|
21961
21998
|
const Microphone = (props) => {
|
21999
|
+
var _a;
|
21962
22000
|
const microphoneButtonProps = usePropsFor$1(MicrophoneButton);
|
21963
22001
|
const callStatus = useSelector$1(getCallStatus);
|
21964
22002
|
const isLocalMicrophoneEnabled = useSelector$1(getLocalMicrophoneEnabled);
|
21965
22003
|
const strings = useLocale().strings.call;
|
22004
|
+
/* @conditional-compile-remove(rooms) */
|
22005
|
+
const adapter = useAdapter();
|
22006
|
+
/* @conditional-compile-remove(rooms) */
|
22007
|
+
const isRoomsCall = adapter.getState().isRoomsCall;
|
21966
22008
|
/**
|
21967
22009
|
* When call is in Lobby, microphone button should be disabled.
|
21968
22010
|
* This is due to to headless limitation where a call can not be muted/unmuted in lobby.
|
@@ -21983,7 +22025,9 @@ const Microphone = (props) => {
|
|
21983
22025
|
: {};
|
21984
22026
|
const styles = React.useMemo(() => { var _a; return concatButtonBaseStyles((_a = props.styles) !== null && _a !== void 0 ? _a : {}); }, [props.styles]);
|
21985
22027
|
// tab focus on MicrophoneButton on page load
|
21986
|
-
return (React__default['default'].createElement(MicrophoneButton, Object.assign({ "data-ui-id": "call-composite-microphone-button" }, microphoneButtonProps, { showLabel: props.displayType !== 'compact', styles: styles }, microphoneButtonStrings, { enableDeviceSelectionMenu: props.splitButtonsForDeviceSelection, disabled: microphoneButtonProps.disabled ||
|
22028
|
+
return (React__default['default'].createElement(MicrophoneButton, Object.assign({ "data-ui-id": "call-composite-microphone-button" }, microphoneButtonProps, { showLabel: props.displayType !== 'compact', styles: styles }, microphoneButtonStrings, { enableDeviceSelectionMenu: props.splitButtonsForDeviceSelection, disabled: microphoneButtonProps.disabled ||
|
22029
|
+
props.disabled ||
|
22030
|
+
/* @conditional-compile-remove(rooms) */ (isRoomsCall && ((_a = adapter.getState().call) === null || _a === void 0 ? void 0 : _a.role) === 'Unknown') })));
|
21987
22031
|
};
|
21988
22032
|
|
21989
22033
|
// Copyright (c) Microsoft Corporation.
|
@@ -22006,13 +22050,20 @@ const isDisabled$1 = (option) => {
|
|
22006
22050
|
// Copyright (c) Microsoft Corporation.
|
22007
22051
|
/** @private */
|
22008
22052
|
const ScreenShare = (props) => {
|
22053
|
+
var _a;
|
22009
22054
|
const screenShareButtonProps = usePropsFor$1(ScreenShareButton);
|
22010
22055
|
const styles = React.useMemo(() => { var _a; return concatButtonBaseStyles((_a = props.styles) !== null && _a !== void 0 ? _a : {}); }, [props.styles]);
|
22056
|
+
/* @conditional-compile-remove(rooms) */
|
22057
|
+
const adapter = useAdapter();
|
22058
|
+
/* @conditional-compile-remove(rooms) */
|
22059
|
+
const isRoomsCall = adapter.getState().isRoomsCall;
|
22011
22060
|
const screenShareButtonDisabled = () => {
|
22012
22061
|
/* @conditional-compile-remove(PSTN-calls) */
|
22013
22062
|
return (screenShareButtonProps === null || screenShareButtonProps === void 0 ? void 0 : screenShareButtonProps.disabled) ? screenShareButtonProps.disabled : isDisabled(props.option);
|
22014
22063
|
};
|
22015
|
-
return (React__default['default'].createElement(ScreenShareButton, Object.assign({ "data-ui-id": "call-composite-screenshare-button" }, screenShareButtonProps, { showLabel: props.displayType !== 'compact', disabled: screenShareButtonDisabled() ||
|
22064
|
+
return (React__default['default'].createElement(ScreenShareButton, Object.assign({ "data-ui-id": "call-composite-screenshare-button" }, screenShareButtonProps, { showLabel: props.displayType !== 'compact', disabled: screenShareButtonDisabled() ||
|
22065
|
+
props.disabled ||
|
22066
|
+
/* @conditional-compile-remove(rooms) */ (isRoomsCall && ((_a = adapter.getState().call) === null || _a === void 0 ? void 0 : _a.role) === 'Unknown'), styles: styles })));
|
22016
22067
|
};
|
22017
22068
|
const isDisabled = (option) => {
|
22018
22069
|
if (option === undefined || option === true || option === false) {
|
@@ -22257,6 +22308,8 @@ const controlBarStyles = react.memoizeFunction((background) => ({ root: { backgr
|
|
22257
22308
|
*/
|
22258
22309
|
const CallControls = (props) => {
|
22259
22310
|
const options = React.useMemo(() => (typeof props.options === 'boolean' ? {} : props.options), [props.options]);
|
22311
|
+
/* @conditional-compile-remove(new-call-control-bar) */
|
22312
|
+
const adapter = useAdapter();
|
22260
22313
|
/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
|
22261
22314
|
const localeStrings = useLocale();
|
22262
22315
|
/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
|
@@ -22301,7 +22354,7 @@ const CallControls = (props) => {
|
|
22301
22354
|
});
|
22302
22355
|
}
|
22303
22356
|
/* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */
|
22304
|
-
if (!isRoomsCallTrampoline()) {
|
22357
|
+
if (!isRoomsCallTrampoline(adapter)) {
|
22305
22358
|
items.push({
|
22306
22359
|
key: 'holdButtonKey',
|
22307
22360
|
text: localeStrings.component.strings.holdButton.tooltipOffContent,
|
@@ -22345,17 +22398,9 @@ const CallControls = (props) => {
|
|
22345
22398
|
const onDismissDialpad = () => {
|
22346
22399
|
setShowDialpad(false);
|
22347
22400
|
};
|
22348
|
-
|
22349
|
-
const
|
22350
|
-
|
22351
|
-
/* @conditional-compile-remove(rooms) */
|
22352
|
-
screenShareButtonIsEnabled = rolePermissions.screenShare && screenShareButtonIsEnabled;
|
22353
|
-
let microphoneButtonIsEnabled = isEnabled$2(options === null || options === void 0 ? void 0 : options.microphoneButton);
|
22354
|
-
/* @conditional-compile-remove(rooms) */
|
22355
|
-
microphoneButtonIsEnabled = rolePermissions.microphoneButton && microphoneButtonIsEnabled;
|
22356
|
-
let cameraButtonIsEnabled = isEnabled$2(options === null || options === void 0 ? void 0 : options.cameraButton);
|
22357
|
-
/* @conditional-compile-remove(rooms) */
|
22358
|
-
cameraButtonIsEnabled = rolePermissions.cameraButton && cameraButtonIsEnabled;
|
22401
|
+
const screenShareButtonIsEnabled = isEnabled$2(options === null || options === void 0 ? void 0 : options.screenShareButton);
|
22402
|
+
const microphoneButtonIsEnabled = isEnabled$2(options === null || options === void 0 ? void 0 : options.microphoneButton);
|
22403
|
+
const cameraButtonIsEnabled = isEnabled$2(options === null || options === void 0 ? void 0 : options.cameraButton);
|
22359
22404
|
return (React__default['default'].createElement(react.Stack, { horizontalAlign: "center", className: callControlsContainerStyles },
|
22360
22405
|
/* @conditional-compile-remove(PSTN-calls) */
|
22361
22406
|
React__default['default'].createElement(SendDtmfDialpad, { isMobile: !!props.isMobile, strings: dialpadStrings, showDialpad: showDialpad, onDismissDialpad: onDismissDialpad }),
|
@@ -22377,11 +22422,9 @@ const CallControls = (props) => {
|
|
22377
22422
|
};
|
22378
22423
|
const isEnabled$2 = (option) => option !== false;
|
22379
22424
|
/** @private */
|
22380
|
-
const isRoomsCallTrampoline = () => {
|
22381
|
-
/* @conditional-compile-remove(rooms) */
|
22382
|
-
const rolePermissions = _usePermissions();
|
22425
|
+
const isRoomsCallTrampoline = (adapter) => {
|
22383
22426
|
/* @conditional-compile-remove(rooms) */
|
22384
|
-
return
|
22427
|
+
return adapter.getState().isRoomsCall;
|
22385
22428
|
};
|
22386
22429
|
|
22387
22430
|
// Copyright (c) Microsoft Corporation.
|
@@ -22799,18 +22842,10 @@ const CommonCallControlBar = (props) => {
|
|
22799
22842
|
if (options === false) {
|
22800
22843
|
return React__default['default'].createElement(React__default['default'].Fragment, null);
|
22801
22844
|
}
|
22802
|
-
/* @conditional-compile-remove(rooms) */
|
22803
|
-
const rolePermissions = _usePermissions();
|
22804
22845
|
const sideButtonsPresent = isEnabled$1(options.peopleButton) || isEnabled$1(options.chatButton) || customButtons['secondary'] !== undefined;
|
22805
|
-
|
22806
|
-
|
22807
|
-
|
22808
|
-
let microphoneButtonIsEnabled = isEnabled$1(options === null || options === void 0 ? void 0 : options.microphoneButton);
|
22809
|
-
/* @conditional-compile-remove(rooms) */
|
22810
|
-
microphoneButtonIsEnabled = rolePermissions.microphoneButton && microphoneButtonIsEnabled;
|
22811
|
-
let cameraButtonIsEnabled = isEnabled$1(options === null || options === void 0 ? void 0 : options.cameraButton);
|
22812
|
-
/* @conditional-compile-remove(rooms) */
|
22813
|
-
cameraButtonIsEnabled = rolePermissions.cameraButton && cameraButtonIsEnabled;
|
22846
|
+
const screenShareButtonIsEnabled = isEnabled$1(options === null || options === void 0 ? void 0 : options.screenShareButton);
|
22847
|
+
const microphoneButtonIsEnabled = isEnabled$1(options === null || options === void 0 ? void 0 : options.microphoneButton);
|
22848
|
+
const cameraButtonIsEnabled = isEnabled$1(options === null || options === void 0 ? void 0 : options.cameraButton);
|
22814
22849
|
return (React__default['default'].createElement("div", { ref: controlBarSizeRef },
|
22815
22850
|
React__default['default'].createElement(CallAdapterProvider, { adapter: props.callAdapter },
|
22816
22851
|
/* @conditional-compile-remove(close-captions) */ showCaptionsSettingsModal && (React__default['default'].createElement(CaptionsSettingsModal, { showCaptionsSettingsModal: showCaptionsSettingsModal, onDismissCaptionsSettings: onDismissCaptionsSettings }))),
|
@@ -23953,7 +23988,7 @@ const PeoplePaneContent = (props) => {
|
|
23953
23988
|
/* @conditional-compile-remove(PSTN-calls) */
|
23954
23989
|
const alternateCallerId = adapter.getState().alternateCallerId;
|
23955
23990
|
const participantListDefaultProps = usePropsFor$1(ParticipantList);
|
23956
|
-
const removeButtonAllowed = hasRemoveParticipantsPermissionTrampoline();
|
23991
|
+
const removeButtonAllowed = hasRemoveParticipantsPermissionTrampoline(adapter);
|
23957
23992
|
const setDrawerMenuItemsForParticipant = React.useMemo(() => {
|
23958
23993
|
return (participant) => {
|
23959
23994
|
if (participant) {
|
@@ -24026,9 +24061,10 @@ const createDefaultContextualMenuItems = (participant, strings, onRemoveParticip
|
|
24026
24061
|
/**
|
24027
24062
|
* @private
|
24028
24063
|
*/
|
24029
|
-
const hasRemoveParticipantsPermissionTrampoline = () => {
|
24064
|
+
const hasRemoveParticipantsPermissionTrampoline = (adapter) => {
|
24065
|
+
var _a;
|
24030
24066
|
/* @conditional-compile-remove(rooms) */
|
24031
|
-
return
|
24067
|
+
return ((_a = adapter.getState().call) === null || _a === void 0 ? void 0 : _a.role) === 'Presenter';
|
24032
24068
|
};
|
24033
24069
|
|
24034
24070
|
// Copyright (c) Microsoft Corporation.
|
@@ -24526,29 +24562,27 @@ const DRAG_OPTIONS = {
|
|
24526
24562
|
* @private
|
24527
24563
|
*/
|
24528
24564
|
const ModalLocalAndRemotePIP = (props) => {
|
24529
|
-
var _a;
|
24565
|
+
var _a, _b;
|
24530
24566
|
const rootStyles = props.hidden ? hiddenStyle : PIPContainerStyle;
|
24531
24567
|
/* @conditional-compile-remove(rooms) */
|
24532
|
-
const
|
24568
|
+
const adapter = useAdapter();
|
24569
|
+
/* @conditional-compile-remove(rooms) */
|
24570
|
+
const role = (_a = adapter.getState().call) === null || _a === void 0 ? void 0 : _a.role;
|
24533
24571
|
const pictureInPictureProps = useSelector$1(localAndRemotePIPSelector);
|
24534
24572
|
const pictureInPictureHandlers = useHandlers();
|
24535
24573
|
const localAndRemotePIP = React.useMemo(() => {
|
24536
24574
|
var _a;
|
24537
24575
|
/* @conditional-compile-remove(rooms) */
|
24538
|
-
if (
|
24576
|
+
if (role === 'Consumer' && ((_a = pictureInPictureProps.dominantRemoteParticipant) === null || _a === void 0 ? void 0 : _a.userId)) {
|
24539
24577
|
return (React__default['default'].createElement(_RemoteVideoTile, Object.assign({}, pictureInPictureProps.dominantRemoteParticipant, { remoteParticipant: pictureInPictureProps.dominantRemoteParticipant })));
|
24540
24578
|
}
|
24541
24579
|
return React__default['default'].createElement(LocalAndRemotePIP, Object.assign({}, pictureInPictureProps, pictureInPictureHandlers));
|
24542
|
-
}, [
|
24543
|
-
pictureInPictureProps,
|
24544
|
-
pictureInPictureHandlers,
|
24545
|
-
/* @conditional-compile-remove(rooms) */ rolePermissions.cameraButton
|
24546
|
-
]);
|
24580
|
+
}, [pictureInPictureProps, pictureInPictureHandlers, /* @conditional-compile-remove(rooms) */ role]);
|
24547
24581
|
/* @conditional-compile-remove(rooms) */
|
24548
|
-
if (
|
24582
|
+
if (role === 'Consumer' && !pictureInPictureProps.dominantRemoteParticipant) {
|
24549
24583
|
return null;
|
24550
24584
|
}
|
24551
|
-
const modalStylesThemed = react.concatStyleSets(modalStyle, (
|
24585
|
+
const modalStylesThemed = react.concatStyleSets(modalStyle, (_b = props.styles) === null || _b === void 0 ? void 0 : _b.modal);
|
24552
24586
|
return (React__default['default'].createElement(react.Stack, { styles: rootStyles },
|
24553
24587
|
React__default['default'].createElement(_ModalClone, { isOpen: true, isModeless: true, dragOptions: DRAG_OPTIONS, styles: modalStylesThemed, layerProps: { hostId: props.modalLayerHostId }, minDragPosition: props.minDragPosition, maxDragPosition: props.maxDragPosition },
|
24554
24588
|
// Only render LocalAndRemotePIP when this component is NOT hidden because VideoGallery needs to have
|
@@ -24589,7 +24623,7 @@ const useMinMaxDragPosition = (modalLayerHostId, rtl) => {
|
|
24589
24623
|
* @private
|
24590
24624
|
*/
|
24591
24625
|
const CallArrangement = (props) => {
|
24592
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
24626
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
24593
24627
|
const containerClassName = React.useMemo(() => {
|
24594
24628
|
return props.mobileView ? containerStyleMobile : containerStyleDesktop;
|
24595
24629
|
}, [props.mobileView]);
|
@@ -24685,16 +24719,16 @@ const CallArrangement = (props) => {
|
|
24685
24719
|
};
|
24686
24720
|
const drawerContainerStylesValue = React.useMemo(() => drawerContainerStyles(DRAWER_Z_INDEX), []);
|
24687
24721
|
/* @conditional-compile-remove(rooms) */
|
24688
|
-
const
|
24722
|
+
const role = (_b = adapter.getState().call) === null || _b === void 0 ? void 0 : _b.role;
|
24689
24723
|
let canUnmute = true;
|
24690
24724
|
/* @conditional-compile-remove(rooms) */
|
24691
|
-
canUnmute =
|
24725
|
+
canUnmute = role !== 'Consumer' ? true : false;
|
24692
24726
|
let filteredLatestErrors = props.errorBarProps !== false ? props.latestErrors : [];
|
24693
24727
|
/* @conditional-compile-remove(video-background-effects) */
|
24694
24728
|
const isCameraOn = useSelector$1(localVideoSelector).isAvailable;
|
24695
24729
|
/* @conditional-compile-remove(rooms) */
|
24696
24730
|
// TODO: move this logic to the error bar selector once role is plumbed from the headless SDK
|
24697
|
-
if (
|
24731
|
+
if (role === 'Consumer' && props.errorBarProps) {
|
24698
24732
|
filteredLatestErrors = filteredLatestErrors.filter((e) => e.type !== 'callCameraAccessDenied' && e.type !== 'callCameraAccessDeniedSafari');
|
24699
24733
|
}
|
24700
24734
|
/* @conditional-compile-remove(video-background-effects) */
|
@@ -24713,10 +24747,10 @@ const CallArrangement = (props) => {
|
|
24713
24747
|
return (React__default['default'].createElement("div", { ref: containerRef, className: react.mergeStyles(containerDivStyles), id: props.id },
|
24714
24748
|
React__default['default'].createElement(react.Stack, { verticalFill: true, horizontalAlign: "stretch", className: containerClassName, "data-ui-id": props.dataUiId },
|
24715
24749
|
React__default['default'].createElement(react.Stack, { reversed: true, horizontal: verticalControlBar, grow: true, styles: callArrangementContainerStyles(verticalControlBar) },
|
24716
|
-
((
|
24750
|
+
((_c = props.callControlProps) === null || _c === void 0 ? void 0 : _c.options) !== false && !isMobileWithActivePane && (React__default['default'].createElement(react.Stack, { verticalAlign: 'center', className: react.mergeStyles({
|
24717
24751
|
zIndex: CONTROL_BAR_Z_INDEX,
|
24718
24752
|
padding: verticalControlBar ? '0.25rem' : 'unset'
|
24719
|
-
}) }, isLegacyCallControlEnabled((
|
24753
|
+
}) }, isLegacyCallControlEnabled((_d = props.callControlProps) === null || _d === void 0 ? void 0 : _d.options) ? (React__default['default'].createElement(CallControls, Object.assign({}, props.callControlProps, { containerWidth: containerWidth, containerHeight: containerHeight, isMobile: props.mobileView,
|
24720
24754
|
/* @conditional-compile-remove(one-to-n-calling) */
|
24721
24755
|
peopleButtonChecked: isPeoplePaneOpen,
|
24722
24756
|
/* @conditional-compile-remove(one-to-n-calling) */
|
@@ -24729,7 +24763,7 @@ const CallArrangement = (props) => {
|
|
24729
24763
|
onShowVideoEffectsPicker: openVideoEffectsPane,
|
24730
24764
|
/* @conditional-compile-remove(PSTN-calls) */
|
24731
24765
|
onClickShowDialpad: alternateCallerId ? onClickShowDialpad : undefined, displayVertical: verticalControlBar }))))),
|
24732
|
-
((
|
24766
|
+
((_e = props.callControlProps) === null || _e === void 0 ? void 0 : _e.options) !== false && showDrawer && (React__default['default'].createElement(react.Stack, { styles: drawerContainerStylesValue },
|
24733
24767
|
React__default['default'].createElement(PreparedMoreDrawer, { callControls: props.callControlProps.options, onLightDismiss: closeDrawer, onPeopleButtonClicked: onMoreDrawerPeopleClicked,
|
24734
24768
|
/* @conditional-compile-remove(PSTN-calls) */
|
24735
24769
|
onClickShowDialpad: alternateCallerId ? onClickShowDialpad : undefined,
|
@@ -24738,7 +24772,7 @@ const CallArrangement = (props) => {
|
|
24738
24772
|
/* @conditional-compile-remove(close-captions) */
|
24739
24773
|
isCaptionsSupported: isTeamsCall && hasJoinedCall }))),
|
24740
24774
|
/* @conditional-compile-remove(PSTN-calls) */
|
24741
|
-
((
|
24775
|
+
((_f = props.callControlProps) === null || _f === void 0 ? void 0 : _f.options) !== false && showDtmfDialpad && (React__default['default'].createElement(react.Stack, { styles: drawerContainerStylesValue },
|
24742
24776
|
React__default['default'].createElement(SendDtmfDialpad, { isMobile: props.mobileView, strings: dialpadStrings, showDialpad: showDtmfDialpad, onDismissDialpad: onDismissDtmfDialpad }))),
|
24743
24777
|
React__default['default'].createElement(react.Stack, { horizontal: true, grow: true },
|
24744
24778
|
React__default['default'].createElement(react.Stack.Item, { style: callCompositeContainerCSS },
|
@@ -24758,7 +24792,7 @@ const CallArrangement = (props) => {
|
|
24758
24792
|
maxWidth: isVideoPaneOpen ? `${VIDEO_EFFECTS_SIDE_PANE_WIDTH_REM}rem` : undefined, updateSidePaneRenderer: props.updateSidePaneRenderer, onPeopleButtonClicked: props.mobileView && !shouldShowPeopleTabHeaderButton(props.callControlProps.options)
|
24759
24793
|
? undefined
|
24760
24794
|
: togglePeoplePane, disablePeopleButton: typeof props.callControlProps.options !== 'boolean' &&
|
24761
|
-
isDisabled$2((
|
24795
|
+
isDisabled$2((_g = props.callControlProps.options) === null || _g === void 0 ? void 0 : _g.participantsButton), onChatButtonClicked: (_h = props.mobileChatTabHeader) === null || _h === void 0 ? void 0 : _h.onClick, disableChatButton: (_j = props.mobileChatTabHeader) === null || _j === void 0 ? void 0 : _j.disabled }),
|
24762
24796
|
props.mobileView && (React__default['default'].createElement(ModalLocalAndRemotePIP, { modalLayerHostId: props.modalLayerHostId, hidden: !isSidePaneOpen, styles: pipStyles, minDragPosition: minMaxDragPosition.minDragPosition, maxDragPosition: minMaxDragPosition.maxDragPosition })),
|
24763
24797
|
drawerMenuItems.length > 0 && (React__default['default'].createElement(react.Stack, { styles: drawerContainerStyles() },
|
24764
24798
|
React__default['default'].createElement(_DrawerMenu, { onLightDismiss: () => setDrawerMenuItems([]), items: drawerMenuItems }))))))));
|
@@ -24941,21 +24975,27 @@ const remoteVideoViewOptions = {
|
|
24941
24975
|
* @private
|
24942
24976
|
*/
|
24943
24977
|
const MediaGallery = (props) => {
|
24944
|
-
var _a, _b;
|
24978
|
+
var _a, _b, _c;
|
24945
24979
|
const videoGalleryProps = usePropsFor$1(VideoGallery);
|
24946
24980
|
const cameraSwitcherCameras = useSelector$1(localVideoCameraCycleButtonSelector);
|
24947
24981
|
const cameraSwitcherCallback = useHandlers();
|
24948
24982
|
const announcerString = useParticipantChangedAnnouncement();
|
24949
|
-
/* @conditional-compile-remove(
|
24983
|
+
/* @conditional-compile-remove(rooms) */
|
24984
|
+
const adapter = useAdapter();
|
24985
|
+
/* @conditional-compile-remove(rooms) */
|
24986
|
+
const userRole = (_a = adapter.getState().call) === null || _a === void 0 ? void 0 : _a.role;
|
24987
|
+
/* @conditional-compile-remove(rooms) */
|
24988
|
+
const isRoomsCall = adapter.getState().isRoomsCall;
|
24989
|
+
/* @conditional-compile-remove(vertical-gallery) */ /* @conditional-compile-remove(rooms) */
|
24950
24990
|
const containerRef = React.useRef(null);
|
24951
|
-
/* @conditional-compile-remove(vertical-gallery) */
|
24991
|
+
/* @conditional-compile-remove(vertical-gallery) */ /* @conditional-compile-remove(rooms) */
|
24952
24992
|
const containerWidth = _useContainerWidth(containerRef);
|
24953
|
-
/* @conditional-compile-remove(vertical-gallery) */
|
24993
|
+
/* @conditional-compile-remove(vertical-gallery) */ /* @conditional-compile-remove(rooms) */
|
24954
24994
|
const containerHeight = _useContainerHeight(containerRef);
|
24955
|
-
/* @conditional-compile-remove(click-to-call) */
|
24995
|
+
/* @conditional-compile-remove(click-to-call) */ /* @conditional-compile-remove(rooms) */
|
24956
24996
|
const containerAspectRatio = containerWidth && containerHeight ? containerWidth / containerHeight : 0;
|
24957
24997
|
const layoutBasedOnTilePosition = localVideoTileLayoutTrampoline(
|
24958
|
-
/* @conditional-compile-remove(click-to-call) */ (
|
24998
|
+
/* @conditional-compile-remove(click-to-call) */ (_b = props.localVideoTileOptions) === null || _b === void 0 ? void 0 : _b.position);
|
24959
24999
|
const cameraSwitcherProps = React.useMemo(() => {
|
24960
25000
|
return Object.assign(Object.assign({}, cameraSwitcherCallback), cameraSwitcherCameras);
|
24961
25001
|
}, [cameraSwitcherCallback, cameraSwitcherCameras]);
|
@@ -24972,7 +25012,7 @@ const MediaGallery = (props) => {
|
|
24972
25012
|
: props.isMobile
|
24973
25013
|
? { kind: 'drawer', hostId: props.drawerMenuHostId }
|
24974
25014
|
: { kind: 'contextual' };
|
24975
|
-
}, [(
|
25015
|
+
}, [(_c = props.remoteVideoTileMenuOptions) === null || _c === void 0 ? void 0 : _c.isHidden, props.isMobile, props.drawerMenuHostId]);
|
24976
25016
|
/* @conditional-compile-remove(vertical-gallery) */
|
24977
25017
|
const overflowGalleryPosition = React.useMemo(() => containerWidth && containerHeight && containerWidth / containerHeight >= 16 / 9
|
24978
25018
|
? 'VerticalRight'
|
@@ -24984,24 +25024,30 @@ const MediaGallery = (props) => {
|
|
24984
25024
|
remoteVideoTileMenuOptions: remoteVideoTileMenuOptions,
|
24985
25025
|
/* @conditional-compile-remove(vertical-gallery) */
|
24986
25026
|
overflowGalleryPosition: overflowGalleryPosition,
|
24987
|
-
/* @conditional-compile-remove(
|
24988
|
-
localVideoTileSize: props.localVideoTileOptions === false
|
25027
|
+
/* @conditional-compile-remove(rooms) */
|
25028
|
+
localVideoTileSize: props.localVideoTileOptions === false || userRole === 'Consumer' || (isRoomsCall && userRole === 'Unknown')
|
24989
25029
|
? 'hidden'
|
24990
25030
|
: props.isMobile && containerAspectRatio < 1
|
24991
25031
|
? '9:16'
|
24992
25032
|
: '16:9' })));
|
24993
25033
|
}, [
|
24994
25034
|
videoGalleryProps,
|
25035
|
+
layoutBasedOnTilePosition,
|
24995
25036
|
props.isMobile,
|
24996
25037
|
props.onRenderAvatar,
|
24997
|
-
|
25038
|
+
/* @conditional-compile-remove(rooms) */ /* @conditional-compile-remove(click-to-call) */
|
25039
|
+
props.localVideoTileOptions,
|
24998
25040
|
cameraSwitcherProps,
|
24999
|
-
|
25000
|
-
/* @conditional-compile-remove(
|
25001
|
-
|
25002
|
-
|
25003
|
-
|
25004
|
-
|
25041
|
+
onRenderAvatar,
|
25042
|
+
/* @conditional-compile-remove(pinned-participants) */
|
25043
|
+
remoteVideoTileMenuOptions,
|
25044
|
+
/* @conditional-compile-remove(vertical-gallery) */
|
25045
|
+
overflowGalleryPosition,
|
25046
|
+
/* @conditional-compile-remove(rooms) */
|
25047
|
+
isRoomsCall,
|
25048
|
+
/* @conditional-compile-remove(rooms) */
|
25049
|
+
userRole,
|
25050
|
+
/* @conditional-compile-remove(click-to-call) */ /* @conditional-compile-remove(rooms) */ containerAspectRatio
|
25005
25051
|
]);
|
25006
25052
|
return (React__default['default'].createElement("div", { ref: containerRef, style: mediaGalleryContainerStyles },
|
25007
25053
|
React__default['default'].createElement(Announcer$1, { announcementString: announcerString, ariaLive: 'polite' }),
|
@@ -25552,10 +25598,10 @@ const localVideoViewOptions = {
|
|
25552
25598
|
* @private
|
25553
25599
|
*/
|
25554
25600
|
const LocalDeviceSettings = (props) => {
|
25555
|
-
var _a;
|
25601
|
+
var _a, _b;
|
25556
25602
|
const theme = useTheme();
|
25557
25603
|
const locale = useLocale();
|
25558
|
-
/* @conditional-compile-remove(call-readiness) */
|
25604
|
+
/* @conditional-compile-remove(call-readiness) */ /* @conditional-compile-remove(rooms) */
|
25559
25605
|
const adapter = useAdapter();
|
25560
25606
|
const defaultPlaceHolder = locale.strings.call.defaultPlaceHolder;
|
25561
25607
|
const cameraLabel = locale.strings.call.cameraLabel;
|
@@ -25563,16 +25609,16 @@ const LocalDeviceSettings = (props) => {
|
|
25563
25609
|
const noSpeakersLabel = locale.strings.call.noSpeakersLabel;
|
25564
25610
|
const noCameraLabel = locale.strings.call.noCamerasLabel;
|
25565
25611
|
const noMicLabel = locale.strings.call.noMicrophonesLabel;
|
25612
|
+
/* @conditional-compile-remove(rooms) */
|
25613
|
+
const role = (_a = adapter.getState().call) === null || _a === void 0 ? void 0 : _a.role;
|
25566
25614
|
const cameraPermissionGranted = props.cameraPermissionGranted;
|
25567
25615
|
const micPermissionGranted = props.microphonePermissionGranted;
|
25568
25616
|
let roleCanUseCamera = true;
|
25569
25617
|
let roleCanUseMic = true;
|
25570
25618
|
/* @conditional-compile-remove(rooms) */
|
25571
|
-
|
25572
|
-
/* @conditional-compile-remove(rooms) */
|
25573
|
-
roleCanUseCamera = rolePermissions.cameraButton;
|
25619
|
+
roleCanUseCamera = role === 'Consumer' ? false : true;
|
25574
25620
|
/* @conditional-compile-remove(rooms) */
|
25575
|
-
roleCanUseMic =
|
25621
|
+
roleCanUseMic = role === 'Consumer' ? false : true;
|
25576
25622
|
// TODO: speaker permission is tied to microphone permission (when you request 'audio' permission using the SDK) its
|
25577
25623
|
// actually granting access to query both microphone and speaker. However the browser popup asks you explicity for
|
25578
25624
|
// 'microphone'. This needs investigation on how we want to handle this and maybe needs follow up with SDK team.
|
@@ -25597,7 +25643,7 @@ const LocalDeviceSettings = (props) => {
|
|
25597
25643
|
? props.selectedCamera
|
25598
25644
|
? props.selectedCamera.id
|
25599
25645
|
: props.cameras
|
25600
|
-
? (
|
25646
|
+
? (_b = props.cameras[0]) === null || _b === void 0 ? void 0 : _b.id
|
25601
25647
|
: ''
|
25602
25648
|
: 'deniedOrUnknown', onChange: (event, option, index) => {
|
25603
25649
|
props.onSelectCamera(props.cameras[index !== null && index !== void 0 ? index : 0], localVideoViewOptions);
|
@@ -26057,7 +26103,7 @@ var __awaiter$7 = (window && window.__awaiter) || function (thisArg, _arguments,
|
|
26057
26103
|
* @private
|
26058
26104
|
*/
|
26059
26105
|
const ConfigurationPage = (props) => {
|
26060
|
-
var _a, _b;
|
26106
|
+
var _a, _b, _c;
|
26061
26107
|
const { startCallHandler, mobileView, modalLayerHostId,
|
26062
26108
|
/* @conditional-compile-remove(call-readiness) */ deviceChecks,
|
26063
26109
|
/* @conditional-compile-remove(call-readiness) */ onPermissionsTroubleshootingClick,
|
@@ -26079,13 +26125,13 @@ const ConfigurationPage = (props) => {
|
|
26079
26125
|
const environmentInfo = adapter.getState().environmentInfo;
|
26080
26126
|
let disableStartCallButton = !microphonePermissionGranted || ((_a = deviceState.microphones) === null || _a === void 0 ? void 0 : _a.length) === 0;
|
26081
26127
|
/* @conditional-compile-remove(rooms) */
|
26082
|
-
const
|
26128
|
+
const role = (_b = adapter.getState().call) === null || _b === void 0 ? void 0 : _b.role;
|
26083
26129
|
/* @conditional-compile-remove(video-background-effects) */
|
26084
26130
|
const isCameraOn = useSelector$1(localVideoSelector).isAvailable;
|
26085
26131
|
let filteredLatestErrors = props.latestErrors;
|
26086
26132
|
/* @conditional-compile-remove(rooms) */
|
26087
26133
|
// TODO: move this logic to the error bar selector once role is plumbed from the headless SDK
|
26088
|
-
if (
|
26134
|
+
if (role !== 'Consumer') {
|
26089
26135
|
filteredLatestErrors = filteredLatestErrors.filter((e) => e.type !== 'callCameraAccessDenied' && e.type !== 'callCameraAccessDeniedSafari');
|
26090
26136
|
}
|
26091
26137
|
/* @conditional-compile-remove(video-background-effects) */
|
@@ -26093,7 +26139,7 @@ const ConfigurationPage = (props) => {
|
|
26093
26139
|
filteredLatestErrors = filteredLatestErrors.filter((e) => e.type !== 'unableToStartVideoEffect');
|
26094
26140
|
}
|
26095
26141
|
/* @conditional-compile-remove(rooms) */
|
26096
|
-
if (
|
26142
|
+
if (role === 'Consumer') {
|
26097
26143
|
// If user's role permissions do not allow access to the microphone button then DO NOT disable the start call button
|
26098
26144
|
// because microphone device permission is not needed for the user's role
|
26099
26145
|
disableStartCallButton = false;
|
@@ -26106,7 +26152,7 @@ const ConfigurationPage = (props) => {
|
|
26106
26152
|
disableStartCallButton = false;
|
26107
26153
|
}
|
26108
26154
|
else if (deviceChecks.camera === 'required') {
|
26109
|
-
disableStartCallButton = !cameraPermissionGranted || ((
|
26155
|
+
disableStartCallButton = !cameraPermissionGranted || ((_c = deviceState.cameras) === null || _c === void 0 ? void 0 : _c.length) === 0;
|
26110
26156
|
}
|
26111
26157
|
}
|
26112
26158
|
const locale = useLocale();
|
@@ -26114,7 +26160,7 @@ const ConfigurationPage = (props) => {
|
|
26114
26160
|
const callDescription = locale.strings.call.configurationPageCallDetails && (React__default['default'].createElement(react.Stack.Item, { className: mobileView ? callDetailsStyleMobile : callDetailsStyleDesktop }, locale.strings.call.configurationPageCallDetails));
|
26115
26161
|
let mobileWithPreview = mobileView;
|
26116
26162
|
/* @conditional-compile-remove(rooms) */
|
26117
|
-
mobileWithPreview = mobileWithPreview &&
|
26163
|
+
mobileWithPreview = mobileWithPreview && role !== 'Consumer';
|
26118
26164
|
/* @conditional-compile-remove(call-readiness) */
|
26119
26165
|
const permissionsState = {
|
26120
26166
|
// fall back to using cameraPermissionGranted and microphonePermissionGranted if permission API is not supported
|
@@ -26196,8 +26242,7 @@ const ConfigurationPage = (props) => {
|
|
26196
26242
|
mobileWithPreview && (React__default['default'].createElement(react.Stack.Item, null,
|
26197
26243
|
title,
|
26198
26244
|
callDescription)),
|
26199
|
-
localPreviewTrampoline(mobileWithPreview,
|
26200
|
-
/* @conditional-compile-remove(rooms) */ !rolePermissions.cameraButton),
|
26245
|
+
localPreviewTrampoline(mobileWithPreview, /* @conditional-compile-remove(rooms) */ !!(role === 'Consumer')),
|
26201
26246
|
React__default['default'].createElement(react.Stack, { className: mobileView ? undefined : selectionContainerStyle },
|
26202
26247
|
!mobileWithPreview && (React__default['default'].createElement(React__default['default'].Fragment, null,
|
26203
26248
|
React__default['default'].createElement(react.Stack.Item, { styles: callDetailsContainerStylesDesktop },
|
@@ -26838,8 +26883,6 @@ const MainScreen = (props) => {
|
|
26838
26883
|
const locale = useLocale();
|
26839
26884
|
const palette = useTheme().palette;
|
26840
26885
|
const leavePageStyle = React.useMemo(() => leavingPageStyle(palette), [palette]);
|
26841
|
-
/* @conditional-compile-remove(rooms) */
|
26842
|
-
const role = useSelector$1(getRole);
|
26843
26886
|
let pageElement;
|
26844
26887
|
/* @conditional-compile-remove(rooms) */
|
26845
26888
|
switch (page) {
|
@@ -26905,13 +26948,7 @@ const MainScreen = (props) => {
|
|
26905
26948
|
if (!pageElement) {
|
26906
26949
|
throw new Error('Invalid call composite page');
|
26907
26950
|
}
|
26908
|
-
|
26909
|
-
const permissions = _getPermissions(role === 'Unknown' || role === undefined ? props.roleHint : role);
|
26910
|
-
// default retElement for stable version
|
26911
|
-
let retElement = pageElement;
|
26912
|
-
/* @conditional-compile-remove(rooms) */
|
26913
|
-
retElement = React__default['default'].createElement(_PermissionsProvider, { permissions: permissions }, pageElement);
|
26914
|
-
return (React__default['default'].createElement(SidePaneProvider, { sidePaneRenderer: sidePaneRenderer, overrideSidePane: injectedSidePaneProps }, retElement));
|
26951
|
+
return (React__default['default'].createElement(SidePaneProvider, { sidePaneRenderer: sidePaneRenderer, overrideSidePane: injectedSidePaneProps }, pageElement));
|
26915
26952
|
};
|
26916
26953
|
/**
|
26917
26954
|
* A customizable UI composite for calling experience.
|
@@ -26926,19 +26963,18 @@ const CallComposite = (props) => React__default['default'].createElement(CallCom
|
|
26926
26963
|
/** @private */
|
26927
26964
|
const CallCompositeInner = (props) => {
|
26928
26965
|
const { adapter, callInvitationUrl, onFetchAvatarPersonaData, onFetchParticipantMenuItems, options, formFactor = 'desktop' } = props;
|
26929
|
-
/* @conditional-compile-remove(rooms) */
|
26930
|
-
const roleHint = adapter.getState().roleHint;
|
26931
26966
|
React.useEffect(() => {
|
26932
26967
|
(() => __awaiter$5(void 0, void 0, void 0, function* () {
|
26968
|
+
var _a;
|
26933
26969
|
const constrain = getQueryOptions({
|
26934
|
-
/* @conditional-compile-remove(rooms) */ role:
|
26970
|
+
/* @conditional-compile-remove(rooms) */ role: (_a = adapter.getState().call) === null || _a === void 0 ? void 0 : _a.role
|
26935
26971
|
});
|
26936
26972
|
yield adapter.askDevicePermission(constrain);
|
26937
26973
|
adapter.queryCameras();
|
26938
26974
|
adapter.queryMicrophones();
|
26939
26975
|
adapter.querySpeakers();
|
26940
26976
|
}))();
|
26941
|
-
}, [adapter
|
26977
|
+
}, [adapter]);
|
26942
26978
|
const mobileView = formFactor === 'mobile';
|
26943
26979
|
const modalLayerHostId = reactHooks.useId('modalLayerhost');
|
26944
26980
|
const mainScreenContainerClassName = React.useMemo(() => {
|
@@ -26947,9 +26983,7 @@ const CallCompositeInner = (props) => {
|
|
26947
26983
|
return (React__default['default'].createElement("div", { className: mainScreenContainerClassName },
|
26948
26984
|
React__default['default'].createElement(BaseProvider, Object.assign({}, props),
|
26949
26985
|
React__default['default'].createElement(CallAdapterProvider, { adapter: adapter },
|
26950
|
-
React__default['default'].createElement(MainScreen, { callInvitationUrl: callInvitationUrl, onFetchAvatarPersonaData: onFetchAvatarPersonaData, onFetchParticipantMenuItems: onFetchParticipantMenuItems, mobileView: mobileView, modalLayerHostId: modalLayerHostId, options: options,
|
26951
|
-
/* @conditional-compile-remove(rooms) */
|
26952
|
-
roleHint: roleHint, onSidePaneIdChange: props.onSidePaneIdChange, overrideSidePane: props.overrideSidePane, mobileChatTabHeader: props.mobileChatTabHeader }),
|
26986
|
+
React__default['default'].createElement(MainScreen, { callInvitationUrl: callInvitationUrl, onFetchAvatarPersonaData: onFetchAvatarPersonaData, onFetchParticipantMenuItems: onFetchParticipantMenuItems, mobileView: mobileView, modalLayerHostId: modalLayerHostId, options: options, onSidePaneIdChange: props.onSidePaneIdChange, overrideSidePane: props.overrideSidePane, mobileChatTabHeader: props.mobileChatTabHeader }),
|
26953
26987
|
// This layer host is for ModalLocalAndRemotePIP in SidePane. This LayerHost cannot be inside the SidePane
|
26954
26988
|
// because when the SidePane is hidden, ie. style property display is 'none', it takes up no space. This causes problems when dragging
|
26955
26989
|
// the Modal because the draggable bounds thinks it has no space and will always return to its initial position after dragging.
|
@@ -27162,7 +27196,9 @@ var __awaiter$3 = (window && window.__awaiter) || function (thisArg, _arguments,
|
|
27162
27196
|
};
|
27163
27197
|
/** Context of call, which is a centralized context for all state updates */
|
27164
27198
|
class CallContext {
|
27165
|
-
constructor(clientState, isTeamsCall,
|
27199
|
+
constructor(clientState, isTeamsCall,
|
27200
|
+
/* @conditional-compile-remove(rooms) */
|
27201
|
+
isRoomsCall, options) {
|
27166
27202
|
var _a, _b;
|
27167
27203
|
this.emitter = new EventEmitter.EventEmitter();
|
27168
27204
|
this.state = {
|
@@ -27174,10 +27210,10 @@ class CallContext {
|
|
27174
27210
|
page: 'configuration',
|
27175
27211
|
latestErrors: clientState.latestErrors,
|
27176
27212
|
isTeamsCall,
|
27213
|
+
/* @conditional-compile-remove(rooms) */ isRoomsCall,
|
27177
27214
|
/* @conditional-compile-remove(PSTN-calls) */ alternateCallerId: clientState.alternateCallerId,
|
27178
27215
|
/* @conditional-compile-remove(unsupported-browser) */ environmentInfo: clientState.environmentInfo,
|
27179
27216
|
/* @conditional-compile-remove(unsupported-browser) */ unsupportedBrowserVersionsAllowed: false,
|
27180
|
-
/* @conditional-compile-remove(rooms) */ roleHint: options === null || options === void 0 ? void 0 : options.roleHint,
|
27181
27217
|
/* @conditional-compile-remove(video-background-effects) */ videoBackgroundImages: options === null || options === void 0 ? void 0 : options.videoBackgroundImages,
|
27182
27218
|
/* @conditional-compile-remove(video-background-effects) */ selectedVideoBackgroundEffect: undefined,
|
27183
27219
|
cameraStatus: undefined
|
@@ -27323,13 +27359,9 @@ class AzureCommunicationCallAdapter {
|
|
27323
27359
|
const isTeamsMeeting = 'meetingLink' in this.locator;
|
27324
27360
|
/* @conditional-compile-remove(rooms) */
|
27325
27361
|
const isRoomsCall = 'roomId' in this.locator;
|
27326
|
-
|
27327
|
-
|
27328
|
-
|
27329
|
-
if (isRoomsCall && (options === null || options === void 0 ? void 0 : options.roleHint) === undefined) {
|
27330
|
-
options = Object.assign(Object.assign({}, options), { roleHint: 'Consumer' });
|
27331
|
-
}
|
27332
|
-
this.context = new CallContext(callClient.getState(), isTeamsMeeting, options);
|
27362
|
+
this.context = new CallContext(callClient.getState(), isTeamsMeeting,
|
27363
|
+
/* @conditional-compile-remove(rooms) */ isRoomsCall,
|
27364
|
+
/* @conditional-compile-remove(video-background-effects) */ options);
|
27333
27365
|
this.context.onCallEnded((endCallData) => this.emitter.emit('callEnded', endCallData));
|
27334
27366
|
const onStateChange = (clientState) => {
|
27335
27367
|
var _a, _b;
|
@@ -28094,7 +28126,7 @@ const useAzureCommunicationCallAdapterGeneric = (args, afterCreate, beforeDispos
|
|
28094
28126
|
const displayName = 'displayName' in args ? args.displayName : undefined;
|
28095
28127
|
/* @conditional-compile-remove(PSTN-calls) */
|
28096
28128
|
const alternateCallerId = 'alternateCallerId' in args ? args.alternateCallerId : undefined;
|
28097
|
-
/* @conditional-compile-remove(
|
28129
|
+
/* @conditional-compile-remove(video-background-effects) */
|
28098
28130
|
const options = 'options' in args ? args.options : undefined;
|
28099
28131
|
// State update needed to rerender the parent component when a new adapter is created.
|
28100
28132
|
const [adapter, setAdapter] = React.useState(undefined);
|
@@ -28135,11 +28167,6 @@ const useAzureCommunicationCallAdapterGeneric = (args, afterCreate, beforeDispos
|
|
28135
28167
|
if (!displayName) {
|
28136
28168
|
throw new Error('Unreachable code, displayName already checked above.');
|
28137
28169
|
}
|
28138
|
-
// This is just the type check to ensure that roleHint is defined.
|
28139
|
-
/* @conditional-compile-remove(rooms) */
|
28140
|
-
if (options && !('roleHint' in options)) {
|
28141
|
-
throw new Error('Unreachable code, provided a options without roleHint.');
|
28142
|
-
}
|
28143
28170
|
if (creatingAdapterRef.current) {
|
28144
28171
|
console.warn('Adapter is already being created, please see storybook for more information: https://azure.github.io/communication-ui-library/?path=/story/troubleshooting--page');
|
28145
28172
|
return;
|
@@ -28151,7 +28178,7 @@ const useAzureCommunicationCallAdapterGeneric = (args, afterCreate, beforeDispos
|
|
28151
28178
|
locator,
|
28152
28179
|
userId: userId,
|
28153
28180
|
/* @conditional-compile-remove(PSTN-calls) */ alternateCallerId,
|
28154
|
-
/* @conditional-compile-remove(
|
28181
|
+
/* @conditional-compile-remove(video-background-effects) */ options
|
28155
28182
|
}));
|
28156
28183
|
}
|
28157
28184
|
else if (adapterKind === 'Teams') {
|
@@ -28194,7 +28221,6 @@ const useAzureCommunicationCallAdapterGeneric = (args, afterCreate, beforeDispos
|
|
28194
28221
|
displayName,
|
28195
28222
|
/* @conditional-compile-remove(PSTN-calls) */
|
28196
28223
|
alternateCallerId,
|
28197
|
-
/* @conditional-compile-remove(rooms) */
|
28198
28224
|
/* @conditional-compile-remove(teams-identity-support) */
|
28199
28225
|
options
|
28200
28226
|
]);
|
@@ -28304,7 +28330,7 @@ const createAzureCommunicationCallAdapterFromClient = (callClient, callAgent, lo
|
|
28304
28330
|
/* @conditional-compile-remove(unsupported-browser) */
|
28305
28331
|
yield callClient.feature(communicationCalling.Features.DebugInfo).getEnvironmentInfo();
|
28306
28332
|
return new AzureCommunicationCallAdapter(callClient, locator, callAgent, deviceManager,
|
28307
|
-
/* @conditional-compile-remove(
|
28333
|
+
/* @conditional-compile-remove(video-background-effects) */ options);
|
28308
28334
|
});
|
28309
28335
|
/* @conditional-compile-remove(teams-identity-support) */
|
28310
28336
|
/**
|
@@ -28544,6 +28570,8 @@ function callAdapterStateFromCallWithChatAdapterState(callWithChatAdapterState)
|
|
28544
28570
|
call: callWithChatAdapterState.call,
|
28545
28571
|
devices: callWithChatAdapterState.devices,
|
28546
28572
|
isTeamsCall: callWithChatAdapterState.isTeamsCall,
|
28573
|
+
/* @conditional-compile-remove(rooms) */
|
28574
|
+
isRoomsCall: callWithChatAdapterState.isRoomsCall,
|
28547
28575
|
latestErrors: callWithChatAdapterState.latestCallErrors,
|
28548
28576
|
/* @conditional-compile-remove(PSTN-calls) */
|
28549
28577
|
alternateCallerId: callWithChatAdapterState.alternateCallerId,
|
@@ -29034,6 +29062,8 @@ function callWithChatAdapterStateFromBackingStates(callAdapter, chatAdapter) {
|
|
29034
29062
|
devices: callAdapterState.devices,
|
29035
29063
|
isLocalPreviewMicrophoneEnabled: callAdapterState.isLocalPreviewMicrophoneEnabled,
|
29036
29064
|
isTeamsCall: callAdapterState.isTeamsCall,
|
29065
|
+
/* @conditional-compile-remove(rooms) */
|
29066
|
+
isRoomsCall: callAdapterState.isRoomsCall,
|
29037
29067
|
latestCallErrors: callAdapterState.latestErrors,
|
29038
29068
|
latestChatErrors: chatAdapterState.latestErrors,
|
29039
29069
|
/* @conditional-compile-remove(file-sharing) */
|
@@ -29693,7 +29723,7 @@ class AzureCommunicationCallWithChatAdapter {
|
|
29693
29723
|
*/
|
29694
29724
|
const createAzureCommunicationCallWithChatAdapter = ({ userId, displayName, credential, endpoint, locator,
|
29695
29725
|
/* @conditional-compile-remove(PSTN-calls) */ alternateCallerId,
|
29696
|
-
/* @conditional-compile-remove(
|
29726
|
+
/* @conditional-compile-remove(video-background-effects) */ callAdapterOptions }) => __awaiter(void 0, void 0, void 0, function* () {
|
29697
29727
|
const callAdapterLocator = isTeamsMeetingLinkLocator(locator) ? locator : locator.callLocator;
|
29698
29728
|
const createCallAdapterPromise = createAzureCommunicationCallAdapter({
|
29699
29729
|
userId,
|
@@ -29701,7 +29731,7 @@ const createAzureCommunicationCallWithChatAdapter = ({ userId, displayName, cred
|
|
29701
29731
|
credential,
|
29702
29732
|
locator: callAdapterLocator,
|
29703
29733
|
/* @conditional-compile-remove(PSTN-calls) */ alternateCallerId,
|
29704
|
-
/* @conditional-compile-remove(
|
29734
|
+
/* @conditional-compile-remove(video-background-effects) */ options: callAdapterOptions
|
29705
29735
|
});
|
29706
29736
|
const threadId = isTeamsMeetingLinkLocator(locator)
|
29707
29737
|
? getChatThreadFromTeamsLink(locator.meetingLink)
|
@@ -29752,7 +29782,7 @@ afterCreate,
|
|
29752
29782
|
beforeDispose) => {
|
29753
29783
|
const { credential, displayName, endpoint, locator, userId,
|
29754
29784
|
/* @conditional-compile-remove(PSTN-calls) */ alternateCallerId,
|
29755
|
-
/* @conditional-compile-remove(
|
29785
|
+
/* @conditional-compile-remove(video-background-effects) */ callAdapterOptions } = args;
|
29756
29786
|
// State update needed to rerender the parent component when a new adapter is created.
|
29757
29787
|
const [adapter, setAdapter] = React.useState(undefined);
|
29758
29788
|
// Ref needed for cleanup to access the old adapter created asynchronously.
|
@@ -29789,7 +29819,7 @@ beforeDispose) => {
|
|
29789
29819
|
locator,
|
29790
29820
|
userId,
|
29791
29821
|
/* @conditional-compile-remove(PSTN-calls) */ alternateCallerId,
|
29792
|
-
/* @conditional-compile-remove(
|
29822
|
+
/* @conditional-compile-remove(video-background-effects) */ callAdapterOptions
|
29793
29823
|
});
|
29794
29824
|
if (afterCreateRef.current) {
|
29795
29825
|
newAdapter = yield afterCreateRef.current(newAdapter);
|
@@ -29809,7 +29839,7 @@ beforeDispose) => {
|
|
29809
29839
|
endpoint,
|
29810
29840
|
locator,
|
29811
29841
|
userId,
|
29812
|
-
/* @conditional-compile-remove(
|
29842
|
+
/* @conditional-compile-remove(video-background-effects) */ callAdapterOptions
|
29813
29843
|
]);
|
29814
29844
|
// Dispose any existing adapter when the component unmounts.
|
29815
29845
|
React.useEffect(() => {
|