@azure/communication-react 1.23.0-alpha-202501100017 → 1.23.0-alpha-202501110016

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.
Files changed (33) hide show
  1. package/dist/communication-react.d.ts +4 -4
  2. package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-DT0cdPPC.js → ChatMessageComponentAsRichTextEditBox-B8K83_JO.js} +2 -2
  3. package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-DT0cdPPC.js.map → ChatMessageComponentAsRichTextEditBox-B8K83_JO.js.map} +1 -1
  4. package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-lT8BiqS6.js → RichTextSendBoxWrapper-BfbHGYVY.js} +2 -2
  5. package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-lT8BiqS6.js.map → RichTextSendBoxWrapper-BfbHGYVY.js.map} +1 -1
  6. package/dist/dist-cjs/communication-react/{index-CjMI0Yzv.js → index-C9oi1qJA.js} +95 -24
  7. package/dist/dist-cjs/communication-react/index-C9oi1qJA.js.map +1 -0
  8. package/dist/dist-cjs/communication-react/index.js +1 -1
  9. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  10. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  11. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js +6 -1
  12. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js.map +1 -1
  13. package/dist/dist-esm/chat-stateful-client/src/ChatContext.js +1 -1
  14. package/dist/dist-esm/chat-stateful-client/src/ChatContext.js.map +1 -1
  15. package/dist/dist-esm/chat-stateful-client/src/{Constants.d.ts → constants.d.ts} +1 -1
  16. package/dist/dist-esm/chat-stateful-client/src/{Constants.js → constants.js} +1 -1
  17. package/dist/dist-esm/chat-stateful-client/src/{Constants.js.map → constants.js.map} +1 -1
  18. package/dist/dist-esm/react-components/src/components/ParticipantItem.js.map +1 -1
  19. package/dist/dist-esm/react-components/src/components/ParticipantList.js +2 -0
  20. package/dist/dist-esm/react-components/src/components/ParticipantList.js.map +1 -1
  21. package/dist/dist-esm/react-components/src/components/VideoGallery.d.ts +4 -4
  22. package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
  23. package/dist/dist-esm/react-components/src/components/VideoTile.js +24 -4
  24. package/dist/dist-esm/react-components/src/components/VideoTile.js.map +1 -1
  25. package/dist/dist-esm/react-components/src/components/utils.d.ts +1 -1
  26. package/dist/dist-esm/react-components/src/components/utils.js +9 -1
  27. package/dist/dist-esm/react-components/src/components/utils.js.map +1 -1
  28. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +13 -12
  29. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
  30. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/usePeoplePane.js +36 -0
  31. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/usePeoplePane.js.map +1 -1
  32. package/package.json +1 -1
  33. package/dist/dist-cjs/communication-react/index-CjMI0Yzv.js.map +0 -1
@@ -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,MA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AAC,oBAAoB,oBAAK,WAAW,EAAI,CAAC;QACnD,CAAC;QACD,IAAI,MAAM,KAAK,oBAAoB,EAAE,CAAC;YACpC,OAAO,oBAAC,wBAAwB,oBAAK,WAAW,EAAI,CAAC;QACvD,CAAC;QAED,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YACzB,OAAO,oBAAC,kBAAkB,oBAAK,WAAW,EAAI,CAAC;QACjD,CAAC;QACD,gDAAgD;QAChD,IAAI,MAAM,KAAK,cAAc,EAAE,CAAC;YAC9B,OAAO,oBAAC,kBAAkB,oBAAK,WAAW,EAAI,CAAC;QACjD,CAAC;QACD,OAAO,oBAAC,aAAa,oBAAK,WAAW,EAAI,CAAC;IAC5C,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,sBAAsB,CAAC,CAAC,CAAC;IAElD,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';\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 a 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 a 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 a 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 a 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,YA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AM,KAAK,gBAAgB,EAAE,CAAC;YAC1D,OAAO,oBAAC,oBAAoB,oBAAK,WAAW,EAAI,CAAC;QACnD,CAAC;QACD,IAAI,MAAM,KAAK,oBAAoB,EAAE,CAAC;YACpC,OAAO,oBAAC,wBAAwB,oBAAK,WAAW,EAAI,CAAC;QACvD,CAAC;QAED,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YACzB,OAAO,oBAAC,kBAAkB,oBAAK,WAAW,EAAI,CAAC;QACjD,CAAC;QACD,gDAAgD;QAChD,IAAI,MAAM,KAAK,cAAc,EAAE,CAAC;YAC9B,OAAO,oBAAC,kBAAkB,oBAAK,WAAW,EAAI,CAAC;QACjD,CAAC;QACD,OAAO,oBAAC,aAAa,oBAAK,WAAW,EAAI,CAAC;IAC5C,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,sBAAsB,CAAC,CAAC,CAAC;IAElD,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';\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"]}
@@ -31,10 +31,18 @@ const videoTileMoreMenuProps = {
31
31
  const VideoTileMoreOptionsButton = (props) => {
32
32
  const locale = useLocale().strings.videoTile;
33
33
  const theme = useTheme();
34
- const { contextualMenu, canShowContextMenuButton, participantDisplayName, participantHandRaised, participantIsSpeaking, participantState, participantIsMuted, isMicDisabled, isCameraDisabled } = props;
34
+ const { contextualMenu, canShowContextMenuButton, participantDisplayName, participantHandRaised, participantIsSpeaking, participantState, participantIsMuted,
35
+ /* @conditional-compile-remove(media-access) */
36
+ isMicDisabled,
37
+ /* @conditional-compile-remove(media-access) */
38
+ isCameraDisabled } = props;
35
39
  const [moreButtonAiraDescription, setMoreButtonAriaDescription] = useState('');
36
40
  useEffect(() => {
37
- setMoreButtonAriaDescription(formatMoreButtonAriaDescription(participantDisplayName, participantIsMuted, participantHandRaised, participantState, participantIsSpeaking, isMicDisabled, isCameraDisabled, locale));
41
+ setMoreButtonAriaDescription(formatMoreButtonAriaDescription(participantDisplayName, participantIsMuted, participantHandRaised, participantState, participantIsSpeaking, locale,
42
+ /* @conditional-compile-remove(media-access) */
43
+ isMicDisabled,
44
+ /* @conditional-compile-remove(media-access) */
45
+ isCameraDisabled));
38
46
  }, [
39
47
  participantDisplayName,
40
48
  participantHandRaised,
@@ -42,7 +50,9 @@ const VideoTileMoreOptionsButton = (props) => {
42
50
  participantIsSpeaking,
43
51
  participantState,
44
52
  locale,
53
+ /* @conditional-compile-remove(media-access) */
45
54
  isMicDisabled,
55
+ /* @conditional-compile-remove(media-access) */
46
56
  isCameraDisabled
47
57
  ]);
48
58
  if (!contextualMenu) {
@@ -158,7 +168,13 @@ export const VideoTile = (props) => {
158
168
  ? getMediaAccessIconsTrampoline(showMuteIndicator, isMuted,
159
169
  /* @conditional-compile-remove(media-access) */
160
170
  mediaAccess)
161
- : undefined, [canShowLabel, isMuted, mediaAccess, participantStateString, showMuteIndicator]);
171
+ : undefined, [
172
+ canShowLabel,
173
+ isMuted,
174
+ /* @conditional-compile-remove(media-access) */ mediaAccess,
175
+ participantStateString,
176
+ showMuteIndicator
177
+ ]);
162
178
  const canShowParticipantIcons = participantMediaAccessIcons || isSpotlighted || isPinned;
163
179
  return (React.createElement(Stack, Object.assign({ "data-ui-id": ids.videoTile, className: mergeStyles(rootStyles, {
164
180
  background: theme.palette.neutralLighter,
@@ -191,7 +207,11 @@ export const VideoTile = (props) => {
191
207
  React.createElement(Icon, { iconName: "VideoTileSpotlighted" }))),
192
208
  isPinned && (React.createElement(Stack, { className: mergeStyles(iconContainerStyle) },
193
209
  React.createElement(Icon, { iconName: "VideoTilePinned", className: mergeStyles(pinIconStyle) }))))),
194
- React.createElement(VideoTileMoreOptionsButton, { contextualMenu: contextualMenu, participantDisplayName: displayName, participantHandRaised: !!raisedHand, participantIsMuted: isMuted, participantState: participantStateString, participantIsSpeaking: isSpeaking, canShowContextMenuButton: canShowContextMenuButton, isMicDisabled: (mediaAccess === null || mediaAccess === void 0 ? void 0 : mediaAccess.isAudioPermitted) === false, isCameraDisabled: (mediaAccess === null || mediaAccess === void 0 ? void 0 : mediaAccess.isVideoPermitted) === false })))),
210
+ React.createElement(VideoTileMoreOptionsButton, { contextualMenu: contextualMenu, participantDisplayName: displayName, participantHandRaised: !!raisedHand, participantIsMuted: isMuted, participantState: participantStateString, participantIsSpeaking: isSpeaking, canShowContextMenuButton: canShowContextMenuButton,
211
+ /* @conditional-compile-remove(media-access) */
212
+ isMicDisabled: (mediaAccess === null || mediaAccess === void 0 ? void 0 : mediaAccess.isAudioPermitted) === false,
213
+ /* @conditional-compile-remove(media-access) */
214
+ isCameraDisabled: (mediaAccess === null || mediaAccess === void 0 ? void 0 : mediaAccess.isVideoPermitted) === false })))),
195
215
  children && (React.createElement(Stack, { className: mergeStyles(overlayContainerStyles, styles === null || styles === void 0 ? void 0 : styles.overlayContainer) }, children)),
