@azure/communication-react 1.23.0-alpha-202501120018 → 1.23.0-alpha-202501160016
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 +82 -21
- package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-BbYciITo.js → ChatMessageComponentAsRichTextEditBox-R5C_P0J9.js} +2 -2
- package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-BbYciITo.js.map → ChatMessageComponentAsRichTextEditBox-R5C_P0J9.js.map} +1 -1
- package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-CcLqgWsO.js → RichTextSendBoxWrapper-D0KlP9qO.js} +2 -2
- package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-CcLqgWsO.js.map → RichTextSendBoxWrapper-D0KlP9qO.js.map} +1 -1
- package/dist/dist-cjs/communication-react/{index-CuxcFFWR.js → index-iq0jAnxX.js} +527 -34
- package/dist/dist-cjs/communication-react/index-iq0jAnxX.js.map +1 -0
- package/dist/dist-cjs/communication-react/index.js +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/communication-react/src/index.d.ts +1 -0
- package/dist/dist-esm/communication-react/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/CaptionsBanner.d.ts +44 -8
- package/dist/dist-esm/react-components/src/components/CaptionsBanner.js +42 -13
- package/dist/dist-esm/react-components/src/components/CaptionsBanner.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/MeetingReactionOverlay.d.ts +2 -0
- package/dist/dist-esm/react-components/src/components/MeetingReactionOverlay.js +12 -1
- package/dist/dist-esm/react-components/src/components/MeetingReactionOverlay.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RealTimeText.d.ts +3 -3
- package/dist/dist-esm/react-components/src/components/RealTimeText.js +2 -2
- package/dist/dist-esm/react-components/src/components/RealTimeText.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RealTimeTextModal.d.ts +5 -2
- package/dist/dist-esm/react-components/src/components/RealTimeTextModal.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/StartRealTimeTextButton.d.ts +3 -3
- package/dist/dist-esm/react-components/src/components/StartRealTimeTextButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/TogetherModeOverlay.d.ts +15 -0
- package/dist/dist-esm/react-components/src/components/TogetherModeOverlay.js +123 -0
- package/dist/dist-esm/react-components/src/components/TogetherModeOverlay.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/Layout.d.ts +5 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/Layout.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/TogetherModeLayout.d.ts +9 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/TogetherModeLayout.js +85 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/TogetherModeLayout.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/TogetherModeStream.d.ts +24 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/TogetherModeStream.js +53 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/TogetherModeStream.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery.d.ts +11 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery.js +61 -3
- package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/TogetherMode.styles.d.ts +89 -0
- package/dist/dist-esm/react-components/src/components/styles/TogetherMode.styles.js +173 -0
- package/dist/dist-esm/react-components/src/components/styles/TogetherMode.styles.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/utils/sortCaptionsAndRealTimeTexts.d.ts +8 -0
- package/dist/dist-esm/react-components/src/components/utils/sortCaptionsAndRealTimeTexts.js +25 -0
- package/dist/dist-esm/react-components/src/components/utils/sortCaptionsAndRealTimeTexts.js.map +1 -0
- package/dist/dist-esm/react-components/src/types/ReactionTypes.d.ts +1 -1
- package/dist/dist-esm/react-components/src/types/ReactionTypes.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.d.ts +12 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/en-US/strings.json +6 -0
- package/package.json +1 -1
- package/dist/dist-cjs/communication-react/index-CuxcFFWR.js.map +0 -1
@@ -10,6 +10,8 @@ import { _RemoteVideoTile } from './RemoteVideoTile';
|
|
10
10
|
import { isNarrowWidth, _useContainerHeight, _useContainerWidth } from './utils/responsive';
|
11
11
|
import { LocalScreenShare } from './VideoGallery/LocalScreenShare';
|
12
12
|
import { RemoteScreenShare } from './VideoGallery/RemoteScreenShare';
|
13
|
+
import {
|
14
|
+
/* @conditional-compile-remove(together-mode) */ _isIdentityMicrosoftTeamsUser } from "../../../acs-ui-common/src";
|
13
15
|
import { _LocalVideoTile } from './LocalVideoTile';
|
14
16
|
import { DefaultLayout } from './VideoGallery/DefaultLayout';
|
15
17
|
import { FloatingLocalVideoLayout } from './VideoGallery/FloatingLocalVideoLayout';
|
@@ -21,6 +23,10 @@ import { SpeakerVideoLayout } from './VideoGallery/SpeakerVideoLayout';
|
|
21
23
|
import { FocusedContentLayout } from './VideoGallery/FocusContentLayout';
|
22
24
|
/* @conditional-compile-remove(large-gallery) */
|
23
25
|
import { LargeGalleryLayout } from './VideoGallery/LargeGalleryLayout';
|
26
|
+
/* @conditional-compile-remove(together-mode) */
|
27
|
+
import { TogetherModeLayout } from './VideoGallery/TogetherModeLayout';
|
28
|
+
/* @conditional-compile-remove(together-mode) */
|
29
|
+
import { TogetherModeStream } from './VideoGallery/TogetherModeStream';
|
24
30
|
/**
|
25
31
|
* @private
|
26
32
|
* Currently the Calling JS SDK supports up to 4 remote video streams
|
@@ -63,6 +69,22 @@ export const MAX_PINNED_REMOTE_VIDEO_TILES = 4;
|
|
63
69
|
export const VideoGallery = (props) => {
|
64
70
|
var _a, _b, _c, _d;
|
65
71
|
const { localParticipant, remoteParticipants = [], localVideoViewOptions, remoteVideoViewOptions, dominantSpeakers, onRenderLocalVideoTile, onRenderRemoteVideoTile, onCreateLocalStreamView, onDisposeLocalStreamView, onCreateRemoteStreamView, onDisposeRemoteScreenShareStreamView, onDisposeLocalScreenShareStreamView, onDisposeRemoteVideoStreamView, styles, layout, onRenderAvatar, showMuteIndicator, maxRemoteVideoStreams = DEFAULT_MAX_REMOTE_VIDEO_STREAMS, showCameraSwitcherInLocalPreview, localVideoCameraCycleButtonProps, onPinParticipant: onPinParticipantHandler, onUnpinParticipant: onUnpinParticipantHandler, remoteVideoTileMenu = DEFAULT_REMOTE_VIDEO_TILE_MENU_OPTIONS, overflowGalleryPosition = 'horizontalBottom', localVideoTileSize = 'followDeviceOrientation', spotlightedParticipants, onStartLocalSpotlight, onStartRemoteSpotlight, onStopLocalSpotlight, onStopRemoteSpotlight, maxParticipantsToSpotlight, reactionResources, videoTilesOptions, onMuteParticipant,
|
72
|
+
/* @conditional-compile-remove(together-mode) */
|
73
|
+
startTogetherModeEnabled,
|
74
|
+
/* @conditional-compile-remove(together-mode) */
|
75
|
+
isTogetherModeActive,
|
76
|
+
/* @conditional-compile-remove(together-mode) */
|
77
|
+
onCreateTogetherModeStreamView,
|
78
|
+
/* @conditional-compile-remove(together-mode) */
|
79
|
+
onStartTogetherMode,
|
80
|
+
/* @conditional-compile-remove(together-mode) */
|
81
|
+
onSetTogetherModeSceneSize,
|
82
|
+
/* @conditional-compile-remove(together-mode) */
|
83
|
+
togetherModeStreams,
|
84
|
+
/* @conditional-compile-remove(together-mode) */
|
85
|
+
togetherModeSeatingCoordinates,
|
86
|
+
/* @conditional-compile-remove(together-mode) */
|
87
|
+
onDisposeTogetherModeStreamView,
|
66
88
|
/* @conditional-compile-remove(media-access) */
|
67
89
|
onForbidAudio,
|
68
90
|
/* @conditional-compile-remove(media-access) */
|
@@ -259,6 +281,27 @@ export const VideoGallery = (props) => {
|
|
259
281
|
: localParticipant.isScreenSharingOn
|
260
282
|
? localScreenShareStreamComponent
|
261
283
|
: undefined;
|
284
|
+
/* @conditional-compile-remove(together-mode) */
|
285
|
+
const togetherModeStreamComponent = useMemo(() => (React.createElement(TogetherModeStream, { startTogetherModeEnabled: startTogetherModeEnabled, isTogetherModeActive: isTogetherModeActive, onCreateTogetherModeStreamView: onCreateTogetherModeStreamView, onStartTogetherMode: onStartTogetherMode, onDisposeTogetherModeStreamView: onDisposeTogetherModeStreamView, onSetTogetherModeSceneSize: onSetTogetherModeSceneSize, togetherModeStreams: togetherModeStreams, seatingCoordinates: togetherModeSeatingCoordinates, localParticipant: localParticipant, remoteParticipants: remoteParticipants, reactionResources: reactionResources, screenShareComponent: screenShareComponent, containerWidth: containerWidth, containerHeight: containerHeight })), [
|
286
|
+
startTogetherModeEnabled,
|
287
|
+
isTogetherModeActive,
|
288
|
+
onCreateTogetherModeStreamView,
|
289
|
+
onStartTogetherMode,
|
290
|
+
onDisposeTogetherModeStreamView,
|
291
|
+
onSetTogetherModeSceneSize,
|
292
|
+
togetherModeStreams,
|
293
|
+
togetherModeSeatingCoordinates,
|
294
|
+
localParticipant,
|
295
|
+
remoteParticipants,
|
296
|
+
reactionResources,
|
297
|
+
screenShareComponent,
|
298
|
+
containerWidth,
|
299
|
+
containerHeight
|
300
|
+
]);
|
301
|
+
/* @conditional-compile-remove(together-mode) */
|
302
|
+
// Current implementation of capabilities is only based on user role.
|
303
|
+
// This logic checks for the user role and if the user is a Teams user.
|
304
|
+
const canSwitchToTogetherModeLayout = isTogetherModeActive || (_isIdentityMicrosoftTeamsUser(localParticipant.userId) && startTogetherModeEnabled);
|
262
305
|
const layoutProps = useMemo(() => ({
|
263
306
|
remoteParticipants,
|
264
307
|
localParticipant,
|
@@ -274,7 +317,9 @@ export const VideoGallery = (props) => {
|
|
274
317
|
pinnedParticipantUserIds: pinnedParticipants,
|
275
318
|
overflowGalleryPosition,
|
276
319
|
localVideoTileSize,
|
277
|
-
spotlightedParticipantUserIds: spotlightedParticipants
|
320
|
+
spotlightedParticipantUserIds: spotlightedParticipants,
|
321
|
+
/* @conditional-compile-remove(together-mode) */
|
322
|
+
togetherModeStreamComponent
|
278
323
|
}), [
|
279
324
|
remoteParticipants,
|
280
325
|
localParticipant,
|
@@ -291,7 +336,9 @@ export const VideoGallery = (props) => {
|
|
291
336
|
pinnedParticipants,
|
292
337
|
overflowGalleryPosition,
|
293
338
|
localVideoTileSize,
|
294
|
-
spotlightedParticipants
|
339
|
+
spotlightedParticipants,
|
340
|
+
/* @conditional-compile-remove(together-mode) */
|
341
|
+
togetherModeStreamComponent
|
295
342
|
]);
|
296
343
|
const videoGalleryLayout = useMemo(() => {
|
297
344
|
if (screenShareParticipant && layout === 'focusedContent') {
|
@@ -307,8 +354,19 @@ export const VideoGallery = (props) => {
|
|
307
354
|
if (layout === 'largeGallery') {
|
308
355
|
return React.createElement(LargeGalleryLayout, Object.assign({}, layoutProps));
|
309
356
|
}
|
357
|
+
/* @conditional-compile-remove(together-mode) */
|
358
|
+
// Teams users can switch to Together mode layout only if they have the capability,
|
359
|
+
// while ACS users can do so only if Together mode is enabled.
|
360
|
+
if (layout === 'togetherMode' && canSwitchToTogetherModeLayout) {
|
361
|
+
return React.createElement(TogetherModeLayout, Object.assign({}, layoutProps));
|
362
|
+
}
|
310
363
|
return React.createElement(DefaultLayout, Object.assign({}, layoutProps));
|
311
|
-
}, [
|
364
|
+
}, [
|
365
|
+
/* @conditional-compile-remove(together-mode) */ canSwitchToTogetherModeLayout,
|
366
|
+
layout,
|
367
|
+
layoutProps,
|
368
|
+
screenShareParticipant
|
369
|
+
]);
|
312
370
|
return (React.createElement("div", {
|
313
371
|
// We don't assign an drawer menu host id to the VideoGallery when a drawerMenuHostId is assigned from props
|
314
372
|
id: drawerMenuHostIdFromProp ? undefined : drawerMenuHostId, "data-ui-id": ids.videoGallery, ref: containerRef, className: mergeStyles(videoGalleryOuterDivStyle, styles === null || styles === void 0 ? void 0 : styles.root, unselectable) },
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"VideoGallery.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/VideoGallery.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,eAAe,EAAU,WAAW,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAC9E,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE5D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAWtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC5F,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAIrE,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,wBAAwB,EAAE,MAAM,yCAAyC,CAAC;AACnF,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,6BAA6B,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AACxG,OAAO,EAAE,2BAA2B,EAAE,MAAM,iDAAiD,CAAC;AAC9F,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAE9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,C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,CAAC,YAAY,EAC5B,GAAG,EAAE,YAAY,EACjB,SAAS,EAAE,WAAW,CAAC,yBAAyB,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,EAAE,YAAY,CAAC;QAE5E,kBAAkB;QACnB,oBAAC,SAAS,IAAC,kBAAkB,EAAE,kBAAkB,EAAE,QAAQ,EAAC,QAAQ,GAAG,CACnE,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { concatStyleSets, IStyle, mergeStyles, Stack } from '@fluentui/react';\nimport React, { useCallback, useMemo, useRef } from 'react';\nimport { GridLayoutStyles } from '.';\nimport { Announcer } from './Announcer';\nimport { useEffect } from 'react';\nimport { useLocale } from '../localization';\nimport { useTheme } from '../theming';\nimport {\n BaseCustomStyles,\n OnRenderAvatarCallback,\n VideoGalleryLocalParticipant,\n VideoGalleryRemoteParticipant,\n VideoStreamOptions,\n CreateVideoStreamViewResult\n} from '../types';\nimport { ViewScalingMode } from '../types';\nimport { HorizontalGalleryStyles } from './HorizontalGallery';\nimport { _RemoteVideoTile } from './RemoteVideoTile';\nimport { isNarrowWidth, _useContainerHeight, _useContainerWidth } from './utils/responsive';\nimport { LocalScreenShare } from './VideoGallery/LocalScreenShare';\nimport { RemoteScreenShare } from './VideoGallery/RemoteScreenShare';\nimport { LocalVideoCameraCycleButtonProps } from './LocalVideoCameraButton';\nimport { _ICoordinates, _ModalClone } from './ModalClone/ModalClone';\nimport { _formatString } from '@internal/acs-ui-common';\nimport { _LocalVideoTile } from './LocalVideoTile';\nimport { DefaultLayout } from './VideoGallery/DefaultLayout';\nimport { FloatingLocalVideoLayout } from './VideoGallery/FloatingLocalVideoLayout';\nimport { useIdentifiers } from '../identifiers';\nimport { localVideoTileContainerStyles, videoGalleryOuterDivStyle } from './styles/VideoGallery.styles';\nimport { floatingLocalVideoTileStyle } from './VideoGallery/styles/FloatingLocalVideo.styles';\nimport { useId } from '@fluentui/react-hooks';\nimport { VerticalGalleryStyles } from './VerticalGallery';\nimport { SpeakerVideoLayout } from './VideoGallery/SpeakerVideoLayout';\nimport { FocusedContentLayout } from './VideoGallery/FocusContentLayout';\n/* @conditional-compile-remove(large-gallery) */\nimport { LargeGalleryLayout } from './VideoGallery/LargeGalleryLayout';\nimport { LayoutProps } from './VideoGallery/Layout';\nimport { ReactionResources } from '../types/ReactionTypes';\n\n/**\n * @private\n * Currently the Calling JS SDK supports up to 4 remote video streams\n */\nexport const DEFAULT_MAX_REMOTE_VIDEO_STREAMS = 4;\n\n/**\n * @private\n * Styles to disable the selectivity of a text in video gallery\n */\nexport const unselectable = {\n '-webkit-user-select': 'none',\n '-webkit-touch-callout': 'none',\n '-moz-user-select': 'none',\n '-ms-user-select': 'none',\n 'user-select': 'none'\n};\n/**\n * @private\n * Set aside only 6 dominant speakers for remaining audio participants\n */\nexport const MAX_AUDIO_DOMINANT_SPEAKERS = 6;\n/**\n * @private\n * Default remote video tile menu options\n */\nexport const DEFAULT_REMOTE_VIDEO_TILE_MENU_OPTIONS = {\n kind: 'contextual'\n};\n\n/**\n * @private\n * Maximum number of remote video tiles that can be pinned\n */\nexport const MAX_PINNED_REMOTE_VIDEO_TILES = 4;\n\n/**\n * All strings that may be shown on the UI in the {@link VideoGallery}.\n *\n * @public\n */\nexport interface VideoGalleryStrings {\n /** String to notify that local user is sharing their screen */\n screenIsBeingSharedMessage: string;\n /** String to show when remote screen share stream is loading */\n screenShareLoadingMessage: string;\n /** String to show when local screen share stream is loading */\n localScreenShareLoadingMessage: string;\n /** String for local video label. Default is \"You\" */\n localVideoLabel: string;\n /** String for local video camera switcher */\n localVideoCameraSwitcherLabel: string;\n /** String for announcing the local video tile can be moved by keyboard controls */\n localVideoMovementLabel: string;\n /** Aria-label for announcing the local video tile can be moved by keyboard controls */\n localVideoMovementAriaLabel: string;\n /** String for announcing the selected camera */\n localVideoSelectedDescription: string;\n /** placeholder text for participants who does not have a display name*/\n displayNamePlaceholder: string;\n /** Menu text shown in Video Tile contextual menu for setting a remote participants video to fit in frame */\n fitRemoteParticipantToFrame: string;\n /** Menu text shown in Video Tile contextual menu for setting a remote participants video to fill the frame */\n fillRemoteParticipantFrame: string;\n /** Menu text shown in Video Tile contextual menu for pinning a remote participant's video tile */\n pinParticipantForMe: string;\n /** Menu text shown in Video Tile contextual menu for unpinning a remote participant's video tile */\n unpinParticipantForMe: string;\n /** Aria label for pin participant menu item of remote participant's video tile */\n pinParticipantMenuItemAriaLabel: string;\n /** Aria label for unpin participant menu item of remote participant's video tile */\n unpinParticipantMenuItemAriaLabel: string;\n /** Aria label to announce when remote participant's video tile is pinned */\n pinnedParticipantAnnouncementAriaLabel: string;\n /** Aria label to announce when remote participant's video tile is unpinned */\n unpinnedParticipantAnnouncementAriaLabel: string;\n /** Menu text shown in Video Tile contextual menu to start spotlight on participant's video tile */\n startSpotlightVideoTileMenuLabel: string;\n /** Menu text shown in Video Tile contextual menu to add spotlight to participant's video tile */\n addSpotlightVideoTileMenuLabel: string;\n /** Menu title for start spotlight menu item when spotlight limit is reached */\n spotlightLimitReachedMenuTitle: string;\n /** Menu text shown in Video Tile contextual menu to stop spotlight on participant's video tile */\n stopSpotlightVideoTileMenuLabel: string;\n /** Menu text shown in Video Tile contextual menu to stop spotlight on local user's video tile */\n stopSpotlightOnSelfVideoTileMenuLabel: string;\n /** String for the attendee role */\n attendeeRole: string;\n /** Menu text shown in Video Tile contextual menu to mute a remote participant */\n muteParticipantMenuItemLabel: string;\n /** Text shown when waiting for others to join the call */\n waitingScreenText: string;\n}\n\n/**\n * @public\n */\nexport type VideoGalleryLayout =\n | 'default'\n | 'floatingLocalVideo'\n | 'speaker'\n | /* @conditional-compile-remove(large-gallery) */ 'largeGallery'\n | 'focusedContent';\n\n/**\n * {@link VideoGallery} Component Styles.\n * @public\n */\nexport interface VideoGalleryStyles extends BaseCustomStyles {\n /** Styles for the grid layout */\n gridLayout?: GridLayoutStyles;\n /** Styles for the horizontal gallery */\n horizontalGallery?: HorizontalGalleryStyles;\n /** Styles for the local video */\n localVideo?: IStyle;\n /** Styles for the vertical gallery */\n verticalGallery?: VerticalGalleryStyles;\n}\n\n/**\n * Different modes and positions of the overflow gallery in the VideoGallery\n *\n * @public\n */\nexport type OverflowGalleryPosition = 'horizontalBottom' | 'verticalRight' | 'horizontalTop';\n\n/**\n * different modes of the local video tile\n *\n * @public\n */\nexport type LocalVideoTileSize = '9:16' | '16:9' | 'hidden' | 'followDeviceOrientation';\n\n/**\n * Props for {@link VideoGallery}.\n *\n * @public\n */\nexport interface VideoGalleryProps {\n /**\n * Allows users to pass an object containing custom CSS styles for the gallery container.\n *\n * @Example\n * ```\n * <VideoGallery styles={{ root: { border: 'solid 1px red' } }} />\n * ```\n */\n styles?: VideoGalleryStyles;\n /** Layout of the video tiles. */\n layout?: VideoGalleryLayout;\n /** Local video particpant */\n localParticipant: VideoGalleryLocalParticipant;\n /** List of remote video particpants */\n remoteParticipants?: VideoGalleryRemoteParticipant[];\n /** List of dominant speaker userIds in the order of their dominance. 0th index is the most dominant. */\n dominantSpeakers?: string[];\n /** Local video view options */\n localVideoViewOptions?: VideoStreamOptions;\n /** Remote videos view options */\n remoteVideoViewOptions?: VideoStreamOptions;\n /** Callback to create the local video stream view */\n onCreateLocalStreamView?: (options?: VideoStreamOptions) => Promise<void | CreateVideoStreamViewResult>;\n /** Callback to dispose of the local video stream view */\n onDisposeLocalStreamView?: () => void;\n /** Callback to render the local video tile*/\n onRenderLocalVideoTile?: (localParticipant: VideoGalleryLocalParticipant) => JSX.Element;\n /** Callback to create a remote video stream view */\n onCreateRemoteStreamView?: (\n userId: string,\n options?: VideoStreamOptions\n ) => Promise<void | CreateVideoStreamViewResult>;\n /** Callback to render a remote video tile */\n onRenderRemoteVideoTile?: (remoteParticipant: VideoGalleryRemoteParticipant) => JSX.Element;\n /**\n * @deprecated use {@link onDisposeRemoteVideoStreamView} and {@link onDisposeRemoteScreenShareStreamView} instead\n *\n * Callback to dispose a remote video stream view\n */\n onDisposeRemoteStreamView?: (userId: string) => Promise<void>;\n /** Callback to dispose a remote video stream view */\n onDisposeRemoteVideoStreamView?: (userId: string) => Promise<void>;\n /** Callback to dispose a remote screen share stream view */\n onDisposeRemoteScreenShareStreamView?: (userId: string) => Promise<void>;\n /** Callback to dispose a local screen share stream view */\n onDisposeLocalScreenShareStreamView?: () => Promise<void>;\n /** Callback to render a participant avatar */\n onRenderAvatar?: OnRenderAvatarCallback;\n /**\n * Whether to display the local video camera switcher button\n */\n showCameraSwitcherInLocalPreview?: boolean;\n /**\n * Whether to display a mute icon beside the user's display name.\n * @defaultValue `true`\n */\n showMuteIndicator?: boolean;\n /** Optional strings to override in component */\n strings?: Partial<VideoGalleryStrings>;\n /**\n * Maximum number of participant remote video streams that is rendered.\n * @defaultValue 4\n */\n maxRemoteVideoStreams?: number;\n /**\n * Camera control information for button to switch cameras.\n */\n localVideoCameraCycleButtonProps?: LocalVideoCameraCycleButtonProps;\n /**\n * List of pinned participant userIds.\n */\n pinnedParticipants?: string[];\n /**\n * This callback will be called when a participant video tile is pinned.\n */\n onPinParticipant?: (userId: string) => void;\n /**\n * This callback will be called when a participant video tile is un-pinned.\n */\n onUnpinParticipant?: (userId: string) => void;\n /**\n * List of spotlighted participant userIds.\n */\n spotlightedParticipants?: string[];\n /**\n * This callback is to start spotlight for local participant video tile.\n */\n onStartLocalSpotlight?: () => Promise<void>;\n /**\n * This callback is to stop spotlight for local participant video tile.\n */\n onStartRemoteSpotlight?: (userIds: string[]) => Promise<void>;\n /**\n * This callback is to start spotlight for remote participant video tiles.\n */\n onStopLocalSpotlight?: () => Promise<void>;\n /**\n * This callback is to stop spotlight for remote participant video tiles.\n */\n onStopRemoteSpotlight?: (userIds: string[]) => Promise<void>;\n /**\n * Maximum participants that can be spotlighted\n */\n maxParticipantsToSpotlight?: number;\n /**\n * Options for showing the remote video tile menu.\n *\n * @defaultValue \\{ kind: 'contextual' \\}\n */\n remoteVideoTileMenu?: false | VideoTileContextualMenuProps | VideoTileDrawerMenuProps;\n /**\n * Determines the layout of the overflowGallery inside the VideoGallery.\n * @defaultValue 'horizontalBottom'\n */\n overflowGalleryPosition?: OverflowGalleryPosition;\n /**\n * Determines the aspect ratio of local video tile in the video gallery.\n * @remarks 'followDeviceOrientation' will be responsive to the screen orientation and will change between 9:16 (portrait) and\n * 16:9 (landscape) aspect ratios.\n * @defaultValue 'followDeviceOrientation'\n */\n localVideoTileSize?: LocalVideoTileSize;\n /**\n * Reaction resources for like, heart, laugh, applause and surprised.\n */\n reactionResources?: ReactionResources;\n /**\n * Additional Options for Video Tiles\n */\n videoTilesOptions?: VideoTilesOptions;\n /**\n * This callback is to mute a remote participant\n */\n onMuteParticipant?: (userId: string) => Promise<void>;\n /* @conditional-compile-remove(media-access) */\n /**\n * This callback is to forbid audio for remote participant(s)\n */\n onForbidAudio?: (userIds: string[]) => Promise<void>;\n /* @conditional-compile-remove(media-access) */\n /**\n * This callback is to permit audio for remote participant(s)\n */\n onPermitAudio?: (userIds: string[]) => Promise<void>;\n /* @conditional-compile-remove(media-access) */\n /**\n * This callback is to forbid video for remote participant(s)\n */\n onForbidVideo?: (userIds: string[]) => Promise<void>;\n /* @conditional-compile-remove(media-access) */\n /**\n * This callback is to permit video for remote participant(s)\n */\n onPermitVideo?: (userIds: string[]) => Promise<void>;\n}\n\n/**\n * Options that apply to all Video Tiles in the {@link VideoGallery}\n *\n * @public\n */\nexport interface VideoTilesOptions {\n /**\n * Whether to always show the label background for the video tile\n */\n alwaysShowLabelBackground?: boolean;\n}\n\n/**\n * Properties for showing contextual menu for remote {@link VideoTile} components in {@link VideoGallery}.\n *\n * @public\n */\nexport interface VideoTileContextualMenuProps {\n /**\n * The menu property kind\n */\n kind: 'contextual';\n}\n\n/**\n * Properties for showing drawer menu on remote {@link VideoTile} long touch in {@link VideoGallery}.\n *\n * @public\n */\nexport interface VideoTileDrawerMenuProps {\n /**\n * The menu property kind\n */\n kind: 'drawer';\n /**\n * The optional id property provided on an element that the drawer menu should render within when a\n * remote participant video tile Drawer is shown. If an id is not provided, then a drawer menu will\n * render within the VideoGallery component.\n */\n hostId?: string;\n}\n/**\n * VideoGallery represents a layout of video tiles for a specific call.\n * It displays a {@link VideoTile} for the local user as well as for each remote participant who has joined the call.\n *\n * @public\n */\nexport const VideoGallery = (props: VideoGalleryProps): JSX.Element => {\n const {\n localParticipant,\n remoteParticipants = [],\n localVideoViewOptions,\n remoteVideoViewOptions,\n dominantSpeakers,\n onRenderLocalVideoTile,\n onRenderRemoteVideoTile,\n onCreateLocalStreamView,\n onDisposeLocalStreamView,\n onCreateRemoteStreamView,\n onDisposeRemoteScreenShareStreamView,\n onDisposeLocalScreenShareStreamView,\n onDisposeRemoteVideoStreamView,\n styles,\n layout,\n onRenderAvatar,\n showMuteIndicator,\n maxRemoteVideoStreams = DEFAULT_MAX_REMOTE_VIDEO_STREAMS,\n showCameraSwitcherInLocalPreview,\n localVideoCameraCycleButtonProps,\n onPinParticipant: onPinParticipantHandler,\n onUnpinParticipant: onUnpinParticipantHandler,\n remoteVideoTileMenu = DEFAULT_REMOTE_VIDEO_TILE_MENU_OPTIONS,\n overflowGalleryPosition = 'horizontalBottom',\n localVideoTileSize = 'followDeviceOrientation',\n spotlightedParticipants,\n onStartLocalSpotlight,\n onStartRemoteSpotlight,\n onStopLocalSpotlight,\n onStopRemoteSpotlight,\n maxParticipantsToSpotlight,\n reactionResources,\n videoTilesOptions,\n onMuteParticipant,\n /* @conditional-compile-remove(media-access) */\n onForbidAudio,\n /* @conditional-compile-remove(media-access) */\n onPermitAudio,\n /* @conditional-compile-remove(media-access) */\n onForbidVideo,\n /* @conditional-compile-remove(media-access) */\n onPermitVideo\n } = props;\n\n const ids = useIdentifiers();\n const theme = useTheme();\n const localeStrings = useLocale().strings.videoGallery;\n const strings = useMemo(() => ({ ...localeStrings, ...props.strings }), [localeStrings, props.strings]);\n\n const drawerMenuHostIdFromProp =\n remoteVideoTileMenu && remoteVideoTileMenu.kind === 'drawer'\n ? (remoteVideoTileMenu as VideoTileDrawerMenuProps).hostId\n : undefined;\n const drawerMenuHostId = useId('drawerMenuHost', drawerMenuHostIdFromProp);\n\n const localTileNotInGrid = (layout === 'floatingLocalVideo' || layout === 'speaker') && remoteParticipants.length > 0;\n\n const containerRef = useRef<HTMLDivElement>(null);\n const containerWidth = _useContainerWidth(containerRef);\n const containerHeight = _useContainerHeight(containerRef);\n const isNarrow = containerWidth ? isNarrowWidth(containerWidth) : false;\n\n const [pinnedParticipantsState, setPinnedParticipantsState] = React.useState<string[]>([]);\n const [selectedScalingModeState, setselectedScalingModeState] = React.useState<Record<string, VideoStreamOptions>>(\n {}\n );\n\n const onUpdateScalingMode = useCallback(\n (remoteUserId: string, scalingMode: ViewScalingMode) => {\n setselectedScalingModeState((current) => ({\n ...current,\n [remoteUserId]: {\n scalingMode,\n isMirrored: remoteVideoViewOptions?.isMirrored\n }\n }));\n },\n [remoteVideoViewOptions?.isMirrored]\n );\n useEffect(() => {\n props.pinnedParticipants?.forEach((pinParticipant) => {\n if (!props.remoteParticipants?.find((t) => t.userId === pinParticipant)) {\n // warning will be logged in the console when invalid participant id is passed in pinned participants\n console.warn('Invalid pinned participant UserId :' + pinParticipant);\n }\n });\n }, [props.pinnedParticipants, props.remoteParticipants]);\n // Use pinnedParticipants from props but if it is not defined use the maintained state of pinned participants\n const pinnedParticipants = useMemo(\n () =>\n props.pinnedParticipants ??\n pinnedParticipantsState.filter((pinnedParticipantId) =>\n remoteParticipants.find((remoteParticipant) => remoteParticipant.userId === pinnedParticipantId)\n ),\n [props.pinnedParticipants, pinnedParticipantsState, remoteParticipants]\n );\n\n const showLocalVideoTileLabel =\n !((localTileNotInGrid && isNarrow) || localVideoTileSize === '9:16') || layout === 'default';\n /**\n * Utility function for memoized rendering of LocalParticipant.\n */\n const localVideoTile = useMemo((): JSX.Element | undefined => {\n if (localVideoTileSize === 'hidden') {\n return undefined;\n }\n if (onRenderLocalVideoTile) {\n return onRenderLocalVideoTile(localParticipant);\n }\n\n const isSpotlighted = !!localParticipant.spotlight;\n\n const localVideoTileStyles = concatStyleSets(\n localTileNotInGrid ? floatingLocalVideoTileStyle : {},\n {\n root: { borderRadius: theme.effects.roundedCorner4 }\n },\n styles?.localVideo\n );\n\n const initialsName = !localParticipant.displayName ? '' : localParticipant.displayName;\n\n const showDisplayNameTrampoline = (): string => {\n return layout === 'default' ? strings.localVideoLabel : isNarrow ? '' : strings.localVideoLabel;\n };\n\n return (\n <Stack styles={localVideoTileContainerStyles} key=\"local-video-tile-key\">\n <_LocalVideoTile\n alwaysShowLabelBackground={videoTilesOptions?.alwaysShowLabelBackground}\n userId={localParticipant.userId}\n onCreateLocalStreamView={onCreateLocalStreamView}\n onDisposeLocalStreamView={onDisposeLocalStreamView}\n isAvailable={localParticipant?.videoStream?.isAvailable}\n isMuted={localParticipant.isMuted}\n renderElement={localParticipant?.videoStream?.renderElement}\n displayName={showDisplayNameTrampoline()}\n initialsName={initialsName}\n localVideoViewOptions={localVideoViewOptions}\n onRenderAvatar={onRenderAvatar}\n showLabel={showLocalVideoTileLabel}\n showMuteIndicator={showMuteIndicator}\n showCameraSwitcherInLocalPreview={showCameraSwitcherInLocalPreview}\n localVideoCameraCycleButtonProps={localVideoCameraCycleButtonProps}\n localVideoCameraSwitcherLabel={strings.localVideoCameraSwitcherLabel}\n localVideoSelectedDescription={strings.localVideoSelectedDescription}\n styles={localVideoTileStyles}\n raisedHand={localParticipant.raisedHand}\n reaction={localParticipant.reaction}\n spotlightedParticipantUserIds={spotlightedParticipants}\n isSpotlighted={isSpotlighted}\n onStartSpotlight={onStartLocalSpotlight}\n onStopSpotlight={onStopLocalSpotlight}\n maxParticipantsToSpotlight={maxParticipantsToSpotlight}\n menuKind={remoteVideoTileMenu ? (remoteVideoTileMenu.kind === 'drawer' ? 'drawer' : 'contextual') : undefined}\n drawerMenuHostId={drawerMenuHostId}\n strings={strings}\n reactionResources={reactionResources}\n participantsCount={remoteParticipants.length + 1}\n isScreenSharingOn={localParticipant.isScreenSharingOn}\n /* @conditional-compile-remove(media-access) */\n mediaAccess={localParticipant.mediaAccess}\n />\n </Stack>\n );\n }, [\n isNarrow,\n localParticipant,\n localVideoCameraCycleButtonProps,\n localVideoViewOptions,\n onCreateLocalStreamView,\n onDisposeLocalStreamView,\n onRenderAvatar,\n onRenderLocalVideoTile,\n localTileNotInGrid,\n showCameraSwitcherInLocalPreview,\n showMuteIndicator,\n styles?.localVideo,\n theme.effects.roundedCorner4,\n localVideoTileSize,\n layout,\n showLocalVideoTileLabel,\n spotlightedParticipants,\n onStartLocalSpotlight,\n onStopLocalSpotlight,\n maxParticipantsToSpotlight,\n remoteVideoTileMenu,\n strings,\n drawerMenuHostId,\n reactionResources,\n videoTilesOptions,\n remoteParticipants.length\n ]);\n\n const onPinParticipant = useCallback(\n (userId: string) => {\n if (pinnedParticipants.length >= MAX_PINNED_REMOTE_VIDEO_TILES) {\n return;\n }\n if (!pinnedParticipants.includes(userId)) {\n setPinnedParticipantsState(pinnedParticipants.concat(userId));\n }\n onPinParticipantHandler?.(userId);\n },\n [pinnedParticipants, setPinnedParticipantsState, onPinParticipantHandler]\n );\n const onUnpinParticipant = useCallback(\n (userId: string) => {\n setPinnedParticipantsState(pinnedParticipantsState.filter((p) => p !== userId));\n onUnpinParticipantHandler?.(userId);\n },\n [pinnedParticipantsState, setPinnedParticipantsState, onUnpinParticipantHandler]\n );\n\n const [announcementString, setAnnouncementString] = React.useState<string>('');\n /**\n * sets the announcement string for VideoGallery actions so that the screenreader will trigger\n */\n const toggleAnnouncerString = useCallback(\n (announcement: string) => {\n setAnnouncementString(announcement);\n /**\n * Clears the announcer string after VideoGallery action allowing it to be re-announced.\n */\n setTimeout(() => {\n setAnnouncementString('');\n }, 3000);\n },\n [setAnnouncementString]\n );\n\n const defaultOnRenderVideoTile = useCallback(\n (participant: VideoGalleryRemoteParticipant, isVideoParticipant?: boolean) => {\n const remoteVideoStream = participant.videoStream;\n const selectedScalingMode = remoteVideoStream ? selectedScalingModeState[participant.userId] : undefined;\n let isPinned = pinnedParticipants?.includes(participant.userId);\n const isSpotlighted = !!participant.spotlight;\n isPinned = isSpotlighted ? false : isPinned;\n\n const createViewOptions = (): VideoStreamOptions | undefined => {\n if (selectedScalingMode) {\n return selectedScalingMode;\n }\n return remoteVideoStream?.streamSize &&\n remoteVideoStream.streamSize?.height > remoteVideoStream.streamSize?.width\n ? ({\n scalingMode: 'Fit',\n isMirrored: remoteVideoViewOptions?.isMirrored\n } as VideoStreamOptions)\n : remoteVideoViewOptions;\n };\n\n return (\n <_RemoteVideoTile\n alwaysShowLabelBackground={videoTilesOptions?.alwaysShowLabelBackground}\n streamId={remoteVideoStream?.id}\n key={participant.userId}\n userId={participant.userId}\n remoteParticipant={participant}\n onCreateRemoteStreamView={isVideoParticipant ? onCreateRemoteStreamView : undefined}\n onDisposeRemoteStreamView={isVideoParticipant ? onDisposeRemoteVideoStreamView : undefined}\n isAvailable={isVideoParticipant ? remoteVideoStream?.isAvailable : false}\n isReceiving={isVideoParticipant ? remoteVideoStream?.isReceiving : false}\n renderElement={isVideoParticipant ? remoteVideoStream?.renderElement : undefined}\n remoteVideoViewOptions={createViewOptions()}\n onRenderAvatar={onRenderAvatar}\n showMuteIndicator={showMuteIndicator}\n strings={strings}\n participantState={participant.state}\n menuKind={\n participant.userId === localParticipant.userId\n ? undefined\n : remoteVideoTileMenu\n ? remoteVideoTileMenu.kind === 'drawer'\n ? 'drawer'\n : 'contextual'\n : undefined\n }\n drawerMenuHostId={drawerMenuHostId}\n onPinParticipant={onPinParticipant}\n onUnpinParticipant={onUnpinParticipant}\n onUpdateScalingMode={onUpdateScalingMode}\n isPinned={isPinned}\n disablePinMenuItem={pinnedParticipants.length >= MAX_PINNED_REMOTE_VIDEO_TILES}\n toggleAnnouncerString={toggleAnnouncerString}\n spotlightedParticipantUserIds={spotlightedParticipants}\n isSpotlighted={isSpotlighted}\n onStartSpotlight={onStartRemoteSpotlight}\n onStopSpotlight={onStopRemoteSpotlight}\n maxParticipantsToSpotlight={maxParticipantsToSpotlight}\n reactionResources={reactionResources}\n onMuteParticipant={onMuteParticipant}\n /* @conditional-compile-remove(media-access) */\n onForbidAudio={onForbidAudio}\n /* @conditional-compile-remove(media-access) */\n onPermitAudio={onPermitAudio}\n /* @conditional-compile-remove(media-access) */\n onForbidVideo={onForbidVideo}\n /* @conditional-compile-remove(media-access) */\n onPermitVideo={onPermitVideo}\n />\n );\n },\n [\n selectedScalingModeState,\n pinnedParticipants,\n videoTilesOptions?.alwaysShowLabelBackground,\n onCreateRemoteStreamView,\n onDisposeRemoteVideoStreamView,\n onRenderAvatar,\n showMuteIndicator,\n strings,\n localParticipant.userId,\n remoteVideoTileMenu,\n drawerMenuHostId,\n onPinParticipant,\n onUnpinParticipant,\n onUpdateScalingMode,\n toggleAnnouncerString,\n spotlightedParticipants,\n onStartRemoteSpotlight,\n onStopRemoteSpotlight,\n maxParticipantsToSpotlight,\n reactionResources,\n onMuteParticipant,\n /* @conditional-compile-remove(media-access) */\n onForbidAudio,\n /* @conditional-compile-remove(media-access) */\n onPermitAudio,\n /* @conditional-compile-remove(media-access) */\n onForbidVideo,\n /* @conditional-compile-remove(media-access) */\n onPermitVideo,\n remoteVideoViewOptions\n ]\n );\n\n const screenShareParticipant = remoteParticipants.find((participant) => participant.screenShareStream?.isAvailable);\n\n const localScreenShareStreamComponent = (\n <LocalScreenShare\n localParticipant={localParticipant}\n renderElement={localParticipant.screenShareStream?.renderElement}\n isAvailable={localParticipant.screenShareStream?.isAvailable}\n onCreateLocalStreamView={onCreateLocalStreamView}\n onDisposeLocalScreenShareStreamView={onDisposeLocalScreenShareStreamView}\n />\n );\n\n const remoteScreenShareComponent = screenShareParticipant && (\n <RemoteScreenShare\n {...screenShareParticipant}\n renderElement={screenShareParticipant.screenShareStream?.renderElement}\n onCreateRemoteStreamView={onCreateRemoteStreamView}\n onDisposeRemoteStreamView={onDisposeRemoteScreenShareStreamView}\n isReceiving={screenShareParticipant.screenShareStream?.isReceiving}\n participantVideoScalingMode={selectedScalingModeState[screenShareParticipant.userId]}\n localParticipant={localParticipant}\n remoteParticipants={remoteParticipants}\n reactionResources={reactionResources}\n />\n );\n\n const screenShareComponent = remoteScreenShareComponent\n ? remoteScreenShareComponent\n : localParticipant.isScreenSharingOn\n ? localScreenShareStreamComponent\n : undefined;\n\n const layoutProps = useMemo<LayoutProps>(\n () => ({\n remoteParticipants,\n localParticipant,\n screenShareComponent,\n showCameraSwitcherInLocalPreview,\n maxRemoteVideoStreams,\n dominantSpeakers,\n styles,\n onRenderRemoteParticipant: onRenderRemoteVideoTile ?? defaultOnRenderVideoTile,\n localVideoComponent: localVideoTile,\n parentWidth: containerWidth,\n parentHeight: containerHeight,\n pinnedParticipantUserIds: pinnedParticipants,\n overflowGalleryPosition,\n localVideoTileSize,\n spotlightedParticipantUserIds: spotlightedParticipants\n }),\n [\n remoteParticipants,\n localParticipant,\n screenShareComponent,\n showCameraSwitcherInLocalPreview,\n maxRemoteVideoStreams,\n dominantSpeakers,\n styles,\n localVideoTile,\n containerWidth,\n containerHeight,\n onRenderRemoteVideoTile,\n defaultOnRenderVideoTile,\n pinnedParticipants,\n overflowGalleryPosition,\n localVideoTileSize,\n spotlightedParticipants\n ]\n );\n\n const videoGalleryLayout = useMemo(() => {\n if (screenShareParticipant && layout === 'focusedContent') {\n return <FocusedContentLayout {...layoutProps} />;\n }\n if (layout === 'floatingLocalVideo') {\n return <FloatingLocalVideoLayout {...layoutProps} />;\n }\n\n if (layout === 'speaker') {\n return <SpeakerVideoLayout {...layoutProps} />;\n }\n /* @conditional-compile-remove(large-gallery) */\n if (layout === 'largeGallery') {\n return <LargeGalleryLayout {...layoutProps} />;\n }\n return <DefaultLayout {...layoutProps} />;\n }, [layout, layoutProps, screenShareParticipant]);\n\n return (\n <div\n // We don't assign an drawer menu host id to the VideoGallery when a drawerMenuHostId is assigned from props\n id={drawerMenuHostIdFromProp ? undefined : drawerMenuHostId}\n data-ui-id={ids.videoGallery}\n ref={containerRef}\n className={mergeStyles(videoGalleryOuterDivStyle, styles?.root, unselectable)}\n >\n {videoGalleryLayout}\n <Announcer announcementString={announcementString} ariaLive=\"polite\" />\n </div>\n );\n};\n"]}
|
1
|
+
{"version":3,"file":"VideoGallery.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/VideoGallery.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,eAAe,EAAU,WAAW,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAC9E,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE5D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAiBtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC5F,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAGrE,OAAO;AAEL,gDAAgD,CAAC,6BAA6B,EAC/E,mCAAgC;AACjC,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,wBAAwB,EAAE,MAAM,yCAAyC,CAAC;AACnF,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,6BAA6B,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AACxG,OAAO,EAAE,2BAA2B,EAAE,MAAM,iDAAiD,CAA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KAAK,cAAc,IAAI,6BAA6B,EAAE,CAAC;YAC/D,OAAO,oBAAC,kBAAkB,oBAAK,WAAW,EAAI,CAAC;QACjD,CAAC;QACD,OAAO,oBAAC,aAAa,oBAAK,WAAW,EAAI,CAAC;IAC5C,CAAC,EAAE;QACD,gDAAgD,CAAC,6BAA6B;QAC9E,MAAM;QACN,WAAW;QACX,sBAAsB;KACvB,CAAC,CAAC;IAEH,OAAO,CACL;QACE,4GAA4G;QAC5G,EAAE,EAAE,wBAAwB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,gBAAgB,gBAC/C,GAAG,CAAC,YAAY,EAC5B,GAAG,EAAE,YAAY,EACjB,SAAS,EAAE,WAAW,CAAC,yBAAyB,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,EAAE,YAAY,CAAC;QAE5E,kBAAkB;QACnB,oBAAC,SAAS,IAAC,kBAAkB,EAAE,kBAAkB,EAAE,QAAQ,EAAC,QAAQ,GAAG,CACnE,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { concatStyleSets, IStyle, mergeStyles, Stack } from '@fluentui/react';\nimport React, { useCallback, useMemo, useRef } from 'react';\nimport { GridLayoutStyles } from '.';\nimport { Announcer } from './Announcer';\nimport { useEffect } from 'react';\nimport { useLocale } from '../localization';\nimport { useTheme } from '../theming';\nimport {\n BaseCustomStyles,\n OnRenderAvatarCallback,\n VideoGalleryLocalParticipant,\n VideoGalleryRemoteParticipant,\n VideoStreamOptions,\n CreateVideoStreamViewResult\n} from '../types';\n/* @conditional-compile-remove(together-mode) */\nimport {\n VideoGalleryTogetherModeParticipantPosition,\n VideoGalleryTogetherModeStreams,\n TogetherModeStreamViewResult\n} from '../types/TogetherModeTypes';\nimport { ViewScalingMode } from '../types';\nimport { HorizontalGalleryStyles } from './HorizontalGallery';\nimport { _RemoteVideoTile } from './RemoteVideoTile';\nimport { isNarrowWidth, _useContainerHeight, _useContainerWidth } from './utils/responsive';\nimport { LocalScreenShare } from './VideoGallery/LocalScreenShare';\nimport { RemoteScreenShare } from './VideoGallery/RemoteScreenShare';\nimport { LocalVideoCameraCycleButtonProps } from './LocalVideoCameraButton';\nimport { _ICoordinates, _ModalClone } from './ModalClone/ModalClone';\nimport {\n _formatString,\n /* @conditional-compile-remove(together-mode) */ _isIdentityMicrosoftTeamsUser\n} from '@internal/acs-ui-common';\nimport { _LocalVideoTile } from './LocalVideoTile';\nimport { DefaultLayout } from './VideoGallery/DefaultLayout';\nimport { FloatingLocalVideoLayout } from './VideoGallery/FloatingLocalVideoLayout';\nimport { useIdentifiers } from '../identifiers';\nimport { localVideoTileContainerStyles, videoGalleryOuterDivStyle } from './styles/VideoGallery.styles';\nimport { floatingLocalVideoTileStyle } from './VideoGallery/styles/FloatingLocalVideo.styles';\nimport { useId } from '@fluentui/react-hooks';\nimport { VerticalGalleryStyles } from './VerticalGallery';\nimport { SpeakerVideoLayout } from './VideoGallery/SpeakerVideoLayout';\nimport { FocusedContentLayout } from './VideoGallery/FocusContentLayout';\n/* @conditional-compile-remove(large-gallery) */\nimport { LargeGalleryLayout } from './VideoGallery/LargeGalleryLayout';\n\n/* @conditional-compile-remove(together-mode) */\nimport { TogetherModeLayout } from './VideoGallery/TogetherModeLayout';\nimport { LayoutProps } from './VideoGallery/Layout';\nimport { ReactionResources } from '../types/ReactionTypes';\n/* @conditional-compile-remove(together-mode) */\nimport { TogetherModeStream } from './VideoGallery/TogetherModeStream';\n\n/**\n * @private\n * Currently the Calling JS SDK supports up to 4 remote video streams\n */\nexport const DEFAULT_MAX_REMOTE_VIDEO_STREAMS = 4;\n\n/**\n * @private\n * Styles to disable the selectivity of a text in video gallery\n */\nexport const unselectable = {\n '-webkit-user-select': 'none',\n '-webkit-touch-callout': 'none',\n '-moz-user-select': 'none',\n '-ms-user-select': 'none',\n 'user-select': 'none'\n};\n/**\n * @private\n * Set aside only 6 dominant speakers for remaining audio participants\n */\nexport const MAX_AUDIO_DOMINANT_SPEAKERS = 6;\n/**\n * @private\n * Default remote video tile menu options\n */\nexport const DEFAULT_REMOTE_VIDEO_TILE_MENU_OPTIONS = {\n kind: 'contextual'\n};\n\n/**\n * @private\n * Maximum number of remote video tiles that can be pinned\n */\nexport const MAX_PINNED_REMOTE_VIDEO_TILES = 4;\n\n/**\n * All strings that may be shown on the UI in the {@link VideoGallery}.\n *\n * @public\n */\nexport interface VideoGalleryStrings {\n /** String to notify that local user is sharing their screen */\n screenIsBeingSharedMessage: string;\n /** String to show when remote screen share stream is loading */\n screenShareLoadingMessage: string;\n /** String to show when local screen share stream is loading */\n localScreenShareLoadingMessage: string;\n /** String for local video label. Default is \"You\" */\n localVideoLabel: string;\n /** String for local video camera switcher */\n localVideoCameraSwitcherLabel: string;\n /** String for announcing the local video tile can be moved by keyboard controls */\n localVideoMovementLabel: string;\n /** Aria-label for announcing the local video tile can be moved by keyboard controls */\n localVideoMovementAriaLabel: string;\n /** String for announcing the selected camera */\n localVideoSelectedDescription: string;\n /** placeholder text for participants who does not have a display name*/\n displayNamePlaceholder: string;\n /** Menu text shown in Video Tile contextual menu for setting a remote participants video to fit in frame */\n fitRemoteParticipantToFrame: string;\n /** Menu text shown in Video Tile contextual menu for setting a remote participants video to fill the frame */\n fillRemoteParticipantFrame: string;\n /** Menu text shown in Video Tile contextual menu for pinning a remote participant's video tile */\n pinParticipantForMe: string;\n /** Menu text shown in Video Tile contextual menu for unpinning a remote participant's video tile */\n unpinParticipantForMe: string;\n /** Aria label for pin participant menu item of remote participant's video tile */\n pinParticipantMenuItemAriaLabel: string;\n /** Aria label for unpin participant menu item of remote participant's video tile */\n unpinParticipantMenuItemAriaLabel: string;\n /** Aria label to announce when remote participant's video tile is pinned */\n pinnedParticipantAnnouncementAriaLabel: string;\n /** Aria label to announce when remote participant's video tile is unpinned */\n unpinnedParticipantAnnouncementAriaLabel: string;\n /** Menu text shown in Video Tile contextual menu to start spotlight on participant's video tile */\n startSpotlightVideoTileMenuLabel: string;\n /** Menu text shown in Video Tile contextual menu to add spotlight to participant's video tile */\n addSpotlightVideoTileMenuLabel: string;\n /** Menu title for start spotlight menu item when spotlight limit is reached */\n spotlightLimitReachedMenuTitle: string;\n /** Menu text shown in Video Tile contextual menu to stop spotlight on participant's video tile */\n stopSpotlightVideoTileMenuLabel: string;\n /** Menu text shown in Video Tile contextual menu to stop spotlight on local user's video tile */\n stopSpotlightOnSelfVideoTileMenuLabel: string;\n /** String for the attendee role */\n attendeeRole: string;\n /** Menu text shown in Video Tile contextual menu to mute a remote participant */\n muteParticipantMenuItemLabel: string;\n /** Text shown when waiting for others to join the call */\n waitingScreenText: string;\n}\n\n/**\n * @public\n */\nexport type VideoGalleryLayout =\n | 'default'\n | 'floatingLocalVideo'\n | 'speaker'\n | /* @conditional-compile-remove(large-gallery) */ 'largeGallery'\n | /* @conditional-compile-remove(together-mode) */ 'togetherMode'\n | 'focusedContent';\n\n/**\n * {@link VideoGallery} Component Styles.\n * @public\n */\nexport interface VideoGalleryStyles extends BaseCustomStyles {\n /** Styles for the grid layout */\n gridLayout?: GridLayoutStyles;\n /** Styles for the horizontal gallery */\n horizontalGallery?: HorizontalGalleryStyles;\n /** Styles for the local video */\n localVideo?: IStyle;\n /** Styles for the vertical gallery */\n verticalGallery?: VerticalGalleryStyles;\n}\n\n/**\n * Different modes and positions of the overflow gallery in the VideoGallery\n *\n * @public\n */\nexport type OverflowGalleryPosition = 'horizontalBottom' | 'verticalRight' | 'horizontalTop';\n\n/**\n * different modes of the local video tile\n *\n * @public\n */\nexport type LocalVideoTileSize = '9:16' | '16:9' | 'hidden' | 'followDeviceOrientation';\n\n/**\n * Props for {@link VideoGallery}.\n *\n * @public\n */\nexport interface VideoGalleryProps {\n /**\n * Allows users to pass an object containing custom CSS styles for the gallery container.\n *\n * @Example\n * ```\n * <VideoGallery styles={{ root: { border: 'solid 1px red' } }} />\n * ```\n */\n styles?: VideoGalleryStyles;\n /** Layout of the video tiles. */\n layout?: VideoGalleryLayout;\n /** Local video particpant */\n localParticipant: VideoGalleryLocalParticipant;\n /** List of remote video particpants */\n remoteParticipants?: VideoGalleryRemoteParticipant[];\n /** List of dominant speaker userIds in the order of their dominance. 0th index is the most dominant. */\n dominantSpeakers?: string[];\n /** Local video view options */\n localVideoViewOptions?: VideoStreamOptions;\n /** Remote videos view options */\n remoteVideoViewOptions?: VideoStreamOptions;\n /** Callback to create the local video stream view */\n onCreateLocalStreamView?: (options?: VideoStreamOptions) => Promise<void | CreateVideoStreamViewResult>;\n /** Callback to dispose of the local video stream view */\n onDisposeLocalStreamView?: () => void;\n /** Callback to render the local video tile*/\n onRenderLocalVideoTile?: (localParticipant: VideoGalleryLocalParticipant) => JSX.Element;\n /** Callback to create a remote video stream view */\n onCreateRemoteStreamView?: (\n userId: string,\n options?: VideoStreamOptions\n ) => Promise<void | CreateVideoStreamViewResult>;\n /** Callback to render a remote video tile */\n onRenderRemoteVideoTile?: (remoteParticipant: VideoGalleryRemoteParticipant) => JSX.Element;\n /**\n * @deprecated use {@link onDisposeRemoteVideoStreamView} and {@link onDisposeRemoteScreenShareStreamView} instead\n *\n * Callback to dispose a remote video stream view\n */\n onDisposeRemoteStreamView?: (userId: string) => Promise<void>;\n /** Callback to dispose a remote video stream view */\n onDisposeRemoteVideoStreamView?: (userId: string) => Promise<void>;\n /** Callback to dispose a remote screen share stream view */\n onDisposeRemoteScreenShareStreamView?: (userId: string) => Promise<void>;\n /** Callback to dispose a local screen share stream view */\n onDisposeLocalScreenShareStreamView?: () => Promise<void>;\n /** Callback to render a participant avatar */\n onRenderAvatar?: OnRenderAvatarCallback;\n /**\n * Whether to display the local video camera switcher button\n */\n showCameraSwitcherInLocalPreview?: boolean;\n /**\n * Whether to display a mute icon beside the user's display name.\n * @defaultValue `true`\n */\n showMuteIndicator?: boolean;\n /** Optional strings to override in component */\n strings?: Partial<VideoGalleryStrings>;\n /**\n * Maximum number of participant remote video streams that is rendered.\n * @defaultValue 4\n */\n maxRemoteVideoStreams?: number;\n /**\n * Camera control information for button to switch cameras.\n */\n localVideoCameraCycleButtonProps?: LocalVideoCameraCycleButtonProps;\n /**\n * List of pinned participant userIds.\n */\n pinnedParticipants?: string[];\n /**\n * This callback will be called when a participant video tile is pinned.\n */\n onPinParticipant?: (userId: string) => void;\n /**\n * This callback will be called when a participant video tile is un-pinned.\n */\n onUnpinParticipant?: (userId: string) => void;\n /**\n * List of spotlighted participant userIds.\n */\n spotlightedParticipants?: string[];\n /**\n * This callback is to start spotlight for local participant video tile.\n */\n onStartLocalSpotlight?: () => Promise<void>;\n /**\n * This callback is to stop spotlight for local participant video tile.\n */\n onStartRemoteSpotlight?: (userIds: string[]) => Promise<void>;\n /**\n * This callback is to start spotlight for remote participant video tiles.\n */\n onStopLocalSpotlight?: () => Promise<void>;\n /**\n * This callback is to stop spotlight for remote participant video tiles.\n */\n onStopRemoteSpotlight?: (userIds: string[]) => Promise<void>;\n /**\n * Maximum participants that can be spotlighted\n */\n maxParticipantsToSpotlight?: number;\n /**\n * Options for showing the remote video tile menu.\n *\n * @defaultValue \\{ kind: 'contextual' \\}\n */\n remoteVideoTileMenu?: false | VideoTileContextualMenuProps | VideoTileDrawerMenuProps;\n /**\n * Determines the layout of the overflowGallery inside the VideoGallery.\n * @defaultValue 'horizontalBottom'\n */\n overflowGalleryPosition?: OverflowGalleryPosition;\n /**\n * Determines the aspect ratio of local video tile in the video gallery.\n * @remarks 'followDeviceOrientation' will be responsive to the screen orientation and will change between 9:16 (portrait) and\n * 16:9 (landscape) aspect ratios.\n * @defaultValue 'followDeviceOrientation'\n */\n localVideoTileSize?: LocalVideoTileSize;\n /**\n * Reaction resources for like, heart, laugh, applause and surprised.\n */\n reactionResources?: ReactionResources;\n /**\n * Additional Options for Video Tiles\n */\n videoTilesOptions?: VideoTilesOptions;\n /**\n * This callback is to mute a remote participant\n */\n onMuteParticipant?: (userId: string) => Promise<void>;\n /* @conditional-compile-remove(together-mode) */\n startTogetherModeEnabled?: boolean;\n /* @conditional-compile-remove(together-mode) */\n isTogetherModeActive?: boolean;\n /* @conditional-compile-remove(together-mode) */\n onCreateTogetherModeStreamView?: (options?: VideoStreamOptions) => Promise<void | TogetherModeStreamViewResult>;\n /* @conditional-compile-remove(together-mode) */\n /** Callback to create the local video stream view */\n onStartTogetherMode?: () => Promise<void>;\n /* @conditional-compile-remove(together-mode) */\n onSetTogetherModeSceneSize?: (width: number, height: number) => void;\n /* @conditional-compile-remove(together-mode) */\n togetherModeStreams?: VideoGalleryTogetherModeStreams;\n /* @conditional-compile-remove(together-mode) */\n togetherModeSeatingCoordinates?: VideoGalleryTogetherModeParticipantPosition;\n /* @conditional-compile-remove(together-mode) */\n onDisposeTogetherModeStreamView?: () => Promise<void>;\n /* @conditional-compile-remove(media-access) */\n /**\n * This callback is to forbid audio for remote participant(s)\n */\n onForbidAudio?: (userIds: string[]) => Promise<void>;\n /* @conditional-compile-remove(media-access) */\n /**\n * This callback is to permit audio for remote participant(s)\n */\n onPermitAudio?: (userIds: string[]) => Promise<void>;\n /* @conditional-compile-remove(media-access) */\n /**\n * This callback is to forbid video for remote participant(s)\n */\n onForbidVideo?: (userIds: string[]) => Promise<void>;\n /* @conditional-compile-remove(media-access) */\n /**\n * This callback is to permit video for remote participant(s)\n */\n onPermitVideo?: (userIds: string[]) => Promise<void>;\n}\n\n/**\n * Options that apply to all Video Tiles in the {@link VideoGallery}\n *\n * @public\n */\nexport interface VideoTilesOptions {\n /**\n * Whether to always show the label background for the video tile\n */\n alwaysShowLabelBackground?: boolean;\n}\n\n/**\n * Properties for showing contextual menu for remote {@link VideoTile} components in {@link VideoGallery}.\n *\n * @public\n */\nexport interface VideoTileContextualMenuProps {\n /**\n * The menu property kind\n */\n kind: 'contextual';\n}\n\n/**\n * Properties for showing drawer menu on remote {@link VideoTile} long touch in {@link VideoGallery}.\n *\n * @public\n */\nexport interface VideoTileDrawerMenuProps {\n /**\n * The menu property kind\n */\n kind: 'drawer';\n /**\n * The optional id property provided on an element that the drawer menu should render within when a\n * remote participant video tile Drawer is shown. If an id is not provided, then a drawer menu will\n * render within the VideoGallery component.\n */\n hostId?: string;\n}\n/**\n * VideoGallery represents a layout of video tiles for a specific call.\n * It displays a {@link VideoTile} for the local user as well as for each remote participant who has joined the call.\n *\n * @public\n */\nexport const VideoGallery = (props: VideoGalleryProps): JSX.Element => {\n const {\n localParticipant,\n remoteParticipants = [],\n localVideoViewOptions,\n remoteVideoViewOptions,\n dominantSpeakers,\n onRenderLocalVideoTile,\n onRenderRemoteVideoTile,\n onCreateLocalStreamView,\n onDisposeLocalStreamView,\n onCreateRemoteStreamView,\n onDisposeRemoteScreenShareStreamView,\n onDisposeLocalScreenShareStreamView,\n onDisposeRemoteVideoStreamView,\n styles,\n layout,\n onRenderAvatar,\n showMuteIndicator,\n maxRemoteVideoStreams = DEFAULT_MAX_REMOTE_VIDEO_STREAMS,\n showCameraSwitcherInLocalPreview,\n localVideoCameraCycleButtonProps,\n onPinParticipant: onPinParticipantHandler,\n onUnpinParticipant: onUnpinParticipantHandler,\n remoteVideoTileMenu = DEFAULT_REMOTE_VIDEO_TILE_MENU_OPTIONS,\n overflowGalleryPosition = 'horizontalBottom',\n localVideoTileSize = 'followDeviceOrientation',\n spotlightedParticipants,\n onStartLocalSpotlight,\n onStartRemoteSpotlight,\n onStopLocalSpotlight,\n onStopRemoteSpotlight,\n maxParticipantsToSpotlight,\n reactionResources,\n videoTilesOptions,\n onMuteParticipant,\n /* @conditional-compile-remove(together-mode) */\n startTogetherModeEnabled,\n /* @conditional-compile-remove(together-mode) */\n isTogetherModeActive,\n /* @conditional-compile-remove(together-mode) */\n onCreateTogetherModeStreamView,\n /* @conditional-compile-remove(together-mode) */\n onStartTogetherMode,\n /* @conditional-compile-remove(together-mode) */\n onSetTogetherModeSceneSize,\n /* @conditional-compile-remove(together-mode) */\n togetherModeStreams,\n /* @conditional-compile-remove(together-mode) */\n togetherModeSeatingCoordinates,\n /* @conditional-compile-remove(together-mode) */\n onDisposeTogetherModeStreamView,\n /* @conditional-compile-remove(media-access) */\n onForbidAudio,\n /* @conditional-compile-remove(media-access) */\n onPermitAudio,\n /* @conditional-compile-remove(media-access) */\n onForbidVideo,\n /* @conditional-compile-remove(media-access) */\n onPermitVideo\n } = props;\n\n const ids = useIdentifiers();\n const theme = useTheme();\n const localeStrings = useLocale().strings.videoGallery;\n const strings = useMemo(() => ({ ...localeStrings, ...props.strings }), [localeStrings, props.strings]);\n\n const drawerMenuHostIdFromProp =\n remoteVideoTileMenu && remoteVideoTileMenu.kind === 'drawer'\n ? (remoteVideoTileMenu as VideoTileDrawerMenuProps).hostId\n : undefined;\n const drawerMenuHostId = useId('drawerMenuHost', drawerMenuHostIdFromProp);\n\n const localTileNotInGrid = (layout === 'floatingLocalVideo' || layout === 'speaker') && remoteParticipants.length > 0;\n\n const containerRef = useRef<HTMLDivElement>(null);\n const containerWidth = _useContainerWidth(containerRef);\n const containerHeight = _useContainerHeight(containerRef);\n const isNarrow = containerWidth ? isNarrowWidth(containerWidth) : false;\n\n const [pinnedParticipantsState, setPinnedParticipantsState] = React.useState<string[]>([]);\n const [selectedScalingModeState, setselectedScalingModeState] = React.useState<Record<string, VideoStreamOptions>>(\n {}\n );\n\n const onUpdateScalingMode = useCallback(\n (remoteUserId: string, scalingMode: ViewScalingMode) => {\n setselectedScalingModeState((current) => ({\n ...current,\n [remoteUserId]: {\n scalingMode,\n isMirrored: remoteVideoViewOptions?.isMirrored\n }\n }));\n },\n [remoteVideoViewOptions?.isMirrored]\n );\n useEffect(() => {\n props.pinnedParticipants?.forEach((pinParticipant) => {\n if (!props.remoteParticipants?.find((t) => t.userId === pinParticipant)) {\n // warning will be logged in the console when invalid participant id is passed in pinned participants\n console.warn('Invalid pinned participant UserId :' + pinParticipant);\n }\n });\n }, [props.pinnedParticipants, props.remoteParticipants]);\n // Use pinnedParticipants from props but if it is not defined use the maintained state of pinned participants\n const pinnedParticipants = useMemo(\n () =>\n props.pinnedParticipants ??\n pinnedParticipantsState.filter((pinnedParticipantId) =>\n remoteParticipants.find((remoteParticipant) => remoteParticipant.userId === pinnedParticipantId)\n ),\n [props.pinnedParticipants, pinnedParticipantsState, remoteParticipants]\n );\n\n const showLocalVideoTileLabel =\n !((localTileNotInGrid && isNarrow) || localVideoTileSize === '9:16') || layout === 'default';\n /**\n * Utility function for memoized rendering of LocalParticipant.\n */\n const localVideoTile = useMemo((): JSX.Element | undefined => {\n if (localVideoTileSize === 'hidden') {\n return undefined;\n }\n if (onRenderLocalVideoTile) {\n return onRenderLocalVideoTile(localParticipant);\n }\n\n const isSpotlighted = !!localParticipant.spotlight;\n\n const localVideoTileStyles = concatStyleSets(\n localTileNotInGrid ? floatingLocalVideoTileStyle : {},\n {\n root: { borderRadius: theme.effects.roundedCorner4 }\n },\n styles?.localVideo\n );\n\n const initialsName = !localParticipant.displayName ? '' : localParticipant.displayName;\n\n const showDisplayNameTrampoline = (): string => {\n return layout === 'default' ? strings.localVideoLabel : isNarrow ? '' : strings.localVideoLabel;\n };\n\n return (\n <Stack styles={localVideoTileContainerStyles} key=\"local-video-tile-key\">\n <_LocalVideoTile\n alwaysShowLabelBackground={videoTilesOptions?.alwaysShowLabelBackground}\n userId={localParticipant.userId}\n onCreateLocalStreamView={onCreateLocalStreamView}\n onDisposeLocalStreamView={onDisposeLocalStreamView}\n isAvailable={localParticipant?.videoStream?.isAvailable}\n isMuted={localParticipant.isMuted}\n renderElement={localParticipant?.videoStream?.renderElement}\n displayName={showDisplayNameTrampoline()}\n initialsName={initialsName}\n localVideoViewOptions={localVideoViewOptions}\n onRenderAvatar={onRenderAvatar}\n showLabel={showLocalVideoTileLabel}\n showMuteIndicator={showMuteIndicator}\n showCameraSwitcherInLocalPreview={showCameraSwitcherInLocalPreview}\n localVideoCameraCycleButtonProps={localVideoCameraCycleButtonProps}\n localVideoCameraSwitcherLabel={strings.localVideoCameraSwitcherLabel}\n localVideoSelectedDescription={strings.localVideoSelectedDescription}\n styles={localVideoTileStyles}\n raisedHand={localParticipant.raisedHand}\n reaction={localParticipant.reaction}\n spotlightedParticipantUserIds={spotlightedParticipants}\n isSpotlighted={isSpotlighted}\n onStartSpotlight={onStartLocalSpotlight}\n onStopSpotlight={onStopLocalSpotlight}\n maxParticipantsToSpotlight={maxParticipantsToSpotlight}\n menuKind={remoteVideoTileMenu ? (remoteVideoTileMenu.kind === 'drawer' ? 'drawer' : 'contextual') : undefined}\n drawerMenuHostId={drawerMenuHostId}\n strings={strings}\n reactionResources={reactionResources}\n participantsCount={remoteParticipants.length + 1}\n isScreenSharingOn={localParticipant.isScreenSharingOn}\n /* @conditional-compile-remove(media-access) */\n mediaAccess={localParticipant.mediaAccess}\n />\n </Stack>\n );\n }, [\n isNarrow,\n localParticipant,\n localVideoCameraCycleButtonProps,\n localVideoViewOptions,\n onCreateLocalStreamView,\n onDisposeLocalStreamView,\n onRenderAvatar,\n onRenderLocalVideoTile,\n localTileNotInGrid,\n showCameraSwitcherInLocalPreview,\n showMuteIndicator,\n styles?.localVideo,\n theme.effects.roundedCorner4,\n localVideoTileSize,\n layout,\n showLocalVideoTileLabel,\n spotlightedParticipants,\n onStartLocalSpotlight,\n onStopLocalSpotlight,\n maxParticipantsToSpotlight,\n remoteVideoTileMenu,\n strings,\n drawerMenuHostId,\n reactionResources,\n videoTilesOptions,\n remoteParticipants.length\n ]);\n\n const onPinParticipant = useCallback(\n (userId: string) => {\n if (pinnedParticipants.length >= MAX_PINNED_REMOTE_VIDEO_TILES) {\n return;\n }\n if (!pinnedParticipants.includes(userId)) {\n setPinnedParticipantsState(pinnedParticipants.concat(userId));\n }\n onPinParticipantHandler?.(userId);\n },\n [pinnedParticipants, setPinnedParticipantsState, onPinParticipantHandler]\n );\n const onUnpinParticipant = useCallback(\n (userId: string) => {\n setPinnedParticipantsState(pinnedParticipantsState.filter((p) => p !== userId));\n onUnpinParticipantHandler?.(userId);\n },\n [pinnedParticipantsState, setPinnedParticipantsState, onUnpinParticipantHandler]\n );\n\n const [announcementString, setAnnouncementString] = React.useState<string>('');\n /**\n * sets the announcement string for VideoGallery actions so that the screenreader will trigger\n */\n const toggleAnnouncerString = useCallback(\n (announcement: string) => {\n setAnnouncementString(announcement);\n /**\n * Clears the announcer string after VideoGallery action allowing it to be re-announced.\n */\n setTimeout(() => {\n setAnnouncementString('');\n }, 3000);\n },\n [setAnnouncementString]\n );\n\n const defaultOnRenderVideoTile = useCallback(\n (participant: VideoGalleryRemoteParticipant, isVideoParticipant?: boolean) => {\n const remoteVideoStream = participant.videoStream;\n const selectedScalingMode = remoteVideoStream ? selectedScalingModeState[participant.userId] : undefined;\n let isPinned = pinnedParticipants?.includes(participant.userId);\n const isSpotlighted = !!participant.spotlight;\n isPinned = isSpotlighted ? false : isPinned;\n\n const createViewOptions = (): VideoStreamOptions | undefined => {\n if (selectedScalingMode) {\n return selectedScalingMode;\n }\n return remoteVideoStream?.streamSize &&\n remoteVideoStream.streamSize?.height > remoteVideoStream.streamSize?.width\n ? ({\n scalingMode: 'Fit',\n isMirrored: remoteVideoViewOptions?.isMirrored\n } as VideoStreamOptions)\n : remoteVideoViewOptions;\n };\n\n return (\n <_RemoteVideoTile\n alwaysShowLabelBackground={videoTilesOptions?.alwaysShowLabelBackground}\n streamId={remoteVideoStream?.id}\n key={participant.userId}\n userId={participant.userId}\n remoteParticipant={participant}\n onCreateRemoteStreamView={isVideoParticipant ? onCreateRemoteStreamView : undefined}\n onDisposeRemoteStreamView={isVideoParticipant ? onDisposeRemoteVideoStreamView : undefined}\n isAvailable={isVideoParticipant ? remoteVideoStream?.isAvailable : false}\n isReceiving={isVideoParticipant ? remoteVideoStream?.isReceiving : false}\n renderElement={isVideoParticipant ? remoteVideoStream?.renderElement : undefined}\n remoteVideoViewOptions={createViewOptions()}\n onRenderAvatar={onRenderAvatar}\n showMuteIndicator={showMuteIndicator}\n strings={strings}\n participantState={participant.state}\n menuKind={\n participant.userId === localParticipant.userId\n ? undefined\n : remoteVideoTileMenu\n ? remoteVideoTileMenu.kind === 'drawer'\n ? 'drawer'\n : 'contextual'\n : undefined\n }\n drawerMenuHostId={drawerMenuHostId}\n onPinParticipant={onPinParticipant}\n onUnpinParticipant={onUnpinParticipant}\n onUpdateScalingMode={onUpdateScalingMode}\n isPinned={isPinned}\n disablePinMenuItem={pinnedParticipants.length >= MAX_PINNED_REMOTE_VIDEO_TILES}\n toggleAnnouncerString={toggleAnnouncerString}\n spotlightedParticipantUserIds={spotlightedParticipants}\n isSpotlighted={isSpotlighted}\n onStartSpotlight={onStartRemoteSpotlight}\n onStopSpotlight={onStopRemoteSpotlight}\n maxParticipantsToSpotlight={maxParticipantsToSpotlight}\n reactionResources={reactionResources}\n onMuteParticipant={onMuteParticipant}\n /* @conditional-compile-remove(media-access) */\n onForbidAudio={onForbidAudio}\n /* @conditional-compile-remove(media-access) */\n onPermitAudio={onPermitAudio}\n /* @conditional-compile-remove(media-access) */\n onForbidVideo={onForbidVideo}\n /* @conditional-compile-remove(media-access) */\n onPermitVideo={onPermitVideo}\n />\n );\n },\n [\n selectedScalingModeState,\n pinnedParticipants,\n videoTilesOptions?.alwaysShowLabelBackground,\n onCreateRemoteStreamView,\n onDisposeRemoteVideoStreamView,\n onRenderAvatar,\n showMuteIndicator,\n strings,\n localParticipant.userId,\n remoteVideoTileMenu,\n drawerMenuHostId,\n onPinParticipant,\n onUnpinParticipant,\n onUpdateScalingMode,\n toggleAnnouncerString,\n spotlightedParticipants,\n onStartRemoteSpotlight,\n onStopRemoteSpotlight,\n maxParticipantsToSpotlight,\n reactionResources,\n onMuteParticipant,\n /* @conditional-compile-remove(media-access) */\n onForbidAudio,\n /* @conditional-compile-remove(media-access) */\n onPermitAudio,\n /* @conditional-compile-remove(media-access) */\n onForbidVideo,\n /* @conditional-compile-remove(media-access) */\n onPermitVideo,\n remoteVideoViewOptions\n ]\n );\n\n const screenShareParticipant = remoteParticipants.find((participant) => participant.screenShareStream?.isAvailable);\n const localScreenShareStreamComponent = (\n <LocalScreenShare\n localParticipant={localParticipant}\n renderElement={localParticipant.screenShareStream?.renderElement}\n isAvailable={localParticipant.screenShareStream?.isAvailable}\n onCreateLocalStreamView={onCreateLocalStreamView}\n onDisposeLocalScreenShareStreamView={onDisposeLocalScreenShareStreamView}\n />\n );\n\n const remoteScreenShareComponent = screenShareParticipant && (\n <RemoteScreenShare\n {...screenShareParticipant}\n renderElement={screenShareParticipant.screenShareStream?.renderElement}\n onCreateRemoteStreamView={onCreateRemoteStreamView}\n onDisposeRemoteStreamView={onDisposeRemoteScreenShareStreamView}\n isReceiving={screenShareParticipant.screenShareStream?.isReceiving}\n participantVideoScalingMode={selectedScalingModeState[screenShareParticipant.userId]}\n localParticipant={localParticipant}\n remoteParticipants={remoteParticipants}\n reactionResources={reactionResources}\n />\n );\n\n const screenShareComponent = remoteScreenShareComponent\n ? remoteScreenShareComponent\n : localParticipant.isScreenSharingOn\n ? localScreenShareStreamComponent\n : undefined;\n\n /* @conditional-compile-remove(together-mode) */\n const togetherModeStreamComponent = useMemo(\n () => (\n <TogetherModeStream\n startTogetherModeEnabled={startTogetherModeEnabled}\n isTogetherModeActive={isTogetherModeActive}\n onCreateTogetherModeStreamView={onCreateTogetherModeStreamView}\n onStartTogetherMode={onStartTogetherMode}\n onDisposeTogetherModeStreamView={onDisposeTogetherModeStreamView}\n onSetTogetherModeSceneSize={onSetTogetherModeSceneSize}\n togetherModeStreams={togetherModeStreams}\n seatingCoordinates={togetherModeSeatingCoordinates}\n localParticipant={localParticipant}\n remoteParticipants={remoteParticipants}\n reactionResources={reactionResources}\n screenShareComponent={screenShareComponent}\n containerWidth={containerWidth}\n containerHeight={containerHeight}\n />\n ),\n [\n startTogetherModeEnabled,\n isTogetherModeActive,\n onCreateTogetherModeStreamView,\n onStartTogetherMode,\n onDisposeTogetherModeStreamView,\n onSetTogetherModeSceneSize,\n togetherModeStreams,\n togetherModeSeatingCoordinates,\n localParticipant,\n remoteParticipants,\n reactionResources,\n screenShareComponent,\n containerWidth,\n containerHeight\n ]\n );\n /* @conditional-compile-remove(together-mode) */\n // Current implementation of capabilities is only based on user role.\n // This logic checks for the user role and if the user is a Teams user.\n const canSwitchToTogetherModeLayout =\n isTogetherModeActive || (_isIdentityMicrosoftTeamsUser(localParticipant.userId) && startTogetherModeEnabled);\n\n const layoutProps = useMemo<LayoutProps>(\n () => ({\n remoteParticipants,\n localParticipant,\n screenShareComponent,\n showCameraSwitcherInLocalPreview,\n maxRemoteVideoStreams,\n dominantSpeakers,\n styles,\n onRenderRemoteParticipant: onRenderRemoteVideoTile ?? defaultOnRenderVideoTile,\n localVideoComponent: localVideoTile,\n parentWidth: containerWidth,\n parentHeight: containerHeight,\n pinnedParticipantUserIds: pinnedParticipants,\n overflowGalleryPosition,\n localVideoTileSize,\n spotlightedParticipantUserIds: spotlightedParticipants,\n /* @conditional-compile-remove(together-mode) */\n togetherModeStreamComponent\n }),\n [\n remoteParticipants,\n localParticipant,\n screenShareComponent,\n showCameraSwitcherInLocalPreview,\n maxRemoteVideoStreams,\n dominantSpeakers,\n styles,\n localVideoTile,\n containerWidth,\n containerHeight,\n onRenderRemoteVideoTile,\n defaultOnRenderVideoTile,\n pinnedParticipants,\n overflowGalleryPosition,\n localVideoTileSize,\n spotlightedParticipants,\n /* @conditional-compile-remove(together-mode) */\n togetherModeStreamComponent\n ]\n );\n\n const videoGalleryLayout = useMemo(() => {\n if (screenShareParticipant && layout === 'focusedContent') {\n return <FocusedContentLayout {...layoutProps} />;\n }\n if (layout === 'floatingLocalVideo') {\n return <FloatingLocalVideoLayout {...layoutProps} />;\n }\n\n if (layout === 'speaker') {\n return <SpeakerVideoLayout {...layoutProps} />;\n }\n /* @conditional-compile-remove(large-gallery) */\n if (layout === 'largeGallery') {\n return <LargeGalleryLayout {...layoutProps} />;\n }\n /* @conditional-compile-remove(together-mode) */\n // Teams users can switch to Together mode layout only if they have the capability,\n // while ACS users can do so only if Together mode is enabled.\n if (layout === 'togetherMode' && canSwitchToTogetherModeLayout) {\n return <TogetherModeLayout {...layoutProps} />;\n }\n return <DefaultLayout {...layoutProps} />;\n }, [\n /* @conditional-compile-remove(together-mode) */ canSwitchToTogetherModeLayout,\n layout,\n layoutProps,\n screenShareParticipant\n ]);\n\n return (\n <div\n // We don't assign an drawer menu host id to the VideoGallery when a drawerMenuHostId is assigned from props\n id={drawerMenuHostIdFromProp ? undefined : drawerMenuHostId}\n data-ui-id={ids.videoGallery}\n ref={containerRef}\n className={mergeStyles(videoGalleryOuterDivStyle, styles?.root, unselectable)}\n >\n {videoGalleryLayout}\n <Announcer announcementString={announcementString} ariaLive=\"polite\" />\n </div>\n );\n};\n"]}
|
@@ -0,0 +1,89 @@
|
|
1
|
+
import { VideoGalleryTogetherModeSeatingInfo } from '../../types/TogetherModeTypes';
|
2
|
+
import { IStackStyles } from '@fluentui/react';
|
3
|
+
import { CSSProperties } from 'react';
|
4
|
+
/**
|
5
|
+
* Multiplier to convert rem units to pixels.
|
6
|
+
*/
|
7
|
+
export declare const REM_TO_PX_MULTIPLIER = 16;
|
8
|
+
/**
|
9
|
+
* The travel height for reactions in Together Mode.
|
10
|
+
* The reaction move overlay uses pixel units, so the seat position height, defined in rem, needs to be converted to pixels
|
11
|
+
*/
|
12
|
+
export declare const REACTION_TRAVEL_HEIGHT: number;
|
13
|
+
/**
|
14
|
+
* Defines the maximum travel height for reactions in Together Mode.
|
15
|
+
* Ensures the reaction animation does not exceed the center point from the top.
|
16
|
+
* Since the reaction move overlay uses pixel units, the seat position height (defined in rem) must be converted to pixels.
|
17
|
+
*/
|
18
|
+
export declare const REACTION_MAX_TRAVEL_HEIGHT: number;
|
19
|
+
/**
|
20
|
+
* Interface for defining the coordinates of a seat in Together Mode.
|
21
|
+
*/
|
22
|
+
export interface TogetherModeParticipantSeatPosition {
|
23
|
+
height: string;
|
24
|
+
width: string;
|
25
|
+
left: string;
|
26
|
+
top: string;
|
27
|
+
}
|
28
|
+
/**
|
29
|
+
* Interface for defining the style of a seat position in Together Mode.
|
30
|
+
*/
|
31
|
+
export interface TogetherModeSeatStyle {
|
32
|
+
seatPosition: TogetherModeParticipantSeatPosition;
|
33
|
+
}
|
34
|
+
/**
|
35
|
+
* Sets the seating position for a participant in Together Mode.
|
36
|
+
*
|
37
|
+
* @param seatingPosition - The seating position information.
|
38
|
+
* @returns The style object for the seating position.
|
39
|
+
*/
|
40
|
+
export declare function setParticipantSeatingPosition(seatingPosition: VideoGalleryTogetherModeSeatingInfo): TogetherModeParticipantSeatPosition;
|
41
|
+
/**
|
42
|
+
* Return a style bucket based on the number of active sprites.
|
43
|
+
* For example, the first three reactions should appear at maximum
|
44
|
+
* height, width, and opacity.
|
45
|
+
* @private
|
46
|
+
*/
|
47
|
+
export declare function setTogetherModeSeatPositionStyle(seatingPosition: VideoGalleryTogetherModeSeatingInfo): TogetherModeSeatStyle;
|
48
|
+
/**
|
49
|
+
* The style for the Together Mode meeting overlay.
|
50
|
+
*/
|
51
|
+
export declare const togetherModeMeetingOverlayStyle: CSSProperties;
|
52
|
+
/**
|
53
|
+
* Generates the overlay style for a participant in Together Mode.
|
54
|
+
*
|
55
|
+
* @param seatingPosition - The seating position information.
|
56
|
+
* @returns The style object for the participant overlay.
|
57
|
+
*/
|
58
|
+
export declare function getTogetherModeParticipantOverlayStyle(seatingPositionStyle: TogetherModeSeatStyle): CSSProperties;
|
59
|
+
/**
|
60
|
+
* Calculate the reaction emoji scaled size based on width and height of the participant seat width and height.
|
61
|
+
* This is needed when the browser is resized and the participant seat width and height changes.
|
62
|
+
*
|
63
|
+
* @param width - The width of the element.
|
64
|
+
* @param height - The height of the element.
|
65
|
+
* @returns The scaled size.
|
66
|
+
*/
|
67
|
+
export declare const calculateScaledSize: (width: number, height: number) => number;
|
68
|
+
/**
|
69
|
+
* @private
|
70
|
+
*/
|
71
|
+
export declare const togetherModeStreamRootStyle: IStackStyles;
|
72
|
+
/**
|
73
|
+
* @private
|
74
|
+
*/
|
75
|
+
export declare const togetherModeIconStyle: () => CSSProperties;
|
76
|
+
/**
|
77
|
+
* The style for the container holding the display name, raiseHand, spotlight and mute icons.
|
78
|
+
* @private
|
79
|
+
*/
|
80
|
+
export declare const togetherModeParticipantStatusContainer: (backgroundColor: string, borderRadius: string) => CSSProperties;
|
81
|
+
/**
|
82
|
+
* @private
|
83
|
+
*/
|
84
|
+
export declare const togetherModeParticipantDisplayName: (isParticipantHovered: boolean, participantSeatingWidth: number, color: string) => CSSProperties;
|
85
|
+
/**
|
86
|
+
* @private
|
87
|
+
*/
|
88
|
+
export declare const togetherModeParticipantEmojiSpriteStyle: (emojiSize: number, emojiScaledSize: number, participantSeatWidth: string) => CSSProperties;
|
89
|
+
//# sourceMappingURL=TogetherMode.styles.d.ts.map
|
@@ -0,0 +1,173 @@
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
2
|
+
// Licensed under the MIT License.
|
3
|
+
/* @conditional-compile-remove(together-mode) */
|
4
|
+
import { _pxToRem } from "../../../../acs-ui-common/src";
|
5
|
+
/* @conditional-compile-remove(together-mode) */
|
6
|
+
/**
|
7
|
+
* Multiplier to convert rem units to pixels.
|
8
|
+
*/
|
9
|
+
export const REM_TO_PX_MULTIPLIER = 16;
|
10
|
+
/* @conditional-compile-remove(together-mode) */
|
11
|
+
/**
|
12
|
+
* The travel height for reactions in Together Mode.
|
13
|
+
* The reaction move overlay uses pixel units, so the seat position height, defined in rem, needs to be converted to pixels
|
14
|
+
*/
|
15
|
+
export const REACTION_TRAVEL_HEIGHT = 0.35 * REM_TO_PX_MULTIPLIER;
|
16
|
+
/* @conditional-compile-remove(together-mode) */
|
17
|
+
/**
|
18
|
+
* Defines the maximum travel height for reactions in Together Mode.
|
19
|
+
* Ensures the reaction animation does not exceed the center point from the top.
|
20
|
+
* Since the reaction move overlay uses pixel units, the seat position height (defined in rem) must be converted to pixels.
|
21
|
+
*/
|
22
|
+
export const REACTION_MAX_TRAVEL_HEIGHT = 0.5 * REM_TO_PX_MULTIPLIER;
|
23
|
+
/* @conditional-compile-remove(together-mode) */
|
24
|
+
/**
|
25
|
+
* Sets the seating position for a participant in Together Mode.
|
26
|
+
*
|
27
|
+
* @param seatingPosition - The seating position information.
|
28
|
+
* @returns The style object for the seating position.
|
29
|
+
*/
|
30
|
+
export function setParticipantSeatingPosition(seatingPosition) {
|
31
|
+
return {
|
32
|
+
width: _pxToRem(seatingPosition.width),
|
33
|
+
height: _pxToRem(seatingPosition.height),
|
34
|
+
left: _pxToRem(seatingPosition.left),
|
35
|
+
top: _pxToRem(seatingPosition.top)
|
36
|
+
};
|
37
|
+
}
|
38
|
+
/* @conditional-compile-remove(together-mode) */
|
39
|
+
/**
|
40
|
+
* Return a style bucket based on the number of active sprites.
|
41
|
+
* For example, the first three reactions should appear at maximum
|
42
|
+
* height, width, and opacity.
|
43
|
+
* @private
|
44
|
+
*/
|
45
|
+
export function setTogetherModeSeatPositionStyle(seatingPosition) {
|
46
|
+
return {
|
47
|
+
seatPosition: setParticipantSeatingPosition(seatingPosition)
|
48
|
+
};
|
49
|
+
}
|
50
|
+
/* @conditional-compile-remove(together-mode) */
|
51
|
+
/**
|
52
|
+
* The style for the Together Mode meeting overlay.
|
53
|
+
*/
|
54
|
+
export const togetherModeMeetingOverlayStyle = {
|
55
|
+
width: '100%',
|
56
|
+
height: '100%',
|
57
|
+
position: 'absolute',
|
58
|
+
top: '0',
|
59
|
+
left: '0'
|
60
|
+
};
|
61
|
+
/* @conditional-compile-remove(together-mode) */
|
62
|
+
/**
|
63
|
+
* Generates the overlay style for a participant in Together Mode.
|
64
|
+
*
|
65
|
+
* @param seatingPosition - The seating position information.
|
66
|
+
* @returns The style object for the participant overlay.
|
67
|
+
*/
|
68
|
+
export function getTogetherModeParticipantOverlayStyle(seatingPositionStyle) {
|
69
|
+
return Object.assign(Object.assign({}, seatingPositionStyle.seatPosition), { position: 'absolute' });
|
70
|
+
}
|
71
|
+
/* @conditional-compile-remove(together-mode) */
|
72
|
+
// Function to map a value from one range to another
|
73
|
+
const mapRange = (value, inMin, inMax, outMin, outMax) => {
|
74
|
+
return outMin + ((value - inMin) * (outMax - outMin)) / (inMax - inMin);
|
75
|
+
};
|
76
|
+
/* @conditional-compile-remove(together-mode) */
|
77
|
+
/**
|
78
|
+
* Calculate the reaction emoji scaled size based on width and height of the participant seat width and height.
|
79
|
+
* This is needed when the browser is resized and the participant seat width and height changes.
|
80
|
+
*
|
81
|
+
* @param width - The width of the element.
|
82
|
+
* @param height - The height of the element.
|
83
|
+
* @returns The scaled size.
|
84
|
+
*/
|
85
|
+
export const calculateScaledSize = (width, height) => {
|
86
|
+
// Maximum participant seat width and height
|
87
|
+
const maxSize = 600;
|
88
|
+
// Minimum participant seat width and height
|
89
|
+
const minSize = 200;
|
90
|
+
// Minimum scaled width and height of the reaction emoji
|
91
|
+
const minScaledSize = 35;
|
92
|
+
// Maximum scaled width and height of the reaction emoji
|
93
|
+
const maxScaledSize = 70;
|
94
|
+
// Use width or height to determine scaling factor
|
95
|
+
const size = Math.min(width, height);
|
96
|
+
// Map the size to the desired range
|
97
|
+
return mapRange(size, minSize, maxSize, minScaledSize, maxScaledSize);
|
98
|
+
};
|
99
|
+
/* @conditional-compile-remove(together-mode) */
|
100
|
+
/**
|
101
|
+
* @private
|
102
|
+
*/
|
103
|
+
export const togetherModeStreamRootStyle = {
|
104
|
+
root: {
|
105
|
+
width: '100%',
|
106
|
+
height: '100%',
|
107
|
+
display: 'flex',
|
108
|
+
justifyContent: 'center',
|
109
|
+
alignItems: 'center',
|
110
|
+
position: 'absolute',
|
111
|
+
top: 0,
|
112
|
+
left: 0
|
113
|
+
}
|
114
|
+
};
|
115
|
+
/* @conditional-compile-remove(together-mode) */
|
116
|
+
/**
|
117
|
+
* @private
|
118
|
+
*/
|
119
|
+
export const togetherModeIconStyle = () => {
|
120
|
+
return {
|
121
|
+
width: _pxToRem(20),
|
122
|
+
flexShrink: 0
|
123
|
+
};
|
124
|
+
};
|
125
|
+
/* @conditional-compile-remove(together-mode) */
|
126
|
+
/**
|
127
|
+
* The style for the container holding the display name, raiseHand, spotlight and mute icons.
|
128
|
+
* @private
|
129
|
+
*/
|
130
|
+
export const togetherModeParticipantStatusContainer = (backgroundColor, borderRadius) => {
|
131
|
+
return {
|
132
|
+
backgroundColor,
|
133
|
+
display: 'flex',
|
134
|
+
justifyContent: 'center',
|
135
|
+
alignItems: 'center',
|
136
|
+
gap: _pxToRem(2),
|
137
|
+
margin: '0 auto', // Centers the container
|
138
|
+
padding: `0 ${_pxToRem(5)}`,
|
139
|
+
borderRadius,
|
140
|
+
width: 'fit-content'
|
141
|
+
};
|
142
|
+
};
|
143
|
+
/* @conditional-compile-remove(together-mode) */
|
144
|
+
/**
|
145
|
+
* @private
|
146
|
+
*/
|
147
|
+
export const togetherModeParticipantDisplayName = (isParticipantHovered, participantSeatingWidth, color) => {
|
148
|
+
const MIN_DISPLAY_NAME_WIDTH = 100;
|
149
|
+
return {
|
150
|
+
textOverflow: 'ellipsis',
|
151
|
+
flexGrow: 1, // Allow text to grow within available space
|
152
|
+
overflow: isParticipantHovered ? 'visible' : 'hidden',
|
153
|
+
whiteSpace: 'nowrap',
|
154
|
+
textAlign: 'center',
|
155
|
+
color,
|
156
|
+
display: isParticipantHovered || participantSeatingWidth > MIN_DISPLAY_NAME_WIDTH ? 'inline-block' : 'none' // Completely remove the element when hidden
|
157
|
+
};
|
158
|
+
};
|
159
|
+
/* @conditional-compile-remove(together-mode) */
|
160
|
+
/**
|
161
|
+
* @private
|
162
|
+
*/
|
163
|
+
export const togetherModeParticipantEmojiSpriteStyle = (emojiSize, emojiScaledSize, participantSeatWidth) => {
|
164
|
+
const participantSeatWidthInPixel = parseFloat(participantSeatWidth) * REM_TO_PX_MULTIPLIER;
|
165
|
+
const emojiScaledSizeInPercent = (emojiScaledSize / participantSeatWidthInPixel) * 100;
|
166
|
+
return {
|
167
|
+
width: `${emojiSize}`,
|
168
|
+
position: 'absolute',
|
169
|
+
// Center the emoji sprite within the participant seat
|
170
|
+
left: `${emojiScaledSizeInPercent / 2}%`
|
171
|
+
};
|
172
|
+
};
|
173
|
+
//# sourceMappingURL=TogetherMode.styles.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"TogetherMode.styles.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/styles/TogetherMode.styles.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,gDAAgD;AAChD,OAAO,EAAE,QAAQ,EAAE,sCAAgC;AAQnD,gDAAgD;AAChD;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAEvC,gDAAgD;AAChD;;;GAGG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,GAAG,oBAAoB,CAAC;AAElE,gDAAgD;AAChD;;;;GAIG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,GAAG,GAAG,oBAAoB,CAAC;AAqBrE,gDAAgD;AAChD;;;;;GAKG;AACH,MAAM,UAAU,6BAA6B,CAC3C,eAAoD;IAEpD,OAAO;QACL,KAAK,EAAE,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC;QACtC,MAAM,EAAE,QAAQ,CAAC,eAAe,CAAC,MAAM,CAAC;QACxC,IAAI,EAAE,QAAQ,CAAC,eAAe,CAAC,IAAI,CAAC;QACpC,GAAG,EAAE,QAAQ,CAAC,eAAe,CAAC,GAAG,CAAC;KACnC,CAAC;AACJ,CAAC;AAED,gDAAgD;AAChD;;;;;GAKG;AACH,MAAM,UAAU,gCAAgC,CAC9C,eAAoD;IAEpD,OAAO;QACL,YAAY,EAAE,6BAA6B,CAAC,eAAe,CAAC;KAC7D,CAAC;AACJ,CAAC;AAED,gDAAgD;AAChD;;GAEG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAkB;IAC5D,KAAK,EAAE,MAAM;IACb,MAAM,EAAE,MAAM;IACd,QAAQ,EAAE,UAAU;IACpB,GAAG,EAAE,GAAG;IACR,IAAI,EAAE,GAAG;CACV,CAAC;AAEF,gDAAgD;AAChD;;;;;GAKG;AACH,MAAM,UAAU,sCAAsC,CAAC,o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oB,CAAC,GAAG,oBAAoB,CAAC;IAC5F,MAAM,wBAAwB,GAAG,CAAC,eAAe,GAAG,2BAA2B,CAAC,GAAG,GAAG,CAAC;IACvF,OAAO;QACL,KAAK,EAAE,GAAG,SAAS,EAAE;QACrB,QAAQ,EAAE,UAAU;QACpB,sDAAsD;QACtD,IAAI,EAAE,GAAG,wBAAwB,GAAG,CAAC,GAAG;KACzC,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/* @conditional-compile-remove(together-mode) */\nimport { _pxToRem } from '@internal/acs-ui-common';\n/* @conditional-compile-remove(together-mode) */\nimport { VideoGalleryTogetherModeSeatingInfo } from '../../types/TogetherModeTypes';\n/* @conditional-compile-remove(together-mode) */\nimport { IStackStyles } from '@fluentui/react';\n/* @conditional-compile-remove(together-mode) */\nimport { CSSProperties } from 'react';\n\n/* @conditional-compile-remove(together-mode) */\n/**\n * Multiplier to convert rem units to pixels.\n */\nexport const REM_TO_PX_MULTIPLIER = 16;\n\n/* @conditional-compile-remove(together-mode) */\n/**\n * The travel height for reactions in Together Mode.\n * The reaction move overlay uses pixel units, so the seat position height, defined in rem, needs to be converted to pixels\n */\nexport const REACTION_TRAVEL_HEIGHT = 0.35 * REM_TO_PX_MULTIPLIER;\n\n/* @conditional-compile-remove(together-mode) */\n/**\n * Defines the maximum travel height for reactions in Together Mode.\n * Ensures the reaction animation does not exceed the center point from the top.\n * Since the reaction move overlay uses pixel units, the seat position height (defined in rem) must be converted to pixels.\n */\nexport const REACTION_MAX_TRAVEL_HEIGHT = 0.5 * REM_TO_PX_MULTIPLIER;\n\n/* @conditional-compile-remove(together-mode) */\n/**\n * Interface for defining the coordinates of a seat in Together Mode.\n */\nexport interface TogetherModeParticipantSeatPosition {\n height: string;\n width: string;\n left: string;\n top: string;\n}\n\n/* @conditional-compile-remove(together-mode) */\n/**\n * Interface for defining the style of a seat position in Together Mode.\n */\nexport interface TogetherModeSeatStyle {\n seatPosition: TogetherModeParticipantSeatPosition;\n}\n\n/* @conditional-compile-remove(together-mode) */\n/**\n * Sets the seating position for a participant in Together Mode.\n *\n * @param seatingPosition - The seating position information.\n * @returns The style object for the seating position.\n */\nexport function setParticipantSeatingPosition(\n seatingPosition: VideoGalleryTogetherModeSeatingInfo\n): TogetherModeParticipantSeatPosition {\n return {\n width: _pxToRem(seatingPosition.width),\n height: _pxToRem(seatingPosition.height),\n left: _pxToRem(seatingPosition.left),\n top: _pxToRem(seatingPosition.top)\n };\n}\n\n/* @conditional-compile-remove(together-mode) */\n/**\n * Return a style bucket based on the number of active sprites.\n * For example, the first three reactions should appear at maximum\n * height, width, and opacity.\n * @private\n */\nexport function setTogetherModeSeatPositionStyle(\n seatingPosition: VideoGalleryTogetherModeSeatingInfo\n): TogetherModeSeatStyle {\n return {\n seatPosition: setParticipantSeatingPosition(seatingPosition)\n };\n}\n\n/* @conditional-compile-remove(together-mode) */\n/**\n * The style for the Together Mode meeting overlay.\n */\nexport const togetherModeMeetingOverlayStyle: CSSProperties = {\n width: '100%',\n height: '100%',\n position: 'absolute',\n top: '0',\n left: '0'\n};\n\n/* @conditional-compile-remove(together-mode) */\n/**\n * Generates the overlay style for a participant in Together Mode.\n *\n * @param seatingPosition - The seating position information.\n * @returns The style object for the participant overlay.\n */\nexport function getTogetherModeParticipantOverlayStyle(seatingPositionStyle: TogetherModeSeatStyle): CSSProperties {\n return {\n ...seatingPositionStyle.seatPosition,\n position: 'absolute'\n };\n}\n\n/* @conditional-compile-remove(together-mode) */\n// Function to map a value from one range to another\nconst mapRange = (value: number, inMin: number, inMax: number, outMin: number, outMax: number): number => {\n return outMin + ((value - inMin) * (outMax - outMin)) / (inMax - inMin);\n};\n\n/* @conditional-compile-remove(together-mode) */\n/**\n * Calculate the reaction emoji scaled size based on width and height of the participant seat width and height.\n * This is needed when the browser is resized and the participant seat width and height changes.\n *\n * @param width - The width of the element.\n * @param height - The height of the element.\n * @returns The scaled size.\n */\nexport const calculateScaledSize = (width: number, height: number): number => {\n // Maximum participant seat width and height\n const maxSize = 600;\n // Minimum participant seat width and height\n const minSize = 200;\n // Minimum scaled width and height of the reaction emoji\n const minScaledSize = 35;\n // Maximum scaled width and height of the reaction emoji\n const maxScaledSize = 70;\n\n // Use width or height to determine scaling factor\n const size = Math.min(width, height);\n\n // Map the size to the desired range\n return mapRange(size, minSize, maxSize, minScaledSize, maxScaledSize);\n};\n\n/* @conditional-compile-remove(together-mode) */\n/**\n * @private\n */\nexport const togetherModeStreamRootStyle: IStackStyles = {\n root: {\n width: '100%',\n height: '100%',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n position: 'absolute',\n top: 0,\n left: 0\n }\n};\n\n/* @conditional-compile-remove(together-mode) */\n/**\n * @private\n */\nexport const togetherModeIconStyle = (): CSSProperties => {\n return {\n width: _pxToRem(20),\n flexShrink: 0\n };\n};\n\n/* @conditional-compile-remove(together-mode) */\n/**\n * The style for the container holding the display name, raiseHand, spotlight and mute icons.\n * @private\n */\nexport const togetherModeParticipantStatusContainer = (\n backgroundColor: string,\n borderRadius: string\n): CSSProperties => {\n return {\n backgroundColor,\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n gap: _pxToRem(2),\n margin: '0 auto', // Centers the container\n padding: `0 ${_pxToRem(5)}`,\n borderRadius,\n width: 'fit-content'\n };\n};\n\n/* @conditional-compile-remove(together-mode) */\n/**\n * @private\n */\nexport const togetherModeParticipantDisplayName = (\n isParticipantHovered: boolean,\n participantSeatingWidth: number,\n color: string\n): CSSProperties => {\n const MIN_DISPLAY_NAME_WIDTH = 100;\n return {\n textOverflow: 'ellipsis',\n flexGrow: 1, // Allow text to grow within available space\n overflow: isParticipantHovered ? 'visible' : 'hidden',\n whiteSpace: 'nowrap',\n textAlign: 'center',\n color,\n display: isParticipantHovered || participantSeatingWidth > MIN_DISPLAY_NAME_WIDTH ? 'inline-block' : 'none' // Completely remove the element when hidden\n };\n};\n\n/* @conditional-compile-remove(together-mode) */\n/**\n * @private\n */\nexport const togetherModeParticipantEmojiSpriteStyle = (\n emojiSize: number,\n emojiScaledSize: number,\n participantSeatWidth: string\n): CSSProperties => {\n const participantSeatWidthInPixel = parseFloat(participantSeatWidth) * REM_TO_PX_MULTIPLIER;\n const emojiScaledSizeInPercent = (emojiScaledSize / participantSeatWidthInPixel) * 100;\n return {\n width: `${emojiSize}`,\n position: 'absolute',\n // Center the emoji sprite within the participant seat\n left: `${emojiScaledSizeInPercent / 2}%`\n };\n};\n"]}
|