@azure/communication-react 1.23.0-alpha-202501090016 → 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 (40) hide show
  1. package/dist/communication-react.d.ts +12 -4
  2. package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-26P-CBBD.js → ChatMessageComponentAsRichTextEditBox-B8K83_JO.js} +2 -2
  3. package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-26P-CBBD.js.map → ChatMessageComponentAsRichTextEditBox-B8K83_JO.js.map} +1 -1
  4. package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-C5CLzoQD.js → RichTextSendBoxWrapper-BfbHGYVY.js} +2 -2
  5. package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-C5CLzoQD.js.map → RichTextSendBoxWrapper-BfbHGYVY.js.map} +1 -1
  6. package/dist/dist-cjs/communication-react/{index-EuovDlek.js → index-C9oi1qJA.js} +121 -38
  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.d.ts +4 -0
  19. package/dist/dist-esm/react-components/src/components/ParticipantItem.js.map +1 -1
  20. package/dist/dist-esm/react-components/src/components/ParticipantList.js +10 -6
  21. package/dist/dist-esm/react-components/src/components/ParticipantList.js.map +1 -1
  22. package/dist/dist-esm/react-components/src/components/VideoGallery/useVideoTileContextualMenuProps.js +2 -2
  23. package/dist/dist-esm/react-components/src/components/VideoGallery/useVideoTileContextualMenuProps.js.map +1 -1
  24. package/dist/dist-esm/react-components/src/components/VideoGallery.d.ts +4 -4
  25. package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
  26. package/dist/dist-esm/react-components/src/components/VideoTile.d.ts +4 -0
  27. package/dist/dist-esm/react-components/src/components/VideoTile.js +28 -6
  28. package/dist/dist-esm/react-components/src/components/VideoTile.js.map +1 -1
  29. package/dist/dist-esm/react-components/src/components/utils.d.ts +1 -1
  30. package/dist/dist-esm/react-components/src/components/utils.js +14 -2
  31. package/dist/dist-esm/react-components/src/components/utils.js.map +1 -1
  32. package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +9 -5
  33. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +13 -12
  34. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
  35. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/usePeoplePane.js +36 -0
  36. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/usePeoplePane.js.map +1 -1
  37. package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.js +6 -2
  38. package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.js.map +1 -1
  39. package/package.json +1 -1
  40. package/dist/dist-cjs/communication-react/index-EuovDlek.js.map +0 -1
