@azure/communication-react 1.7.0-alpha-202308010015 → 1.7.0-alpha-202308020013

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.
@@ -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-202308010015';
181
+ var telemetryVersion = '1.7.0-alpha-202308020013';
182
182
 
183
183
  // Copyright (c) Microsoft Corporation.
184
184
  /**
@@ -340,6 +340,11 @@ const getRole = (state, props) => {
340
340
  /* @conditional-compile-remove(rooms) */
341
341
  return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.role;
342
342
  };
343
+ /* @conditional-compile-remove(capabilities) */
344
+ /**
345
+ * @private
346
+ */
347
+ const getCapabilites = (state, props) => { var _a, _b; return (_b = (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.capabilities) === null || _b === void 0 ? void 0 : _b.capabilities; };
343
348
  /**
344
349
  * @private
345
350
  */
@@ -543,10 +548,12 @@ const _isRingingPSTNParticipant = (participant) => {
543
548
  *
544
549
  * @public
545
550
  */
546
- const microphoneButtonSelector = reselect__namespace.createSelector([getCallExists, getIsMuted, getDeviceManager$1, /* @conditional-compile-remove(rooms) */ getRole], (callExists, isMuted, deviceManager, /* @conditional-compile-remove(rooms) */ role) => {
551
+ const microphoneButtonSelector = reselect__namespace.createSelector([getCallExists, getIsMuted, getDeviceManager$1, /* @conditional-compile-remove(capabilities) */ getCapabilites], (callExists, isMuted, deviceManager, /* @conditional-compile-remove(capabilities) */ capabilities) => {
547
552
  const permission = deviceManager.deviceAccess ? deviceManager.deviceAccess.audio : true;
553
+ /* @conditional-compile-remove(capabilities) */
554
+ const incapable = (capabilities === null || capabilities === void 0 ? void 0 : capabilities.muteUnmuteMic.isPresent) === false;
548
555
  return {
549
- disabled: !callExists || !permission || /* @conditional-compile-remove(rooms) */ role === 'Consumer',
556
+ disabled: !callExists || !permission || /* @conditional-compile-remove(capabilities) */ incapable,
550
557
  checked: callExists ? !isMuted : false,
551
558
  microphones: deviceManager.microphones,
552
559
  speakers: deviceManager.speakers,
@@ -559,15 +566,17 @@ const microphoneButtonSelector = reselect__namespace.createSelector([getCallExis
559
566
  *
560
567
  * @public
561
568
  */
562
- const cameraButtonSelector = reselect__namespace.createSelector([getLocalVideoStreams$1, getDeviceManager$1, /* @conditional-compile-remove(rooms) */ getRole], (localVideoStreams, deviceManager, /* @conditional-compile-remove(rooms) */ role) => {
569
+ const cameraButtonSelector = reselect__namespace.createSelector([getLocalVideoStreams$1, getDeviceManager$1, /* @conditional-compile-remove(capabilities) */ getCapabilites], (localVideoStreams, deviceManager, /* @conditional-compile-remove(capabilities) */ capabilities) => {
563
570
  const previewOn = _isPreviewOn(deviceManager);
564
571
  const localVideoFromCall = localVideoStreams === null || localVideoStreams === void 0 ? void 0 : localVideoStreams.find((stream) => stream.mediaStreamType === 'Video');
565
572
  const permission = deviceManager.deviceAccess ? deviceManager.deviceAccess.video : true;
573
+ /* @conditional-compile-remove(capabilities) */
574
+ const incapable = (capabilities === null || capabilities === void 0 ? void 0 : capabilities.turnVideoOnOff.isPresent) === false;
566
575
  return {
567
576
  disabled: !deviceManager.selectedCamera ||
568
577
  !permission ||
569
578
  !deviceManager.cameras.length ||
570
- /* @conditional-compile-remove(rooms) */ role === 'Consumer',
579
+ /* @conditional-compile-remove(capabilities) */ incapable,
571
580
  checked: localVideoStreams !== undefined && localVideoStreams.length > 0 ? !!localVideoFromCall : previewOn,
572
581
  cameras: deviceManager.cameras,
573
582
  selectedCamera: deviceManager.selectedCamera
@@ -581,17 +590,18 @@ const cameraButtonSelector = reselect__namespace.createSelector([getLocalVideoSt
581
590
  const screenShareButtonSelector = reselect__namespace.createSelector([
582
591
  getIsScreenSharingOn,
583
592
  /* @conditional-compile-remove(PSTN-calls) */ getCallState,
584
- /* @conditional-compile-remove(rooms) */ getRole
593
+ /* @conditional-compile-remove(capabilities) */ getCapabilites
585
594
  ], (isScreenSharingOn,
586
595
  /* @conditional-compile-remove(PSTN-calls) */ callState,
587
- /* @conditional-compile-remove(rooms) */ role) => {
588
- var _a;
596
+ /* @conditional-compile-remove(capabilities) */ capabilities) => {
597
+ let disabled = undefined;
598
+ /* @conditional-compile-remove(capabilities) */
599
+ disabled = disabled || (capabilities === null || capabilities === void 0 ? void 0 : capabilities.shareScreen.isPresent) === false;
600
+ /* @conditional-compile-remove(PSTN-calls) */
601
+ disabled = disabled || ['InLobby', 'Connecting'].includes(callState);
589
602
  return {
590
603
  checked: isScreenSharingOn,
591
- /* @conditional-compile-remove(PSTN-calls) */
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'
604
+ disabled
595
605
  };
596
606
  });
597
607
  /**
@@ -22058,8 +22068,9 @@ const ScreenShare = (props) => {
22058
22068
  /* @conditional-compile-remove(rooms) */
22059
22069
  const isRoomsCall = adapter.getState().isRoomsCall;
22060
22070
  const screenShareButtonDisabled = () => {
22061
- /* @conditional-compile-remove(PSTN-calls) */
22062
- return (screenShareButtonProps === null || screenShareButtonProps === void 0 ? void 0 : screenShareButtonProps.disabled) ? screenShareButtonProps.disabled : isDisabled(props.option);
22071
+ var _a;
22072
+ /* @conditional-compile-remove(capabilities) */ /* @conditional-compile-remove(PSTN-calls) */
22073
+ return (_a = screenShareButtonProps === null || screenShareButtonProps === void 0 ? void 0 : screenShareButtonProps.disabled) !== null && _a !== void 0 ? _a : isDisabled(props.option);
22063
22074
  };
22064
22075
  return (React__default['default'].createElement(ScreenShareButton, Object.assign({ "data-ui-id": "call-composite-screenshare-button" }, screenShareButtonProps, { showLabel: props.displayType !== 'compact', disabled: screenShareButtonDisabled() ||
22065
22076
  props.disabled ||