@azure/communication-react 1.8.1-alpha-202309200012 → 1.8.1-alpha-202309210012
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 +9 -8
- package/dist/dist-cjs/communication-react/index.js +1540 -1380
- package/dist/dist-cjs/communication-react/index.js.map +1 -1
- package/dist/dist-esm/acs-ui-common/src/areEqual.d.ts +1 -0
- 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/hooks/usePropsFor.d.ts +1 -0
- package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.d.ts +1 -0
- package/dist/dist-esm/communication-react/src/mergedHooks.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/Announcer/Announcer.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/Announcer/LiveMessage.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/Announcer/MessageBlock.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/Announcer.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/CameraButton.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/Caption.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/CaptionsBanner.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/CaptionsSettingsModal.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageActionsFlyout.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/ComplianceBanner/BannerMessage.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/ComplianceBanner/ComplianceBanner.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/ComplianceBanner/DelayedUpdateBanner.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/ControlBarButton.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/ControlButtonTooltip.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/DevicePermissions/DevicePermissionDropdown.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/DevicesButton.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/Drawer/DrawerLightDismiss.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenu.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/EndCallButton.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/ErrorBar.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/FileCard.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/FileDownloadCards.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/FileUploadCards.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/HighContrastAwareIcon.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/HoldButton.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/LocalVideoCameraButton.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/MessageStatusIndicator.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/MessageThread.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/MicrophoneButton.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/ParticipantItem.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/ParticipantList.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/ParticipantsButton.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/PictureInPictureInPicture/PictureInPictureInPicture.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/RaiseHandButton.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/ScreenShareButton.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/SendBoxErrors.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/StartCaptionsButton.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/StreamMedia.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/SystemMessage.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/TroubleshootingGuideErrorBar.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/TypingIndicator.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/VideoEffects/PresetVideoEffectsItems.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/DefaultLayout.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideo.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/FocusContentLayout.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/LargeGalleryLayout.d.ts +17 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/LargeGalleryLayout.js +126 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/LargeGalleryLayout.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/Layout.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/OverflowGallery.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/ScrollableHorizontalGallery.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/SpeakerVideoLayout.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js +37 -10
- package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery.d.ts +2 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery.js +6 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/assets/RaisedHandIcon.d.ts +1 -0
- package/dist/dist-esm/react-components/src/theming/icons.d.ts +1 -0
- package/dist/dist-esm/react-components/src/types/OnRender.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.d.ts +4 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CapabilitiesChangedNotificationBar.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageErrorBar.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ExpandedLocalVideoTile.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/HoldPane.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LobbyTile.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalAndRemotePIP.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalPreview.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MutedNotification.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/NetworkReconnectTile.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/SidePane.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/StartCallButton.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Devices.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/EndCall.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Participants.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/People.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/RaiseHand.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/ScreenShare.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/usePropsFor.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/NoticePage.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/TransferPage.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/LocalVideoTileSelector.d.ts +26 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/activeVideoBackgroundEffectSelector.d.ts +24 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/callStatusSelector.d.ts +26 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/capabilitiesChangedInfoAndRoleSelector.d.ts +26 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/complianceBannerSelector.d.ts +26 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/deviceCountSelector.d.ts +26 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/devicePermissionSelector.d.ts +26 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/dominantRemoteParticipantSelector.d.ts +25 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/lobbySelector.d.ts +26 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localAndRemotePIPSelector.d.ts +27 -4
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localPreviewSelector.d.ts +26 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localVideoStreamSelector.d.ts +27 -4
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/mediaGallerySelector.d.ts +51 -5
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/mutedNotificationSelector.d.ts +26 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/networkReconnectTileSelector.d.ts +26 -3
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/ChatButton/ChatButton.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/ChatButton/ChatButtonWithUnreadMessagesBadge.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/ChatButton/NotificationIcon.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatHeader.d.ts +15 -3
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/FileDownloadErrorBar.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/FileUploadButton.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/usePropsFor.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/fileUploadsSelector.d.ts +14 -3
- package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/AvatarPersona.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsBannerMoreButton.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsSettingsModal.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js +24 -3
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/PeopleButton.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/CaptionSettingsDrawer.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/HiddenFocusStartPoint.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/ModalLocalAndRemotePIP.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/MoreButton.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/SidePaneHeader.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/TabHeader.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +3 -7
- package/dist/dist-esm/react-composites/src/composites/common/icons.js +4 -2
- package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/en-US/strings.json +1 -0
- package/package.json +10 -9
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"telemetryVersion.js","sourceRoot":"","sources":["../../../../../acs-ui-common/src/telemetryVersion.js"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;AAElC,wCAAwC;AAExC,MAAM,CAAC,OAAO,GAAG,0BAA0B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n// GENERATED FILE. DO NOT EDIT MANUALLY.\n\nmodule.exports = '1.8.1-alpha-
|
1
|
+
{"version":3,"file":"telemetryVersion.js","sourceRoot":"","sources":["../../../../../acs-ui-common/src/telemetryVersion.js"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;AAElC,wCAAwC;AAExC,MAAM,CAAC,OAAO,GAAG,0BAA0B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n// GENERATED FILE. DO NOT EDIT MANUALLY.\n\nmodule.exports = '1.8.1-alpha-202309210012';\n"]}
|
@@ -1,3 +1,4 @@
|
|
1
|
+
/// <reference types="react" />
|
1
2
|
import { CameraButton, EndCallButton, ErrorBar, MicrophoneButton, DevicesButton, ParticipantList, ScreenShareButton, VideoGallery } from "../../../react-components/src";
|
2
3
|
import { Dialpad } from "../../../react-components/src";
|
3
4
|
import { HoldButton } from "../../../react-components/src";
|
@@ -1,3 +1,4 @@
|
|
1
|
+
/// <reference types="react" />
|
1
2
|
import { CallingHandlers, GetCallingSelector } from "../../calling-component-bindings/src";
|
2
3
|
import { ChatHandlers, GetChatSelector } from "../../chat-component-bindings/src";
|
3
4
|
import { ChatClientState } from "../../chat-stateful-client/src";
|
@@ -1,3 +1,4 @@
|
|
1
|
+
/// <reference types="react" />
|
1
2
|
import { IStyle } from '@fluentui/react';
|
2
3
|
import { BaseCustomStyles, ChatMessage, CustomMessage, SystemMessage, OnRenderAvatarCallback, Message, ReadReceiptsBySenderId, ComponentSlotStyle } from '../types';
|
3
4
|
import { BlockedMessage } from '../types';
|
@@ -1,3 +1,4 @@
|
|
1
|
+
/// <reference types="react" />
|
1
2
|
import { IContextualMenuItem, IContextualMenuItemStyles } from '@fluentui/react';
|
2
3
|
import { BaseCustomStyles, OnRenderAvatarCallback, ParticipantListParticipant } from '../types';
|
3
4
|
import { ParticipantItemStyles } from './ParticipantItem';
|
@@ -1,3 +1,4 @@
|
|
1
|
+
/// <reference types="react" />
|
1
2
|
import { IContextualMenuStyles, IContextualMenuItemStyles } from '@fluentui/react';
|
2
3
|
import { ParticipantListProps, ParticipantListStyles, ParticipantMenuItemsCallback } from './ParticipantList';
|
3
4
|
import { ControlBarButtonProps, ControlBarButtonStyles } from './ControlBarButton';
|
@@ -0,0 +1,17 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { LayoutProps } from './Layout';
|
3
|
+
/**
|
4
|
+
* Props for {@link LargeGalleryLayout}.
|
5
|
+
*
|
6
|
+
* @private
|
7
|
+
*/
|
8
|
+
export declare type LargeGalleryProps = LayoutProps;
|
9
|
+
/**
|
10
|
+
* VideoGallery Layout for when user is in a large meeting and wants to see more participants
|
11
|
+
*
|
12
|
+
* Caps the number of tiles that a participant can see in the grid to 49, Video and Audio.
|
13
|
+
*
|
14
|
+
* @private
|
15
|
+
*/
|
16
|
+
export declare const LargeGalleryLayout: (props: LargeGalleryProps) => JSX.Element;
|
17
|
+
//# sourceMappingURL=LargeGalleryLayout.d.ts.map
|
@@ -0,0 +1,126 @@
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
2
|
+
// Licensed under the MIT license.
|
3
|
+
import React, { useMemo, useRef, useState } from 'react';
|
4
|
+
import { isNarrowWidth } from '../utils/responsive';
|
5
|
+
/* @conditional-compile-remove(gallery-layouts) */
|
6
|
+
import { isShortHeight } from '../utils/responsive';
|
7
|
+
import { OverflowGallery } from './OverflowGallery';
|
8
|
+
import { GridLayout } from '../GridLayout';
|
9
|
+
import { Stack } from '@fluentui/react';
|
10
|
+
import { useOrganizedParticipants } from './utils/videoGalleryLayoutUtils';
|
11
|
+
import { rootLayoutStyle } from './styles/DefaultLayout.styles';
|
12
|
+
import { videoGalleryLayoutGap } from './styles/Layout.styles';
|
13
|
+
/* @conditional-compile-remove(gallery-layouts) */
|
14
|
+
import { VERTICAL_GALLERY_TILE_SIZE_REM } from './styles/VideoGalleryResponsiveVerticalGallery.styles';
|
15
|
+
const DEFAULT_CHILDREN_PER_PAGE = 5;
|
16
|
+
/* @conditional-compile-remove(gallery-layouts) */
|
17
|
+
const REM_TO_PIXEL = 16;
|
18
|
+
/* @conditional-compile-remove(gallery-layouts) */
|
19
|
+
const LARGE_GALLERY_PARTICIPANT_CAP = 48;
|
20
|
+
/**
|
21
|
+
* VideoGallery Layout for when user is in a large meeting and wants to see more participants
|
22
|
+
*
|
23
|
+
* Caps the number of tiles that a participant can see in the grid to 49, Video and Audio.
|
24
|
+
*
|
25
|
+
* @private
|
26
|
+
*/
|
27
|
+
export const LargeGalleryLayout = (props) => {
|
28
|
+
const { remoteParticipants = [], localParticipant, dominantSpeakers, localVideoComponent, screenShareComponent, onRenderRemoteParticipant, styles, maxRemoteVideoStreams, parentWidth,
|
29
|
+
/* @conditional-compile-remove(gallery-layouts) */ parentHeight, pinnedParticipantUserIds = [],
|
30
|
+
/* @conditional-compile-remove(vertical-gallery) */ overflowGalleryPosition = 'HorizontalBottom' } = props;
|
31
|
+
const isNarrow = parentWidth ? isNarrowWidth(parentWidth) : false;
|
32
|
+
/* @conditional-compile-remove(gallery-layouts) */
|
33
|
+
const isShort = parentHeight ? isShortHeight(parentHeight) : false;
|
34
|
+
const maxStreamsTrampoline = () => {
|
35
|
+
/* @conditional-compile-remove(gallery-layouts) */
|
36
|
+
return parentWidth && parentHeight
|
37
|
+
? calculateMaxTilesInLargeGrid(parentWidth, parentHeight)
|
38
|
+
: maxRemoteVideoStreams;
|
39
|
+
return maxRemoteVideoStreams;
|
40
|
+
};
|
41
|
+
// This is for tracking the number of children in the first page of overflow gallery.
|
42
|
+
// This number will be used for the maxOverflowGalleryDominantSpeakers when organizing the remote participants.
|
43
|
+
// We need to add the local participant to the pinned participant count so we are placing the speakers correctly.
|
44
|
+
const childrenPerPage = useRef(DEFAULT_CHILDREN_PER_PAGE);
|
45
|
+
const { gridParticipants, overflowGalleryParticipants } = useOrganizedParticipants({
|
46
|
+
remoteParticipants,
|
47
|
+
localParticipant,
|
48
|
+
dominantSpeakers,
|
49
|
+
maxRemoteVideoStreams: maxStreamsTrampoline(),
|
50
|
+
isScreenShareActive: !!screenShareComponent,
|
51
|
+
maxOverflowGalleryDominantSpeakers: screenShareComponent
|
52
|
+
? childrenPerPage.current - ((pinnedParticipantUserIds.length + 1) % childrenPerPage.current)
|
53
|
+
: childrenPerPage.current,
|
54
|
+
/* @conditional-compile-remove(pinned-participants) */ pinnedParticipantUserIds,
|
55
|
+
/* @conditional-compile-remove(gallery-layouts) */ layout: 'largeGallery'
|
56
|
+
});
|
57
|
+
let activeVideoStreams = 0;
|
58
|
+
const gridTiles = gridParticipants.map((p) => {
|
59
|
+
var _a, _b;
|
60
|
+
return onRenderRemoteParticipant(p, maxRemoteVideoStreams && maxRemoteVideoStreams >= 0
|
61
|
+
? ((_a = p.videoStream) === null || _a === void 0 ? void 0 : _a.isAvailable) && activeVideoStreams++ < maxRemoteVideoStreams
|
62
|
+
: (_b = p.videoStream) === null || _b === void 0 ? void 0 : _b.isAvailable);
|
63
|
+
});
|
64
|
+
/**
|
65
|
+
* instantiate indexes available to render with indexes available that would be on first page
|
66
|
+
*
|
67
|
+
* For some components which do not strictly follow the order of the array, we might
|
68
|
+
* re-render the initial tiles -> dispose them -> create new tiles, we need to take care of
|
69
|
+
* this case when those components are here
|
70
|
+
*/
|
71
|
+
const [indexesToRender, setIndexesToRender] = useState([]);
|
72
|
+
const overflowGalleryTiles = overflowGalleryParticipants.map((p, i) => {
|
73
|
+
var _a, _b;
|
74
|
+
return onRenderRemoteParticipant(p, maxRemoteVideoStreams && maxRemoteVideoStreams >= 0
|
75
|
+
? ((_a = p.videoStream) === null || _a === void 0 ? void 0 : _a.isAvailable) && indexesToRender.includes(i) && activeVideoStreams++ < maxRemoteVideoStreams
|
76
|
+
: (_b = p.videoStream) === null || _b === void 0 ? void 0 : _b.isAvailable);
|
77
|
+
});
|
78
|
+
if (localVideoComponent) {
|
79
|
+
gridTiles.push(localVideoComponent);
|
80
|
+
}
|
81
|
+
const overflowGallery = useMemo(() => {
|
82
|
+
if (overflowGalleryTiles.length === 0) {
|
83
|
+
return null;
|
84
|
+
}
|
85
|
+
return (React.createElement(OverflowGallery, { isNarrow: isNarrow,
|
86
|
+
/* @conditional-compile-remove(gallery-layouts) */
|
87
|
+
isShort: isShort, shouldFloatLocalVideo: false, overflowGalleryElements: overflowGalleryTiles, horizontalGalleryStyles: styles === null || styles === void 0 ? void 0 : styles.horizontalGallery,
|
88
|
+
/* @conditional-compile-remove(vertical-gallery) */
|
89
|
+
verticalGalleryStyles: styles === null || styles === void 0 ? void 0 : styles.verticalGallery,
|
90
|
+
/* @conditional-compile-remove(vertical-gallery) */
|
91
|
+
overflowGalleryPosition: overflowGalleryPosition, onFetchTilesToRender: setIndexesToRender, onChildrenPerPageChange: (n) => {
|
92
|
+
childrenPerPage.current = n;
|
93
|
+
} }));
|
94
|
+
}, [
|
95
|
+
isNarrow,
|
96
|
+
/* @conditional-compile-remove(gallery-layouts) */ isShort,
|
97
|
+
overflowGalleryTiles,
|
98
|
+
styles === null || styles === void 0 ? void 0 : styles.horizontalGallery,
|
99
|
+
/* @conditional-compile-remove(vertical-gallery) */ overflowGalleryPosition,
|
100
|
+
setIndexesToRender,
|
101
|
+
/* @conditional-compile-remove(vertical-gallery) */ styles === null || styles === void 0 ? void 0 : styles.verticalGallery
|
102
|
+
]);
|
103
|
+
return (React.createElement(Stack
|
104
|
+
/* @conditional-compile-remove(vertical-gallery) */
|
105
|
+
, {
|
106
|
+
/* @conditional-compile-remove(vertical-gallery) */
|
107
|
+
horizontal: overflowGalleryPosition === 'VerticalRight', styles: rootLayoutStyle, tokens: videoGalleryLayoutGap },
|
108
|
+
/* @conditional-compile-remove(gallery-layouts) */ props.overflowGalleryPosition === 'HorizontalTop' ? (overflowGallery) : (React.createElement(React.Fragment, null)),
|
109
|
+
screenShareComponent ? (screenShareComponent) : (React.createElement(GridLayout, { key: "grid-layout", styles: styles === null || styles === void 0 ? void 0 : styles.gridLayout }, gridTiles)),
|
110
|
+
overflowGalleryTrampoline(overflowGallery,
|
111
|
+
/* @conditional-compile-remove(gallery-layouts) */ props.overflowGalleryPosition)));
|
112
|
+
};
|
113
|
+
const overflowGalleryTrampoline = (gallery, galleryPosition) => {
|
114
|
+
/* @conditional-compile-remove(gallery-layouts) */
|
115
|
+
return galleryPosition !== 'HorizontalTop' ? gallery : React.createElement(React.Fragment, null);
|
116
|
+
return gallery;
|
117
|
+
};
|
118
|
+
/* @conditional-compile-remove(gallery-layouts) */
|
119
|
+
const calculateMaxTilesInLargeGrid = (parentWidth, parentHeight) => {
|
120
|
+
const xAxisTiles = Math.floor(parentWidth / (VERTICAL_GALLERY_TILE_SIZE_REM.width * REM_TO_PIXEL));
|
121
|
+
const yAxisTiles = Math.floor(parentHeight / (VERTICAL_GALLERY_TILE_SIZE_REM.minHeight * REM_TO_PIXEL));
|
122
|
+
return xAxisTiles * yAxisTiles < LARGE_GALLERY_PARTICIPANT_CAP
|
123
|
+
? xAxisTiles * yAxisTiles
|
124
|
+
: LARGE_GALLERY_PARTICIPANT_CAP;
|
125
|
+
};
|
126
|
+
//# sourceMappingURL=LargeGalleryLayout.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"LargeGalleryLayout.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/VideoGallery/LargeGalleryLayout.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,kDAAkD;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U;QACzB,CAAC,CAAC,6BAA6B,CAAC;AACpC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport React, { useMemo, useRef, useState } from 'react';\nimport { isNarrowWidth } from '../utils/responsive';\n/* @conditional-compile-remove(gallery-layouts) */\nimport { isShortHeight } from '../utils/responsive';\nimport { LayoutProps } from './Layout';\nimport { OverflowGallery } from './OverflowGallery';\nimport { GridLayout } from '../GridLayout';\nimport { Stack } from '@fluentui/react';\nimport { useOrganizedParticipants } from './utils/videoGalleryLayoutUtils';\nimport { rootLayoutStyle } from './styles/DefaultLayout.styles';\nimport { videoGalleryLayoutGap } from './styles/Layout.styles';\n/* @conditional-compile-remove(gallery-layouts) */\nimport { VERTICAL_GALLERY_TILE_SIZE_REM } from './styles/VideoGalleryResponsiveVerticalGallery.styles';\n\n/**\n * Props for {@link LargeGalleryLayout}.\n *\n * @private\n */\nexport type LargeGalleryProps = LayoutProps;\n\nconst DEFAULT_CHILDREN_PER_PAGE = 5;\n/* @conditional-compile-remove(gallery-layouts) */\nconst REM_TO_PIXEL = 16;\n/* @conditional-compile-remove(gallery-layouts) */\nconst LARGE_GALLERY_PARTICIPANT_CAP = 48;\n/**\n * VideoGallery Layout for when user is in a large meeting and wants to see more participants\n *\n * Caps the number of tiles that a participant can see in the grid to 49, Video and Audio.\n *\n * @private\n */\nexport const LargeGalleryLayout = (props: LargeGalleryProps): JSX.Element => {\n const {\n remoteParticipants = [],\n localParticipant,\n dominantSpeakers,\n localVideoComponent,\n screenShareComponent,\n onRenderRemoteParticipant,\n styles,\n maxRemoteVideoStreams,\n parentWidth,\n /* @conditional-compile-remove(gallery-layouts) */ parentHeight,\n pinnedParticipantUserIds = [],\n /* @conditional-compile-remove(vertical-gallery) */ overflowGalleryPosition = 'HorizontalBottom'\n } = props;\n\n const isNarrow = parentWidth ? isNarrowWidth(parentWidth) : false;\n /* @conditional-compile-remove(gallery-layouts) */\n const isShort = parentHeight ? isShortHeight(parentHeight) : false;\n\n const maxStreamsTrampoline = (): number => {\n /* @conditional-compile-remove(gallery-layouts) */\n return parentWidth && parentHeight\n ? calculateMaxTilesInLargeGrid(parentWidth, parentHeight)\n : maxRemoteVideoStreams;\n return maxRemoteVideoStreams;\n };\n\n // This is for tracking the number of children in the first page of overflow gallery.\n // This number will be used for the maxOverflowGalleryDominantSpeakers when organizing the remote participants.\n // We need to add the local participant to the pinned participant count so we are placing the speakers correctly.\n const childrenPerPage = useRef(DEFAULT_CHILDREN_PER_PAGE);\n const { gridParticipants, overflowGalleryParticipants } = useOrganizedParticipants({\n remoteParticipants,\n localParticipant,\n dominantSpeakers,\n maxRemoteVideoStreams: maxStreamsTrampoline(),\n isScreenShareActive: !!screenShareComponent,\n maxOverflowGalleryDominantSpeakers: screenShareComponent\n ? childrenPerPage.current - ((pinnedParticipantUserIds.length + 1) % childrenPerPage.current)\n : childrenPerPage.current,\n /* @conditional-compile-remove(pinned-participants) */ pinnedParticipantUserIds,\n /* @conditional-compile-remove(gallery-layouts) */ layout: 'largeGallery'\n });\n let activeVideoStreams = 0;\n\n const gridTiles = gridParticipants.map((p) => {\n return onRenderRemoteParticipant(\n p,\n maxRemoteVideoStreams && maxRemoteVideoStreams >= 0\n ? p.videoStream?.isAvailable && activeVideoStreams++ < maxRemoteVideoStreams\n : p.videoStream?.isAvailable\n );\n });\n\n /**\n * instantiate indexes available to render with indexes available that would be on first page\n *\n * For some components which do not strictly follow the order of the array, we might\n * re-render the initial tiles -> dispose them -> create new tiles, we need to take care of\n * this case when those components are here\n */\n const [indexesToRender, setIndexesToRender] = useState<number[]>([]);\n\n const overflowGalleryTiles = overflowGalleryParticipants.map((p, i) => {\n return onRenderRemoteParticipant(\n p,\n maxRemoteVideoStreams && maxRemoteVideoStreams >= 0\n ? p.videoStream?.isAvailable && indexesToRender.includes(i) && activeVideoStreams++ < maxRemoteVideoStreams\n : p.videoStream?.isAvailable\n );\n });\n\n if (localVideoComponent) {\n gridTiles.push(localVideoComponent);\n }\n\n const overflowGallery = useMemo(() => {\n if (overflowGalleryTiles.length === 0) {\n return null;\n }\n return (\n <OverflowGallery\n isNarrow={isNarrow}\n /* @conditional-compile-remove(gallery-layouts) */\n isShort={isShort}\n shouldFloatLocalVideo={false}\n overflowGalleryElements={overflowGalleryTiles}\n horizontalGalleryStyles={styles?.horizontalGallery}\n /* @conditional-compile-remove(vertical-gallery) */\n verticalGalleryStyles={styles?.verticalGallery}\n /* @conditional-compile-remove(vertical-gallery) */\n overflowGalleryPosition={overflowGalleryPosition}\n onFetchTilesToRender={setIndexesToRender}\n onChildrenPerPageChange={(n: number) => {\n childrenPerPage.current = n;\n }}\n />\n );\n }, [\n isNarrow,\n /* @conditional-compile-remove(gallery-layouts) */ isShort,\n overflowGalleryTiles,\n styles?.horizontalGallery,\n /* @conditional-compile-remove(vertical-gallery) */ overflowGalleryPosition,\n setIndexesToRender,\n /* @conditional-compile-remove(vertical-gallery) */ styles?.verticalGallery\n ]);\n\n return (\n <Stack\n /* @conditional-compile-remove(vertical-gallery) */\n horizontal={overflowGalleryPosition === 'VerticalRight'}\n styles={rootLayoutStyle}\n tokens={videoGalleryLayoutGap}\n >\n {\n /* @conditional-compile-remove(gallery-layouts) */ props.overflowGalleryPosition === 'HorizontalTop' ? (\n overflowGallery\n ) : (\n <></>\n )\n }\n {screenShareComponent ? (\n screenShareComponent\n ) : (\n <GridLayout key=\"grid-layout\" styles={styles?.gridLayout}>\n {gridTiles}\n </GridLayout>\n )}\n {overflowGalleryTrampoline(\n overflowGallery,\n /* @conditional-compile-remove(gallery-layouts) */ props.overflowGalleryPosition\n )}\n </Stack>\n );\n};\n\nconst overflowGalleryTrampoline = (\n gallery: JSX.Element | null,\n galleryPosition?: 'HorizontalBottom' | 'VerticalRight' | 'HorizontalTop'\n): JSX.Element | null => {\n /* @conditional-compile-remove(gallery-layouts) */\n return galleryPosition !== 'HorizontalTop' ? gallery : <></>;\n return gallery;\n};\n\n/* @conditional-compile-remove(gallery-layouts) */\nconst calculateMaxTilesInLargeGrid = (parentWidth: number, parentHeight: number): number => {\n const xAxisTiles = Math.floor(parentWidth / (VERTICAL_GALLERY_TILE_SIZE_REM.width * REM_TO_PIXEL));\n const yAxisTiles = Math.floor(parentHeight / (VERTICAL_GALLERY_TILE_SIZE_REM.minHeight * REM_TO_PIXEL));\n return xAxisTiles * yAxisTiles < LARGE_GALLERY_PARTICIPANT_CAP\n ? xAxisTiles * yAxisTiles\n : LARGE_GALLERY_PARTICIPANT_CAP;\n};\n"]}
|