@@ -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,EAC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AgB;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}\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}): 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 } = 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 )\n );\n }, [\n participantDisplayName,\n participantHandRaised,\n participantIsMuted,\n participantIsSpeaking,\n participantState,\n locale\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 =\n canShowLabel || participantStateString\n ? getMediaAccessIconsTrampoline(\n showMuteIndicator,\n isMuted,\n /* @conditional-compile-remove(media-access) */\n mediaAccess\n )\n : undefined;\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 />\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,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAMtC,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAGzD,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,sBAAsB,EACtB,UAAU,EACV,oBAAoB,EACpB,sBAAsB,EACtB,4BAA4B,EAC5B,2BAA2B,EAC3B,wBAAwB,EACzB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,YAAY,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,wBAAwB,EAAE,MAAM,2B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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 /* @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, 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,19 +358,31 @@ export const nullToUndefined = (value) => (value === null ? undefined : value);
358
358
  /**
359
359
  * @private
360
360
  */
361
- export const formatMoreButtonAriaDescription = (displayName, isMuted, isHandRaised, state, isSpeaking, 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) */
372
+ const micDisabledState = isMicDisabled ? strings === null || strings === void 0 ? void 0 : strings.moreOptionsParticipantMicDisabledAriaLabel : undefined;
373
+ /* @conditional-compile-remove(media-access) */
374
+ const cameraDisabledState = isCameraDisabled ? strings === null || strings === void 0 ? void 0 : strings.moreOptionsParticipantCameraDisabledAriaLabel : undefined;
367
375
  const description = (strings === null || strings === void 0 ? void 0 : strings.moreOptionsButtonAriaLabel)
368
376
  ? _formatString(strings === null || strings === void 0 ? void 0 : strings.moreOptionsButtonAriaLabel, {
369
377
  displayName: displayName !== null && displayName !== void 0 ? displayName : ' ',
370
378
  isMuted: mutedState !== null && mutedState !== void 0 ? mutedState : ' ',
371
379
  isHandRaised: handRaisedState !== null && handRaisedState !== void 0 ? handRaisedState : ' ',
372
380
  state: state !== null && state !== void 0 ? state : ' ',
373
- isSpeaking: isSpeakingState !== null && isSpeakingState !== void 0 ? isSpeakingState : ' '
381
+ isSpeaking: isSpeakingState !== null && isSpeakingState !== void 0 ? isSpeakingState : ' ',
382
+ /* @conditional-compile-remove(media-access) */
383
+ micDisabledState: micDisabledState !== null && micDisabledState !== void 0 ? micDisabledState : ' ',
384
+ /* @conditional-compile-remove(media-access) */
385
+ cameraDisabledState: cameraDisabledState !== null && cameraDisabledState !== void 0 ? cameraDisabledState : ' '
374
386
  })
375
387
  : '';
376
388
  return description;
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/utils.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAc,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAK7D,OAAO,EAAE,aAAa,EAAE,mCAAgC;AAExD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,QAAgB,EAAE,MAAc,EAAU,EAAE;IAC5E,OAAO,QAAQ,CAAC,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,OAAO,EAAE,GAAG,CAAC,QAAQ,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AAC5F,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,QAAgB,EAAU,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,CAAC;AAoBvF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,eAAiC,EAAE,SAA6B,EAAoB,EAAE;;IACjH,MAAM,GAAG,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;IACjC,KAAK,MAAM,KAAK,IAAI,eAAe,EAAE,CAAC;QACpC,IAAI,KAAK,CAAC,IAAI,KAAK,SAAS,CAAC,IAAI,EAAE,CAAC;YAClC,gEAAgE;YAChE,KAAK,CAAC,WAAW,GAAG,GAAG,CAAC;YACxB,KAAK,CAAC,WAAW,GAAG,SAAS,CAAC,SAAS,CAAC;YACxC,OAAO,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC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,CAAC,EAAE,CAAC;IAEP,OAAO,WAAW,CAAC;AACrB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { IIconProps, MessageBarType } from '@fluentui/react';\nimport { ActiveErrorMessage, ErrorType } from './ErrorBar';\nimport { SupportedSpokenLanguage } from '../types';\nimport { ActiveNotification, NotificationType } from './NotificationStack';\nimport { VideoTileStrings } from './VideoTile';\nimport { _formatString } from '@internal/acs-ui-common';\n\n/**\n * @private\n *\n * @param fileName\n * @param length\n * @returns string\n */\nexport const truncatedFileName = (fileName: string, length: number): string => {\n return fileName.substring(0, length).trimEnd() + (fileName.length > length ? '... ' : '');\n};\n\n/**\n * @private\n *\n * @param fileName\n * @returns string\n */\nexport const extension = (fileName: string): string => fileName.split('.').pop() || '';\n\n/**\n * @private\n */\nexport interface DismissedError {\n type: ErrorType;\n dismissedAt: Date;\n activeSince?: Date;\n}\n\n/**\n * @private\n */\nexport interface DismissedNotification {\n type: NotificationType;\n dismissedAt: Date;\n activeSince?: Date;\n}\n\n/**\n * @private\n * @param dismissedErrors\n * @param toDismiss\n * @returns DismissedError[]\n * Always returns a new Array so that the state variable is updated, trigerring a render.\n */\nexport const dismissError = (dismissedErrors: DismissedError[], toDismiss: ActiveErrorMessage): DismissedError[] => {\n const now = new Date(Date.now());\n for (const error of dismissedErrors) {\n if (error.type === toDismiss.type) {\n // Bump the timestamp for latest dismissal of this error to now.\n error.dismissedAt = now;\n error.activeSince = toDismiss.timestamp;\n return Array.from(dismissedErrors);\n }\n }\n\n const toDismissTimestamp = toDismiss.timestamp ?? now;\n\n // Record that this error was dismissed for the first time right now.\n return [\n ...dismissedErrors,\n {\n type: toDismiss.type,\n // the error time could be sometimes later than the button click time, which cause the dismiss not working\n // so we set the dismiss time to the later one\n dismissedAt: now > toDismissTimestamp ? now : toDismissTimestamp,\n activeSince: toDismiss.timestamp\n }\n ];\n};\n\n/**\n * @private\n * @param activeErrorMessages\n * @param dismissedErrors\n * @returns DismissedError[]\n * Returns a new Array if and only if contents change, to avoid re-rendering when nothing was dropped.\n */\nexport const dropDismissalsForInactiveErrors = (\n activeErrorMessages: ActiveErrorMessage[],\n dismissedErrors: DismissedError[]\n): DismissedError[] => {\n const active = new Map();\n for (const message of activeErrorMessages) {\n active.set(message.type, message);\n }\n\n // For an error such that:\n // * It was previously active, and dismissed.\n // * It did not have a timestamp associated with it.\n // * It is no longer active.\n //\n // We remove it from dismissals. When it becomes active again next time, it will be shown again on the UI.\n const shouldDeleteDismissal = (dismissed: DismissedError): boolean =>\n dismissed.activeSince === undefined && active.get(dismissed.type) === undefined;\n\n if (dismissedErrors.some((dismissed) => shouldDeleteDismissal(dismissed))) {\n return dismissedErrors.filter((dismissed) => !shouldDeleteDismissal(dismissed));\n }\n return dismissedErrors;\n};\n\n/**\n * @private\n * @param dismissedNotifications\n * @param toDismiss\n * @returns DismissedNotification[]\n * Always returns a new Array so that the state variable is updated, trigerring a render.\n */\nexport const dismissNotification = (\n dismissedNotifications: DismissedNotification[],\n toDismiss: ActiveNotification\n): DismissedNotification[] => {\n const now = new Date(Date.now());\n for (const notification of dismissedNotifications) {\n if (notification.type === toDismiss.type) {\n // Bump the timestamp for latest dismissal of this error to now.\n notification.dismissedAt = now;\n notification.activeSince = toDismiss.timestamp;\n return Array.from(dismissedNotifications);\n }\n }\n\n const toDismissTimestamp = toDismiss.timestamp ?? now;\n\n // Record that this error was dismissed for the first time right now.\n return [\n ...dismissedNotifications,\n {\n type: toDismiss.type,\n // the error time could be sometimes later than the button click time, which cause the dismiss not working\n // so we set the dismiss time to the later one\n dismissedAt: now > toDismissTimestamp ? now : toDismissTimestamp,\n activeSince: toDismiss.timestamp\n }\n ];\n};\n\n/**\n * @private\n * @param activeNotifications\n * @param dismissedNotifications\n * @returns DismissedError[]\n * Returns a new Array if and only if contents change, to avoid re-rendering when nothing was dropped.\n */\nexport const dropDismissalsForInactiveNotifications = (\n activeNotifications: ActiveNotification[],\n dismissedNotifications: DismissedNotification[]\n): DismissedNotification[] => {\n const active = new Map();\n for (const message of activeNotifications) {\n active.set(message.type, message);\n }\n\n // For an error such that:\n // * It was previously active, and dismissed.\n // * It did not have a timestamp associated with it.\n // * It is no longer active.\n //\n // We remove it from dismissals. When it becomes active again next time, it will be shown again on the UI.\n const shouldDeleteDismissal = (dismissed: DismissedNotification): boolean =>\n dismissed.activeSince === undefined && active.get(dismissed.type) === undefined;\n\n if (dismissedNotifications.some((dismissed) => shouldDeleteDismissal(dismissed))) {\n return dismissedNotifications.filter((dismissed) => !shouldDeleteDismissal(dismissed));\n }\n return dismissedNotifications;\n};\n\n/**\n * @private\n * @param activeErrorMessages\n * @param dismissedErrors\n * @returns ActiveErrorMessage[]\n */\nexport const errorsToShow = (\n activeErrorMessages: ActiveErrorMessage[],\n dismissedErrors: DismissedError[],\n mountTimestamp?: Date\n): ActiveErrorMessage[] => {\n const dismissed: Map<ErrorType, DismissedError> = new Map();\n for (const error of dismissedErrors) {\n dismissed.set(error.type, error);\n }\n\n return activeErrorMessages.filter((error) => {\n if (mountTimestamp && error.timestamp && mountTimestamp > error.timestamp) {\n // Error has a timestamp and it is older than when the component was mounted.\n return false;\n }\n\n const dismissal = dismissed.get(error.type);\n if (!dismissal) {\n // This error was never dismissed.\n return true;\n }\n if (!error.timestamp) {\n // No timestamp associated with the error. In this case, the existence of a dismissal is enough to suppress the error.\n return false;\n }\n // Error has an associated timestamp, so compare with last dismissal.\n return error.timestamp > dismissal.dismissedAt;\n });\n};\n\n/**\n * @private\n * @param activeNotifications\n * @param dismissedNotifications\n * @returns ActiveNotification[]\n */\nexport const notificationsToShow = (\n activeNotifications: ActiveNotification[],\n dismissedNotifications: DismissedNotification[],\n mountTimestamp?: Date\n): ActiveNotification[] => {\n const dismissed: Map<NotificationType, DismissedNotification> = new Map();\n for (const notification of dismissedNotifications) {\n dismissed.set(notification.type, notification);\n }\n\n return activeNotifications.filter((notification) => {\n if (mountTimestamp && notification.timestamp && mountTimestamp > notification.timestamp) {\n // Notification has a timestamp and it is older than when the component was mounted.\n return false;\n }\n\n const dismissal = dismissed.get(notification.type);\n if (!dismissal) {\n // This error was never dismissed.\n return true;\n }\n if (!notification.timestamp) {\n // No timestamp associated with the error. In this case, the existence of a dismissal is enough to suppress the error.\n return false;\n }\n // Error has an associated timestamp, so compare with last dismissal.\n return notification.timestamp > dismissal.dismissedAt;\n });\n};\n\n/**\n * @private\n * @param errorType\n * @returns MessageBarType\n */\nexport const messageBarType = (errorType: ErrorType): MessageBarType => {\n switch (errorType) {\n case 'callNetworkQualityLow':\n case 'callNoSpeakerFound':\n case 'callNoMicrophoneFound':\n case 'callMicrophoneAccessDenied':\n case 'callMicrophoneAccessDeniedSafari':\n case 'callMicrophoneMutedBySystem':\n case 'callMicrophoneUnmutedBySystem':\n case 'callMacOsMicrophoneAccessDenied':\n case 'callLocalVideoFreeze':\n case 'callCameraAccessDenied':\n case 'callCameraAccessDeniedSafari':\n case 'callCameraAlreadyInUse':\n case 'callVideoStoppedBySystem':\n case 'callVideoRecoveredBySystem':\n case 'callMacOsCameraAccessDenied':\n case 'callMacOsScreenShareAccessDenied':\n case 'startScreenShareGeneric':\n case 'cameraFrozenForRemoteParticipants':\n return MessageBarType.warning;\n default:\n return MessageBarType.error;\n }\n};\n\n/**\n * @private\n * @param errorType\n * @returns IIconProps | undefined\n */\nexport const messageBarIconProps = (errorType: ErrorType): IIconProps | undefined => {\n const iconName = customIconName[errorType];\n return iconName ? { iconName } : undefined;\n};\n\n/**\n * @private\n */\nexport const customIconName: Partial<{ [key in ErrorType]: string }> = {\n callNetworkQualityLow: 'ErrorBarCallNetworkQualityLow',\n callNoSpeakerFound: 'ErrorBarCallNoSpeakerFound',\n callNoMicrophoneFound: 'ErrorBarCallNoMicrophoneFound',\n callMicrophoneAccessDenied: 'ErrorBarCallMicrophoneAccessDenied',\n callMicrophoneAccessDeniedSafari: 'ErrorBarCallMicrophoneAccessDenied',\n callMicrophoneMutedBySystem: 'ErrorBarCallMicrophoneMutedBySystem',\n callMicrophoneUnmutedBySystem: 'ErrorBarCallMicrophoneUnmutedBySystem',\n callMacOsMicrophoneAccessDenied: 'ErrorBarCallMacOsMicrophoneAccessDenied',\n callLocalVideoFreeze: 'ErrorBarCallLocalVideoFreeze',\n callCameraAccessDenied: 'ErrorBarCallCameraAccessDenied',\n callCameraAccessDeniedSafari: 'ErrorBarCallCameraAccessDenied',\n callCameraAlreadyInUse: 'ErrorBarCallCameraAlreadyInUse',\n callVideoStoppedBySystem: 'ErrorBarCallVideoStoppedBySystem',\n callVideoRecoveredBySystem: 'ErrorBarCallVideoRecoveredBySystem',\n callMacOsCameraAccessDenied: 'ErrorBarCallMacOsCameraAccessDenied'\n};\n\n/**\n * @private\n * @param NotificationType\n * @returns IIconProps | undefined\n */\nexport const NotificationIconProps = (notificationType: NotificationType): IIconProps | undefined => {\n const iconName = customNotificationIconName[notificationType];\n return iconName ? { iconName } : undefined;\n};\n\n/**\n * @private\n */\nexport const customNotificationIconName: Partial<{ [key in NotificationType]: string }> = {\n callNetworkQualityLow: 'ErrorBarCallNetworkQualityLow',\n teamsMeetingCallNetworkQualityLow: 'ErrorBarCallNetworkQualityLow',\n callNoSpeakerFound: 'ErrorBarCallNoSpeakerFound',\n callNoMicrophoneFound: 'ErrorBarCallNoMicrophoneFound',\n callMicrophoneAccessDenied: 'ErrorBarCallMicrophoneAccessDenied',\n callMicrophoneAccessDeniedSafari: 'ErrorBarCallMicrophoneAccessDenied',\n callMicrophoneMutedBySystem: 'ErrorBarCallMicrophoneMutedBySystem',\n callMicrophoneUnmutedBySystem: 'ErrorBarCallMicrophoneUnmutedBySystem',\n callMacOsMicrophoneAccessDenied: 'ErrorBarCallMacOsMicrophoneAccessDenied',\n callLocalVideoFreeze: 'ErrorBarCallLocalVideoFreeze',\n callCameraAccessDenied: 'ErrorBarCallCameraAccessDenied',\n callCameraAccessDeniedSafari: 'ErrorBarCallCameraAccessDenied',\n callCameraAlreadyInUse: 'ErrorBarCallCameraAlreadyInUse',\n callVideoStoppedBySystem: 'ErrorBarCallVideoStoppedBySystem',\n callVideoRecoveredBySystem: 'ErrorBarCallVideoRecoveredBySystem',\n callMacOsCameraAccessDenied: 'ErrorBarCallMacOsCameraAccessDenied',\n mutedByRemoteParticipant: 'ErrorBarMutedByRemoteParticipant',\n speakingWhileMuted: 'ErrorBarCallMicrophoneMutedBySystem',\n recordingStarted: 'NotificationBarRecording',\n transcriptionStarted: 'NotificationBarRecording',\n recordingStopped: 'NotificationBarRecording',\n transcriptionStopped: 'NotificationBarRecording',\n recordingAndTranscriptionStarted: 'NotificationBarRecording',\n recordingAndTranscriptionStopped: 'NotificationBarRecording',\n recordingStoppedStillTranscribing: 'NotificationBarRecording',\n transcriptionStoppedStillRecording: 'NotificationBarRecording',\n /* @conditional-compile-remove(breakout-rooms) */\n assignedBreakoutRoomOpened: 'NotificationBarBreakoutRoomOpened',\n /* @conditional-compile-remove(breakout-rooms) */\n assignedBreakoutRoomOpenedPromptJoin: 'NotificationBarBreakoutRoomPromptJoin',\n /* @conditional-compile-remove(breakout-rooms) */\n assignedBreakoutRoomChanged: 'NotificationBarBreakoutRoomChanged',\n /* @conditional-compile-remove(breakout-rooms) */\n breakoutRoomJoined: 'NotificationBarBreakoutRoomJoined',\n /* @conditional-compile-remove(breakout-rooms) */\n breakoutRoomClosingSoon: 'NotificationBarBreakoutRoomClosingSoon',\n /* @conditional-compile-remove(media-access) */\n capabilityTurnVideoOnPresent: 'ControlButtonCameraOff',\n /* @conditional-compile-remove(media-access) */\n capabilityTurnVideoOnAbsent: 'ControlButtonCameraProhibited',\n /* @conditional-compile-remove(media-access) */\n capabilityUnmuteMicPresent: 'ControlButtonMicOff',\n /* @conditional-compile-remove(media-access) */\n capabilityUnmuteMicAbsent: 'ControlButtonMicProhibited',\n /* @conditional-compile-remove(together-mode) */\n togetherModeStarted: 'NotificationBarTogetherModeIcon',\n /* @conditional-compile-remove(together-mode) */\n togetherModeEnded: 'NotificationBarTogetherModeIcon'\n};\n\n/**\n * @private\n */\nexport const isValidString = (string: string | undefined): string is string => {\n return !!string && string.length > 0;\n};\n\n/**\n * Chunk an array into rows of a given size.\n * @private\n */\nexport function chunk<T>(options: T[], itemsPerRow: number): T[][] {\n const rows: T[][] = [];\n let currentRow: T[] = [];\n for (const option of options) {\n currentRow.push(option);\n if (currentRow.length === itemsPerRow) {\n rows.push(currentRow);\n currentRow = [];\n }\n }\n if (currentRow.length > 0) {\n rows.push(currentRow);\n }\n return rows;\n}\n\n/**\n * @private\n */\nexport const defaultSpokenLanguage: SupportedSpokenLanguage = 'en-us';\n\n/**\n * @private\n */\nconst SAFARI_COMPOSITION_KEYCODE = 229;\n/**\n * Determine if the press of the enter key is from a composition session or not (Safari only)\n *\n * @private\n */\nexport const isEnterKeyEventFromCompositionSession = (e: KeyboardEvent): boolean => {\n // Uses KeyCode 229 and which code 229 to determine if the press of the enter key is from a composition session or not (the code check is needed for Safari only, for everything else e.isComposing check is enough)\n const isComposing =\n e.isComposing || e.keyCode === SAFARI_COMPOSITION_KEYCODE || e.which === SAFARI_COMPOSITION_KEYCODE;\n return isComposing && e.key === 'Enter';\n};\n\n/**\n * @private\n */\nexport const nullToUndefined = <T>(value: T | null): T | undefined => (value === null ? undefined : value);\n\n/**\n * @private\n */\nexport const formatMoreButtonAriaDescription = (\n displayName?: string,\n isMuted?: boolean,\n isHandRaised?: boolean,\n state?: string,\n isSpeaking?: boolean,\n strings?: VideoTileStrings\n): string => {\n const mutedState = isMuted\n ? strings?.moreOptionsParticipantMutedStateMutedAriaLabel\n : strings?.moreOptionsParticipantMutedStateUnmutedAriaLabel;\n const handRaisedState = isHandRaised ? strings?.moreOptionsParticipantHandRaisedAriaLabel : undefined;\n const isSpeakingState = isSpeaking ? strings?.moreOptionsParticipantIsSpeakingAriaLabel : undefined;\n\n const description = strings?.moreOptionsButtonAriaLabel\n ? _formatString(strings?.moreOptionsButtonAriaLabel, {\n displayName: displayName ?? ' ',\n isMuted: mutedState ?? ' ',\n isHandRaised: handRaisedState ?? ' ',\n state: state ?? ' ',\n isSpeaking: isSpeakingState ?? ' '\n })\n : '';\n\n return description;\n};\n"]}
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/utils.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAc,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAK7D,OAAO,EAAE,aAAa,EAAE,mCAAgC;AAExD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,QAAgB,EAAE,MAAc,EAAU,EAAE;IAC5E,OAAO,QAAQ,CAAC,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,OAAO,EAAE,GAAG,CAAC,QAAQ,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AAC5F,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,QAAgB,EAAU,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,CAAC;AAoBvF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,eAAiC,EAAE,SAA6B,EAAoB,EAAE;;IACjH,MAAM,GAAG,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;IACjC,KAAK,MAAM,KAAK,IAAI,eAAe,EAAE,CAAC;QACpC,IAAI,KAAK,CAAC,IAAI,KAAK,SAAS,CAAC,IAAI,EAAE,CAAC;YAClC,gEAAgE;YAChE,KAAK,CAAC,WAAW,GAAG,GAAG,CAAC;YACxB,KAAK,CAAC,WAAW,GAAG,SAAS,CAAC,SAAS,CAAC;YACxC,OAAO,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QACrC,CAAC;IACH,CAAC;IAED,MAAM,kBAA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AW,aAAX,WAAW,cAAX,WAAW,GAAI,GAAG;YAC/B,OAAO,EAAE,UAAU,aAAV,UAAU,cAAV,UAAU,GAAI,GAAG;YAC1B,YAAY,EAAE,eAAe,aAAf,eAAe,cAAf,eAAe,GAAI,GAAG;YACpC,KAAK,EAAE,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,GAAG;YACnB,UAAU,EAAE,eAAe,aAAf,eAAe,cAAf,eAAe,GAAI,GAAG;YAClC,+CAA+C;YAC/C,gBAAgB,EAAE,gBAAgB,aAAhB,gBAAgB,cAAhB,gBAAgB,GAAI,GAAG;YACzC,+CAA+C;YAC/C,mBAAmB,EAAE,mBAAmB,aAAnB,mBAAmB,cAAnB,mBAAmB,GAAI,GAAG;SAChD,CAAC;QACJ,CAAC,CAAC,EAAE,CAAC;IAEP,OAAO,WAAW,CAAC;AACrB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { IIconProps, MessageBarType } from '@fluentui/react';\nimport { ActiveErrorMessage, ErrorType } from './ErrorBar';\nimport { SupportedSpokenLanguage } from '../types';\nimport { ActiveNotification, NotificationType } from './NotificationStack';\nimport { VideoTileStrings } from './VideoTile';\nimport { _formatString } from '@internal/acs-ui-common';\n\n/**\n * @private\n *\n * @param fileName\n * @param length\n * @returns string\n */\nexport const truncatedFileName = (fileName: string, length: number): string => {\n return fileName.substring(0, length).trimEnd() + (fileName.length > length ? '... ' : '');\n};\n\n/**\n * @private\n *\n * @param fileName\n * @returns string\n */\nexport const extension = (fileName: string): string => fileName.split('.').pop() || '';\n\n/**\n * @private\n */\nexport interface DismissedError {\n type: ErrorType;\n dismissedAt: Date;\n activeSince?: Date;\n}\n\n/**\n * @private\n */\nexport interface DismissedNotification {\n type: NotificationType;\n dismissedAt: Date;\n activeSince?: Date;\n}\n\n/**\n * @private\n * @param dismissedErrors\n * @param toDismiss\n * @returns DismissedError[]\n * Always returns a new Array so that the state variable is updated, trigerring a render.\n */\nexport const dismissError = (dismissedErrors: DismissedError[], toDismiss: ActiveErrorMessage): DismissedError[] => {\n const now = new Date(Date.now());\n for (const error of dismissedErrors) {\n if (error.type === toDismiss.type) {\n // Bump the timestamp for latest dismissal of this error to now.\n error.dismissedAt = now;\n error.activeSince = toDismiss.timestamp;\n return Array.from(dismissedErrors);\n }\n }\n\n const toDismissTimestamp = toDismiss.timestamp ?? now;\n\n // Record that this error was dismissed for the first time right now.\n return [\n ...dismissedErrors,\n {\n type: toDismiss.type,\n // the error time could be sometimes later than the button click time, which cause the dismiss not working\n // so we set the dismiss time to the later one\n dismissedAt: now > toDismissTimestamp ? now : toDismissTimestamp,\n activeSince: toDismiss.timestamp\n }\n ];\n};\n\n/**\n * @private\n * @param activeErrorMessages\n * @param dismissedErrors\n * @returns DismissedError[]\n * Returns a new Array if and only if contents change, to avoid re-rendering when nothing was dropped.\n */\nexport const dropDismissalsForInactiveErrors = (\n activeErrorMessages: ActiveErrorMessage[],\n dismissedErrors: DismissedError[]\n): DismissedError[] => {\n const active = new Map();\n for (const message of activeErrorMessages) {\n active.set(message.type, message);\n }\n\n // For an error such that:\n // * It was previously active, and dismissed.\n // * It did not have a timestamp associated with it.\n // * It is no longer active.\n //\n // We remove it from dismissals. When it becomes active again next time, it will be shown again on the UI.\n const shouldDeleteDismissal = (dismissed: DismissedError): boolean =>\n dismissed.activeSince === undefined && active.get(dismissed.type) === undefined;\n\n if (dismissedErrors.some((dismissed) => shouldDeleteDismissal(dismissed))) {\n return dismissedErrors.filter((dismissed) => !shouldDeleteDismissal(dismissed));\n }\n return dismissedErrors;\n};\n\n/**\n * @private\n * @param dismissedNotifications\n * @param toDismiss\n * @returns DismissedNotification[]\n * Always returns a new Array so that the state variable is updated, trigerring a render.\n */\nexport const dismissNotification = (\n dismissedNotifications: DismissedNotification[],\n toDismiss: ActiveNotification\n): DismissedNotification[] => {\n const now = new Date(Date.now());\n for (const notification of dismissedNotifications) {\n if (notification.type === toDismiss.type) {\n // Bump the timestamp for latest dismissal of this error to now.\n notification.dismissedAt = now;\n notification.activeSince = toDismiss.timestamp;\n return Array.from(dismissedNotifications);\n }\n }\n\n const toDismissTimestamp = toDismiss.timestamp ?? now;\n\n // Record that this error was dismissed for the first time right now.\n return [\n ...dismissedNotifications,\n {\n type: toDismiss.type,\n // the error time could be sometimes later than the button click time, which cause the dismiss not working\n // so we set the dismiss time to the later one\n dismissedAt: now > toDismissTimestamp ? now : toDismissTimestamp,\n activeSince: toDismiss.timestamp\n }\n ];\n};\n\n/**\n * @private\n * @param activeNotifications\n * @param dismissedNotifications\n * @returns DismissedError[]\n * Returns a new Array if and only if contents change, to avoid re-rendering when nothing was dropped.\n */\nexport const dropDismissalsForInactiveNotifications = (\n activeNotifications: ActiveNotification[],\n dismissedNotifications: DismissedNotification[]\n): DismissedNotification[] => {\n const active = new Map();\n for (const message of activeNotifications) {\n active.set(message.type, message);\n }\n\n // For an error such that:\n // * It was previously active, and dismissed.\n // * It did not have a timestamp associated with it.\n // * It is no longer active.\n //\n // We remove it from dismissals. When it becomes active again next time, it will be shown again on the UI.\n const shouldDeleteDismissal = (dismissed: DismissedNotification): boolean =>\n dismissed.activeSince === undefined && active.get(dismissed.type) === undefined;\n\n if (dismissedNotifications.some((dismissed) => shouldDeleteDismissal(dismissed))) {\n return dismissedNotifications.filter((dismissed) => !shouldDeleteDismissal(dismissed));\n }\n return dismissedNotifications;\n};\n\n/**\n * @private\n * @param activeErrorMessages\n * @param dismissedErrors\n * @returns ActiveErrorMessage[]\n */\nexport const errorsToShow = (\n activeErrorMessages: ActiveErrorMessage[],\n dismissedErrors: DismissedError[],\n mountTimestamp?: Date\n): ActiveErrorMessage[] => {\n const dismissed: Map<ErrorType, DismissedError> = new Map();\n for (const error of dismissedErrors) {\n dismissed.set(error.type, error);\n }\n\n return activeErrorMessages.filter((error) => {\n if (mountTimestamp && error.timestamp && mountTimestamp > error.timestamp) {\n // Error has a timestamp and it is older than when the component was mounted.\n return false;\n }\n\n const dismissal = dismissed.get(error.type);\n if (!dismissal) {\n // This error was never dismissed.\n return true;\n }\n if (!error.timestamp) {\n // No timestamp associated with the error. In this case, the existence of a dismissal is enough to suppress the error.\n return false;\n }\n // Error has an associated timestamp, so compare with last dismissal.\n return error.timestamp > dismissal.dismissedAt;\n });\n};\n\n/**\n * @private\n * @param activeNotifications\n * @param dismissedNotifications\n * @returns ActiveNotification[]\n */\nexport const notificationsToShow = (\n activeNotifications: ActiveNotification[],\n dismissedNotifications: DismissedNotification[],\n mountTimestamp?: Date\n): ActiveNotification[] => {\n const dismissed: Map<NotificationType, DismissedNotification> = new Map();\n for (const notification of dismissedNotifications) {\n dismissed.set(notification.type, notification);\n }\n\n return activeNotifications.filter((notification) => {\n if (mountTimestamp && notification.timestamp && mountTimestamp > notification.timestamp) {\n // Notification has a timestamp and it is older than when the component was mounted.\n return false;\n }\n\n const dismissal = dismissed.get(notification.type);\n if (!dismissal) {\n // This error was never dismissed.\n return true;\n }\n if (!notification.timestamp) {\n // No timestamp associated with the error. In this case, the existence of a dismissal is enough to suppress the error.\n return false;\n }\n // Error has an associated timestamp, so compare with last dismissal.\n return notification.timestamp > dismissal.dismissedAt;\n });\n};\n\n/**\n * @private\n * @param errorType\n * @returns MessageBarType\n */\nexport const messageBarType = (errorType: ErrorType): MessageBarType => {\n switch (errorType) {\n case 'callNetworkQualityLow':\n case 'callNoSpeakerFound':\n case 'callNoMicrophoneFound':\n case 'callMicrophoneAccessDenied':\n case 'callMicrophoneAccessDeniedSafari':\n case 'callMicrophoneMutedBySystem':\n case 'callMicrophoneUnmutedBySystem':\n case 'callMacOsMicrophoneAccessDenied':\n case 'callLocalVideoFreeze':\n case 'callCameraAccessDenied':\n case 'callCameraAccessDeniedSafari':\n case 'callCameraAlreadyInUse':\n case 'callVideoStoppedBySystem':\n case 'callVideoRecoveredBySystem':\n case 'callMacOsCameraAccessDenied':\n case 'callMacOsScreenShareAccessDenied':\n case 'startScreenShareGeneric':\n case 'cameraFrozenForRemoteParticipants':\n return MessageBarType.warning;\n default:\n return MessageBarType.error;\n }\n};\n\n/**\n * @private\n * @param errorType\n * @returns IIconProps | undefined\n */\nexport const messageBarIconProps = (errorType: ErrorType): IIconProps | undefined => {\n const iconName = customIconName[errorType];\n return iconName ? { iconName } : undefined;\n};\n\n/**\n * @private\n */\nexport const customIconName: Partial<{ [key in ErrorType]: string }> = {\n callNetworkQualityLow: 'ErrorBarCallNetworkQualityLow',\n callNoSpeakerFound: 'ErrorBarCallNoSpeakerFound',\n callNoMicrophoneFound: 'ErrorBarCallNoMicrophoneFound',\n callMicrophoneAccessDenied: 'ErrorBarCallMicrophoneAccessDenied',\n callMicrophoneAccessDeniedSafari: 'ErrorBarCallMicrophoneAccessDenied',\n callMicrophoneMutedBySystem: 'ErrorBarCallMicrophoneMutedBySystem',\n callMicrophoneUnmutedBySystem: 'ErrorBarCallMicrophoneUnmutedBySystem',\n callMacOsMicrophoneAccessDenied: 'ErrorBarCallMacOsMicrophoneAccessDenied',\n callLocalVideoFreeze: 'ErrorBarCallLocalVideoFreeze',\n callCameraAccessDenied: 'ErrorBarCallCameraAccessDenied',\n callCameraAccessDeniedSafari: 'ErrorBarCallCameraAccessDenied',\n callCameraAlreadyInUse: 'ErrorBarCallCameraAlreadyInUse',\n callVideoStoppedBySystem: 'ErrorBarCallVideoStoppedBySystem',\n callVideoRecoveredBySystem: 'ErrorBarCallVideoRecoveredBySystem',\n callMacOsCameraAccessDenied: 'ErrorBarCallMacOsCameraAccessDenied'\n};\n\n/**\n * @private\n * @param NotificationType\n * @returns IIconProps | undefined\n */\nexport const NotificationIconProps = (notificationType: NotificationType): IIconProps | undefined => {\n const iconName = customNotificationIconName[notificationType];\n return iconName ? { iconName } : undefined;\n};\n\n/**\n * @private\n */\nexport const customNotificationIconName: Partial<{ [key in NotificationType]: string }> = {\n callNetworkQualityLow: 'ErrorBarCallNetworkQualityLow',\n teamsMeetingCallNetworkQualityLow: 'ErrorBarCallNetworkQualityLow',\n callNoSpeakerFound: 'ErrorBarCallNoSpeakerFound',\n callNoMicrophoneFound: 'ErrorBarCallNoMicrophoneFound',\n callMicrophoneAccessDenied: 'ErrorBarCallMicrophoneAccessDenied',\n callMicrophoneAccessDeniedSafari: 'ErrorBarCallMicrophoneAccessDenied',\n callMicrophoneMutedBySystem: 'ErrorBarCallMicrophoneMutedBySystem',\n callMicrophoneUnmutedBySystem: 'ErrorBarCallMicrophoneUnmutedBySystem',\n callMacOsMicrophoneAccessDenied: 'ErrorBarCallMacOsMicrophoneAccessDenied',\n callLocalVideoFreeze: 'ErrorBarCallLocalVideoFreeze',\n callCameraAccessDenied: 'ErrorBarCallCameraAccessDenied',\n callCameraAccessDeniedSafari: 'ErrorBarCallCameraAccessDenied',\n callCameraAlreadyInUse: 'ErrorBarCallCameraAlreadyInUse',\n callVideoStoppedBySystem: 'ErrorBarCallVideoStoppedBySystem',\n callVideoRecoveredBySystem: 'ErrorBarCallVideoRecoveredBySystem',\n callMacOsCameraAccessDenied: 'ErrorBarCallMacOsCameraAccessDenied',\n mutedByRemoteParticipant: 'ErrorBarMutedByRemoteParticipant',\n speakingWhileMuted: 'ErrorBarCallMicrophoneMutedBySystem',\n recordingStarted: 'NotificationBarRecording',\n transcriptionStarted: 'NotificationBarRecording',\n recordingStopped: 'NotificationBarRecording',\n transcriptionStopped: 'NotificationBarRecording',\n recordingAndTranscriptionStarted: 'NotificationBarRecording',\n recordingAndTranscriptionStopped: 'NotificationBarRecording',\n recordingStoppedStillTranscribing: 'NotificationBarRecording',\n transcriptionStoppedStillRecording: 'NotificationBarRecording',\n /* @conditional-compile-remove(breakout-rooms) */\n assignedBreakoutRoomOpened: 'NotificationBarBreakoutRoomOpened',\n /* @conditional-compile-remove(breakout-rooms) */\n assignedBreakoutRoomOpenedPromptJoin: 'NotificationBarBreakoutRoomPromptJoin',\n /* @conditional-compile-remove(breakout-rooms) */\n assignedBreakoutRoomChanged: 'NotificationBarBreakoutRoomChanged',\n /* @conditional-compile-remove(breakout-rooms) */\n breakoutRoomJoined: 'NotificationBarBreakoutRoomJoined',\n /* @conditional-compile-remove(breakout-rooms) */\n breakoutRoomClosingSoon: 'NotificationBarBreakoutRoomClosingSoon',\n /* @conditional-compile-remove(media-access) */\n capabilityTurnVideoOnPresent: 'ControlButtonCameraOff',\n /* @conditional-compile-remove(media-access) */\n capabilityTurnVideoOnAbsent: 'ControlButtonCameraProhibited',\n /* @conditional-compile-remove(media-access) */\n capabilityUnmuteMicPresent: 'ControlButtonMicOff',\n /* @conditional-compile-remove(media-access) */\n capabilityUnmuteMicAbsent: 'ControlButtonMicProhibited',\n /* @conditional-compile-remove(together-mode) */\n togetherModeStarted: 'NotificationBarTogetherModeIcon',\n /* @conditional-compile-remove(together-mode) */\n togetherModeEnded: 'NotificationBarTogetherModeIcon'\n};\n\n/**\n * @private\n */\nexport const isValidString = (string: string | undefined): string is string => {\n return !!string && string.length > 0;\n};\n\n/**\n * Chunk an array into rows of a given size.\n * @private\n */\nexport function chunk<T>(options: T[], itemsPerRow: number): T[][] {\n const rows: T[][] = [];\n let currentRow: T[] = [];\n for (const option of options) {\n currentRow.push(option);\n if (currentRow.length === itemsPerRow) {\n rows.push(currentRow);\n currentRow = [];\n }\n }\n if (currentRow.length > 0) {\n rows.push(currentRow);\n }\n return rows;\n}\n\n/**\n * @private\n */\nexport const defaultSpokenLanguage: SupportedSpokenLanguage = 'en-us';\n\n/**\n * @private\n */\nconst SAFARI_COMPOSITION_KEYCODE = 229;\n/**\n * Determine if the press of the enter key is from a composition session or not (Safari only)\n *\n * @private\n */\nexport const isEnterKeyEventFromCompositionSession = (e: KeyboardEvent): boolean => {\n // Uses KeyCode 229 and which code 229 to determine if the press of the enter key is from a composition session or not (the code check is needed for Safari only, for everything else e.isComposing check is enough)\n const isComposing =\n e.isComposing || e.keyCode === SAFARI_COMPOSITION_KEYCODE || e.which === SAFARI_COMPOSITION_KEYCODE;\n return isComposing && e.key === 'Enter';\n};\n\n/**\n * @private\n */\nexport const nullToUndefined = <T>(value: T | null): T | undefined => (value === null ? undefined : value);\n\n/**\n * @private\n */\nexport const formatMoreButtonAriaDescription = (\n displayName?: string,\n isMuted?: boolean,\n isHandRaised?: boolean,\n state?: string,\n isSpeaking?: boolean,\n strings?: VideoTileStrings,\n /* @conditional-compile-remove(media-access) */\n isMicDisabled?: boolean,\n /* @conditional-compile-remove(media-access) */\n isCameraDisabled?: boolean\n): string => {\n const mutedState = isMuted\n ? strings?.moreOptionsParticipantMutedStateMutedAriaLabel\n : strings?.moreOptionsParticipantMutedStateUnmutedAriaLabel;\n const handRaisedState = isHandRaised ? strings?.moreOptionsParticipantHandRaisedAriaLabel : undefined;\n const isSpeakingState = isSpeaking ? strings?.moreOptionsParticipantIsSpeakingAriaLabel : undefined;\n /* @conditional-compile-remove(media-access) */\n const micDisabledState = isMicDisabled ? strings?.moreOptionsParticipantMicDisabledAriaLabel : undefined;\n /* @conditional-compile-remove(media-access) */\n const cameraDisabledState = isCameraDisabled ? strings?.moreOptionsParticipantCameraDisabledAriaLabel : undefined;\n const description = strings?.moreOptionsButtonAriaLabel\n ? _formatString(strings?.moreOptionsButtonAriaLabel, {\n displayName: displayName ?? ' ',\n isMuted: mutedState ?? ' ',\n isHandRaised: handRaisedState ?? ' ',\n state: state ?? ' ',\n isSpeaking: isSpeakingState ?? ' ',\n /* @conditional-compile-remove(media-access) */\n micDisabledState: micDisabledState ?? ' ',\n /* @conditional-compile-remove(media-access) */\n cameraDisabledState: cameraDisabledState ?? ' '\n })\n : '';\n\n return description;\n};\n"]}
@@ -9,9 +9,11 @@
9
9
  "displayNamePlaceholder": "Unnamed participant",
10
10
  "participantStateRinging": "Calling...",
11
11
  "participantStateHold": "On hold",
12
- "participantItemAriaLabel": "{displayName}, {handRaisedState}, {mutedState}, {sharingState}, {connectionState}",
13
- "participantItemWithMoreOptionsAriaLabel": "{displayName}, {handRaisedState}, {mutedState}, {sharingState}, {connectionState}, More Options",
14
- "attendeeRole": "Attendee"
12
+ "participantItemAriaLabel": "{displayName}, {handRaisedState}, {mutedState}, {micDisabledState}, {cameraDisabledState}, {sharingState}, {connectionState}",
13
+ "participantItemWithMoreOptionsAriaLabel": "{displayName}, {handRaisedState}, {mutedState}, {micDisabledState}, {cameraDisabledState}, {sharingState}, {connectionState}, More Options",
14
+ "attendeeRole": "Attendee",
15
+ "micDisabledIconLabel": "Micophone disabled",
16
+ "cameraDisabledIconLabel": "Camera disabled"
15
17
  },
16
18
  "ParticipantList": {
17
19
  "overflowParticipantCount": "+{overflowCount} more"
@@ -684,11 +686,13 @@
684
686
  "participantStateRinging": "Calling...",
685
687
  "participantReconnecting": "Reconnecting...",
686
688
  "participantStateHold": "On hold",
687
- "moreOptionsButtonAriaLabel": "More Options {displayName} {isMuted} {isHandRaised} {state} {isSpeaking}",
689
+ "moreOptionsButtonAriaLabel": "More Options {displayName} {isMuted} {micDisabledState} {cameraDisabledState} {isHandRaised} {state} {isSpeaking}",
688
690
  "moreOptionsParticipantMutedStateMutedAriaLabel": "muted",
689
691
  "moreOptionsParticipantMutedStateUnmutedAriaLabel": "unmuted",
690
692
  "moreOptionsParticipantHandRaisedAriaLabel": "Hand raised",
691
- "moreOptionsParticipantIsSpeakingAriaLabel": "Speaking"
693
+ "moreOptionsParticipantIsSpeakingAriaLabel": "Speaking",
694
+ "moreOptionsParticipantMicDisabledAriaLabel": "Microphone disabled",
695
+ "moreOptionsParticipantCameraDisabledAriaLabel": "Camera disabled"
692
696
  },
693
697
  "CameraAndMicrophoneSitePermissionsRequest": {
694
698
  "primaryText": "Allow {appName} to use your camera and microphone",
@@ -208,8 +208,8 @@ export const CallArrangement = (props) => {
208
208
  const canForbidOthersAudio = !!((_b = capabilities === null || capabilities === void 0 ? void 0 : capabilities.forbidOthersAudio) === null || _b === void 0 ? void 0 : _b.isPresent);
209
209
  /* @conditional-compile-remove(media-access) */
210
210
  const canForbidOthersVideo = !!((_c = capabilities === null || capabilities === void 0 ? void 0 : capabilities.forbidOthersVideo) === null || _c === void 0 ? void 0 : _c.isPresent);
211
- /* @conditional-compile-remove(media-access) */
212
211
  const onToggleParticipantMicPeoplePaneProps = useMemo(() => {
212
+ /* @conditional-compile-remove(media-access) */
213
213
  return {
214
214
  onForbidAudio: canForbidOthersAudio ? onForbidAudio : undefined,
215
215
  onPermitAudio: canForbidOthersAudio ? onPermitAudio : undefined,
@@ -221,18 +221,19 @@ export const CallArrangement = (props) => {
221
221
  onPermitOthersVideo: canForbidOthersVideo ? muteAllHandlers.onPermitOthersVideo : undefined,
222
222
  meetingMediaAccess
223
223
  };
224
+ return {};
224
225
  }, [
225
- canForbidOthersAudio,
226
- onForbidAudio,
227
- onPermitAudio,
228
- muteAllHandlers.onForbidOthersAudio,
229
- muteAllHandlers.onPermitOthersAudio,
230
- muteAllHandlers.onForbidOthersVideo,
231
- muteAllHandlers.onPermitOthersVideo,
232
- canForbidOthersVideo,
233
- onForbidVideo,
234
- onPermitVideo,
235
- meetingMediaAccess
226
+ /* @conditional-compile-remove(media-access) */ canForbidOthersAudio,
227
+ /* @conditional-compile-remove(media-access) */ onForbidAudio,
228
+ /* @conditional-compile-remove(media-access) */ onPermitAudio,
229
+ /* @conditional-compile-remove(media-access) */ muteAllHandlers.onForbidOthersAudio,
230
+ /* @conditional-compile-remove(media-access) */ muteAllHandlers.onPermitOthersAudio,
231
+ /* @conditional-compile-remove(media-access) */ muteAllHandlers.onForbidOthersVideo,
232
+ /* @conditional-compile-remove(media-access) */ muteAllHandlers.onPermitOthersVideo,
233
+ /* @conditional-compile-remove(media-access) */ canForbidOthersVideo,
234
+ /* @conditional-compile-remove(media-access) */ onForbidVideo,
235
+ /* @conditional-compile-remove(media-access) */ onPermitVideo,
236
+ /* @conditional-compile-remove(media-access) */ meetingMediaAccess
236
237
  ]);
237
238
  const { isPeoplePaneOpen, openPeoplePane, closePeoplePane } = usePeoplePane(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, peoplePaneProps), spotlightPeoplePaneProps), onMuteParticipantPeoplePaneProps), pinPeoplePaneProps), onToggleParticipantMicPeoplePaneProps));
238
239
  const togglePeoplePane = useCallback(() => {