196
216
  raisedHand && (React.createElement(Stack, { horizontal: true, tokens: { childrenGap: '0.2rem' }, className: raiseHandContainerStyles(theme, !canShowLabel) },
197
217
  React.createElement(Stack.Item, null,
@@ -1 +1 @@
1
- {"version":3,"file":"VideoTile.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/VideoTile.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EACL,eAAe,EACf,IAAI,EACJ,UAAU,EAGV,WAAW,EACX,OAAO,EACP,KAAK,EACL,IAAI,EACL,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACrF,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD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IAAI,aAAa,CAAC,EAAE,CAAC;QACvD,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,+CAA+C;IAC/C,OAAO,CACL;QACG,gBAAgB;QAChB,UAAU;QACV,aAAa,CACb,CACJ,CAAC;IAEF,OAAO,iBAAiB,IAAI,OAAO,CAAC,CAAC,CAAC,CACpC,oBAAC,KAAK,IAAC,SAAS,EAAE,WAAW,CAAC,kBAAkB,CAAC;QAC/C,oBAAC,IAAI,IAAC,QAAQ,EAAC,iBAAiB,GAAG,CAC7B,CACT,CAAC,CAAC,CAAC,SAAS,CAAC;AAChB,CAAC,CAAC;AAEF,MAAM,yBAAyB,GAAG,CAAC,KAAqB,EAAE,MAAuB,EAAsB,EAAE;IACvG,MAAM,OAAO,mCAAQ,MAAM,CAAC,OAAO,CAAC,SAAS,GAAK,KAAK,CAAC,OAAO,CAAE,CAAC;IAClE,OAAO,KAAK,CAAC,gBAAgB,KAAK,YAAY,IAAI,KAAK,CAAC,gBAAgB,KAAK,SAAS;QACpF,CAAC,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,uBAAuB;QAClC,CAAC,CAAC,KAAK,CAAC,gBAAgB,KAAK,MAAM;YACjC,CAAC,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,oBAAoB;YAC/B,CAAC,CAAC,SAAS,CAAC;AAClB,CAAC,CAAC;AAEF,MAAM,uBAAuB,GAAG;IAC9B,sEAAsE;IACtE,yDAAyD;IACzD,WAAW,EAAE,MAAM;CACpB,CAAC;AAEF,MAAM,0BAA0B,GAAG,CAAC,iBAAyB,EAAE,YAAqB,EAAU,EAAE;IAC9F,OAAO,YAAY,CAAC,CAAC,CAAC,IAAI,iBAAiB,GAAG,CAAC,CAAC,CAAC,iBAAiB,CAAC;AACrE,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n DirectionalHint,\n Icon,\n IconButton,\n IContextualMenuProps,\n IStyle,\n mergeStyles,\n Persona,\n Stack,\n Text\n} from '@fluentui/react';\nimport React, { useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';\nimport { useIdentifiers } from '../identifiers';\nimport { ComponentLocale, useLocale } from '../localization';\nimport { useTheme } from '../theming';\nimport { BaseCustomStyles, CustomAvatarOptions, OnRenderAvatarCallback } from '../types';\n/* @conditional-compile-remove(media-access) */\nimport { MediaAccess } from '../types';\nimport { CallingTheme } from '../theming';\nimport { RaisedHand } from '../types';\nimport { RaisedHandIcon } from './assets/RaisedHandIcon';\n\nimport { ParticipantState } from '../types';\nimport {\n disabledVideoHint,\n displayNameStyle,\n iconContainerStyle,\n overlayContainerStyles,\n rootStyles,\n videoContainerStyles,\n tileInfoContainerStyle,\n participantStateStringStyles,\n videoTileHighContrastStyles,\n iconsGroupContainerStyle\n} from './styles/VideoTile.styles';\nimport { pinIconStyle } from './styles/VideoTile.styles';\nimport useLongPress from './utils/useLongPress';\nimport { moreButtonStyles } from './styles/VideoTile.styles';\nimport { raiseHandContainerStyles } from './styles/VideoTile.styles';\nimport { ReactionResources } from '../types/ReactionTypes';\nimport { formatMoreButtonAriaDescription } from './utils';\n\n/**\n * Strings of {@link VideoTile} that can be overridden.\n * @public\n */\nexport interface VideoTileStrings {\n /** Aria label for announcing the remote video tile drawer menu */\n moreOptionsButtonAriaLabel: string;\n /** String for displaying the Ringing of the remote participant */\n participantStateRinging: string;\n /** String for displaying the Hold state of the remote participant */\n participantStateHold: string;\n /* @conditional-compile-remove(remote-ufd) */\n /** String for displaying the reconnecting state of the remote participant */\n participantReconnecting?: string;\n /** String for the announcement of the muted state of the participant when muted */\n moreOptionsParticipantMutedStateMutedAriaLabel: string;\n /** String for the announcement of the unmuted state of the participant when unmuted */\n moreOptionsParticipantMutedStateUnmutedAriaLabel: string;\n /** String for the announcement of the participant has their hand raised */\n moreOptionsParticipantHandRaisedAriaLabel: string;\n /** String for the announcement of whether the participant is speaking or not */\n moreOptionsParticipantIsSpeakingAriaLabel: string;\n /** String for the announcement of whether the participant microphone disabled */\n moreOptionsParticipantMicDisabledAriaLabel: string;\n /** String for the announcement of whether the participant camera disabled */\n moreOptionsParticipantCameraDisabledAriaLabel: string;\n}\n\n/**\n * Fluent styles for {@link VideoTile}.\n *\n * @public\n */\nexport interface VideoTileStylesProps extends BaseCustomStyles {\n /** Styles for video container. */\n videoContainer?: IStyle;\n /** Styles for container overlayed on the video container. */\n overlayContainer?: IStyle;\n /** Styles for displayName on the video container. */\n displayNameContainer?: IStyle;\n}\n\n/**\n * Props for {@link VideoTile}.\n *\n * @public\n */\nexport interface VideoTileProps {\n /** React Child components. Child Components will show as overlay component in the VideoTile. */\n children?: React.ReactNode;\n /**\n * Allows users to pass in an object contains custom CSS styles.\n * @Example\n * ```\n * <VideoTile styles={{ root: { background: 'blue' } }} />\n * ```\n */\n styles?: VideoTileStylesProps;\n /** user id for the VideoTile placeholder. */\n userId?: string;\n /** Component with the video stream. */\n renderElement?: JSX.Element | null;\n /**\n * Overlay component responsible for rendering reaction\n */\n overlay?: JSX.Element | null;\n /** Determines if the video is mirrored or not. */\n isMirrored?: boolean;\n /** Custom render Component function for no video is available. Render a Persona Icon if undefined. */\n onRenderPlaceholder?: OnRenderAvatarCallback;\n /**\n * Show label on the VideoTile\n * @defaultValue true\n */\n showLabel?: boolean;\n /**\n * Show label background on the VideoTile\n * @defaultValue false\n */\n alwaysShowLabelBackground?: boolean;\n /**\n * Whether to display a mute icon beside the user's display name.\n * @defaultValue true\n */\n showMuteIndicator?: boolean;\n /**\n * Whether the video is muted or not.\n */\n isMuted?: boolean;\n /**\n * If true, the video tile will show the pin icon.\n */\n isPinned?: boolean;\n /**\n * Display Name of the Participant to be shown in the label.\n * @remarks `displayName` is used to generate avatar initials if `initialsName` is not provided.\n */\n displayName?: string;\n /**\n * Name of the participant used to generate initials. For example, a name `John Doe` will display `JD` as initials.\n * @remarks `displayName` is used if this property is not specified.\n */\n initialsName?: string;\n /**\n * Minimum size of the persona avatar in px.\n * The persona avatar is the default placeholder shown when no video stream is available.\n * For more information see https://developer.microsoft.com/en-us/fluentui#/controls/web/persona\n * @defaultValue 32px\n */\n personaMinSize?: number;\n /**\n * Maximum size of the personal avatar in px.\n * The persona avatar is the default placeholder shown when no video stream is available.\n * For more information see https://developer.microsoft.com/en-us/fluentui#/controls/web/persona\n * @defaultValue 100px\n */\n personaMaxSize?: number;\n /** Optional property to set the aria label of the video tile if there is no available stream. */\n noVideoAvailableAriaLabel?: string;\n /** Whether the participant in the videoTile is speaking. Shows a speaking indicator (border). */\n isSpeaking?: boolean;\n\n /** Whether the participant is raised hand. Show a indicator (border) and icon with order */\n raisedHand?: RaisedHand;\n\n /**\n * The call connection state of the participant.\n * For example, `Hold` means the participant is on hold.\n */\n participantState?: ParticipantState;\n /**\n * Strings to override in the component.\n */\n strings?: VideoTileStrings;\n /**\n * Display custom menu items in the VideoTile's contextual menu.\n * Uses Fluent UI ContextualMenu.\n * An ellipses icon will be displayed to open the contextual menu if this prop is defined.\n */\n contextualMenu?: IContextualMenuProps;\n /**\n * Callback triggered by video tile on touch and hold.\n */\n onLongTouch?: () => void;\n /**\n * If true, the video tile will show the spotlighted icon.\n */\n isSpotlighted?: boolean;\n /**\n * Reactions resources' url and metadata.\n */\n reactionResources?: ReactionResources;\n /* @conditional-compile-remove(media-access) */\n /**\n * Media access state of the participant.\n */\n mediaAccess?: MediaAccess;\n}\n\n// Coin max size is set to PersonaSize.size100\nconst DEFAULT_PERSONA_MAX_SIZE_PX = 100;\n// Coin min size is set PersonaSize.size32\nconst DEFAULT_PERSONA_MIN_SIZE_PX = 32;\n\nconst DefaultPlaceholder = (props: CustomAvatarOptions): JSX.Element => {\n const { text, noVideoAvailableAriaLabel, coinSize, hidePersonaDetails } = props;\n\n return (\n <Stack className={mergeStyles({ position: 'absolute', height: '100%', width: '100%' })}>\n <Stack styles={defaultPersonaStyles}>\n {coinSize && (\n <Persona\n coinSize={coinSize}\n hidePersonaDetails={hidePersonaDetails}\n text={text ?? ''}\n initialsTextColor=\"white\"\n aria-label={noVideoAvailableAriaLabel ?? ''}\n showOverflowTooltip={false}\n />\n )}\n </Stack>\n </Stack>\n );\n};\n\nconst defaultPersonaStyles = { root: { margin: 'auto', maxHeight: '100%' } };\n\nconst videoTileMoreMenuIconProps = { iconName: undefined, style: { display: 'none' } };\nconst videoTileMoreMenuProps = {\n directionalHint: DirectionalHint.topLeftEdge,\n isBeakVisible: false,\n styles: { container: { maxWidth: '8rem' } }\n};\nconst VideoTileMoreOptionsButton = (props: {\n contextualMenu?: IContextualMenuProps;\n participantDisplayName: string | undefined;\n participantState: string | undefined;\n participantHandRaised: boolean;\n participantIsSpeaking: boolean | undefined;\n participantIsMuted: boolean | undefined;\n canShowContextMenuButton: boolean;\n isMicDisabled?: boolean;\n isCameraDisabled?: boolean;\n}): JSX.Element => {\n const locale = useLocale().strings.videoTile;\n const theme = useTheme();\n\n const {\n contextualMenu,\n canShowContextMenuButton,\n participantDisplayName,\n participantHandRaised,\n participantIsSpeaking,\n participantState,\n participantIsMuted,\n isMicDisabled,\n isCameraDisabled\n } = props;\n const [moreButtonAiraDescription, setMoreButtonAriaDescription] = useState<string>('');\n\n useEffect(() => {\n setMoreButtonAriaDescription(\n formatMoreButtonAriaDescription(\n participantDisplayName,\n participantIsMuted,\n participantHandRaised,\n participantState,\n participantIsSpeaking,\n isMicDisabled,\n isCameraDisabled,\n locale\n )\n );\n }, [\n participantDisplayName,\n participantHandRaised,\n participantIsMuted,\n participantIsSpeaking,\n participantState,\n locale,\n isMicDisabled,\n isCameraDisabled\n ]);\n\n if (!contextualMenu) {\n return <></>;\n }\n\n const optionsIcon = canShowContextMenuButton ? 'VideoTileMoreOptions' : undefined;\n return (\n <IconButton\n data-ui-id=\"video-tile-more-options-button\"\n ariaLabel={moreButtonAiraDescription}\n styles={moreButtonStyles(theme)}\n menuIconProps={videoTileMoreMenuIconProps}\n menuProps={{ ...videoTileMoreMenuProps, ...contextualMenu }}\n iconProps={{ iconName: optionsIcon }}\n />\n );\n};\n\n/**\n * A component to render the video stream for a single call participant.\n *\n * Use with {@link GridLayout} in a {@link VideoGallery}.\n *\n * @public\n */\nexport const VideoTile = (props: VideoTileProps): JSX.Element => {\n const {\n children,\n displayName,\n initialsName,\n isMirrored,\n isMuted,\n isSpotlighted,\n isPinned,\n onRenderPlaceholder,\n renderElement,\n overlay: reactionOverlay,\n showLabel = true,\n showMuteIndicator = true,\n styles,\n userId,\n noVideoAvailableAriaLabel,\n isSpeaking,\n raisedHand,\n personaMinSize = DEFAULT_PERSONA_MIN_SIZE_PX,\n personaMaxSize = DEFAULT_PERSONA_MAX_SIZE_PX,\n contextualMenu,\n /* @conditional-compile-remove(media-access) */\n mediaAccess\n } = props;\n\n const [isHovered, setIsHovered] = useState<boolean>(false);\n const [isFocused, setIsFocused] = useState<boolean>(false);\n // need to set a default otherwise the resizeObserver will get stuck in an infinite loop.\n const [personaSize, setPersonaSize] = useState<number>(1);\n\n const videoTileRef = useRef<HTMLDivElement>(null);\n\n const locale = useLocale();\n const theme = useTheme();\n const callingPalette = (theme as unknown as CallingTheme).callingPalette;\n\n const isVideoRendered = !!renderElement;\n\n const observer = useRef(\n new ResizeObserver((entries): void => {\n if (!entries[0]) {\n return;\n }\n const { width, height } = entries[0].contentRect;\n const personaCalcSize = Math.min(width, height) / 3;\n // we only want to set the persona size if it has changed\n if (personaCalcSize !== personaSize) {\n setPersonaSize(Math.max(Math.min(personaCalcSize, personaMaxSize), personaMinSize));\n }\n })\n );\n\n useLayoutEffect(() => {\n if (videoTileRef.current) {\n observer.current.observe(videoTileRef.current);\n }\n const currentObserver = observer.current;\n return () => currentObserver.disconnect();\n }, [videoTileRef]);\n\n // TODO: Remove after calling sdk fix the keybaord focus\n useEffect(() => {\n // PPTLive stream id is null\n if (videoTileRef.current?.id) {\n return;\n }\n let observer: MutationObserver | undefined;\n if (videoTileRef.current) {\n observer = new MutationObserver((mutationsList) => {\n for (const mutation of mutationsList) {\n if (mutation.type === 'childList') {\n const iframe = document.querySelector('iframe');\n if (iframe) {\n if (!iframe.getAttribute('tabIndex')) {\n iframe.setAttribute('tabIndex', '-1');\n }\n }\n }\n }\n });\n\n observer.observe(videoTileRef.current, { childList: true, subtree: true });\n }\n\n return () => {\n observer?.disconnect();\n };\n }, [displayName, renderElement]);\n\n const useLongPressProps = useMemo(() => {\n return {\n onLongPress: () => {\n props.onLongTouch?.();\n },\n touchEventsOnly: true\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [props.onLongTouch]);\n const longPressHandlers = useLongPress(useLongPressProps);\n\n const hoverHandlers = useMemo(() => {\n return {\n onMouseEnter: () => setIsHovered(true),\n onMouseLeave: () => setIsHovered(false),\n onFocus: () => setIsFocused(true),\n onBlur: () => setIsFocused(false)\n };\n }, []);\n\n const placeholderOptions = {\n userId,\n text: initialsName ?? displayName,\n noVideoAvailableAriaLabel,\n coinSize: personaSize,\n styles: defaultPersonaStyles,\n hidePersonaDetails: true\n };\n\n const videoHintWithBorderRadius = mergeStyles(disabledVideoHint, {\n borderRadius: theme.effects.roundedCorner4,\n backgroundColor: callingPalette.videoTileLabelBackgroundLight\n });\n\n const tileInfoStyle = useMemo(\n () =>\n mergeStyles(\n isVideoRendered || props.alwaysShowLabelBackground ? videoHintWithBorderRadius : disabledVideoHint,\n styles?.displayNameContainer\n ),\n [isVideoRendered, videoHintWithBorderRadius, styles?.displayNameContainer, props.alwaysShowLabelBackground]\n );\n\n const ids = useIdentifiers();\n\n const canShowLabel = showLabel && (displayName || (showMuteIndicator && isMuted));\n const participantStateString = getParticipantStateString(props, locale);\n const canShowContextMenuButton = isHovered || isFocused;\n let raisedHandBackgroundColor = '';\n raisedHandBackgroundColor = callingPalette.raiseHandGold;\n const participantMediaAccessIcons = useMemo(\n () =>\n canShowLabel || participantStateString\n ? getMediaAccessIconsTrampoline(\n showMuteIndicator,\n isMuted,\n /* @conditional-compile-remove(media-access) */\n mediaAccess\n )\n : undefined,\n [canShowLabel, isMuted, mediaAccess, participantStateString, showMuteIndicator]\n );\n const canShowParticipantIcons = participantMediaAccessIcons || isSpotlighted || isPinned;\n\n return (\n <Stack\n data-ui-id={ids.videoTile}\n className={mergeStyles(\n rootStyles,\n {\n background: theme.palette.neutralLighter,\n borderRadius: theme.effects.roundedCorner4\n },\n isSpeaking || raisedHand\n ? {\n '&::after': {\n content: `''`,\n position: 'absolute',\n border: `0.25rem solid ${isSpeaking ? theme.palette.themePrimary : raisedHandBackgroundColor}`,\n borderRadius: theme.effects.roundedCorner4,\n width: '100%',\n height: '100%',\n pointerEvents: 'none'\n }\n }\n : {},\n videoTileHighContrastStyles(theme),\n styles?.root\n )}\n {...longPressHandlers}\n >\n <div ref={videoTileRef} style={{ width: '100%', height: '100%' }} {...hoverHandlers} data-is-focusable={true}>\n {isVideoRendered ? (\n <Stack\n className={mergeStyles(\n videoContainerStyles,\n isMirrored && { transform: 'scaleX(-1)' },\n styles?.videoContainer\n )}\n >\n {renderElement}\n </Stack>\n ) : (\n <Stack\n className={mergeStyles(videoContainerStyles, {\n opacity: participantStateString || props.participantState === 'Idle' ? 0.4 : 1\n })}\n >\n {onRenderPlaceholder ? (\n onRenderPlaceholder(userId ?? '', placeholderOptions, DefaultPlaceholder)\n ) : (\n <DefaultPlaceholder {...placeholderOptions} />\n )}\n </Stack>\n )}\n {reactionOverlay}\n {(canShowLabel || participantStateString) && (\n <Stack horizontal className={tileInfoContainerStyle} tokens={tileInfoContainerTokens}>\n <Stack horizontal className={tileInfoStyle}>\n {canShowLabel && (\n <Text\n className={mergeStyles(displayNameStyle)}\n title={displayName}\n style={{ color: participantStateString ? theme.palette.neutralSecondary : 'inherit' }}\n data-ui-id=\"video-tile-display-name\"\n >\n {displayName}\n </Text>\n )}\n {participantStateString && (\n <Text className={mergeStyles(participantStateStringStyles(theme))}>\n {bracketedParticipantString(participantStateString, !!canShowLabel)}\n </Text>\n )}\n {canShowParticipantIcons && (\n <Stack horizontal className={mergeStyles(iconsGroupContainerStyle)}>\n {participantMediaAccessIcons}\n {isSpotlighted && (\n <Stack className={mergeStyles(iconContainerStyle)}>\n <Icon iconName=\"VideoTileSpotlighted\" />\n </Stack>\n )}\n {isPinned && (\n <Stack className={mergeStyles(iconContainerStyle)}>\n <Icon iconName=\"VideoTilePinned\" className={mergeStyles(pinIconStyle)} />\n </Stack>\n )}\n </Stack>\n )}\n <VideoTileMoreOptionsButton\n contextualMenu={contextualMenu}\n participantDisplayName={displayName}\n participantHandRaised={!!raisedHand}\n participantIsMuted={isMuted}\n participantState={participantStateString}\n participantIsSpeaking={isSpeaking}\n canShowContextMenuButton={canShowContextMenuButton}\n isMicDisabled={mediaAccess?.isAudioPermitted === false}\n isCameraDisabled={mediaAccess?.isVideoPermitted === false}\n />\n </Stack>\n </Stack>\n )}\n\n {children && (\n <Stack className={mergeStyles(overlayContainerStyles, styles?.overlayContainer)}>{children}</Stack>\n )}\n {raisedHand && (\n <Stack\n horizontal={true}\n tokens={{ childrenGap: '0.2rem' }}\n className={raiseHandContainerStyles(theme, !canShowLabel)}\n >\n <Stack.Item>\n <Text>{raisedHand.raisedHandOrderPosition}</Text>\n </Stack.Item>\n <Stack.Item>\n <RaisedHandIcon />\n </Stack.Item>\n </Stack>\n )}\n </div>\n </Stack>\n );\n};\n\nconst getMediaAccessIconsTrampoline = (\n showMuteIndicator: boolean,\n isMuted?: boolean,\n mediaAccess?: undefined | /* @conditional-compile-remove(media-access) */ MediaAccess\n): JSX.Element | undefined => {\n /* @conditional-compile-remove(media-access) */\n const cameraForbidIcon =\n mediaAccess && !mediaAccess?.isVideoPermitted ? (\n <Stack className={mergeStyles(iconContainerStyle)}>\n <Icon iconName=\"ControlButtonCameraProhibitedSmall\" />\n </Stack>\n ) : undefined;\n /* @conditional-compile-remove(media-access) */\n const micOffIcon =\n (mediaAccess ? mediaAccess.isAudioPermitted : true) && showMuteIndicator && isMuted ? (\n <Stack className={mergeStyles(iconContainerStyle)}>\n <Icon iconName=\"VideoTileMicOff\" />\n </Stack>\n ) : undefined;\n /* @conditional-compile-remove(media-access) */\n const micForbidIcon =\n mediaAccess && !mediaAccess?.isAudioPermitted && showMuteIndicator ? (\n <Stack className={mergeStyles(iconContainerStyle)}>\n <Icon iconName=\"ControlButtonMicProhibitedSmall\" />\n </Stack>\n ) : undefined;\n /* @conditional-compile-remove(media-access) */\n if (!(cameraForbidIcon || micOffIcon || micForbidIcon)) {\n return undefined;\n }\n\n /* @conditional-compile-remove(media-access) */\n return (\n <>\n {cameraForbidIcon}\n {micOffIcon}\n {micForbidIcon}\n </>\n );\n\n return showMuteIndicator && isMuted ? (\n <Stack className={mergeStyles(iconContainerStyle)}>\n <Icon iconName=\"VideoTileMicOff\" />\n </Stack>\n ) : undefined;\n};\n\nconst getParticipantStateString = (props: VideoTileProps, locale: ComponentLocale): string | undefined => {\n const strings = { ...locale.strings.videoTile, ...props.strings };\n return props.participantState === 'EarlyMedia' || props.participantState === 'Ringing'\n ? strings?.participantStateRinging\n : props.participantState === 'Hold'\n ? strings?.participantStateHold\n : undefined;\n};\n\nconst tileInfoContainerTokens = {\n // A horizontal Stack sets the left margin to 0 for all it's children.\n // We need to allow the children to set their own margins\n childrenGap: 'none'\n};\n\nconst bracketedParticipantString = (participantString: string, withBrackets: boolean): string => {\n return withBrackets ? `(${participantString})` : participantString;\n};\n"]}
1
+ {"version":3,"file":"VideoTile.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/VideoTile.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EACL,eAAe,EACf,IAAI,EACJ,UAAU,EAGV,WAAW,EACX,OAAO,EACP,KAAK,EACL,IAAI,EACL,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACrF,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAmB,SAAS,EAAE,MAAM,iBAAiB,CAA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Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n DirectionalHint,\n Icon,\n IconButton,\n IContextualMenuProps,\n IStyle,\n mergeStyles,\n Persona,\n Stack,\n Text\n} from '@fluentui/react';\nimport React, { useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';\nimport { useIdentifiers } from '../identifiers';\nimport { ComponentLocale, useLocale } from '../localization';\nimport { useTheme } from '../theming';\nimport { BaseCustomStyles, CustomAvatarOptions, OnRenderAvatarCallback } from '../types';\n/* @conditional-compile-remove(media-access) */\nimport { MediaAccess } from '../types';\nimport { CallingTheme } from '../theming';\nimport { RaisedHand } from '../types';\nimport { RaisedHandIcon } from './assets/RaisedHandIcon';\n\nimport { ParticipantState } from '../types';\nimport {\n disabledVideoHint,\n displayNameStyle,\n iconContainerStyle,\n overlayContainerStyles,\n rootStyles,\n videoContainerStyles,\n tileInfoContainerStyle,\n participantStateStringStyles,\n videoTileHighContrastStyles,\n iconsGroupContainerStyle\n} from './styles/VideoTile.styles';\nimport { pinIconStyle } from './styles/VideoTile.styles';\nimport useLongPress from './utils/useLongPress';\nimport { moreButtonStyles } from './styles/VideoTile.styles';\nimport { raiseHandContainerStyles } from './styles/VideoTile.styles';\nimport { ReactionResources } from '../types/ReactionTypes';\nimport { formatMoreButtonAriaDescription } from './utils';\n\n/**\n * Strings of {@link VideoTile} that can be overridden.\n * @public\n */\nexport interface VideoTileStrings {\n /** Aria label for announcing the remote video tile drawer menu */\n moreOptionsButtonAriaLabel: string;\n /** String for displaying the Ringing of the remote participant */\n participantStateRinging: string;\n /** String for displaying the Hold state of the remote participant */\n participantStateHold: string;\n /* @conditional-compile-remove(remote-ufd) */\n /** String for displaying the reconnecting state of the remote participant */\n participantReconnecting?: string;\n /** String for the announcement of the muted state of the participant when muted */\n moreOptionsParticipantMutedStateMutedAriaLabel: string;\n /** String for the announcement of the unmuted state of the participant when unmuted */\n moreOptionsParticipantMutedStateUnmutedAriaLabel: string;\n /** String for the announcement of the participant has their hand raised */\n moreOptionsParticipantHandRaisedAriaLabel: string;\n /** String for the announcement of whether the participant is speaking or not */\n moreOptionsParticipantIsSpeakingAriaLabel: string;\n /* @conditional-compile-remove(media-access) */\n /** String for the announcement of whether the participant microphone disabled */\n moreOptionsParticipantMicDisabledAriaLabel: string;\n /* @conditional-compile-remove(media-access) */\n /** String for the announcement of whether the participant camera disabled */\n moreOptionsParticipantCameraDisabledAriaLabel: string;\n}\n\n/**\n * Fluent styles for {@link VideoTile}.\n *\n * @public\n */\nexport interface VideoTileStylesProps extends BaseCustomStyles {\n /** Styles for video container. */\n videoContainer?: IStyle;\n /** Styles for container overlayed on the video container. */\n overlayContainer?: IStyle;\n /** Styles for displayName on the video container. */\n displayNameContainer?: IStyle;\n}\n\n/**\n * Props for {@link VideoTile}.\n *\n * @public\n */\nexport interface VideoTileProps {\n /** React Child components. Child Components will show as overlay component in the VideoTile. */\n children?: React.ReactNode;\n /**\n * Allows users to pass in an object contains custom CSS styles.\n * @Example\n * ```\n * <VideoTile styles={{ root: { background: 'blue' } }} />\n * ```\n */\n styles?: VideoTileStylesProps;\n /** user id for the VideoTile placeholder. */\n userId?: string;\n /** Component with the video stream. */\n renderElement?: JSX.Element | null;\n /**\n * Overlay component responsible for rendering reaction\n */\n overlay?: JSX.Element | null;\n /** Determines if the video is mirrored or not. */\n isMirrored?: boolean;\n /** Custom render Component function for no video is available. Render a Persona Icon if undefined. */\n onRenderPlaceholder?: OnRenderAvatarCallback;\n /**\n * Show label on the VideoTile\n * @defaultValue true\n */\n showLabel?: boolean;\n /**\n * Show label background on the VideoTile\n * @defaultValue false\n */\n alwaysShowLabelBackground?: boolean;\n /**\n * Whether to display a mute icon beside the user's display name.\n * @defaultValue true\n */\n showMuteIndicator?: boolean;\n /**\n * Whether the video is muted or not.\n */\n isMuted?: boolean;\n /**\n * If true, the video tile will show the pin icon.\n */\n isPinned?: boolean;\n /**\n * Display Name of the Participant to be shown in the label.\n * @remarks `displayName` is used to generate avatar initials if `initialsName` is not provided.\n */\n displayName?: string;\n /**\n * Name of the participant used to generate initials. For example, a name `John Doe` will display `JD` as initials.\n * @remarks `displayName` is used if this property is not specified.\n */\n initialsName?: string;\n /**\n * Minimum size of the persona avatar in px.\n * The persona avatar is the default placeholder shown when no video stream is available.\n * For more information see https://developer.microsoft.com/en-us/fluentui#/controls/web/persona\n * @defaultValue 32px\n */\n personaMinSize?: number;\n /**\n * Maximum size of the personal avatar in px.\n * The persona avatar is the default placeholder shown when no video stream is available.\n * For more information see https://developer.microsoft.com/en-us/fluentui#/controls/web/persona\n * @defaultValue 100px\n */\n personaMaxSize?: number;\n /** Optional property to set the aria label of the video tile if there is no available stream. */\n noVideoAvailableAriaLabel?: string;\n /** Whether the participant in the videoTile is speaking. Shows a speaking indicator (border). */\n isSpeaking?: boolean;\n\n /** Whether the participant is raised hand. Show a indicator (border) and icon with order */\n raisedHand?: RaisedHand;\n\n /**\n * The call connection state of the participant.\n * For example, `Hold` means the participant is on hold.\n */\n participantState?: ParticipantState;\n /**\n * Strings to override in the component.\n */\n strings?: VideoTileStrings;\n /**\n * Display custom menu items in the VideoTile's contextual menu.\n * Uses Fluent UI ContextualMenu.\n * An ellipses icon will be displayed to open the contextual menu if this prop is defined.\n */\n contextualMenu?: IContextualMenuProps;\n /**\n * Callback triggered by video tile on touch and hold.\n */\n onLongTouch?: () => void;\n /**\n * If true, the video tile will show the spotlighted icon.\n */\n isSpotlighted?: boolean;\n /**\n * Reactions resources' url and metadata.\n */\n reactionResources?: ReactionResources;\n /* @conditional-compile-remove(media-access) */\n /**\n * Media access state of the participant.\n */\n mediaAccess?: MediaAccess;\n}\n\n// Coin max size is set to PersonaSize.size100\nconst DEFAULT_PERSONA_MAX_SIZE_PX = 100;\n// Coin min size is set PersonaSize.size32\nconst DEFAULT_PERSONA_MIN_SIZE_PX = 32;\n\nconst DefaultPlaceholder = (props: CustomAvatarOptions): JSX.Element => {\n const { text, noVideoAvailableAriaLabel, coinSize, hidePersonaDetails } = props;\n\n return (\n <Stack className={mergeStyles({ position: 'absolute', height: '100%', width: '100%' })}>\n <Stack styles={defaultPersonaStyles}>\n {coinSize && (\n <Persona\n coinSize={coinSize}\n hidePersonaDetails={hidePersonaDetails}\n text={text ?? ''}\n initialsTextColor=\"white\"\n aria-label={noVideoAvailableAriaLabel ?? ''}\n showOverflowTooltip={false}\n />\n )}\n </Stack>\n </Stack>\n );\n};\n\nconst defaultPersonaStyles = { root: { margin: 'auto', maxHeight: '100%' } };\n\nconst videoTileMoreMenuIconProps = { iconName: undefined, style: { display: 'none' } };\nconst videoTileMoreMenuProps = {\n directionalHint: DirectionalHint.topLeftEdge,\n isBeakVisible: false,\n styles: { container: { maxWidth: '8rem' } }\n};\nconst VideoTileMoreOptionsButton = (props: {\n contextualMenu?: IContextualMenuProps;\n participantDisplayName: string | undefined;\n participantState: string | undefined;\n participantHandRaised: boolean;\n participantIsSpeaking: boolean | undefined;\n participantIsMuted: boolean | undefined;\n canShowContextMenuButton: boolean;\n /* @conditional-compile-remove(media-access) */\n isMicDisabled?: boolean;\n /* @conditional-compile-remove(media-access) */\n isCameraDisabled?: boolean;\n}): JSX.Element => {\n const locale = useLocale().strings.videoTile;\n const theme = useTheme();\n\n const {\n contextualMenu,\n canShowContextMenuButton,\n participantDisplayName,\n participantHandRaised,\n participantIsSpeaking,\n participantState,\n participantIsMuted,\n /* @conditional-compile-remove(media-access) */\n isMicDisabled,\n /* @conditional-compile-remove(media-access) */\n isCameraDisabled\n } = props;\n const [moreButtonAiraDescription, setMoreButtonAriaDescription] = useState<string>('');\n\n useEffect(() => {\n setMoreButtonAriaDescription(\n formatMoreButtonAriaDescription(\n participantDisplayName,\n participantIsMuted,\n participantHandRaised,\n participantState,\n participantIsSpeaking,\n locale,\n /* @conditional-compile-remove(media-access) */\n isMicDisabled,\n /* @conditional-compile-remove(media-access) */\n isCameraDisabled\n )\n );\n }, [\n participantDisplayName,\n participantHandRaised,\n participantIsMuted,\n participantIsSpeaking,\n participantState,\n locale,\n /* @conditional-compile-remove(media-access) */\n isMicDisabled,\n /* @conditional-compile-remove(media-access) */\n isCameraDisabled\n ]);\n\n if (!contextualMenu) {\n return <></>;\n }\n\n const optionsIcon = canShowContextMenuButton ? 'VideoTileMoreOptions' : undefined;\n return (\n <IconButton\n data-ui-id=\"video-tile-more-options-button\"\n ariaLabel={moreButtonAiraDescription}\n styles={moreButtonStyles(theme)}\n menuIconProps={videoTileMoreMenuIconProps}\n menuProps={{ ...videoTileMoreMenuProps, ...contextualMenu }}\n iconProps={{ iconName: optionsIcon }}\n />\n );\n};\n\n/**\n * A component to render the video stream for a single call participant.\n *\n * Use with {@link GridLayout} in a {@link VideoGallery}.\n *\n * @public\n */\nexport const VideoTile = (props: VideoTileProps): JSX.Element => {\n const {\n children,\n displayName,\n initialsName,\n isMirrored,\n isMuted,\n isSpotlighted,\n isPinned,\n onRenderPlaceholder,\n renderElement,\n overlay: reactionOverlay,\n showLabel = true,\n showMuteIndicator = true,\n styles,\n userId,\n noVideoAvailableAriaLabel,\n isSpeaking,\n raisedHand,\n personaMinSize = DEFAULT_PERSONA_MIN_SIZE_PX,\n personaMaxSize = DEFAULT_PERSONA_MAX_SIZE_PX,\n contextualMenu,\n /* @conditional-compile-remove(media-access) */\n mediaAccess\n } = props;\n\n const [isHovered, setIsHovered] = useState<boolean>(false);\n const [isFocused, setIsFocused] = useState<boolean>(false);\n // need to set a default otherwise the resizeObserver will get stuck in an infinite loop.\n const [personaSize, setPersonaSize] = useState<number>(1);\n\n const videoTileRef = useRef<HTMLDivElement>(null);\n\n const locale = useLocale();\n const theme = useTheme();\n const callingPalette = (theme as unknown as CallingTheme).callingPalette;\n\n const isVideoRendered = !!renderElement;\n\n const observer = useRef(\n new ResizeObserver((entries): void => {\n if (!entries[0]) {\n return;\n }\n const { width, height } = entries[0].contentRect;\n const personaCalcSize = Math.min(width, height) / 3;\n // we only want to set the persona size if it has changed\n if (personaCalcSize !== personaSize) {\n setPersonaSize(Math.max(Math.min(personaCalcSize, personaMaxSize), personaMinSize));\n }\n })\n );\n\n useLayoutEffect(() => {\n if (videoTileRef.current) {\n observer.current.observe(videoTileRef.current);\n }\n const currentObserver = observer.current;\n return () => currentObserver.disconnect();\n }, [videoTileRef]);\n\n // TODO: Remove after calling sdk fix the keybaord focus\n useEffect(() => {\n // PPTLive stream id is null\n if (videoTileRef.current?.id) {\n return;\n }\n let observer: MutationObserver | undefined;\n if (videoTileRef.current) {\n observer = new MutationObserver((mutationsList) => {\n for (const mutation of mutationsList) {\n if (mutation.type === 'childList') {\n const iframe = document.querySelector('iframe');\n if (iframe) {\n if (!iframe.getAttribute('tabIndex')) {\n iframe.setAttribute('tabIndex', '-1');\n }\n }\n }\n }\n });\n\n observer.observe(videoTileRef.current, { childList: true, subtree: true });\n }\n\n return () => {\n observer?.disconnect();\n };\n }, [displayName, renderElement]);\n\n const useLongPressProps = useMemo(() => {\n return {\n onLongPress: () => {\n props.onLongTouch?.();\n },\n touchEventsOnly: true\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [props.onLongTouch]);\n const longPressHandlers = useLongPress(useLongPressProps);\n\n const hoverHandlers = useMemo(() => {\n return {\n onMouseEnter: () => setIsHovered(true),\n onMouseLeave: () => setIsHovered(false),\n onFocus: () => setIsFocused(true),\n onBlur: () => setIsFocused(false)\n };\n }, []);\n\n const placeholderOptions = {\n userId,\n text: initialsName ?? displayName,\n noVideoAvailableAriaLabel,\n coinSize: personaSize,\n styles: defaultPersonaStyles,\n hidePersonaDetails: true\n };\n\n const videoHintWithBorderRadius = mergeStyles(disabledVideoHint, {\n borderRadius: theme.effects.roundedCorner4,\n backgroundColor: callingPalette.videoTileLabelBackgroundLight\n });\n\n const tileInfoStyle = useMemo(\n () =>\n mergeStyles(\n isVideoRendered || props.alwaysShowLabelBackground ? videoHintWithBorderRadius : disabledVideoHint,\n styles?.displayNameContainer\n ),\n [isVideoRendered, videoHintWithBorderRadius, styles?.displayNameContainer, props.alwaysShowLabelBackground]\n );\n\n const ids = useIdentifiers();\n\n const canShowLabel = showLabel && (displayName || (showMuteIndicator && isMuted));\n const participantStateString = getParticipantStateString(props, locale);\n const canShowContextMenuButton = isHovered || isFocused;\n let raisedHandBackgroundColor = '';\n raisedHandBackgroundColor = callingPalette.raiseHandGold;\n const participantMediaAccessIcons = useMemo(\n () =>\n canShowLabel || participantStateString\n ? getMediaAccessIconsTrampoline(\n showMuteIndicator,\n isMuted,\n /* @conditional-compile-remove(media-access) */\n mediaAccess\n )\n : undefined,\n [\n canShowLabel,\n isMuted,\n /* @conditional-compile-remove(media-access) */ mediaAccess,\n participantStateString,\n showMuteIndicator\n ]\n );\n const canShowParticipantIcons = participantMediaAccessIcons || isSpotlighted || isPinned;\n\n return (\n <Stack\n data-ui-id={ids.videoTile}\n className={mergeStyles(\n rootStyles,\n {\n background: theme.palette.neutralLighter,\n borderRadius: theme.effects.roundedCorner4\n },\n isSpeaking || raisedHand\n ? {\n '&::after': {\n content: `''`,\n position: 'absolute',\n border: `0.25rem solid ${isSpeaking ? theme.palette.themePrimary : raisedHandBackgroundColor}`,\n borderRadius: theme.effects.roundedCorner4,\n width: '100%',\n height: '100%',\n pointerEvents: 'none'\n }\n }\n : {},\n videoTileHighContrastStyles(theme),\n styles?.root\n )}\n {...longPressHandlers}\n >\n <div ref={videoTileRef} style={{ width: '100%', height: '100%' }} {...hoverHandlers} data-is-focusable={true}>\n {isVideoRendered ? (\n <Stack\n className={mergeStyles(\n videoContainerStyles,\n isMirrored && { transform: 'scaleX(-1)' },\n styles?.videoContainer\n )}\n >\n {renderElement}\n </Stack>\n ) : (\n <Stack\n className={mergeStyles(videoContainerStyles, {\n opacity: participantStateString || props.participantState === 'Idle' ? 0.4 : 1\n })}\n >\n {onRenderPlaceholder ? (\n onRenderPlaceholder(userId ?? '', placeholderOptions, DefaultPlaceholder)\n ) : (\n <DefaultPlaceholder {...placeholderOptions} />\n )}\n </Stack>\n )}\n {reactionOverlay}\n {(canShowLabel || participantStateString) && (\n <Stack horizontal className={tileInfoContainerStyle} tokens={tileInfoContainerTokens}>\n <Stack horizontal className={tileInfoStyle}>\n {canShowLabel && (\n <Text\n className={mergeStyles(displayNameStyle)}\n title={displayName}\n style={{ color: participantStateString ? theme.palette.neutralSecondary : 'inherit' }}\n data-ui-id=\"video-tile-display-name\"\n >\n {displayName}\n </Text>\n )}\n {participantStateString && (\n <Text className={mergeStyles(participantStateStringStyles(theme))}>\n {bracketedParticipantString(participantStateString, !!canShowLabel)}\n </Text>\n )}\n {canShowParticipantIcons && (\n <Stack horizontal className={mergeStyles(iconsGroupContainerStyle)}>\n {participantMediaAccessIcons}\n {isSpotlighted && (\n <Stack className={mergeStyles(iconContainerStyle)}>\n <Icon iconName=\"VideoTileSpotlighted\" />\n </Stack>\n )}\n {isPinned && (\n <Stack className={mergeStyles(iconContainerStyle)}>\n <Icon iconName=\"VideoTilePinned\" className={mergeStyles(pinIconStyle)} />\n </Stack>\n )}\n </Stack>\n )}\n <VideoTileMoreOptionsButton\n contextualMenu={contextualMenu}\n participantDisplayName={displayName}\n participantHandRaised={!!raisedHand}\n participantIsMuted={isMuted}\n participantState={participantStateString}\n participantIsSpeaking={isSpeaking}\n canShowContextMenuButton={canShowContextMenuButton}\n /* @conditional-compile-remove(media-access) */\n isMicDisabled={mediaAccess?.isAudioPermitted === false}\n /* @conditional-compile-remove(media-access) */\n isCameraDisabled={mediaAccess?.isVideoPermitted === false}\n />\n </Stack>\n </Stack>\n )}\n\n {children && (\n <Stack className={mergeStyles(overlayContainerStyles, styles?.overlayContainer)}>{children}</Stack>\n )}\n {raisedHand && (\n <Stack\n horizontal={true}\n tokens={{ childrenGap: '0.2rem' }}\n className={raiseHandContainerStyles(theme, !canShowLabel)}\n >\n <Stack.Item>\n <Text>{raisedHand.raisedHandOrderPosition}</Text>\n </Stack.Item>\n <Stack.Item>\n <RaisedHandIcon />\n </Stack.Item>\n </Stack>\n )}\n </div>\n </Stack>\n );\n};\n\nconst getMediaAccessIconsTrampoline = (\n showMuteIndicator: boolean,\n isMuted?: boolean,\n mediaAccess?: undefined | /* @conditional-compile-remove(media-access) */ MediaAccess\n): JSX.Element | undefined => {\n /* @conditional-compile-remove(media-access) */\n const cameraForbidIcon =\n mediaAccess && !mediaAccess?.isVideoPermitted ? (\n <Stack className={mergeStyles(iconContainerStyle)}>\n <Icon iconName=\"ControlButtonCameraProhibitedSmall\" />\n </Stack>\n ) : undefined;\n /* @conditional-compile-remove(media-access) */\n const micOffIcon =\n (mediaAccess ? mediaAccess.isAudioPermitted : true) && showMuteIndicator && isMuted ? (\n <Stack className={mergeStyles(iconContainerStyle)}>\n <Icon iconName=\"VideoTileMicOff\" />\n </Stack>\n ) : undefined;\n /* @conditional-compile-remove(media-access) */\n const micForbidIcon =\n mediaAccess && !mediaAccess?.isAudioPermitted && showMuteIndicator ? (\n <Stack className={mergeStyles(iconContainerStyle)}>\n <Icon iconName=\"ControlButtonMicProhibitedSmall\" />\n </Stack>\n ) : undefined;\n /* @conditional-compile-remove(media-access) */\n if (!(cameraForbidIcon || micOffIcon || micForbidIcon)) {\n return undefined;\n }\n\n /* @conditional-compile-remove(media-access) */\n return (\n <>\n {cameraForbidIcon}\n {micOffIcon}\n {micForbidIcon}\n </>\n );\n\n return showMuteIndicator && isMuted ? (\n <Stack className={mergeStyles(iconContainerStyle)}>\n <Icon iconName=\"VideoTileMicOff\" />\n </Stack>\n ) : undefined;\n};\n\nconst getParticipantStateString = (props: VideoTileProps, locale: ComponentLocale): string | undefined => {\n const strings = { ...locale.strings.videoTile, ...props.strings };\n return props.participantState === 'EarlyMedia' || props.participantState === 'Ringing'\n ? strings?.participantStateRinging\n : props.participantState === 'Hold'\n ? strings?.participantStateHold\n : undefined;\n};\n\nconst tileInfoContainerTokens = {\n // A horizontal Stack sets the left margin to 0 for all it's children.\n // We need to allow the children to set their own margins\n childrenGap: 'none'\n};\n\nconst bracketedParticipantString = (participantString: string, withBrackets: boolean): string => {\n return withBrackets ? `(${participantString})` : participantString;\n};\n"]}
@@ -136,5 +136,5 @@ export declare const nullToUndefined: <T>(value: T | null) => T | undefined;
136
136
  /**
137
137
  * @private
138
138
  */
139
- export declare const formatMoreButtonAriaDescription: (displayName?: string, isMuted?: boolean, isHandRaised?: boolean, state?: string, isSpeaking?: boolean, isMicDisabled?: boolean, isCameraDisabled?: boolean, strings?: VideoTileStrings) => string;
139
+ export declare const formatMoreButtonAriaDescription: (displayName?: string, isMuted?: boolean, isHandRaised?: boolean, state?: string, isSpeaking?: boolean, strings?: VideoTileStrings, isMicDisabled?: boolean, isCameraDisabled?: boolean) => string;
140
140
  //# sourceMappingURL=utils.d.ts.map
@@ -358,13 +358,19 @@ export const nullToUndefined = (value) => (value === null ? undefined : value);
358
358
  /**
359
359
  * @private
360
360
  */
361
- export const formatMoreButtonAriaDescription = (displayName, isMuted, isHandRaised, state, isSpeaking, isMicDisabled, isCameraDisabled, strings) => {
361
+ export const formatMoreButtonAriaDescription = (displayName, isMuted, isHandRaised, state, isSpeaking, strings,
362
+ /* @conditional-compile-remove(media-access) */
363
+ isMicDisabled,
364
+ /* @conditional-compile-remove(media-access) */
365
+ isCameraDisabled) => {
362
366
  const mutedState = isMuted
363
367
  ? strings === null || strings === void 0 ? void 0 : strings.moreOptionsParticipantMutedStateMutedAriaLabel
364
368
  : strings === null || strings === void 0 ? void 0 : strings.moreOptionsParticipantMutedStateUnmutedAriaLabel;
365
369
  const handRaisedState = isHandRaised ? strings === null || strings === void 0 ? void 0 : strings.moreOptionsParticipantHandRaisedAriaLabel : undefined;
366
370
  const isSpeakingState = isSpeaking ? strings === null || strings === void 0 ? void 0 : strings.moreOptionsParticipantIsSpeakingAriaLabel : undefined;
371
+ /* @conditional-compile-remove(media-access) */
367
372
  const micDisabledState = isMicDisabled ? strings === null || strings === void 0 ? void 0 : strings.moreOptionsParticipantMicDisabledAriaLabel : undefined;
373
+ /* @conditional-compile-remove(media-access) */
368
374
  const cameraDisabledState = isCameraDisabled ? strings === null || strings === void 0 ? void 0 : strings.moreOptionsParticipantCameraDisabledAriaLabel : undefined;
369
375
  const description = (strings === null || strings === void 0 ? void 0 : strings.moreOptionsButtonAriaLabel)
370
376
  ? _formatString(strings === null || strings === void 0 ? void 0 : strings.moreOptionsButtonAriaLabel, {
@@ -373,7 +379,9 @@ export const formatMoreButtonAriaDescription = (displayName, isMuted, isHandRais
373
379
  isHandRaised: handRaisedState !== null && handRaisedState !== void 0 ? handRaisedState : ' ',
374
380
  state: state !== null && state !== void 0 ? state : ' ',
375
381
  isSpeaking: isSpeakingState !== null && isSpeakingState !== void 0 ? isSpeakingState : ' ',
382
+ /* @conditional-compile-remove(media-access) */
376
383
  micDisabledState: micDisabledState !== null && micDisabledState !== void 0 ? micDisabledState : ' ',
384
+ /* @conditional-compile-remove(media-access) */
377
385
  cameraDisabledState: cameraDisabledState !== null && cameraDisabledState !== void 0 ? cameraDisabledState : ' '
378
386
  })
379
387
  : '';