@azure/communication-react 1.7.1-alpha-202308300012 → 1.7.1-alpha-202308310013
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 +13 -0
- package/dist/dist-cjs/communication-react/index.js +66 -10
- 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/react-components/src/components/RemoteVideoTile.d.ts +2 -1
- package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js +2 -1
- package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/useVideoTileContextualMenuProps.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/useVideoTileContextualMenuProps.js +4 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/useVideoTileContextualMenuProps.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery.js +21 -2
- package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CapabilitiesChangedNotificationBar.js +18 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CapabilitiesChangedNotificationBar.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Camera.js +10 -2
- 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/Microphone.js +10 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +13 -0
- package/dist/dist-esm/react-composites/src/composites/common/icons.js +6 -0
- package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
- package/package.json +8 -8
@@ -1390,6 +1390,8 @@ export declare type CallCompositeIcons = {
|
|
1390
1390
|
ControlButtonParticipants?: JSX.Element;
|
1391
1391
|
ControlButtonScreenShareStart?: JSX.Element;
|
1392
1392
|
ControlButtonScreenShareStop?: JSX.Element;
|
1393
|
+
ControlButtonCameraProhibited?: JSX.Element;
|
1394
|
+
ControlButtonMicProhibited?: JSX.Element;
|
1393
1395
|
ControlButtonRaiseHand?: JSX.Element;
|
1394
1396
|
ControlButtonLowerHand?: JSX.Element;
|
1395
1397
|
RaiseHandContextualMenuItem?: JSX.Element;
|
@@ -2991,6 +2993,8 @@ export declare type CallWithChatCompositeIcons = {
|
|
2991
2993
|
ControlButtonOptions?: JSX.Element;
|
2992
2994
|
ControlButtonScreenShareStart?: JSX.Element;
|
2993
2995
|
ControlButtonScreenShareStop?: JSX.Element;
|
2996
|
+
ControlButtonCameraProhibited?: JSX.Element;
|
2997
|
+
ControlButtonMicProhibited?: JSX.Element;
|
2994
2998
|
ErrorBarCallCameraAccessDenied?: JSX.Element;
|
2995
2999
|
ErrorBarCallCameraAlreadyInUse?: JSX.Element;
|
2996
3000
|
ErrorBarCallLocalVideoFreeze?: JSX.Element;
|
@@ -5685,6 +5689,8 @@ export declare const DEFAULT_COMPOSITE_ICONS: {
|
|
5685
5689
|
ControlButtonParticipants: JSX.Element;
|
5686
5690
|
ControlButtonScreenShareStart: JSX.Element;
|
5687
5691
|
ControlButtonScreenShareStop: JSX.Element;
|
5692
|
+
ControlButtonCameraProhibited?: JSX.Element | undefined;
|
5693
|
+
ControlButtonMicProhibited?: JSX.Element | undefined;
|
5688
5694
|
ControlButtonRaiseHand: JSX.Element;
|
5689
5695
|
ControlButtonLowerHand: JSX.Element;
|
5690
5696
|
RaiseHandContextualMenuItem: JSX.Element;
|
@@ -5779,6 +5785,13 @@ export declare const DEFAULT_COMPOSITE_ICONS: {
|
|
5779
5785
|
CaptionsIcon: JSX.Element;
|
5780
5786
|
CaptionsOffIcon: JSX.Element;
|
5781
5787
|
CaptionsSettingsIcon: JSX.Element;
|
5788
|
+
/**
|
5789
|
+
* Icon wrapper to use when including customizable icons inside the CallWithChatComposite.
|
5790
|
+
* This wrapper ensures the icon name is being type-checked helping ensure no typos
|
5791
|
+
* and ensure that icon is customizable through the composite API.
|
5792
|
+
*
|
5793
|
+
* @private
|
5794
|
+
*/
|
5782
5795
|
ChangeSpokenLanguageIcon: JSX.Element;
|
5783
5796
|
ChangeCaptionLanguageIcon: JSX.Element;
|
5784
5797
|
ContextMenuCameraIcon: JSX.Element;
|
@@ -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.1-alpha-
|
181
|
+
var telemetryVersion = '1.7.1-alpha-202308310013';
|
182
182
|
|
183
183
|
// Copyright (c) Microsoft Corporation.
|
184
184
|
/**
|
@@ -11902,7 +11902,7 @@ const useRemoteVideoStreamLifecycleMaintainer = (props) => {
|
|
11902
11902
|
*/
|
11903
11903
|
const useVideoTileContextualMenuProps = (props) => {
|
11904
11904
|
var _a;
|
11905
|
-
const { remoteParticipant, view, strings, isPinned, onPinParticipant, onUnpinParticipant, disablePinMenuItem, toggleAnnouncerString } = props;
|
11905
|
+
const { remoteParticipant, view, strings, isPinned, onPinParticipant, onUnpinParticipant, onUpdateScalingMode, disablePinMenuItem, toggleAnnouncerString } = props;
|
11906
11906
|
const scalingMode = React.useMemo(() => {
|
11907
11907
|
var _a;
|
11908
11908
|
/* @conditional-compile-remove(pinned-participants) */
|
@@ -11970,6 +11970,7 @@ const useVideoTileContextualMenuProps = (props) => {
|
|
11970
11970
|
styles: { root: { lineHeight: '1rem', textAlign: 'center' } }
|
11971
11971
|
},
|
11972
11972
|
onClick: () => {
|
11973
|
+
onUpdateScalingMode === null || onUpdateScalingMode === void 0 ? void 0 : onUpdateScalingMode(remoteParticipant.userId, 'Fit');
|
11973
11974
|
view === null || view === void 0 ? void 0 : view.updateScalingMode('Fit');
|
11974
11975
|
},
|
11975
11976
|
'data-ui-id': 'video-tile-fit-to-frame',
|
@@ -11986,6 +11987,7 @@ const useVideoTileContextualMenuProps = (props) => {
|
|
11986
11987
|
styles: { root: { lineHeight: '1rem', textAlign: 'center' } }
|
11987
11988
|
},
|
11988
11989
|
onClick: () => {
|
11990
|
+
onUpdateScalingMode === null || onUpdateScalingMode === void 0 ? void 0 : onUpdateScalingMode(remoteParticipant.userId, 'Crop');
|
11989
11991
|
view === null || view === void 0 ? void 0 : view.updateScalingMode('Crop');
|
11990
11992
|
},
|
11991
11993
|
'data-ui-id': 'video-tile-fill-frame',
|
@@ -12005,6 +12007,7 @@ const useVideoTileContextualMenuProps = (props) => {
|
|
12005
12007
|
isPinned,
|
12006
12008
|
onPinParticipant,
|
12007
12009
|
onUnpinParticipant,
|
12010
|
+
onUpdateScalingMode,
|
12008
12011
|
remoteParticipant.userId,
|
12009
12012
|
remoteParticipant.displayName,
|
12010
12013
|
disablePinMenuItem,
|
@@ -12442,7 +12445,7 @@ const bracketedParticipantString = (participantString, withBrackets) => {
|
|
12442
12445
|
const _RemoteVideoTile = React__default['default'].memo((props) => {
|
12443
12446
|
var _a;
|
12444
12447
|
const { isAvailable, isReceiving = true, // default to true to prevent any breaking change
|
12445
|
-
isScreenSharingOn, onCreateRemoteStreamView, onDisposeRemoteStreamView, remoteVideoViewOptions, renderElement, userId, onRenderAvatar, showMuteIndicator, remoteParticipant, participantState, menuKind, isPinned, onPinParticipant, onUnpinParticipant, disablePinMenuItem, toggleAnnouncerString, strings } = props;
|
12448
|
+
isScreenSharingOn, onCreateRemoteStreamView, onDisposeRemoteStreamView, remoteVideoViewOptions, renderElement, userId, onRenderAvatar, showMuteIndicator, remoteParticipant, participantState, menuKind, isPinned, onPinParticipant, onUnpinParticipant, onUpdateScalingMode, disablePinMenuItem, toggleAnnouncerString, strings } = props;
|
12446
12449
|
const remoteVideoStreamProps = React.useMemo(() => ({
|
12447
12450
|
isMirrored: remoteVideoViewOptions === null || remoteVideoViewOptions === void 0 ? void 0 : remoteVideoViewOptions.isMirrored,
|
12448
12451
|
isScreenSharingOn,
|
@@ -12474,6 +12477,7 @@ const _RemoteVideoTile = React__default['default'].memo((props) => {
|
|
12474
12477
|
isPinned,
|
12475
12478
|
onPinParticipant,
|
12476
12479
|
onUnpinParticipant,
|
12480
|
+
onUpdateScalingMode,
|
12477
12481
|
disablePinMenuItem,
|
12478
12482
|
toggleAnnouncerString
|
12479
12483
|
});
|
@@ -14911,6 +14915,15 @@ const VideoGallery = (props) => {
|
|
14911
14915
|
/* @conditional-compile-remove(pinned-participants) */
|
14912
14916
|
const [pinnedParticipantsState, setPinnedParticipantsState] = React__default['default'].useState([]);
|
14913
14917
|
/* @conditional-compile-remove(pinned-participants) */
|
14918
|
+
const [selectedScalingModeState, setselectedScalingModeState] = React__default['default'].useState({});
|
14919
|
+
/* @conditional-compile-remove(pinned-participants) */
|
14920
|
+
const onUpdateScalingMode = React.useCallback((remoteUserId, scalingMode) => {
|
14921
|
+
setselectedScalingModeState((current) => (Object.assign(Object.assign({}, current), { [remoteUserId]: {
|
14922
|
+
scalingMode,
|
14923
|
+
isMirrored: remoteVideoViewOptions === null || remoteVideoViewOptions === void 0 ? void 0 : remoteVideoViewOptions.isMirrored
|
14924
|
+
} })));
|
14925
|
+
}, [remoteVideoViewOptions === null || remoteVideoViewOptions === void 0 ? void 0 : remoteVideoViewOptions.isMirrored]);
|
14926
|
+
/* @conditional-compile-remove(pinned-participants) */
|
14914
14927
|
React.useEffect(() => {
|
14915
14928
|
var _a;
|
14916
14929
|
(_a = props.pinnedParticipants) === null || _a === void 0 ? void 0 : _a.forEach((pinParticipant) => {
|
@@ -15000,10 +15013,16 @@ const VideoGallery = (props) => {
|
|
15000
15013
|
const defaultOnRenderVideoTile = React.useCallback((participant, isVideoParticipant) => {
|
15001
15014
|
const remoteVideoStream = participant.videoStream;
|
15002
15015
|
/* @conditional-compile-remove(pinned-participants) */
|
15016
|
+
const selectedScalingMode = remoteVideoStream ? selectedScalingModeState[participant.userId] : undefined;
|
15017
|
+
/* @conditional-compile-remove(pinned-participants) */
|
15003
15018
|
const isPinned = pinnedParticipants === null || pinnedParticipants === void 0 ? void 0 : pinnedParticipants.includes(participant.userId);
|
15004
15019
|
const createViewOptions = () => {
|
15005
15020
|
var _a, _b;
|
15006
15021
|
/* @conditional-compile-remove(pinned-participants) */
|
15022
|
+
if (selectedScalingMode) {
|
15023
|
+
return selectedScalingMode;
|
15024
|
+
}
|
15025
|
+
/* @conditional-compile-remove(pinned-participants) */
|
15007
15026
|
return (remoteVideoStream === null || remoteVideoStream === void 0 ? void 0 : remoteVideoStream.streamSize) &&
|
15008
15027
|
((_a = remoteVideoStream.streamSize) === null || _a === void 0 ? void 0 : _a.height) > ((_b = remoteVideoStream.streamSize) === null || _b === void 0 ? void 0 : _b.width)
|
15009
15028
|
? {
|
@@ -15030,6 +15049,8 @@ const VideoGallery = (props) => {
|
|
15030
15049
|
/* @conditional-compile-remove(pinned-participants) */
|
15031
15050
|
onUnpinParticipant: onUnpinParticipant,
|
15032
15051
|
/* @conditional-compile-remove(pinned-participants) */
|
15052
|
+
onUpdateScalingMode: onUpdateScalingMode,
|
15053
|
+
/* @conditional-compile-remove(pinned-participants) */
|
15033
15054
|
isPinned: isPinned,
|
15034
15055
|
/* @conditional-compile-remove(pinned-participants) */
|
15035
15056
|
disablePinMenuItem: pinnedParticipants.length >= MAX_PINNED_REMOTE_VIDEO_TILES,
|
@@ -15043,12 +15064,14 @@ const VideoGallery = (props) => {
|
|
15043
15064
|
onRenderAvatar,
|
15044
15065
|
showMuteIndicator,
|
15045
15066
|
strings,
|
15046
|
-
/* @conditional-compile-remove(pinned-participants) */
|
15067
|
+
/* @conditional-compile-remove(pinned-participants) */ selectedScalingModeState,
|
15047
15068
|
/* @conditional-compile-remove(pinned-participants) */ remoteVideoTileMenuOptions,
|
15048
15069
|
/* @conditional-compile-remove(pinned-participants) */ pinnedParticipants,
|
15049
15070
|
/* @conditional-compile-remove(pinned-participants) */ onPinParticipant,
|
15050
15071
|
/* @conditional-compile-remove(pinned-participants) */ onUnpinParticipant,
|
15051
|
-
/* @conditional-compile-remove(pinned-participants) */ toggleAnnouncerString
|
15072
|
+
/* @conditional-compile-remove(pinned-participants) */ toggleAnnouncerString,
|
15073
|
+
/* @conditional-compile-remove(pinned-participants) */ drawerMenuHostId,
|
15074
|
+
/* @conditional-compile-remove(pinned-participants) */ onUpdateScalingMode
|
15052
15075
|
]);
|
15053
15076
|
const screenShareParticipant = remoteParticipants.find((participant) => { var _a; return (_a = participant.screenShareStream) === null || _a === void 0 ? void 0 : _a.isAvailable; });
|
15054
15077
|
const localScreenShareStreamComponent = React__default['default'].createElement(LocalScreenShare, { localParticipant: localParticipant });
|
@@ -20280,6 +20303,10 @@ const COMPOSITE_ONLY_ICONS = {
|
|
20280
20303
|
LocalCameraSwitch: React__default['default'].createElement(reactIcons.CameraSwitch24Regular, null),
|
20281
20304
|
ControlBarChatButtonActive: React__default['default'].createElement(reactIcons.Chat20Filled, null),
|
20282
20305
|
ControlBarChatButtonInactive: React__default['default'].createElement(reactIcons.Chat20Regular, null),
|
20306
|
+
/* @conditional-compile-remove(capabilities) */
|
20307
|
+
ControlButtonCameraProhibited: React__default['default'].createElement(reactIcons.VideoProhibited20Filled, null),
|
20308
|
+
/* @conditional-compile-remove(capabilities) */
|
20309
|
+
ControlButtonMicProhibited: React__default['default'].createElement(reactIcons.MicProhibited20Filled, null),
|
20283
20310
|
ControlBarPeopleButton: React__default['default'].createElement(reactIcons.People20Regular, null),
|
20284
20311
|
MoreDrawerMicrophones: React__default['default'].createElement(reactIcons.Mic20Regular, null),
|
20285
20312
|
MoreDrawerPeople: React__default['default'].createElement(reactIcons.People20Regular, null),
|
@@ -23112,16 +23139,22 @@ const usePropsFor$1 = (component) => {
|
|
23112
23139
|
* @private
|
23113
23140
|
*/
|
23114
23141
|
const Camera = (props) => {
|
23115
|
-
var _a;
|
23142
|
+
var _a, _b, _c;
|
23116
23143
|
const cameraButtonProps = usePropsFor$1(CameraButton);
|
23117
23144
|
const styles = React.useMemo(() => { var _a; return concatButtonBaseStyles((_a = props.styles) !== null && _a !== void 0 ? _a : {}); }, [props.styles]);
|
23118
23145
|
/* @conditional-compile-remove(rooms) */
|
23119
23146
|
const adapter = useAdapter();
|
23120
23147
|
/* @conditional-compile-remove(rooms) */
|
23121
23148
|
const isRoomsCall = adapter.getState().isRoomsCall;
|
23149
|
+
/* @conditional-compile-remove(capabilities) */
|
23150
|
+
const turnVideoOnCapability = (_b = (_a = adapter.getState().call) === null || _a === void 0 ? void 0 : _a.capabilitiesFeature) === null || _b === void 0 ? void 0 : _b.capabilities.turnVideoOn;
|
23122
23151
|
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 ||
|
23123
23152
|
props.disabled ||
|
23124
|
-
/* @conditional-compile-remove(rooms) */ (isRoomsCall && ((
|
23153
|
+
/* @conditional-compile-remove(rooms) */ (isRoomsCall && ((_c = adapter.getState().call) === null || _c === void 0 ? void 0 : _c.role) === 'Unknown'),
|
23154
|
+
/* @conditional-compile-remove(capabilities) */
|
23155
|
+
onRenderOffIcon: turnVideoOnCapability && !turnVideoOnCapability.isPresent
|
23156
|
+
? () => React__default['default'].createElement(_HighContrastAwareIcon, { disabled: true, iconName: 'ControlButtonCameraProhibited' })
|
23157
|
+
: undefined,
|
23125
23158
|
/* @conditional-compile-remove(video-background-effects) */
|
23126
23159
|
onShowVideoEffectsPicker: props.onShowVideoEffectsPicker, componentRef: props.componentRef })));
|
23127
23160
|
};
|
@@ -23335,7 +23368,7 @@ const getLatestCapabilitiesChangedInfo = (state) => {
|
|
23335
23368
|
* @private
|
23336
23369
|
*/
|
23337
23370
|
const Microphone = (props) => {
|
23338
|
-
var _a;
|
23371
|
+
var _a, _b, _c;
|
23339
23372
|
const microphoneButtonProps = usePropsFor$1(MicrophoneButton);
|
23340
23373
|
const callStatus = useSelector$1(getCallStatus);
|
23341
23374
|
const isLocalMicrophoneEnabled = useSelector$1(getLocalMicrophoneEnabled);
|
@@ -23344,6 +23377,8 @@ const Microphone = (props) => {
|
|
23344
23377
|
const adapter = useAdapter();
|
23345
23378
|
/* @conditional-compile-remove(rooms) */
|
23346
23379
|
const isRoomsCall = adapter.getState().isRoomsCall;
|
23380
|
+
/* @conditional-compile-remove(capabilities) */
|
23381
|
+
const unmuteMicCapability = (_b = (_a = adapter.getState().call) === null || _a === void 0 ? void 0 : _a.capabilitiesFeature) === null || _b === void 0 ? void 0 : _b.capabilities.unmuteMic;
|
23347
23382
|
/**
|
23348
23383
|
* When call is in Lobby, microphone button should be disabled.
|
23349
23384
|
* This is due to to headless limitation where a call can not be muted/unmuted in lobby.
|
@@ -23366,7 +23401,11 @@ const Microphone = (props) => {
|
|
23366
23401
|
// tab focus on MicrophoneButton on page load
|
23367
23402
|
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 ||
|
23368
23403
|
props.disabled ||
|
23369
|
-
/* @conditional-compile-remove(rooms) */ (isRoomsCall && ((
|
23404
|
+
/* @conditional-compile-remove(rooms) */ (isRoomsCall && ((_c = adapter.getState().call) === null || _c === void 0 ? void 0 : _c.role) === 'Unknown'),
|
23405
|
+
/* @conditional-compile-remove(capabilities) */
|
23406
|
+
onRenderOffIcon: unmuteMicCapability && !unmuteMicCapability.isPresent
|
23407
|
+
? () => React__default['default'].createElement(_HighContrastAwareIcon, { disabled: true, iconName: 'ControlButtonMicProhibited' })
|
23408
|
+
: undefined })));
|
23370
23409
|
};
|
23371
23410
|
|
23372
23411
|
// Copyright (c) Microsoft Corporation.
|
@@ -26221,7 +26260,8 @@ const CapabilitiesChangedNotificationBar = (props) => {
|
|
26221
26260
|
if (!message) {
|
26222
26261
|
return null;
|
26223
26262
|
}
|
26224
|
-
|
26263
|
+
const iconProps = getNotificationIconProps(notification);
|
26264
|
+
return (React__default['default'].createElement(react.MessageBar, { key: notification.capabilityName, styles: messageBarStyles, messageBarType: react.MessageBarType.warning, dismissIconProps: { iconName: 'ErrorBarClear' }, onDismiss: () => props.onDismissNotification(notification), messageBarIconProps: iconProps }, message));
|
26225
26265
|
})));
|
26226
26266
|
};
|
26227
26267
|
/* @conditional-compile-remove(capabilities) */
|
@@ -26254,6 +26294,22 @@ const getCapabilityChangedNotificationString = (notification, strings) => {
|
|
26254
26294
|
return undefined;
|
26255
26295
|
};
|
26256
26296
|
/* @conditional-compile-remove(capabilities) */
|
26297
|
+
const getNotificationIconProps = (notification) => {
|
26298
|
+
switch (notification.capabilityName) {
|
26299
|
+
case 'turnVideoOn':
|
26300
|
+
if (notification.isPresent) {
|
26301
|
+
return { iconName: 'ControlButtonCameraOn' };
|
26302
|
+
}
|
26303
|
+
return { iconName: 'ControlButtonCameraProhibited' };
|
26304
|
+
case 'unmuteMic':
|
26305
|
+
if (notification.isPresent) {
|
26306
|
+
return { iconName: 'ControlButtonMicOn' };
|
26307
|
+
}
|
26308
|
+
return { iconName: 'ControlButtonMicProhibited' };
|
26309
|
+
}
|
26310
|
+
return undefined;
|
26311
|
+
};
|
26312
|
+
/* @conditional-compile-remove(capabilities) */
|
26257
26313
|
const messageBarStyles = {
|
26258
26314
|
innerText: {
|
26259
26315
|
alignSelf: 'center'
|