@azure/communication-react 1.4.3-alpha-202301140013.0 → 1.4.3-alpha-202301180013.0
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/dist-cjs/communication-react/index.js +272 -230
- 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 +1 -1
- package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js +18 -4
- package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/DefaultLayout.js +24 -9
- package/dist/dist-esm/react-components/src/components/VideoGallery/DefaultLayout.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.js +26 -11
- package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/Layout.d.ts +4 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/Layout.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/ScrollableHorizontalGallery.d.ts +9 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/ScrollableHorizontalGallery.js +18 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/ScrollableHorizontalGallery.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/VideoGalleryResponsiveHorizontalGallery.js +2 -3
- package/dist/dist-esm/react-components/src/components/VideoGallery/VideoGalleryResponsiveHorizontalGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/styles/Layout.styles.d.ts +6 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/styles/Layout.styles.js +9 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/styles/Layout.styles.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/styles/ScrollableHorizontalGallery.style.d.ts +10 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/styles/ScrollableHorizontalGallery.style.js +29 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/styles/ScrollableHorizontalGallery.style.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.d.ts +7 -16
- package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js +20 -15
- package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery.js +6 -10
- package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/useLongPress.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/utils/useLongPress.js +7 -2
- package/dist/dist-esm/react-components/src/components/utils/useLongPress.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +2 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallPage.styles.js +2 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallPage.styles.js.map +1 -1
- package/package.json +11 -10
- package/dist/dist-esm/react-components/src/components/VideoGallery/PinnedParticipantsLayout.d.ts +0 -25
- package/dist/dist-esm/react-components/src/components/VideoGallery/PinnedParticipantsLayout.js +0 -62
- package/dist/dist-esm/react-components/src/components/VideoGallery/PinnedParticipantsLayout.js.map +0 -1
@@ -17,6 +17,7 @@ var reactFileTypeIcons = require('@fluentui/react-file-type-icons');
|
|
17
17
|
var reactAriaLive = require('react-aria-live');
|
18
18
|
var htmlToReact = require('html-to-react');
|
19
19
|
var Linkify = require('react-linkify');
|
20
|
+
var reactUseDraggableScroll = require('react-use-draggable-scroll');
|
20
21
|
var reactHooks = require('@fluentui/react-hooks');
|
21
22
|
var reactWindowProvider = require('@fluentui/react-window-provider');
|
22
23
|
var copy = require('copy-to-clipboard');
|
@@ -158,7 +159,7 @@ const _toCommunicationIdentifier = (id) => {
|
|
158
159
|
// Copyright (c) Microsoft Corporation.
|
159
160
|
// Licensed under the MIT license.
|
160
161
|
// GENERATED FILE. DO NOT EDIT MANUALLY.
|
161
|
-
var telemetryVersion = '1.4.3-alpha-
|
162
|
+
var telemetryVersion = '1.4.3-alpha-202301180013.0';
|
162
163
|
|
163
164
|
// Copyright (c) Microsoft Corporation.
|
164
165
|
/**
|
@@ -8421,6 +8422,9 @@ function useLongPress(props) {
|
|
8421
8422
|
const handleOnTouchEnd = React.useCallback(() => {
|
8422
8423
|
timerRef.current && clearTimeout(timerRef.current);
|
8423
8424
|
}, []);
|
8425
|
+
const handleOnTouchMove = React.useCallback(() => {
|
8426
|
+
timerRef.current && clearTimeout(timerRef.current);
|
8427
|
+
}, []);
|
8424
8428
|
return React.useMemo(() => ({
|
8425
8429
|
onClick: handleOnClick,
|
8426
8430
|
onMouseDown: handleOnMouseDown,
|
@@ -8428,7 +8432,8 @@ function useLongPress(props) {
|
|
8428
8432
|
onTouchStart: handleOnTouchStart,
|
8429
8433
|
onTouchEnd: handleOnTouchEnd,
|
8430
8434
|
onKeyDown: handleOnKeyDown,
|
8431
|
-
onKeyUp: handleOnKeyUp
|
8435
|
+
onKeyUp: handleOnKeyUp,
|
8436
|
+
onTouchMove: handleOnTouchMove
|
8432
8437
|
}), [
|
8433
8438
|
handleOnClick,
|
8434
8439
|
handleOnKeyDown,
|
@@ -8436,7 +8441,8 @@ function useLongPress(props) {
|
|
8436
8441
|
handleOnMouseDown,
|
8437
8442
|
handleOnMouseUp,
|
8438
8443
|
handleOnTouchEnd,
|
8439
|
-
handleOnTouchStart
|
8444
|
+
handleOnTouchStart,
|
8445
|
+
handleOnTouchMove
|
8440
8446
|
]);
|
8441
8447
|
}
|
8442
8448
|
|
@@ -8598,7 +8604,7 @@ const bracketedParticipantString = (participantString, withBrackets) => {
|
|
8598
8604
|
*/
|
8599
8605
|
const _RemoteVideoTile = React__default['default'].memo((props) => {
|
8600
8606
|
const { isAvailable, isReceiving = true, // default to true to prevent any breaking change
|
8601
|
-
isScreenSharingOn, onCreateRemoteStreamView, onDisposeRemoteStreamView, remoteVideoViewOptions, renderElement, userId, onRenderAvatar, showMuteIndicator, remoteParticipant, participantState,
|
8607
|
+
isScreenSharingOn, onCreateRemoteStreamView, onDisposeRemoteStreamView, remoteVideoViewOptions, renderElement, userId, onRenderAvatar, showMuteIndicator, remoteParticipant, participantState, menuKind = 'contextual', isPinned, onPinParticipant, onUnpinParticipant, disablePinMenuItem } = props;
|
8602
8608
|
const remoteVideoStreamProps = React.useMemo(() => ({
|
8603
8609
|
isMirrored: remoteVideoViewOptions === null || remoteVideoViewOptions === void 0 ? void 0 : remoteVideoViewOptions.isMirrored,
|
8604
8610
|
isScreenSharingOn,
|
@@ -8633,11 +8639,11 @@ const _RemoteVideoTile = React__default['default'].memo((props) => {
|
|
8633
8639
|
disablePinMenuItem
|
8634
8640
|
});
|
8635
8641
|
const videoTileContextualMenuProps = React.useMemo(() => {
|
8636
|
-
if (
|
8642
|
+
if (menuKind !== 'contextual') {
|
8637
8643
|
return {};
|
8638
8644
|
}
|
8639
8645
|
return videoTileContextualMenuPropsTrampoline(contextualMenuProps);
|
8640
|
-
}, [contextualMenuProps,
|
8646
|
+
}, [contextualMenuProps, menuKind]);
|
8641
8647
|
const showLoadingIndicator = isAvailable && isReceiving === false && participantState !== 'Disconnected';
|
8642
8648
|
const [drawerMenuItemProps, setDrawerMenuItemProps] = React__default['default'].useState([]);
|
8643
8649
|
const renderVideoStreamElement = React.useMemo(() => {
|
@@ -8649,7 +8655,19 @@ const _RemoteVideoTile = React__default['default'].memo((props) => {
|
|
8649
8655
|
}
|
8650
8656
|
return (React__default['default'].createElement(StreamMedia, { videoStreamElement: renderElement, loadingState: showLoadingIndicator ? 'loading' : 'none' }));
|
8651
8657
|
}, [renderElement, showLoadingIndicator]);
|
8652
|
-
|
8658
|
+
/* @conditional-compile-remove(pinned-participants) */
|
8659
|
+
const onKeyDown = React.useCallback((e) => {
|
8660
|
+
if (e.key === 'Enter') {
|
8661
|
+
setDrawerMenuItemProps(convertContextualMenuItemsToDrawerMenuItemProps(contextualMenuProps, () => setDrawerMenuItemProps([])));
|
8662
|
+
}
|
8663
|
+
}, [setDrawerMenuItemProps, contextualMenuProps]);
|
8664
|
+
return (React__default['default'].createElement(react.Stack
|
8665
|
+
/* @conditional-compile-remove(pinned-participants) */
|
8666
|
+
, {
|
8667
|
+
/* @conditional-compile-remove(pinned-participants) */
|
8668
|
+
tabIndex: menuKind === 'drawer' ? 0 : undefined,
|
8669
|
+
/* @conditional-compile-remove(pinned-participants) */
|
8670
|
+
onKeyDown: menuKind === 'drawer' ? onKeyDown : undefined, style: remoteVideoTileWrapperStyle },
|
8653
8671
|
React__default['default'].createElement(VideoTile, Object.assign({ key: userId, userId: userId, renderElement: renderVideoStreamElement, displayName: remoteParticipant.displayName, onRenderPlaceholder: onRenderAvatar, isMuted: remoteParticipant.isMuted, isSpeaking: remoteParticipant.isSpeaking, showMuteIndicator: showMuteIndicator, personaMinSize: props.personaMinSize, showLabel: props.showLabel,
|
8654
8672
|
/* @conditional-compile-remove(one-to-n-calling) */
|
8655
8673
|
/* @conditional-compile-remove(PSTN-calls) */
|
@@ -8910,6 +8928,176 @@ const FloatingLocalCameraCycleButton = (props) => {
|
|
8910
8928
|
(localVideoCameraCycleButtonProps === null || localVideoCameraCycleButtonProps === void 0 ? void 0 : localVideoCameraCycleButtonProps.onSelectCamera) !== undefined && (React__default['default'].createElement(LocalVideoCameraCycleButton, { cameras: localVideoCameraCycleButtonProps.cameras, selectedCamera: localVideoCameraCycleButtonProps.selectedCamera, onSelectCamera: localVideoCameraCycleButtonProps.onSelectCamera, label: localVideoCameraSwitcherLabel, ariaDescription: ariaDescription }))));
|
8911
8929
|
};
|
8912
8930
|
|
8931
|
+
// Copyright (c) Microsoft Corporation.
|
8932
|
+
/**
|
8933
|
+
* @private
|
8934
|
+
*/
|
8935
|
+
react.mergeStyles({ position: 'relative', width: '100%', height: '100%' });
|
8936
|
+
/**
|
8937
|
+
* Small floating modal width and height in rem for small screen
|
8938
|
+
*/
|
8939
|
+
const SMALL_FLOATING_MODAL_SIZE_PX = { width: 64, height: 88 };
|
8940
|
+
/**
|
8941
|
+
* Large floating modal width and height in rem for large screen
|
8942
|
+
* Aspect ratio: 16:9
|
8943
|
+
*/
|
8944
|
+
const LARGE_FLOATING_MODAL_SIZE_PX = { width: 215, height: 120 };
|
8945
|
+
/**
|
8946
|
+
* @private
|
8947
|
+
* z-index to ensure that the local video tile is above the video gallery.
|
8948
|
+
*/
|
8949
|
+
const LOCAL_VIDEO_TILE_ZINDEX = 2;
|
8950
|
+
/**
|
8951
|
+
* @private
|
8952
|
+
*/
|
8953
|
+
const localVideoTileContainerStyle = (theme, isNarrow) => {
|
8954
|
+
return Object.assign({ minWidth: isNarrow ? _pxToRem(SMALL_FLOATING_MODAL_SIZE_PX.width) : _pxToRem(LARGE_FLOATING_MODAL_SIZE_PX.width), minHeight: isNarrow ? _pxToRem(SMALL_FLOATING_MODAL_SIZE_PX.height) : _pxToRem(LARGE_FLOATING_MODAL_SIZE_PX.height), position: 'absolute', bottom: _pxToRem(localVideoTileOuterPaddingPX), borderRadius: theme.effects.roundedCorner4, overflow: 'hidden' }, (theme.rtl
|
8955
|
+
? { left: _pxToRem(localVideoTileOuterPaddingPX) }
|
8956
|
+
: { right: _pxToRem(localVideoTileOuterPaddingPX) }));
|
8957
|
+
};
|
8958
|
+
/**
|
8959
|
+
* @private
|
8960
|
+
*/
|
8961
|
+
const localVideoTileWithControlsContainerStyle = (theme, isNarrow) => {
|
8962
|
+
return react.concatStyleSets(localVideoTileContainerStyle(theme, isNarrow), {
|
8963
|
+
root: { boxShadow: theme.effects.elevation8 }
|
8964
|
+
});
|
8965
|
+
};
|
8966
|
+
/**
|
8967
|
+
* @private
|
8968
|
+
*/
|
8969
|
+
const floatingLocalVideoModalStyle = (theme, isNarrow) => {
|
8970
|
+
return react.concatStyleSets({
|
8971
|
+
main: localVideoTileContainerStyle(theme, isNarrow)
|
8972
|
+
}, {
|
8973
|
+
main: {
|
8974
|
+
boxShadow: theme.effects.elevation8,
|
8975
|
+
':focus-within': {
|
8976
|
+
boxShadow: theme.effects.elevation16,
|
8977
|
+
border: `${_pxToRem(2)} solid ${theme.palette.neutralPrimary}`
|
8978
|
+
}
|
8979
|
+
}
|
8980
|
+
}, localVideoModalStyles);
|
8981
|
+
};
|
8982
|
+
/**
|
8983
|
+
* Padding equal to the amount the modal should stay inside the bounds of the container.
|
8984
|
+
* i.e. if this is 8px, the modal should always be at least 8px inside the container at all times on all sides.
|
8985
|
+
* @private
|
8986
|
+
*/
|
8987
|
+
const localVideoTileOuterPaddingPX = 8;
|
8988
|
+
/**
|
8989
|
+
* @private
|
8990
|
+
*/
|
8991
|
+
const floatingLocalVideoTileStyle = {
|
8992
|
+
root: {
|
8993
|
+
position: 'absolute',
|
8994
|
+
zIndex: LOCAL_VIDEO_TILE_ZINDEX,
|
8995
|
+
height: '100%',
|
8996
|
+
width: '100%'
|
8997
|
+
}
|
8998
|
+
};
|
8999
|
+
/**
|
9000
|
+
* Styles for the local video tile modal when it is focused, will cause keyboard move icon to appear over video
|
9001
|
+
* @private
|
9002
|
+
*/
|
9003
|
+
const localVideoModalStyles = {
|
9004
|
+
keyboardMoveIconContainer: {
|
9005
|
+
zIndex: LOCAL_VIDEO_TILE_ZINDEX + 1 // zIndex to set the keyboard movement Icon above the other layers in the video tile.
|
9006
|
+
}
|
9007
|
+
};
|
9008
|
+
|
9009
|
+
// Copyright (c) Microsoft Corporation.
|
9010
|
+
/**
|
9011
|
+
* @private
|
9012
|
+
*/
|
9013
|
+
const horizontalGalleryContainerStyle = (shouldFloatLocalVideo, isNarrow) => {
|
9014
|
+
return {
|
9015
|
+
minHeight: isNarrow
|
9016
|
+
? `${SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM.height}rem`
|
9017
|
+
: `${LARGE_HORIZONTAL_GALLERY_TILE_SIZE_REM.height}rem`,
|
9018
|
+
width: shouldFloatLocalVideo
|
9019
|
+
? isNarrow
|
9020
|
+
? `calc(100% - ${_pxToRem(SMALL_FLOATING_MODAL_SIZE_PX.width)})`
|
9021
|
+
: `calc(100% - ${_pxToRem(LARGE_FLOATING_MODAL_SIZE_PX.width)})`
|
9022
|
+
: '100%',
|
9023
|
+
paddingRight: '0.5rem'
|
9024
|
+
};
|
9025
|
+
};
|
9026
|
+
/**
|
9027
|
+
* @private
|
9028
|
+
*/
|
9029
|
+
const horizontalGalleryStyle = (isNarrow) => {
|
9030
|
+
return {
|
9031
|
+
children: isNarrow ? SMALL_HORIZONTAL_GALLERY_TILE_STYLE : LARGE_HORIZONTAL_GALLERY_TILE_STYLE
|
9032
|
+
};
|
9033
|
+
};
|
9034
|
+
/**
|
9035
|
+
* Small horizontal gallery tile size in rem
|
9036
|
+
* @private
|
9037
|
+
*/
|
9038
|
+
const SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM = { height: 5.5, width: 5.5 };
|
9039
|
+
/**
|
9040
|
+
* Large horizontal gallery tile size in rem
|
9041
|
+
* @private
|
9042
|
+
*/
|
9043
|
+
const LARGE_HORIZONTAL_GALLERY_TILE_SIZE_REM = { height: 7.5, width: 10 };
|
9044
|
+
/**
|
9045
|
+
* @private
|
9046
|
+
*/
|
9047
|
+
const SMALL_HORIZONTAL_GALLERY_TILE_STYLE = {
|
9048
|
+
minHeight: `${SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM.height}rem`,
|
9049
|
+
minWidth: `${SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM.width}rem`,
|
9050
|
+
maxHeight: `${SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM.height}rem`,
|
9051
|
+
maxWidth: `${SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM.width}rem`
|
9052
|
+
};
|
9053
|
+
/**
|
9054
|
+
* @private
|
9055
|
+
*/
|
9056
|
+
const LARGE_HORIZONTAL_GALLERY_TILE_STYLE = {
|
9057
|
+
minHeight: `${LARGE_HORIZONTAL_GALLERY_TILE_SIZE_REM.height}rem`,
|
9058
|
+
minWidth: `${LARGE_HORIZONTAL_GALLERY_TILE_SIZE_REM.width}rem`,
|
9059
|
+
maxHeight: `${LARGE_HORIZONTAL_GALLERY_TILE_SIZE_REM.height}rem`,
|
9060
|
+
maxWidth: `${LARGE_HORIZONTAL_GALLERY_TILE_SIZE_REM.width}rem`
|
9061
|
+
};
|
9062
|
+
|
9063
|
+
// Copyright (c) Microsoft Corporation.
|
9064
|
+
/**
|
9065
|
+
* @private
|
9066
|
+
*/
|
9067
|
+
const scrollableHorizontalGalleryStyles = {
|
9068
|
+
root: {
|
9069
|
+
width: '100%',
|
9070
|
+
minHeight: `${SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM.height}rem`,
|
9071
|
+
paddingRight: '0.5rem',
|
9072
|
+
'> *': SMALL_HORIZONTAL_GALLERY_TILE_STYLE
|
9073
|
+
}
|
9074
|
+
};
|
9075
|
+
/**
|
9076
|
+
* @private
|
9077
|
+
*/
|
9078
|
+
const scrollableHorizontalGalleryContainerStyles = react.mergeStyles({
|
9079
|
+
display: 'flex',
|
9080
|
+
width: `calc(100% - ${SMALL_FLOATING_MODAL_SIZE_PX.width}px)`,
|
9081
|
+
minHeight: `${SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM.height}rem`,
|
9082
|
+
overflow: 'scroll',
|
9083
|
+
'-ms-overflow-style': 'none',
|
9084
|
+
'scrollbar-width': 'none',
|
9085
|
+
'::-webkit-scrollbar': { display: 'none' }
|
9086
|
+
});
|
9087
|
+
|
9088
|
+
// Copyright (c) Microsoft Corporation.
|
9089
|
+
/**
|
9090
|
+
* Component to display elements horizontally in a scrollable container
|
9091
|
+
* @private
|
9092
|
+
*/
|
9093
|
+
const ScrollableHorizontalGallery = (props) => {
|
9094
|
+
const { horizontalGalleryElements } = props;
|
9095
|
+
const ref = React.useRef();
|
9096
|
+
const { events: dragabbleEvents } = reactUseDraggableScroll.useDraggable(ref);
|
9097
|
+
return (React__default['default'].createElement("div", Object.assign({ ref: ref }, dragabbleEvents, { className: scrollableHorizontalGalleryContainerStyles }),
|
9098
|
+
React__default['default'].createElement(react.Stack, { "data-ui-id": "scrollable-horizontal-gallery", horizontal: true, styles: scrollableHorizontalGalleryStyles, tokens: { childrenGap: '0.5rem' } }, horizontalGalleryElements)));
|
9099
|
+
};
|
9100
|
+
|
8913
9101
|
// Copyright (c) Microsoft Corporation.
|
8914
9102
|
// Licensed under the MIT license.
|
8915
9103
|
/**
|
@@ -8919,6 +9107,15 @@ const rootLayoutStyle$1 = {
|
|
8919
9107
|
root: { position: 'relative', height: '100%', width: '100%', padding: '0.5rem' }
|
8920
9108
|
};
|
8921
9109
|
|
9110
|
+
// Copyright (c) Microsoft Corporation.
|
9111
|
+
// Licensed under the MIT license.
|
9112
|
+
/**
|
9113
|
+
* @private
|
9114
|
+
*/
|
9115
|
+
const videoGalleryLayoutGap = {
|
9116
|
+
childrenGap: '0.5rem'
|
9117
|
+
};
|
9118
|
+
|
8922
9119
|
/**
|
8923
9120
|
* Calculates the participants that should be rendered based on the list of dominant
|
8924
9121
|
* speakers and currently rendered participants in a call.
|
@@ -8972,10 +9169,7 @@ const participantsById = (participants) => {
|
|
8972
9169
|
// Copyright (c) Microsoft Corporation.
|
8973
9170
|
const DEFAULT_MAX_REMOTE_VIDEOSTREAMS = 4;
|
8974
9171
|
const DEFAULT_MAX_AUDIO_DOMINANT_SPEAKERS = 6;
|
8975
|
-
|
8976
|
-
* @private
|
8977
|
-
*/
|
8978
|
-
const useFloatingLocalVideoLayout = (props) => {
|
9172
|
+
const _useOrganizedParticipants = (props) => {
|
8979
9173
|
var _a, _b;
|
8980
9174
|
const visibleVideoParticipants = React.useRef([]);
|
8981
9175
|
const visibleAudioParticipants = React.useRef([]);
|
@@ -9032,10 +9226,9 @@ const useFloatingLocalVideoLayout = (props) => {
|
|
9032
9226
|
const horizontalGalleryParticipants = getHorizontalGalleryRemoteParticipants();
|
9033
9227
|
return { gridParticipants, horizontalGalleryParticipants };
|
9034
9228
|
};
|
9035
|
-
|
9036
|
-
|
9037
|
-
|
9038
|
-
const usePinnedParticipantLayout = (props) => {
|
9229
|
+
/* @conditional-compile-remove(pinned-participants) */
|
9230
|
+
const _useOrganizedParticipantsWithPinnedParticipants = (props) => {
|
9231
|
+
var _a;
|
9039
9232
|
// map remote participants by userId
|
9040
9233
|
const remoteParticipantMap = props.remoteParticipants.reduce((map, remoteParticipant) => {
|
9041
9234
|
map[remoteParticipant.userId] = remoteParticipant;
|
@@ -9045,7 +9238,7 @@ const usePinnedParticipantLayout = (props) => {
|
|
9045
9238
|
let pinnedParticipantsWithVideoOnCount = 0;
|
9046
9239
|
// get pinned participants in the same order of pinned participant user ids using remoteParticipantMap
|
9047
9240
|
const pinnedParticipants = [];
|
9048
|
-
props.pinnedParticipantUserIds.forEach((id) => {
|
9241
|
+
(_a = props.pinnedParticipantUserIds) === null || _a === void 0 ? void 0 : _a.forEach((id) => {
|
9049
9242
|
var _a;
|
9050
9243
|
const pinnedParticipant = remoteParticipantMap[id];
|
9051
9244
|
if (pinnedParticipant) {
|
@@ -9058,24 +9251,32 @@ const usePinnedParticipantLayout = (props) => {
|
|
9058
9251
|
// get unpinned participants by filtering all remote participants using a set of pinned participant user ids
|
9059
9252
|
const pinnedParticipantUserIdSet = new Set(props.pinnedParticipantUserIds);
|
9060
9253
|
const unpinnedParticipants = props.remoteParticipants.filter((p) => !pinnedParticipantUserIdSet.has(p.userId));
|
9061
|
-
const
|
9254
|
+
const useOrganizedParticipantsProps = Object.assign(Object.assign({}, props), {
|
9062
9255
|
// if there are pinned participants then we should only consider unpinned participants
|
9063
9256
|
remoteParticipants: unpinnedParticipants,
|
9064
9257
|
// if there is a maximum of remote video streams we need to subtract pinned participants with video
|
9065
9258
|
maxRemoteVideoStreams: props.maxRemoteVideoStreams
|
9066
9259
|
? props.maxRemoteVideoStreams - pinnedParticipantsWithVideoOnCount
|
9067
9260
|
: undefined });
|
9068
|
-
const
|
9069
|
-
if (
|
9070
|
-
return
|
9261
|
+
const useOrganizedParticipantsResult = _useOrganizedParticipants(useOrganizedParticipantsProps);
|
9262
|
+
if (pinnedParticipants.length === 0) {
|
9263
|
+
return useOrganizedParticipantsResult;
|
9071
9264
|
}
|
9072
9265
|
return {
|
9073
9266
|
gridParticipants: props.isScreenShareActive ? [] : pinnedParticipants,
|
9074
9267
|
horizontalGalleryParticipants: props.isScreenShareActive
|
9075
|
-
? pinnedParticipants.concat(
|
9076
|
-
:
|
9268
|
+
? pinnedParticipants.concat(useOrganizedParticipantsResult.horizontalGalleryParticipants)
|
9269
|
+
: useOrganizedParticipantsResult.gridParticipants.concat(useOrganizedParticipantsResult.horizontalGalleryParticipants)
|
9077
9270
|
};
|
9078
9271
|
};
|
9272
|
+
/**
|
9273
|
+
* Hook to determine which participants should be in grid and horizontal gallery and their order respectively
|
9274
|
+
* @private
|
9275
|
+
*/
|
9276
|
+
const useOrganizedParticipants = (args) => {
|
9277
|
+
/* @conditional-compile-remove(pinned-participants) */
|
9278
|
+
return _useOrganizedParticipantsWithPinnedParticipants(args);
|
9279
|
+
};
|
9079
9280
|
|
9080
9281
|
// Copyright (c) Microsoft Corporation.
|
9081
9282
|
// Licensed under the MIT license.
|
@@ -9225,138 +9426,6 @@ const calculateChildrenPerPage = (args) => {
|
|
9225
9426
|
return Math.floor((childrenSpace + gapWidth) / (childWidth + gapWidth));
|
9226
9427
|
};
|
9227
9428
|
|
9228
|
-
// Copyright (c) Microsoft Corporation.
|
9229
|
-
/**
|
9230
|
-
* @private
|
9231
|
-
*/
|
9232
|
-
react.mergeStyles({ position: 'relative', width: '100%', height: '100%' });
|
9233
|
-
/**
|
9234
|
-
* Small floating modal width and height in rem for small screen
|
9235
|
-
*/
|
9236
|
-
const SMALL_FLOATING_MODAL_SIZE_PX = { width: 64, height: 88 };
|
9237
|
-
/**
|
9238
|
-
* Large floating modal width and height in rem for large screen
|
9239
|
-
* Aspect ratio: 16:9
|
9240
|
-
*/
|
9241
|
-
const LARGE_FLOATING_MODAL_SIZE_PX = { width: 215, height: 120 };
|
9242
|
-
/**
|
9243
|
-
* @private
|
9244
|
-
* z-index to ensure that the local video tile is above the video gallery.
|
9245
|
-
*/
|
9246
|
-
const LOCAL_VIDEO_TILE_ZINDEX = 2;
|
9247
|
-
/**
|
9248
|
-
* @private
|
9249
|
-
*/
|
9250
|
-
const localVideoTileContainerStyle = (theme, isNarrow) => {
|
9251
|
-
return Object.assign({ minWidth: isNarrow ? _pxToRem(SMALL_FLOATING_MODAL_SIZE_PX.width) : _pxToRem(LARGE_FLOATING_MODAL_SIZE_PX.width), minHeight: isNarrow ? _pxToRem(SMALL_FLOATING_MODAL_SIZE_PX.height) : _pxToRem(LARGE_FLOATING_MODAL_SIZE_PX.height), position: 'absolute', bottom: _pxToRem(localVideoTileOuterPaddingPX), borderRadius: theme.effects.roundedCorner4, overflow: 'hidden' }, (theme.rtl
|
9252
|
-
? { left: _pxToRem(localVideoTileOuterPaddingPX) }
|
9253
|
-
: { right: _pxToRem(localVideoTileOuterPaddingPX) }));
|
9254
|
-
};
|
9255
|
-
/**
|
9256
|
-
* @private
|
9257
|
-
*/
|
9258
|
-
const localVideoTileWithControlsContainerStyle = (theme, isNarrow) => {
|
9259
|
-
return react.concatStyleSets(localVideoTileContainerStyle(theme, isNarrow), {
|
9260
|
-
root: { boxShadow: theme.effects.elevation8 }
|
9261
|
-
});
|
9262
|
-
};
|
9263
|
-
/**
|
9264
|
-
* @private
|
9265
|
-
*/
|
9266
|
-
const floatingLocalVideoModalStyle = (theme, isNarrow) => {
|
9267
|
-
return react.concatStyleSets({
|
9268
|
-
main: localVideoTileContainerStyle(theme, isNarrow)
|
9269
|
-
}, {
|
9270
|
-
main: {
|
9271
|
-
boxShadow: theme.effects.elevation8,
|
9272
|
-
':focus-within': {
|
9273
|
-
boxShadow: theme.effects.elevation16,
|
9274
|
-
border: `${_pxToRem(2)} solid ${theme.palette.neutralPrimary}`
|
9275
|
-
}
|
9276
|
-
}
|
9277
|
-
}, localVideoModalStyles);
|
9278
|
-
};
|
9279
|
-
/**
|
9280
|
-
* Padding equal to the amount the modal should stay inside the bounds of the container.
|
9281
|
-
* i.e. if this is 8px, the modal should always be at least 8px inside the container at all times on all sides.
|
9282
|
-
* @private
|
9283
|
-
*/
|
9284
|
-
const localVideoTileOuterPaddingPX = 8;
|
9285
|
-
/**
|
9286
|
-
* @private
|
9287
|
-
*/
|
9288
|
-
const floatingLocalVideoTileStyle = {
|
9289
|
-
root: {
|
9290
|
-
position: 'absolute',
|
9291
|
-
zIndex: LOCAL_VIDEO_TILE_ZINDEX,
|
9292
|
-
height: '100%',
|
9293
|
-
width: '100%'
|
9294
|
-
}
|
9295
|
-
};
|
9296
|
-
/**
|
9297
|
-
* Styles for the local video tile modal when it is focused, will cause keyboard move icon to appear over video
|
9298
|
-
* @private
|
9299
|
-
*/
|
9300
|
-
const localVideoModalStyles = {
|
9301
|
-
keyboardMoveIconContainer: {
|
9302
|
-
zIndex: LOCAL_VIDEO_TILE_ZINDEX + 1 // zIndex to set the keyboard movement Icon above the other layers in the video tile.
|
9303
|
-
}
|
9304
|
-
};
|
9305
|
-
|
9306
|
-
// Copyright (c) Microsoft Corporation.
|
9307
|
-
/**
|
9308
|
-
* @private
|
9309
|
-
*/
|
9310
|
-
const horizontalGalleryContainerStyle = (shouldFloatLocalVideo, isNarrow) => {
|
9311
|
-
return {
|
9312
|
-
minHeight: isNarrow
|
9313
|
-
? `${SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM.height}rem`
|
9314
|
-
: `${LARGE_HORIZONTAL_GALLERY_TILE_SIZE_REM.height}rem`,
|
9315
|
-
width: shouldFloatLocalVideo
|
9316
|
-
? isNarrow
|
9317
|
-
? `calc(100% - ${_pxToRem(SMALL_FLOATING_MODAL_SIZE_PX.width)})`
|
9318
|
-
: `calc(100% - ${_pxToRem(LARGE_FLOATING_MODAL_SIZE_PX.width)})`
|
9319
|
-
: '100%',
|
9320
|
-
paddingRight: '0.5rem'
|
9321
|
-
};
|
9322
|
-
};
|
9323
|
-
/**
|
9324
|
-
* @private
|
9325
|
-
*/
|
9326
|
-
const horizontalGalleryStyle = (isNarrow) => {
|
9327
|
-
return {
|
9328
|
-
children: isNarrow ? SMALL_HORIZONTAL_GALLERY_TILE_STYLE : LARGE_HORIZONTAL_GALLERY_TILE_STYLE
|
9329
|
-
};
|
9330
|
-
};
|
9331
|
-
/**
|
9332
|
-
* Small horizontal gallery tile size in rem
|
9333
|
-
* @private
|
9334
|
-
*/
|
9335
|
-
const SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM = { height: 5.5, width: 5.5 };
|
9336
|
-
/**
|
9337
|
-
* Large horizontal gallery tile size in rem
|
9338
|
-
* @private
|
9339
|
-
*/
|
9340
|
-
const LARGE_HORIZONTAL_GALLERY_TILE_SIZE_REM = { height: 7.5, width: 10 };
|
9341
|
-
/**
|
9342
|
-
* @private
|
9343
|
-
*/
|
9344
|
-
const SMALL_HORIZONTAL_GALLERY_TILE_STYLE = {
|
9345
|
-
minHeight: `${SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM.height}rem`,
|
9346
|
-
minWidth: `${SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM.width}rem`,
|
9347
|
-
maxHeight: `${SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM.height}rem`,
|
9348
|
-
maxWidth: `${SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM.width}rem`
|
9349
|
-
};
|
9350
|
-
/**
|
9351
|
-
* @private
|
9352
|
-
*/
|
9353
|
-
const LARGE_HORIZONTAL_GALLERY_TILE_STYLE = {
|
9354
|
-
minHeight: `${LARGE_HORIZONTAL_GALLERY_TILE_SIZE_REM.height}rem`,
|
9355
|
-
minWidth: `${LARGE_HORIZONTAL_GALLERY_TILE_SIZE_REM.width}rem`,
|
9356
|
-
maxHeight: `${LARGE_HORIZONTAL_GALLERY_TILE_SIZE_REM.height}rem`,
|
9357
|
-
maxWidth: `${LARGE_HORIZONTAL_GALLERY_TILE_SIZE_REM.width}rem`
|
9358
|
-
};
|
9359
|
-
|
9360
9429
|
// Copyright (c) Microsoft Corporation.
|
9361
9430
|
/**
|
9362
9431
|
* A ResponsiveHorizontalGallery styled for the {@link VideoGallery}
|
@@ -9367,8 +9436,7 @@ const VideoGalleryResponsiveHorizontalGallery = (props) => {
|
|
9367
9436
|
const { shouldFloatLocalVideo = false, isNarrow = false, horizontalGalleryElements, styles } = props;
|
9368
9437
|
const containerStyles = React.useMemo(() => horizontalGalleryContainerStyle(shouldFloatLocalVideo, isNarrow), [shouldFloatLocalVideo, isNarrow]);
|
9369
9438
|
const galleryStyles = React.useMemo(() => react.concatStyleSets(horizontalGalleryStyle(isNarrow), styles), [isNarrow, styles]);
|
9370
|
-
return (React__default['default'].createElement(
|
9371
|
-
React__default['default'].createElement(ResponsiveHorizontalGallery, { key: "responsive-horizontal-gallery", containerStyles: containerStyles, horizontalGalleryStyles: galleryStyles, childWidthRem: isNarrow ? SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM.width : LARGE_HORIZONTAL_GALLERY_TILE_SIZE_REM.width, buttonWidthRem: HORIZONTAL_GALLERY_BUTTON_WIDTH, gapWidthRem: HORIZONTAL_GALLERY_GAP }, horizontalGalleryElements)));
|
9439
|
+
return (React__default['default'].createElement(ResponsiveHorizontalGallery, { key: "responsive-horizontal-gallery", containerStyles: containerStyles, horizontalGalleryStyles: galleryStyles, childWidthRem: isNarrow ? SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM.width : LARGE_HORIZONTAL_GALLERY_TILE_SIZE_REM.width, buttonWidthRem: HORIZONTAL_GALLERY_BUTTON_WIDTH, gapWidthRem: HORIZONTAL_GALLERY_GAP }, horizontalGalleryElements));
|
9372
9440
|
};
|
9373
9441
|
|
9374
9442
|
// Copyright (c) Microsoft Corporation.
|
@@ -9379,22 +9447,24 @@ const VideoGalleryResponsiveHorizontalGallery = (props) => {
|
|
9379
9447
|
* @private
|
9380
9448
|
*/
|
9381
9449
|
const DefaultLayout = (props) => {
|
9382
|
-
const { remoteParticipants = [], dominantSpeakers, localVideoComponent, screenShareComponent, onRenderRemoteParticipant, styles, maxRemoteVideoStreams, parentWidth
|
9450
|
+
const { remoteParticipants = [], dominantSpeakers, localVideoComponent, screenShareComponent, onRenderRemoteParticipant, styles, maxRemoteVideoStreams, parentWidth,
|
9451
|
+
/* @conditional-compile-remove(pinned-participants) */ pinnedParticipantUserIds } = props;
|
9383
9452
|
const isNarrow = parentWidth ? isNarrowWidth(parentWidth) : false;
|
9384
|
-
const
|
9453
|
+
const { gridParticipants, horizontalGalleryParticipants } = useOrganizedParticipants({
|
9385
9454
|
remoteParticipants,
|
9386
9455
|
dominantSpeakers,
|
9387
9456
|
maxRemoteVideoStreams,
|
9388
|
-
isScreenShareActive: !!screenShareComponent
|
9457
|
+
isScreenShareActive: !!screenShareComponent,
|
9458
|
+
/* @conditional-compile-remove(pinned-participants) */ pinnedParticipantUserIds
|
9389
9459
|
});
|
9390
9460
|
let activeVideoStreams = 0;
|
9391
|
-
const gridTiles =
|
9461
|
+
const gridTiles = gridParticipants.map((p) => {
|
9392
9462
|
var _a, _b;
|
9393
9463
|
return onRenderRemoteParticipant(p, maxRemoteVideoStreams && maxRemoteVideoStreams >= 0
|
9394
9464
|
? ((_a = p.videoStream) === null || _a === void 0 ? void 0 : _a.isAvailable) && activeVideoStreams++ < maxRemoteVideoStreams
|
9395
9465
|
: (_b = p.videoStream) === null || _b === void 0 ? void 0 : _b.isAvailable);
|
9396
9466
|
});
|
9397
|
-
const horizontalGalleryTiles =
|
9467
|
+
const horizontalGalleryTiles = horizontalGalleryParticipants.map((p) => {
|
9398
9468
|
var _a, _b;
|
9399
9469
|
return onRenderRemoteParticipant(p, maxRemoteVideoStreams && maxRemoteVideoStreams >= 0
|
9400
9470
|
? ((_a = p.videoStream) === null || _a === void 0 ? void 0 : _a.isAvailable) && activeVideoStreams++ < maxRemoteVideoStreams
|
@@ -9403,9 +9473,19 @@ const DefaultLayout = (props) => {
|
|
9403
9473
|
if (localVideoComponent) {
|
9404
9474
|
gridTiles.push(localVideoComponent);
|
9405
9475
|
}
|
9406
|
-
|
9476
|
+
const horizontalGallery = React.useMemo(() => {
|
9477
|
+
if (horizontalGalleryTiles.length === 0) {
|
9478
|
+
return null;
|
9479
|
+
}
|
9480
|
+
/* @conditional-compile-remove(pinned-participants) */
|
9481
|
+
if (isNarrow) {
|
9482
|
+
return React__default['default'].createElement(ScrollableHorizontalGallery, { horizontalGalleryElements: horizontalGalleryTiles });
|
9483
|
+
}
|
9484
|
+
return (React__default['default'].createElement(VideoGalleryResponsiveHorizontalGallery, { isNarrow: isNarrow, shouldFloatLocalVideo: true, horizontalGalleryElements: horizontalGalleryTiles, styles: styles === null || styles === void 0 ? void 0 : styles.horizontalGallery }));
|
9485
|
+
}, [isNarrow, horizontalGalleryTiles, styles === null || styles === void 0 ? void 0 : styles.horizontalGallery]);
|
9486
|
+
return (React__default['default'].createElement(react.Stack, { horizontal: false, styles: rootLayoutStyle$1, tokens: videoGalleryLayoutGap },
|
9407
9487
|
screenShareComponent ? (screenShareComponent) : (React__default['default'].createElement(GridLayout, { key: "grid-layout", styles: styles === null || styles === void 0 ? void 0 : styles.gridLayout }, gridTiles)),
|
9408
|
-
|
9488
|
+
horizontalGallery));
|
9409
9489
|
};
|
9410
9490
|
|
9411
9491
|
// Copyright (c) Microsoft Corporation.
|
@@ -10151,17 +10231,19 @@ const layerHostStyle = {
|
|
10151
10231
|
* @private
|
10152
10232
|
*/
|
10153
10233
|
const FloatingLocalVideoLayout = (props) => {
|
10154
|
-
const { remoteParticipants = [], dominantSpeakers, localVideoComponent, screenShareComponent, onRenderRemoteParticipant, styles, maxRemoteVideoStreams, showCameraSwitcherInLocalPreview, parentWidth, parentHeight
|
10234
|
+
const { remoteParticipants = [], dominantSpeakers, localVideoComponent, screenShareComponent, onRenderRemoteParticipant, styles, maxRemoteVideoStreams, showCameraSwitcherInLocalPreview, parentWidth, parentHeight,
|
10235
|
+
/* @conditional-compile-remove(pinned-participants) */ pinnedParticipantUserIds } = props;
|
10155
10236
|
const theme = useTheme();
|
10156
10237
|
const isNarrow = parentWidth ? isNarrowWidth(parentWidth) : false;
|
10157
|
-
const
|
10238
|
+
const { gridParticipants, horizontalGalleryParticipants } = useOrganizedParticipants({
|
10158
10239
|
remoteParticipants,
|
10159
10240
|
dominantSpeakers,
|
10160
10241
|
maxRemoteVideoStreams,
|
10161
|
-
isScreenShareActive: !!screenShareComponent
|
10242
|
+
isScreenShareActive: !!screenShareComponent,
|
10243
|
+
/* @conditional-compile-remove(pinned-participants) */ pinnedParticipantUserIds
|
10162
10244
|
});
|
10163
10245
|
let activeVideoStreams = 0;
|
10164
|
-
const gridTiles =
|
10246
|
+
const gridTiles = gridParticipants.map((p) => {
|
10165
10247
|
var _a, _b;
|
10166
10248
|
return onRenderRemoteParticipant(p, maxRemoteVideoStreams && maxRemoteVideoStreams >= 0
|
10167
10249
|
? ((_a = p.videoStream) === null || _a === void 0 ? void 0 : _a.isAvailable) && activeVideoStreams++ < maxRemoteVideoStreams
|
@@ -10171,7 +10253,7 @@ const FloatingLocalVideoLayout = (props) => {
|
|
10171
10253
|
if (!shouldFloatLocalVideo && localVideoComponent) {
|
10172
10254
|
gridTiles.push(localVideoComponent);
|
10173
10255
|
}
|
10174
|
-
const horizontalGalleryTiles =
|
10256
|
+
const horizontalGalleryTiles = horizontalGalleryParticipants.map((p) => {
|
10175
10257
|
var _a, _b;
|
10176
10258
|
return onRenderRemoteParticipant(p, maxRemoteVideoStreams && maxRemoteVideoStreams >= 0
|
10177
10259
|
? ((_a = p.videoStream) === null || _a === void 0 ? void 0 : _a.isAvailable) && activeVideoStreams++ < maxRemoteVideoStreams
|
@@ -10184,62 +10266,22 @@ const FloatingLocalVideoLayout = (props) => {
|
|
10184
10266
|
boxShadow: theme.effects.elevation8,
|
10185
10267
|
zIndex: LOCAL_VIDEO_TILE_ZINDEX
|
10186
10268
|
}) }, localVideoComponent)) : horizontalGalleryTiles.length > 0 ? (React__default['default'].createElement(react.Stack, { className: react.mergeStyles(localVideoTileContainerStyle(theme, isNarrow)) }, localVideoComponent)) : (React__default['default'].createElement(FloatingLocalVideo, { localVideoComponent: localVideoComponent, layerHostId: layerHostId, isNarrow: isNarrow, parentWidth: parentWidth, parentHeight: parentHeight }))) : undefined;
|
10269
|
+
const horizontalGallery = React.useMemo(() => {
|
10270
|
+
if (horizontalGalleryTiles.length === 0) {
|
10271
|
+
return null;
|
10272
|
+
}
|
10273
|
+
/* @conditional-compile-remove(pinned-participants) */
|
10274
|
+
if (isNarrow) {
|
10275
|
+
return React__default['default'].createElement(ScrollableHorizontalGallery, { horizontalGalleryElements: horizontalGalleryTiles });
|
10276
|
+
}
|
10277
|
+
return (React__default['default'].createElement(VideoGalleryResponsiveHorizontalGallery, { isNarrow: isNarrow, shouldFloatLocalVideo: true, horizontalGalleryElements: horizontalGalleryTiles, styles: styles === null || styles === void 0 ? void 0 : styles.horizontalGallery }));
|
10278
|
+
}, [isNarrow, horizontalGalleryTiles, styles === null || styles === void 0 ? void 0 : styles.horizontalGallery]);
|
10187
10279
|
return (React__default['default'].createElement(react.Stack, { styles: rootLayoutStyle },
|
10188
|
-
|
10189
|
-
React__default['default'].createElement(react.Stack, { horizontal: false, styles: innerLayoutStyle },
|
10280
|
+
React__default['default'].createElement(react.Stack, { horizontal: false, styles: innerLayoutStyle, tokens: videoGalleryLayoutGap },
|
10190
10281
|
screenShareComponent ? (screenShareComponent) : (React__default['default'].createElement(GridLayout, { key: "grid-layout", styles: styles === null || styles === void 0 ? void 0 : styles.gridLayout }, gridTiles)),
|
10191
|
-
|
10192
|
-
React__default['default'].createElement(react.LayerHost, { id: layerHostId, className: react.mergeStyles(layerHostStyle) }))));
|
10193
|
-
};
|
10194
|
-
|
10195
|
-
// Copyright (c) Microsoft Corporation.
|
10196
|
-
/**
|
10197
|
-
* PinnedParticipantsLayout displays remote participants and a screen sharing component in
|
10198
|
-
* a grid and horizontal gallery while floating the local video
|
10199
|
-
*
|
10200
|
-
* @private
|
10201
|
-
*/
|
10202
|
-
const PinnedParticipantsLayout = (props) => {
|
10203
|
-
const { remoteParticipants = [], pinnedParticipants = [], dominantSpeakers, localVideoComponent, screenShareComponent, onRenderRemoteParticipant, styles, maxRemoteVideoStreams, showCameraSwitcherInLocalPreview, parentWidth, parentHeight, isLocalVideoFloating } = props;
|
10204
|
-
const theme = useTheme();
|
10205
|
-
const isNarrow = parentWidth ? isNarrowWidth(parentWidth) : false;
|
10206
|
-
const pinnedParticipantsLayout = usePinnedParticipantLayout({
|
10207
|
-
remoteParticipants,
|
10208
|
-
pinnedParticipantUserIds: pinnedParticipants,
|
10209
|
-
dominantSpeakers,
|
10210
|
-
maxRemoteVideoStreams,
|
10211
|
-
isScreenShareActive: !!screenShareComponent
|
10212
|
-
});
|
10213
|
-
let activeVideoStreams = 0;
|
10214
|
-
const shouldFloatLocalVideo = isLocalVideoFloating && remoteParticipants.length > 0;
|
10215
|
-
const gridTiles = pinnedParticipantsLayout.gridParticipants.map((p) => {
|
10216
|
-
var _a, _b;
|
10217
|
-
return onRenderRemoteParticipant(p, maxRemoteVideoStreams && maxRemoteVideoStreams >= 0
|
10218
|
-
? ((_a = p.videoStream) === null || _a === void 0 ? void 0 : _a.isAvailable) && activeVideoStreams++ < maxRemoteVideoStreams
|
10219
|
-
: (_b = p.videoStream) === null || _b === void 0 ? void 0 : _b.isAvailable);
|
10220
|
-
});
|
10221
|
-
if (localVideoComponent && !shouldFloatLocalVideo) {
|
10222
|
-
gridTiles.push(localVideoComponent);
|
10223
|
-
}
|
10224
|
-
const horizontalGalleryTiles = pinnedParticipantsLayout.horizontalGalleryParticipants.map((p) => {
|
10225
|
-
var _a, _b;
|
10226
|
-
return onRenderRemoteParticipant(p, maxRemoteVideoStreams && maxRemoteVideoStreams >= 0
|
10227
|
-
? ((_a = p.videoStream) === null || _a === void 0 ? void 0 : _a.isAvailable) && activeVideoStreams++ < maxRemoteVideoStreams
|
10228
|
-
: (_b = p.videoStream) === null || _b === void 0 ? void 0 : _b.isAvailable);
|
10229
|
-
});
|
10230
|
-
const layerHostId = reactHooks.useId('layerhost');
|
10231
|
-
const wrappedLocalVideoComponent = localVideoComponent && shouldFloatLocalVideo ? (
|
10232
|
-
// When we use showCameraSwitcherInLocalPreview it disables dragging to allow keyboard navigation.
|
10233
|
-
showCameraSwitcherInLocalPreview ? (React__default['default'].createElement(react.Stack, { className: react.mergeStyles(localVideoTileWithControlsContainerStyle(theme, isNarrow), {
|
10234
|
-
boxShadow: theme.effects.elevation8,
|
10235
|
-
zIndex: LOCAL_VIDEO_TILE_ZINDEX
|
10236
|
-
}) }, localVideoComponent)) : horizontalGalleryTiles.length > 0 ? (React__default['default'].createElement(react.Stack, { className: react.mergeStyles(localVideoTileContainerStyle(theme, isNarrow)) }, localVideoComponent)) : (React__default['default'].createElement(FloatingLocalVideo, { localVideoComponent: localVideoComponent, layerHostId: layerHostId, isNarrow: isNarrow, parentWidth: parentWidth, parentHeight: parentHeight }))) : undefined;
|
10237
|
-
return (React__default['default'].createElement(react.Stack, { styles: rootLayoutStyle },
|
10282
|
+
horizontalGallery),
|
10238
10283
|
wrappedLocalVideoComponent,
|
10239
|
-
React__default['default'].createElement(react.
|
10240
|
-
screenShareComponent ? (screenShareComponent) : (React__default['default'].createElement(GridLayout, { key: "grid-layout", styles: styles === null || styles === void 0 ? void 0 : styles.gridLayout }, gridTiles)),
|
10241
|
-
horizontalGalleryTiles.length > 0 && (React__default['default'].createElement(VideoGalleryResponsiveHorizontalGallery, { isNarrow: isNarrow, shouldFloatLocalVideo: true, horizontalGalleryElements: horizontalGalleryTiles, styles: styles === null || styles === void 0 ? void 0 : styles.horizontalGallery })),
|
10242
|
-
React__default['default'].createElement(react.LayerHost, { id: layerHostId, className: react.mergeStyles(layerHostStyle) }))));
|
10284
|
+
React__default['default'].createElement(react.LayerHost, { id: layerHostId, className: react.mergeStyles(layerHostStyle) })));
|
10243
10285
|
};
|
10244
10286
|
|
10245
10287
|
// Copyright (c) Microsoft Corporation.
|
@@ -10359,7 +10401,11 @@ const VideoGallery = (props) => {
|
|
10359
10401
|
/* @conditional-compile-remove(PSTN-calls) */
|
10360
10402
|
participantState: participant.state,
|
10361
10403
|
/* @conditional-compile-remove(pinned-participants) */
|
10362
|
-
|
10404
|
+
menuKind: remoteVideoTileMenuOptions
|
10405
|
+
? remoteVideoTileMenuOptions.kind === 'drawer'
|
10406
|
+
? 'drawer'
|
10407
|
+
: 'contextual'
|
10408
|
+
: undefined,
|
10363
10409
|
/* @conditional-compile-remove(pinned-participants) */
|
10364
10410
|
drawerMenuHostId: drawerMenuHostId,
|
10365
10411
|
/* @conditional-compile-remove(pinned-participants) */
|
@@ -10393,7 +10439,6 @@ const VideoGallery = (props) => {
|
|
10393
10439
|
: undefined;
|
10394
10440
|
const layoutProps = React.useMemo(() => ({
|
10395
10441
|
remoteParticipants,
|
10396
|
-
/* @conditional-compile-remove(pinned-participants) */ pinnedParticipants,
|
10397
10442
|
screenShareComponent,
|
10398
10443
|
showCameraSwitcherInLocalPreview,
|
10399
10444
|
maxRemoteVideoStreams,
|
@@ -10403,7 +10448,7 @@ const VideoGallery = (props) => {
|
|
10403
10448
|
localVideoComponent: localVideoTile,
|
10404
10449
|
parentWidth: containerWidth,
|
10405
10450
|
parentHeight: containerHeight,
|
10406
|
-
|
10451
|
+
/* @conditional-compile-remove(pinned-participants) */ pinnedParticipantUserIds: pinnedParticipants
|
10407
10452
|
}), [
|
10408
10453
|
remoteParticipants,
|
10409
10454
|
screenShareComponent,
|
@@ -10416,14 +10461,9 @@ const VideoGallery = (props) => {
|
|
10416
10461
|
containerHeight,
|
10417
10462
|
onRenderRemoteVideoTile,
|
10418
10463
|
defaultOnRenderVideoTile,
|
10419
|
-
layout,
|
10420
10464
|
/* @conditional-compile-remove(pinned-participants) */ pinnedParticipants
|
10421
10465
|
]);
|
10422
10466
|
const videoGalleryLayout = React.useMemo(() => {
|
10423
|
-
/* @conditional-compile-remove(pinned-participants) */
|
10424
|
-
if (layoutProps.pinnedParticipants.length > 0) {
|
10425
|
-
return React__default['default'].createElement(PinnedParticipantsLayout, Object.assign({}, layoutProps));
|
10426
|
-
}
|
10427
10467
|
if (layout === 'floatingLocalVideo') {
|
10428
10468
|
return React__default['default'].createElement(FloatingLocalVideoLayout, Object.assign({}, layoutProps));
|
10429
10469
|
}
|
@@ -17507,6 +17547,8 @@ const bannerNotificationStyles = {
|
|
17507
17547
|
*/
|
17508
17548
|
const callArrangementContainerStyles = {
|
17509
17549
|
root: {
|
17550
|
+
width: '100%',
|
17551
|
+
height: '100%',
|
17510
17552
|
flexDirection: 'column-reverse' // to allow first initial keyboard focus on ControlBar
|
17511
17553
|
}
|
17512
17554
|
};
|
@@ -18471,7 +18513,7 @@ const CallArrangement = (props) => {
|
|
18471
18513
|
const isMobileWithActivePane = props.mobileView && activePane;
|
18472
18514
|
/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
|
18473
18515
|
const callCompositeContainerCSS = React.useMemo(() => {
|
18474
|
-
return { display: isMobileWithActivePane ? 'none' : 'flex' };
|
18516
|
+
return { display: isMobileWithActivePane ? 'none' : 'flex', width: '100%', height: '100%' };
|
18475
18517
|
}, [isMobileWithActivePane]);
|
18476
18518
|
// To be removed once feature is out of beta, replace with callCompositeContainerCSS
|
18477
18519
|
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|