@azure/communication-react 1.4.3-alpha-202212150014.0 → 1.4.3-alpha-202212170012.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/dist/communication-react.d.ts +27 -1
  2. package/dist/dist-cjs/communication-react/index.js +560 -336
  3. package/dist/dist-cjs/communication-react/index.js.map +1 -1
  4. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  5. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  6. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.d.ts +1 -1
  7. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js +2 -1
  8. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
  9. package/dist/dist-esm/calling-component-bindings/src/errorBarSelector.js +21 -10
  10. package/dist/dist-esm/calling-component-bindings/src/errorBarSelector.js.map +1 -1
  11. package/dist/dist-esm/calling-stateful-client/src/StreamUtils.js +6 -2
  12. package/dist/dist-esm/calling-stateful-client/src/StreamUtils.js.map +1 -1
  13. package/dist/dist-esm/react-components/src/components/DevicePermissions/DomainPermissions.d.ts +4 -0
  14. package/dist/dist-esm/react-components/src/components/DevicePermissions/DomainPermissions.js +9 -3
  15. package/dist/dist-esm/react-components/src/components/DevicePermissions/DomainPermissions.js.map +1 -1
  16. package/dist/dist-esm/react-components/src/components/ErrorBar.d.ts +8 -0
  17. package/dist/dist-esm/react-components/src/components/ErrorBar.js.map +1 -1
  18. package/dist/dist-esm/react-components/src/components/ParticipantsButton.d.ts +4 -0
  19. package/dist/dist-esm/react-components/src/components/ParticipantsButton.js +25 -4
  20. package/dist/dist-esm/react-components/src/components/ParticipantsButton.js.map +1 -1
  21. package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.d.ts +1 -1
  22. package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.js +2 -2
  23. package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.js.map +1 -1
  24. package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.d.ts +1 -1
  25. package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.js +2 -2
  26. package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.js.map +1 -1
  27. package/dist/dist-esm/react-components/src/components/VideoGallery/DefaultLayout.d.ts +2 -27
  28. package/dist/dist-esm/react-components/src/components/VideoGallery/DefaultLayout.js +1 -1
  29. package/dist/dist-esm/react-components/src/components/VideoGallery/DefaultLayout.js.map +1 -1
  30. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.d.ts +2 -26
  31. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.js +2 -2
  32. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.js.map +1 -1
  33. package/dist/dist-esm/react-components/src/components/VideoGallery/Layout.d.ts +34 -0
  34. package/dist/dist-esm/react-components/src/components/VideoGallery/Layout.js +4 -0
  35. package/dist/dist-esm/react-components/src/components/VideoGallery/Layout.js.map +1 -0
  36. package/dist/dist-esm/react-components/src/components/VideoGallery/PinnedParticipantsLayout.d.ts +25 -0
  37. package/dist/dist-esm/react-components/src/components/VideoGallery/PinnedParticipantsLayout.js +62 -0
  38. package/dist/dist-esm/react-components/src/components/VideoGallery/PinnedParticipantsLayout.js.map +1 -0
  39. package/dist/dist-esm/react-components/src/components/VideoGallery/VideoGalleryResponsiveHorizontalGallery.d.ts +3 -1
  40. package/dist/dist-esm/react-components/src/components/VideoGallery/VideoGalleryResponsiveHorizontalGallery.js +3 -1
  41. package/dist/dist-esm/react-components/src/components/VideoGallery/VideoGalleryResponsiveHorizontalGallery.js.map +1 -1
  42. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideo.styles.d.ts +1 -0
  43. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideo.styles.js +2 -1
  44. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideo.styles.js.map +1 -1
  45. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveHorizontalGallery.styles.d.ts +0 -14
  46. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveHorizontalGallery.styles.js +1 -8
  47. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveHorizontalGallery.styles.js.map +1 -1
  48. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.d.ts +36 -0
  49. package/dist/dist-esm/react-components/src/components/VideoGallery/{videoGalleryUtils.js → utils/videoGalleryLayoutUtils.js} +46 -2
  50. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js.map +1 -0
  51. package/dist/dist-esm/react-components/src/components/VideoGallery.d.ts +4 -0
  52. package/dist/dist-esm/react-components/src/components/VideoGallery.js +47 -3
  53. package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
  54. package/dist/dist-esm/react-components/src/components/utils.js +4 -0
  55. package/dist/dist-esm/react-components/src/components/utils.js.map +1 -1
  56. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts +6 -0
  57. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
  58. package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +22 -1
  59. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +12 -12
  60. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
  61. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.d.ts +3 -4
  62. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js +55 -24
  63. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js.map +1 -1
  64. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.js +1 -1
  65. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.js.map +1 -1
  66. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +27 -5
  67. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
  68. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.js +1 -1
  69. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.js.map +1 -1
  70. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallPage.styles.d.ts +0 -4
  71. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallPage.styles.js +0 -8
  72. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallPage.styles.js.map +1 -1
  73. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.d.ts +5 -0
  74. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +9 -0
  75. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
  76. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatControlBar.js +1 -11
  77. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatControlBar.js.map +1 -1
  78. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/CallWithChatCompositeStyles.d.ts +0 -2
  79. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/CallWithChatCompositeStyles.js +0 -15
  80. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/CallWithChatCompositeStyles.js.map +1 -1
  81. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.js +26 -3
  82. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.js.map +1 -1
  83. package/dist/dist-esm/react-composites/src/composites/common/styles/Pane.styles.js +1 -1
  84. package/dist/dist-esm/react-composites/src/composites/common/styles/Pane.styles.js.map +1 -1
  85. package/package.json +8 -8
  86. package/dist/dist-esm/react-components/src/components/VideoGallery/videoGalleryUtils.d.ts +0 -17
  87. package/dist/dist-esm/react-components/src/components/VideoGallery/videoGalleryUtils.js.map +0 -1
@@ -0,0 +1,62 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT license.
3
+ import { LayerHost, mergeStyles, Stack } from '@fluentui/react';
4
+ import { useId } from '@fluentui/react-hooks';
5
+ import React from 'react';
6
+ import { useTheme } from '../../theming';
7
+ import { GridLayout } from '../GridLayout';
8
+ import { isNarrowWidth } from '../utils/responsive';
9
+ import { FloatingLocalVideo } from './FloatingLocalVideo';
10
+ import { localVideoTileContainerStyle, localVideoTileWithControlsContainerStyle, LOCAL_VIDEO_TILE_ZINDEX } from './styles/FloatingLocalVideo.styles';
11
+ import { innerLayoutStyle, layerHostStyle, rootLayoutStyle } from './styles/FloatingLocalVideoLayout.styles';
12
+ import { usePinnedParticipantLayout } from './utils/videoGalleryLayoutUtils';
13
+ import { VideoGalleryResponsiveHorizontalGallery } from './VideoGalleryResponsiveHorizontalGallery';
14
+ /**
15
+ * PinnedParticipantsLayout displays remote participants and a screen sharing component in
16
+ * a grid and horizontal gallery while floating the local video
17
+ *
18
+ * @private
19
+ */
20
+ export const PinnedParticipantsLayout = (props) => {
21
+ const { remoteParticipants = [], pinnedParticipants = [], dominantSpeakers, localVideoComponent, screenShareComponent, onRenderRemoteParticipant, styles, maxRemoteVideoStreams, showCameraSwitcherInLocalPreview, parentWidth, parentHeight, isLocalVideoFloating } = props;
22
+ const theme = useTheme();
23
+ const isNarrow = parentWidth ? isNarrowWidth(parentWidth) : false;
24
+ const pinnedParticipantsLayout = usePinnedParticipantLayout({
25
+ remoteParticipants,
26
+ pinnedParticipantUserIds: pinnedParticipants,
27
+ dominantSpeakers,
28
+ maxRemoteVideoStreams,
29
+ isScreenShareActive: !!screenShareComponent
30
+ });
31
+ let activeVideoStreams = 0;
32
+ const shouldFloatLocalVideo = isLocalVideoFloating && remoteParticipants.length > 0;
33
+ const gridTiles = pinnedParticipantsLayout.gridParticipants.map((p) => {
34
+ var _a, _b;
35
+ return onRenderRemoteParticipant(p, maxRemoteVideoStreams && maxRemoteVideoStreams >= 0
36
+ ? ((_a = p.videoStream) === null || _a === void 0 ? void 0 : _a.isAvailable) && activeVideoStreams++ < maxRemoteVideoStreams
37
+ : (_b = p.videoStream) === null || _b === void 0 ? void 0 : _b.isAvailable);
38
+ });
39
+ if (localVideoComponent && !shouldFloatLocalVideo) {
40
+ gridTiles.push(localVideoComponent);
41
+ }
42
+ const horizontalGalleryTiles = pinnedParticipantsLayout.horizontalGalleryParticipants.map((p) => {
43
+ var _a, _b;
44
+ return onRenderRemoteParticipant(p, maxRemoteVideoStreams && maxRemoteVideoStreams >= 0
45
+ ? ((_a = p.videoStream) === null || _a === void 0 ? void 0 : _a.isAvailable) && activeVideoStreams++ < maxRemoteVideoStreams
46
+ : (_b = p.videoStream) === null || _b === void 0 ? void 0 : _b.isAvailable);
47
+ });
48
+ const layerHostId = useId('layerhost');
49
+ const wrappedLocalVideoComponent = localVideoComponent && shouldFloatLocalVideo ? (
50
+ // When we use showCameraSwitcherInLocalPreview it disables dragging to allow keyboard navigation.
51
+ showCameraSwitcherInLocalPreview ? (React.createElement(Stack, { className: mergeStyles(localVideoTileWithControlsContainerStyle(theme, isNarrow), {
52
+ boxShadow: theme.effects.elevation8,
53
+ zIndex: LOCAL_VIDEO_TILE_ZINDEX
54
+ }) }, localVideoComponent)) : horizontalGalleryTiles.length > 0 ? (React.createElement(Stack, { className: mergeStyles(localVideoTileContainerStyle(theme, isNarrow)) }, localVideoComponent)) : (React.createElement(FloatingLocalVideo, { localVideoComponent: localVideoComponent, layerHostId: layerHostId, isNarrow: isNarrow, parentWidth: parentWidth, parentHeight: parentHeight }))) : undefined;
55
+ return (React.createElement(Stack, { styles: rootLayoutStyle },
56
+ wrappedLocalVideoComponent,
57
+ React.createElement(Stack, { horizontal: false, styles: innerLayoutStyle },
58
+ screenShareComponent ? (screenShareComponent) : (React.createElement(GridLayout, { key: "grid-layout", styles: styles === null || styles === void 0 ? void 0 : styles.gridLayout }, gridTiles)),
59
+ horizontalGalleryTiles.length > 0 && (React.createElement(VideoGalleryResponsiveHorizontalGallery, { isNarrow: isNarrow, shouldFloatLocalVideo: true, horizontalGalleryElements: horizontalGalleryTiles, styles: styles === null || styles === void 0 ? void 0 : styles.horizontalGallery })),
60
+ React.createElement(LayerHost, { id: layerHostId, className: mergeStyles(layerHostStyle) }))));
61
+ };
62
+ //# sourceMappingURL=PinnedParticipantsLayout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PinnedParticipantsLayout.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/VideoGallery/PinnedParticipantsLayout.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,EACL,4BAA4B,EAC5B,wCAAwC,EACxC,uBAAuB,EACxB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAC7G,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EAAE,uCAAuC,EAAE,MAAM,2CAA2C,CAAC;AAkBpG;;;;;GAKG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,KAAoC,EAAe,EAAE;IAC5F,MAAM,EACJ,kBAAkB,GAAG,EAAE,EACvB,kBAAkB,G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EAAC,MAAM,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,UAAU,IACrD,SAAS,CACC,CACd;YACA,sBAAsB,CAAC,MAAM,GAAG,CAAC,IAAI,CACpC,oBAAC,uCAAuC,IACtC,QAAQ,EAAE,QAAQ,EAClB,qBAAqB,EAAE,IAAI,EAC3B,yBAAyB,EAAE,sBAAsB,EACjD,MAAM,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,iBAAiB,GACjC,CACH;YACD,oBAAC,SAAS,IAAC,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,CAAC,cAAc,CAAC,GAAI,CAChE,CACF,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { LayerHost, mergeStyles, Stack } from '@fluentui/react';\nimport { useId } from '@fluentui/react-hooks';\nimport React from 'react';\nimport { useTheme } from '../../theming';\nimport { GridLayout } from '../GridLayout';\nimport { isNarrowWidth } from '../utils/responsive';\nimport { FloatingLocalVideo } from './FloatingLocalVideo';\nimport { FloatingLocalVideoLayoutProps } from './FloatingLocalVideoLayout';\nimport {\n localVideoTileContainerStyle,\n localVideoTileWithControlsContainerStyle,\n LOCAL_VIDEO_TILE_ZINDEX\n} from './styles/FloatingLocalVideo.styles';\nimport { innerLayoutStyle, layerHostStyle, rootLayoutStyle } from './styles/FloatingLocalVideoLayout.styles';\nimport { usePinnedParticipantLayout } from './utils/videoGalleryLayoutUtils';\nimport { VideoGalleryResponsiveHorizontalGallery } from './VideoGalleryResponsiveHorizontalGallery';\n\n/**\n * Props for {@link PinnedParticipantsLayout}.\n *\n * @private\n */\nexport interface PinnedParticipantsLayoutProps extends FloatingLocalVideoLayoutProps {\n /**\n * List of pinned participant userIds\n */\n pinnedParticipants?: string[];\n /**\n * Whether local video should be floating\n */\n isLocalVideoFloating?: boolean;\n}\n\n/**\n * PinnedParticipantsLayout displays remote participants and a screen sharing component in\n * a grid and horizontal gallery while floating the local video\n *\n * @private\n */\nexport const PinnedParticipantsLayout = (props: PinnedParticipantsLayoutProps): JSX.Element => {\n const {\n remoteParticipants = [],\n pinnedParticipants = [],\n dominantSpeakers,\n localVideoComponent,\n screenShareComponent,\n onRenderRemoteParticipant,\n styles,\n maxRemoteVideoStreams,\n showCameraSwitcherInLocalPreview,\n parentWidth,\n parentHeight,\n isLocalVideoFloating\n } = props;\n\n const theme = useTheme();\n\n const isNarrow = parentWidth ? isNarrowWidth(parentWidth) : false;\n\n const pinnedParticipantsLayout = usePinnedParticipantLayout({\n remoteParticipants,\n pinnedParticipantUserIds: pinnedParticipants,\n dominantSpeakers,\n maxRemoteVideoStreams,\n isScreenShareActive: !!screenShareComponent\n });\n\n let activeVideoStreams = 0;\n\n const shouldFloatLocalVideo = isLocalVideoFloating && remoteParticipants.length > 0;\n\n const gridTiles = pinnedParticipantsLayout.gridParticipants.map((p) => {\n return onRenderRemoteParticipant(\n p,\n maxRemoteVideoStreams && maxRemoteVideoStreams >= 0\n ? p.videoStream?.isAvailable && activeVideoStreams++ < maxRemoteVideoStreams\n : p.videoStream?.isAvailable\n );\n });\n\n if (localVideoComponent && !shouldFloatLocalVideo) {\n gridTiles.push(localVideoComponent);\n }\n\n const horizontalGalleryTiles = pinnedParticipantsLayout.horizontalGalleryParticipants.map((p) => {\n return onRenderRemoteParticipant(\n p,\n maxRemoteVideoStreams && maxRemoteVideoStreams >= 0\n ? p.videoStream?.isAvailable && activeVideoStreams++ < maxRemoteVideoStreams\n : p.videoStream?.isAvailable\n );\n });\n\n const layerHostId = useId('layerhost');\n\n const wrappedLocalVideoComponent =\n localVideoComponent && shouldFloatLocalVideo ? (\n // When we use showCameraSwitcherInLocalPreview it disables dragging to allow keyboard navigation.\n showCameraSwitcherInLocalPreview ? (\n <Stack\n className={mergeStyles(localVideoTileWithControlsContainerStyle(theme, isNarrow), {\n boxShadow: theme.effects.elevation8,\n zIndex: LOCAL_VIDEO_TILE_ZINDEX\n })}\n >\n {localVideoComponent}\n </Stack>\n ) : horizontalGalleryTiles.length > 0 ? (\n <Stack className={mergeStyles(localVideoTileContainerStyle(theme, isNarrow))}>{localVideoComponent}</Stack>\n ) : (\n <FloatingLocalVideo\n localVideoComponent={localVideoComponent}\n layerHostId={layerHostId}\n isNarrow={isNarrow}\n parentWidth={parentWidth}\n parentHeight={parentHeight}\n />\n )\n ) : undefined;\n\n return (\n <Stack styles={rootLayoutStyle}>\n {wrappedLocalVideoComponent}\n <Stack horizontal={false} styles={innerLayoutStyle}>\n {screenShareComponent ? (\n screenShareComponent\n ) : (\n <GridLayout key=\"grid-layout\" styles={styles?.gridLayout}>\n {gridTiles}\n </GridLayout>\n )}\n {horizontalGalleryTiles.length > 0 && (\n <VideoGalleryResponsiveHorizontalGallery\n isNarrow={isNarrow}\n shouldFloatLocalVideo={true}\n horizontalGalleryElements={horizontalGalleryTiles}\n styles={styles?.horizontalGallery}\n />\n )}\n <LayerHost id={layerHostId} className={mergeStyles(layerHostStyle)} />\n </Stack>\n </Stack>\n );\n};\n"]}
@@ -1,7 +1,9 @@
1
1
  /// <reference types="react" />
2
2
  import { HorizontalGalleryStyles } from '../HorizontalGallery';
3
3
  /**
4
- * A ResponsiveHorizontalGallery styled for the @link{VideoGallery}
4
+ * A ResponsiveHorizontalGallery styled for the {@link VideoGallery}
5
+ *
6
+ * @private
5
7
  */
6
8
  export declare const VideoGalleryResponsiveHorizontalGallery: (props: {
7
9
  shouldFloatLocalVideo?: boolean;
@@ -6,7 +6,9 @@ import { ResponsiveHorizontalGallery } from '../ResponsiveHorizontalGallery';
6
6
  import { HORIZONTAL_GALLERY_BUTTON_WIDTH, HORIZONTAL_GALLERY_GAP } from '../styles/HorizontalGallery.styles';
7
7
  import { horizontalGalleryContainerStyle, horizontalGalleryStyle, LARGE_HORIZONTAL_GALLERY_TILE_SIZE_REM, SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM } from './styles/VideoGalleryResponsiveHorizontalGallery.styles';
8
8
  /**
9
- * A ResponsiveHorizontalGallery styled for the @link{VideoGallery}
9
+ * A ResponsiveHorizontalGallery styled for the {@link VideoGallery}
10
+ *
11
+ * @private
10
12
  */
11
13
  export const VideoGalleryResponsiveHorizontalGallery = (props) => {
12
14
  const { shouldFloatLocalVideo = false, isNarrow = false, horizontalGalleryElements, styles } = props;
@@ -1 +1 @@
1
- {"version":3,"file":"VideoGalleryResponsiveHorizontalGallery.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/VideoGallery/VideoGalleryResponsiveHorizontalGallery.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,2BAA2B,EAAE,MAAM,gCAAgC,CAAC;AAC7E,OAAO,EAAE,+BAA+B,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC7G,OAAO,EACL,+BAA+B,EAC/B,sBAAsB,EACtB,sCAAsC,EACtC,sCAAsC,EACvC,MAAM,yDAAyD,CAAC;AAEjE;;GAEG;AACH,MAAM,CAAC,MAAM,uCAAuC,GAAG,CAAC,KAKvD,EAAe,EAAE;IAChB,MAAM,EAAE,qBAAqB,GAAG,KAAK,EAAE,QAAQ,GAAG,KAAK,EAAE,yBAAyB,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IAErG,MAAM,eAAe,GAAG,OAAO,CAC7B,GAAG,EAAE,CAAC,+BAA+B,CAAC,qBAAqB,EAAE,QAAQ,CAAC,EACtE,CAAC,qBAAqB,EAAE,QAAQ,CAAC,CAClC,CAAC;IACF,MAAM,aAAa,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,eAAe,CAAC,sBAAsB,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC;IAEnH,OAAO,CACL,oBAAC,KAAK,IAAC,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE;QAC/C,oBAAC,2BAA2B,IAC1B,GAAG,EAAC,+BAA+B,EACnC,eAAe,EAAE,eAAe,EAChC,uBAAuB,EAAE,aAAa,EACtC,aAAa,EACX,QAAQ,CAAC,CAAC,CAAC,sCAAsC,CAAC,KAAK,CAAC,CAAC,CAAC,sCAAsC,CAAC,KAAK,EAExG,cAAc,EAAE,+BAA+B,EAC/C,WAAW,EAAE,sBAAsB,IAElC,yBAAyB,CACE,CACxB,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { concatStyleSets, Stack } from '@fluentui/react';\nimport React, { useMemo } from 'react';\nimport { HorizontalGalleryStyles } from '../HorizontalGallery';\nimport { ResponsiveHorizontalGallery } from '../ResponsiveHorizontalGallery';\nimport { HORIZONTAL_GALLERY_BUTTON_WIDTH, HORIZONTAL_GALLERY_GAP } from '../styles/HorizontalGallery.styles';\nimport {\n horizontalGalleryContainerStyle,\n horizontalGalleryStyle,\n LARGE_HORIZONTAL_GALLERY_TILE_SIZE_REM,\n SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM\n} from './styles/VideoGalleryResponsiveHorizontalGallery.styles';\n\n/**\n * A ResponsiveHorizontalGallery styled for the @link{VideoGallery}\n */\nexport const VideoGalleryResponsiveHorizontalGallery = (props: {\n shouldFloatLocalVideo?: boolean;\n isNarrow?: boolean;\n horizontalGalleryElements?: JSX.Element[];\n styles?: HorizontalGalleryStyles;\n}): JSX.Element => {\n const { shouldFloatLocalVideo = false, isNarrow = false, horizontalGalleryElements, styles } = props;\n\n const containerStyles = useMemo(\n () => horizontalGalleryContainerStyle(shouldFloatLocalVideo, isNarrow),\n [shouldFloatLocalVideo, isNarrow]\n );\n const galleryStyles = useMemo(() => concatStyleSets(horizontalGalleryStyle(isNarrow), styles), [isNarrow, styles]);\n\n return (\n <Stack styles={{ root: { paddingTop: '0.5rem' } }}>\n <ResponsiveHorizontalGallery\n key=\"responsive-horizontal-gallery\"\n containerStyles={containerStyles}\n horizontalGalleryStyles={galleryStyles}\n childWidthRem={\n isNarrow ? SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM.width : LARGE_HORIZONTAL_GALLERY_TILE_SIZE_REM.width\n }\n buttonWidthRem={HORIZONTAL_GALLERY_BUTTON_WIDTH}\n gapWidthRem={HORIZONTAL_GALLERY_GAP}\n >\n {horizontalGalleryElements}\n </ResponsiveHorizontalGallery>\n </Stack>\n );\n};\n"]}
1
+ {"version":3,"file":"VideoGalleryResponsiveHorizontalGallery.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/VideoGallery/VideoGalleryResponsiveHorizontalGallery.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,2BAA2B,EAAE,MAAM,gCAAgC,CAAC;AAC7E,OAAO,EAAE,+BAA+B,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC7G,OAAO,EACL,+BAA+B,EAC/B,sBAAsB,EACtB,sCAAsC,EACtC,sCAAsC,EACvC,MAAM,yDAAyD,CAAC;AAEjE;;;;GAIG;AACH,MAAM,CAAC,MAAM,uCAAuC,GAAG,CAAC,KAKvD,EAAe,EAAE;IAChB,MAAM,EAAE,qBAAqB,GAAG,KAAK,EAAE,QAAQ,GAAG,KAAK,EAAE,yBAAyB,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IAErG,MAAM,eAAe,GAAG,OAAO,CAC7B,GAAG,EAAE,CAAC,+BAA+B,CAAC,qBAAqB,EAAE,QAAQ,CAAC,EACtE,CAAC,qBAAqB,EAAE,QAAQ,CAAC,CAClC,CAAC;IACF,MAAM,aAAa,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,eAAe,CAAC,sBAAsB,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC;IAEnH,OAAO,CACL,oBAAC,KAAK,IAAC,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE;QAC/C,oBAAC,2BAA2B,IAC1B,GAAG,EAAC,+BAA+B,EACnC,eAAe,EAAE,eAAe,EAChC,uBAAuB,EAAE,aAAa,EACtC,aAAa,EACX,QAAQ,CAAC,CAAC,CAAC,sCAAsC,CAAC,KAAK,CAAC,CAAC,CAAC,sCAAsC,CAAC,KAAK,EAExG,cAAc,EAAE,+BAA+B,EAC/C,WAAW,EAAE,sBAAsB,IAElC,yBAAyB,CACE,CACxB,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { concatStyleSets, Stack } from '@fluentui/react';\nimport React, { useMemo } from 'react';\nimport { HorizontalGalleryStyles } from '../HorizontalGallery';\nimport { ResponsiveHorizontalGallery } from '../ResponsiveHorizontalGallery';\nimport { HORIZONTAL_GALLERY_BUTTON_WIDTH, HORIZONTAL_GALLERY_GAP } from '../styles/HorizontalGallery.styles';\nimport {\n horizontalGalleryContainerStyle,\n horizontalGalleryStyle,\n LARGE_HORIZONTAL_GALLERY_TILE_SIZE_REM,\n SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM\n} from './styles/VideoGalleryResponsiveHorizontalGallery.styles';\n\n/**\n * A ResponsiveHorizontalGallery styled for the {@link VideoGallery}\n *\n * @private\n */\nexport const VideoGalleryResponsiveHorizontalGallery = (props: {\n shouldFloatLocalVideo?: boolean;\n isNarrow?: boolean;\n horizontalGalleryElements?: JSX.Element[];\n styles?: HorizontalGalleryStyles;\n}): JSX.Element => {\n const { shouldFloatLocalVideo = false, isNarrow = false, horizontalGalleryElements, styles } = props;\n\n const containerStyles = useMemo(\n () => horizontalGalleryContainerStyle(shouldFloatLocalVideo, isNarrow),\n [shouldFloatLocalVideo, isNarrow]\n );\n const galleryStyles = useMemo(() => concatStyleSets(horizontalGalleryStyle(isNarrow), styles), [isNarrow, styles]);\n\n return (\n <Stack styles={{ root: { paddingTop: '0.5rem' } }}>\n <ResponsiveHorizontalGallery\n key=\"responsive-horizontal-gallery\"\n containerStyles={containerStyles}\n horizontalGalleryStyles={galleryStyles}\n childWidthRem={\n isNarrow ? SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM.width : LARGE_HORIZONTAL_GALLERY_TILE_SIZE_REM.width\n }\n buttonWidthRem={HORIZONTAL_GALLERY_BUTTON_WIDTH}\n gapWidthRem={HORIZONTAL_GALLERY_GAP}\n >\n {horizontalGalleryElements}\n </ResponsiveHorizontalGallery>\n </Stack>\n );\n};\n"]}
@@ -17,6 +17,7 @@ export declare const SMALL_FLOATING_MODAL_SIZE_PX: {
17
17
  };
18
18
  /**
19
19
  * Large floating modal width and height in rem for large screen
20
+ * Aspect ratio: 16:9
20
21
  */
21
22
  export declare const LARGE_FLOATING_MODAL_SIZE_PX: {
22
23
  width: number;
@@ -18,8 +18,9 @@ export const videoGalleryContainerStyle = {
18
18
  export const SMALL_FLOATING_MODAL_SIZE_PX = { width: 64, height: 88 };
19
19
  /**
20
20
  * Large floating modal width and height in rem for large screen
21
+ * Aspect ratio: 16:9
21
22
  */
22
- export const LARGE_FLOATING_MODAL_SIZE_PX = { width: 160, height: 120 };
23
+ export const LARGE_FLOATING_MODAL_SIZE_PX = { width: 215, height: 120 };
23
24
  /**
24
25
  * @private
25
26
  * z-index to ensure that the local video tile is above the video gallery.
@@ -1 +1 @@
1
- {"version":3,"file":"FloatingLocalVideo.styles.js","sourceRoot":"","sources":["../../../../../../../../react-components/src/components/VideoGallery/styles/FloatingLocalVideo.styles.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,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H,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,KAAY,EAAiB,EAAE;IAC/E,OAAO;QACL,IAAI,EAAE;YACJ,QAAQ,EAAE,UAAU;YACpB,KAAK,EAAE,QAAQ,CAAC,EAAE,CAAC;YACnB,MAAM,EAAE,QAAQ,CAAC,EAAE,CAAC;YACpB,KAAK,EAAE,MAAM;YACb,GAAG,EAAE,MAAM;YACX,KAAK,EAAE,SAAS;YAChB,MAAM,EAAE,CAAC;YACT,UAAU,EAAE,iBAAiB;YAC7B,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC,cAAc;SAC3C;QACD,WAAW,EAAE;YACX,yFAAyF;YACzF,KAAK,EAAE,SAAS;YAChB,UAAU,EAAE,iBAAiB,CAAC,6EAA6E;SAC5G;QACD,IAAI,EAAE;YACJ,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC;YACxB,YAAY,EAAE,QAAQ,CAAC,CAAC,CAAC;YACzB,MAAM,EAAE,CAAC;SACV;QACD,aAAa,EAAE;YACb,aAAa,EAAE,QAAQ,CAAC,CAAC,CAAC;SAC3B;KACF,CAAC;AACJ,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAA0B;IAC1D,yBAAyB,EAAE;QACzB,MAAM,EAAE,uBAAuB,GAAG,CAAC,CAAC,qFAAqF;KAC1H;CACF,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n concatStyleSets,\n IButtonStyles,\n IModalStyleProps,\n IModalStyles,\n IStackStyles,\n IStyle,\n IStyleFunctionOrObject,\n mergeStyles,\n Theme\n} from '@fluentui/react';\nimport { _pxToRem } from '@internal/acs-ui-common';\nimport { VideoTileStylesProps } from '../../VideoTile';\n\n/**\n * @private\n */\nexport const videoGalleryOuterDivStyle = mergeStyles({ position: 'relative', width: '100%', height: '100%' });\n\n/**\n * @private\n */\nexport const videoGalleryContainerStyle: IStackStyles = {\n root: { position: 'relative', height: '100%', width: '100%', padding: '0.5rem' }\n};\n\n/**\n * Small floating modal width and height in rem for small screen\n */\nexport const SMALL_FLOATING_MODAL_SIZE_PX = { width: 64, height: 88 };\n\n/**\n * Large floating modal width and height in rem for large screen\n */\nexport const LARGE_FLOATING_MODAL_SIZE_PX = { width: 160, height: 120 };\n\n/**\n * @private\n * z-index to ensure that the local video tile is above the video gallery.\n */\nexport const LOCAL_VIDEO_TILE_ZINDEX = 2;\n\n/**\n * @private\n */\nexport const localVideoTileContainerStyle = (theme: Theme, isNarrow?: boolean): IStyle => {\n return {\n minWidth: isNarrow ? _pxToRem(SMALL_FLOATING_MODAL_SIZE_PX.width) : _pxToRem(LARGE_FLOATING_MODAL_SIZE_PX.width),\n minHeight: isNarrow ? _pxToRem(SMALL_FLOATING_MODAL_SIZE_PX.height) : _pxToRem(LARGE_FLOATING_MODAL_SIZE_PX.height),\n position: 'absolute',\n bottom: _pxToRem(localVideoTileOuterPaddingPX),\n borderRadius: theme.effects.roundedCorner4,\n overflow: 'hidden',\n ...(theme.rtl\n ? { left: _pxToRem(localVideoTileOuterPaddingPX) }\n : { right: _pxToRem(localVideoTileOuterPaddingPX) })\n };\n};\n\n/**\n * @private\n */\nexport const localVideoTileWithControlsContainerStyle = (theme: Theme, isNarrow?: boolean): IStackStyles => {\n return concatStyleSets(localVideoTileContainerStyle(theme, isNarrow), {\n root: { boxShadow: theme.effects.elevation8 }\n });\n};\n\n/**\n * @private\n */\nexport const floatingLocalVideoModalStyle = (\n theme: Theme,\n isNarrow?: boolean\n): IStyleFunctionOrObject<IModalStyleProps, IModalStyles> => {\n return concatStyleSets(\n {\n main: localVideoTileContainerStyle(theme, isNarrow)\n },\n {\n main: {\n boxShadow: theme.effects.elevation8,\n ':focus-within': {\n boxShadow: theme.effects.elevation16,\n border: `${_pxToRem(2)} solid ${theme.palette.neutralPrimary}`\n }\n }\n },\n localVideoModalStyles\n );\n};\n\n/**\n * Padding equal to the amount the modal should stay inside the bounds of the container.\n * i.e. if this is 8px, the modal should always be at least 8px inside the container at all times on all sides.\n * @private\n */\nexport const localVideoTileOuterPaddingPX = 8;\n\n/**\n * @private\n */\nexport const floatingLocalVideoTileStyle: VideoTileStylesProps = {\n root: {\n position: 'absolute',\n zIndex: LOCAL_VIDEO_TILE_ZINDEX,\n height: '100%',\n width: '100%'\n }\n};\n\n/**\n * @private\n */\nexport const localVideoCameraCycleButtonStyles = (theme: Theme): IButtonStyles => {\n return {\n root: {\n position: 'absolute',\n width: _pxToRem(32),\n height: _pxToRem(32),\n right: '0rem',\n top: '0rem',\n color: '#FFFFFF', // only shows up on running video feed to we want to force specific colours.\n zIndex: 2, // shows the button directly over the local video feed.\n background: 'rgba(0,0,0,0.4)',\n borderRadius: theme.effects.roundedCorner2\n },\n rootFocused: {\n // styles to remove the unwanted white highlight and blue colour after tapping on button.\n color: '#FFFFFF',\n background: 'rgba(0,0,0,0.4)' // sets opacity of background to be visible on all backdrops in video stream.\n },\n icon: {\n paddingLeft: _pxToRem(3),\n paddingRight: _pxToRem(3),\n margin: 0\n },\n flexContainer: {\n paddingBottom: _pxToRem(8)\n }\n };\n};\n\n/**\n * Styles for the local video tile modal when it is focused, will cause keyboard move icon to appear over video\n * @private\n */\nexport const localVideoModalStyles: Partial<IModalStyles> = {\n keyboardMoveIconContainer: {\n zIndex: LOCAL_VIDEO_TILE_ZINDEX + 1 // zIndex to set the keyboard movement Icon above the other layers in the video tile.\n }\n};\n\"../../../../../acs-ui-common/src\""]}
1
+ {"version":3,"file":"FloatingLocalVideo.styles.js","sourceRoot":"","sources":["../../../../../../../../react-components/src/components/VideoGallery/styles/FloatingLocalVideo.styles.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EACL,eAAe,EAOf,WAAW,EAEZ,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,QAAQ,EAAE,yCAAgC;AAGnD;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,WAAW,CAAC,EAAE,Q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Q,CAAC,EAAE,CAAC;YACpB,KAAK,EAAE,MAAM;YACb,GAAG,EAAE,MAAM;YACX,KAAK,EAAE,SAAS;YAChB,MAAM,EAAE,CAAC;YACT,UAAU,EAAE,iBAAiB;YAC7B,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC,cAAc;SAC3C;QACD,WAAW,EAAE;YACX,yFAAyF;YACzF,KAAK,EAAE,SAAS;YAChB,UAAU,EAAE,iBAAiB,CAAC,6EAA6E;SAC5G;QACD,IAAI,EAAE;YACJ,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC;YACxB,YAAY,EAAE,QAAQ,CAAC,CAAC,CAAC;YACzB,MAAM,EAAE,CAAC;SACV;QACD,aAAa,EAAE;YACb,aAAa,EAAE,QAAQ,CAAC,CAAC,CAAC;SAC3B;KACF,CAAC;AACJ,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAA0B;IAC1D,yBAAyB,EAAE;QACzB,MAAM,EAAE,uBAAuB,GAAG,CAAC,CAAC,qFAAqF;KAC1H;CACF,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n concatStyleSets,\n IButtonStyles,\n IModalStyleProps,\n IModalStyles,\n IStackStyles,\n IStyle,\n IStyleFunctionOrObject,\n mergeStyles,\n Theme\n} from '@fluentui/react';\nimport { _pxToRem } from '@internal/acs-ui-common';\nimport { VideoTileStylesProps } from '../../VideoTile';\n\n/**\n * @private\n */\nexport const videoGalleryOuterDivStyle = mergeStyles({ position: 'relative', width: '100%', height: '100%' });\n\n/**\n * @private\n */\nexport const videoGalleryContainerStyle: IStackStyles = {\n root: { position: 'relative', height: '100%', width: '100%', padding: '0.5rem' }\n};\n\n/**\n * Small floating modal width and height in rem for small screen\n */\nexport const SMALL_FLOATING_MODAL_SIZE_PX = { width: 64, height: 88 };\n\n/**\n * Large floating modal width and height in rem for large screen\n * Aspect ratio: 16:9\n */\nexport const LARGE_FLOATING_MODAL_SIZE_PX = { width: 215, height: 120 };\n\n/**\n * @private\n * z-index to ensure that the local video tile is above the video gallery.\n */\nexport const LOCAL_VIDEO_TILE_ZINDEX = 2;\n\n/**\n * @private\n */\nexport const localVideoTileContainerStyle = (theme: Theme, isNarrow?: boolean): IStyle => {\n return {\n minWidth: isNarrow ? _pxToRem(SMALL_FLOATING_MODAL_SIZE_PX.width) : _pxToRem(LARGE_FLOATING_MODAL_SIZE_PX.width),\n minHeight: isNarrow ? _pxToRem(SMALL_FLOATING_MODAL_SIZE_PX.height) : _pxToRem(LARGE_FLOATING_MODAL_SIZE_PX.height),\n position: 'absolute',\n bottom: _pxToRem(localVideoTileOuterPaddingPX),\n borderRadius: theme.effects.roundedCorner4,\n overflow: 'hidden',\n ...(theme.rtl\n ? { left: _pxToRem(localVideoTileOuterPaddingPX) }\n : { right: _pxToRem(localVideoTileOuterPaddingPX) })\n };\n};\n\n/**\n * @private\n */\nexport const localVideoTileWithControlsContainerStyle = (theme: Theme, isNarrow?: boolean): IStackStyles => {\n return concatStyleSets(localVideoTileContainerStyle(theme, isNarrow), {\n root: { boxShadow: theme.effects.elevation8 }\n });\n};\n\n/**\n * @private\n */\nexport const floatingLocalVideoModalStyle = (\n theme: Theme,\n isNarrow?: boolean\n): IStyleFunctionOrObject<IModalStyleProps, IModalStyles> => {\n return concatStyleSets(\n {\n main: localVideoTileContainerStyle(theme, isNarrow)\n },\n {\n main: {\n boxShadow: theme.effects.elevation8,\n ':focus-within': {\n boxShadow: theme.effects.elevation16,\n border: `${_pxToRem(2)} solid ${theme.palette.neutralPrimary}`\n }\n }\n },\n localVideoModalStyles\n );\n};\n\n/**\n * Padding equal to the amount the modal should stay inside the bounds of the container.\n * i.e. if this is 8px, the modal should always be at least 8px inside the container at all times on all sides.\n * @private\n */\nexport const localVideoTileOuterPaddingPX = 8;\n\n/**\n * @private\n */\nexport const floatingLocalVideoTileStyle: VideoTileStylesProps = {\n root: {\n position: 'absolute',\n zIndex: LOCAL_VIDEO_TILE_ZINDEX,\n height: '100%',\n width: '100%'\n }\n};\n\n/**\n * @private\n */\nexport const localVideoCameraCycleButtonStyles = (theme: Theme): IButtonStyles => {\n return {\n root: {\n position: 'absolute',\n width: _pxToRem(32),\n height: _pxToRem(32),\n right: '0rem',\n top: '0rem',\n color: '#FFFFFF', // only shows up on running video feed to we want to force specific colours.\n zIndex: 2, // shows the button directly over the local video feed.\n background: 'rgba(0,0,0,0.4)',\n borderRadius: theme.effects.roundedCorner2\n },\n rootFocused: {\n // styles to remove the unwanted white highlight and blue colour after tapping on button.\n color: '#FFFFFF',\n background: 'rgba(0,0,0,0.4)' // sets opacity of background to be visible on all backdrops in video stream.\n },\n icon: {\n paddingLeft: _pxToRem(3),\n paddingRight: _pxToRem(3),\n margin: 0\n },\n flexContainer: {\n paddingBottom: _pxToRem(8)\n }\n };\n};\n\n/**\n * Styles for the local video tile modal when it is focused, will cause keyboard move icon to appear over video\n * @private\n */\nexport const localVideoModalStyles: Partial<IModalStyles> = {\n keyboardMoveIconContainer: {\n zIndex: LOCAL_VIDEO_TILE_ZINDEX + 1 // zIndex to set the keyboard movement Icon above the other layers in the video tile.\n }\n};\n\"../../../../../acs-ui-common/src\""]}
@@ -1,19 +1,5 @@
1
1
  import { IStyle } from '@fluentui/react';
2
2
  import { HorizontalGalleryStyles } from '../../HorizontalGallery';
3
- /**
4
- * Small floating modal width and height in rem for small screen
5
- */
6
- export declare const SMALL_FLOATING_MODAL_SIZE_PX: {
7
- width: number;
8
- height: number;
9
- };
10
- /**
11
- * Large floating modal width and height in rem for large screen
12
- */
13
- export declare const LARGE_FLOATING_MODAL_SIZE_PX: {
14
- width: number;
15
- height: number;
16
- };
17
3
  /**
18
4
  * @private
19
5
  */
@@ -1,14 +1,7 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT license.
3
3
  import { _pxToRem } from "../../../../../acs-ui-common/src";
4
- /**
5
- * Small floating modal width and height in rem for small screen
6
- */
7
- export const SMALL_FLOATING_MODAL_SIZE_PX = { width: 64, height: 88 };
8
- /**
9
- * Large floating modal width and height in rem for large screen
10
- */
11
- export const LARGE_FLOATING_MODAL_SIZE_PX = { width: 160, height: 120 };
4
+ import { LARGE_FLOATING_MODAL_SIZE_PX, SMALL_FLOATING_MODAL_SIZE_PX } from './FloatingLocalVideo.styles';
12
5
  /**
13
6
  * @private
14
7
  */
@@ -1 +1 @@
1
- {"version":3,"file":"VideoGalleryResponsiveHorizontalGallery.styles.js","sourceRoot":"","sources":["../../../../../../../../react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveHorizontalGallery.styles.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,QAAQ,EAAE,yCAAgC;AAGnD;;GAEG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;AAEtE;;GAEG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;AAExE;;GAEG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,qBAA8B,EAAE,QAAiB,EAAU,EAAE;IAC3G,OAAO;QACL,SAAS,EAAE,QAAQ;YACjB,CAAC,CAAC,GAAG,sCAAsC,CAAC,MAAM,KAAK;YACvD,CAAC,CAAC,GAAG,sCAAsC,CAAC,MAAM,KAAK;QACzD,KAAK,EAAE,qBAAqB;YAC1B,CAAC,CAAC,QAAQ;gBACR,CAAC,CAAC,eAAe,QAAQ,CAAC,4BAA4B,CAAC,KAAK,CAAC,GAAG;gBAChE,CAAC,CAAC,eAAe,QAAQ,CAAC,4BAA4B,CAAC,KAAK,CAAC,GAAG;YAClE,CAAC,CAAC,MAAM;QACV,YAAY,EAAE,QAAQ;KACvB,CAAC;AACJ,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,QAAiB,EAA2B,EAAE;IACnF,OAAO;QACL,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,mCAAmC,CAAC,CAAC,CAAC,mCAAmC;KAC/F,CAAC;AACJ,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,sCAAsC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC;AAClF;;;GAGG;AACH,MAAM,CAAC,MAAM,sCAAsC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;AAEjF;;GAEG;AACH,MAAM,CAAC,MAAM,mCAAmC,GAAG;IACjD,SAAS,EAAE,GAAG,sCAAsC,CAAC,MAAM,KAAK;IAChE,QAAQ,EAAE,GAAG,sCAAsC,CAAC,KAAK,KAAK;IAC9D,SAAS,EAAE,GAAG,sCAAsC,CAAC,MAAM,KAAK;IAChE,QAAQ,EAAE,GAAG,sCAAsC,CAAC,KAAK,KAAK;CAC/D,CAAC;AACF;;GAEG;AACH,MAAM,CAAC,MAAM,mCAAmC,GAAG;IACjD,SAAS,EAAE,GAAG,sCAAsC,CAAC,MAAM,KAAK;IAChE,QAAQ,EAAE,GAAG,sCAAsC,CAAC,KAAK,KAAK;IAC9D,SAAS,EAAE,GAAG,sCAAsC,CAAC,MAAM,KAAK;IAChE,QAAQ,EAAE,GAAG,sCAAsC,CAAC,KAAK,KAAK;CAC/D,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { IStyle } from '@fluentui/react';\nimport { _pxToRem } from '@internal/acs-ui-common';\nimport { HorizontalGalleryStyles } from '../../HorizontalGallery';\n\n/**\n * Small floating modal width and height in rem for small screen\n */\nexport const SMALL_FLOATING_MODAL_SIZE_PX = { width: 64, height: 88 };\n\n/**\n * Large floating modal width and height in rem for large screen\n */\nexport const LARGE_FLOATING_MODAL_SIZE_PX = { width: 160, height: 120 };\n\n/**\n * @private\n */\nexport const horizontalGalleryContainerStyle = (shouldFloatLocalVideo: boolean, isNarrow: boolean): IStyle => {\n return {\n minHeight: isNarrow\n ? `${SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM.height}rem`\n : `${LARGE_HORIZONTAL_GALLERY_TILE_SIZE_REM.height}rem`,\n width: shouldFloatLocalVideo\n ? isNarrow\n ? `calc(100% - ${_pxToRem(SMALL_FLOATING_MODAL_SIZE_PX.width)})`\n : `calc(100% - ${_pxToRem(LARGE_FLOATING_MODAL_SIZE_PX.width)})`\n : '100%',\n paddingRight: '0.5rem'\n };\n};\n\n/**\n * @private\n */\nexport const horizontalGalleryStyle = (isNarrow: boolean): HorizontalGalleryStyles => {\n return {\n children: isNarrow ? SMALL_HORIZONTAL_GALLERY_TILE_STYLE : LARGE_HORIZONTAL_GALLERY_TILE_STYLE\n };\n};\n\n/**\n * Small horizontal gallery tile size in rem\n * @private\n */\nexport const SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM = { height: 5.5, width: 5.5 };\n/**\n * Large horizontal gallery tile size in rem\n * @private\n */\nexport const LARGE_HORIZONTAL_GALLERY_TILE_SIZE_REM = { height: 7.5, width: 10 };\n\n/**\n * @private\n */\nexport const SMALL_HORIZONTAL_GALLERY_TILE_STYLE = {\n minHeight: `${SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM.height}rem`,\n minWidth: `${SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM.width}rem`,\n maxHeight: `${SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM.height}rem`,\n maxWidth: `${SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM.width}rem`\n};\n/**\n * @private\n */\nexport const LARGE_HORIZONTAL_GALLERY_TILE_STYLE = {\n minHeight: `${LARGE_HORIZONTAL_GALLERY_TILE_SIZE_REM.height}rem`,\n minWidth: `${LARGE_HORIZONTAL_GALLERY_TILE_SIZE_REM.width}rem`,\n maxHeight: `${LARGE_HORIZONTAL_GALLERY_TILE_SIZE_REM.height}rem`,\n maxWidth: `${LARGE_HORIZONTAL_GALLERY_TILE_SIZE_REM.width}rem`\n};\n\"../../../../../acs-ui-common/src\""]}
1
+ {"version":3,"file":"VideoGalleryResponsiveHorizontalGallery.styles.js","sourceRoot":"","sources":["../../../../../../../../react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveHorizontalGallery.styles.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,QAAQ,EAAE,yCAAgC;AAEnD,OAAO,EAAE,4BAA4B,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAC;AAEzG;;GAEG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,qBAA8B,EAAE,QAAiB,EAAU,EAAE;IAC3G,OAAO;QACL,SAAS,EAAE,QAAQ;YACjB,CAAC,CAAC,GAAG,sCAAsC,CAAC,MAAM,KAAK;YACvD,CAAC,CAAC,GAAG,sCAAsC,CAAC,MAAM,KAAK;QACzD,KAAK,EAAE,qBAAqB;YAC1B,CAAC,CAAC,QAAQ;gBACR,CAAC,CAAC,eAAe,QAAQ,CAAC,4BAA4B,CAAC,KAAK,CAAC,GAAG;gBAChE,CAAC,CAAC,eAAe,QAAQ,CAAC,4BAA4B,CAAC,KAAK,CAAC,GAAG;YAClE,CAAC,CAAC,MAAM;QACV,YAAY,EAAE,QAAQ;KACvB,CAAC;AACJ,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,QAAiB,EAA2B,EAAE;IACnF,OAAO;QACL,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,mCAAmC,CAAC,CAAC,CAAC,mCAAmC;KAC/F,CAAC;AACJ,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,sCAAsC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC;AAClF;;;GAGG;AACH,MAAM,CAAC,MAAM,sCAAsC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;AAEjF;;GAEG;AACH,MAAM,CAAC,MAAM,mCAAmC,GAAG;IACjD,SAAS,EAAE,GAAG,sCAAsC,CAAC,MAAM,KAAK;IAChE,QAAQ,EAAE,GAAG,sCAAsC,CAAC,KAAK,KAAK;IAC9D,SAAS,EAAE,GAAG,sCAAsC,CAAC,MAAM,KAAK;IAChE,QAAQ,EAAE,GAAG,sCAAsC,CAAC,KAAK,KAAK;CAC/D,CAAC;AACF;;GAEG;AACH,MAAM,CAAC,MAAM,mCAAmC,GAAG;IACjD,SAAS,EAAE,GAAG,sCAAsC,CAAC,MAAM,KAAK;IAChE,QAAQ,EAAE,GAAG,sCAAsC,CAAC,KAAK,KAAK;IAC9D,SAAS,EAAE,GAAG,sCAAsC,CAAC,MAAM,KAAK;IAChE,QAAQ,EAAE,GAAG,sCAAsC,CAAC,KAAK,KAAK;CAC/D,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { IStyle } from '@fluentui/react';\nimport { _pxToRem } from '@internal/acs-ui-common';\nimport { HorizontalGalleryStyles } from '../../HorizontalGallery';\nimport { LARGE_FLOATING_MODAL_SIZE_PX, SMALL_FLOATING_MODAL_SIZE_PX } from './FloatingLocalVideo.styles';\n\n/**\n * @private\n */\nexport const horizontalGalleryContainerStyle = (shouldFloatLocalVideo: boolean, isNarrow: boolean): IStyle => {\n return {\n minHeight: isNarrow\n ? `${SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM.height}rem`\n : `${LARGE_HORIZONTAL_GALLERY_TILE_SIZE_REM.height}rem`,\n width: shouldFloatLocalVideo\n ? isNarrow\n ? `calc(100% - ${_pxToRem(SMALL_FLOATING_MODAL_SIZE_PX.width)})`\n : `calc(100% - ${_pxToRem(LARGE_FLOATING_MODAL_SIZE_PX.width)})`\n : '100%',\n paddingRight: '0.5rem'\n };\n};\n\n/**\n * @private\n */\nexport const horizontalGalleryStyle = (isNarrow: boolean): HorizontalGalleryStyles => {\n return {\n children: isNarrow ? SMALL_HORIZONTAL_GALLERY_TILE_STYLE : LARGE_HORIZONTAL_GALLERY_TILE_STYLE\n };\n};\n\n/**\n * Small horizontal gallery tile size in rem\n * @private\n */\nexport const SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM = { height: 5.5, width: 5.5 };\n/**\n * Large horizontal gallery tile size in rem\n * @private\n */\nexport const LARGE_HORIZONTAL_GALLERY_TILE_SIZE_REM = { height: 7.5, width: 10 };\n\n/**\n * @private\n */\nexport const SMALL_HORIZONTAL_GALLERY_TILE_STYLE = {\n minHeight: `${SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM.height}rem`,\n minWidth: `${SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM.width}rem`,\n maxHeight: `${SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM.height}rem`,\n maxWidth: `${SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM.width}rem`\n};\n/**\n * @private\n */\nexport const LARGE_HORIZONTAL_GALLERY_TILE_STYLE = {\n minHeight: `${LARGE_HORIZONTAL_GALLERY_TILE_SIZE_REM.height}rem`,\n minWidth: `${LARGE_HORIZONTAL_GALLERY_TILE_SIZE_REM.width}rem`,\n maxHeight: `${LARGE_HORIZONTAL_GALLERY_TILE_SIZE_REM.height}rem`,\n maxWidth: `${LARGE_HORIZONTAL_GALLERY_TILE_SIZE_REM.width}rem`\n};\n\"../../../../../acs-ui-common/src\""]}
@@ -0,0 +1,36 @@
1
+ import { VideoGalleryParticipant, VideoGalleryRemoteParticipant } from '../../../types';
2
+ /**
3
+ * Arguments for {@link useFloatingLocalVideoLayout } to determine grid participants and horizontal participants
4
+ * @private
5
+ */
6
+ export interface UseFloatingLocalVideoLayoutArgs {
7
+ remoteParticipants: VideoGalleryRemoteParticipant[];
8
+ dominantSpeakers?: string[];
9
+ maxRemoteVideoStreams?: number;
10
+ maxAudioDominantSpeakers?: number;
11
+ isScreenShareActive?: boolean;
12
+ }
13
+ /**
14
+ * Arguments for {@link usePinnedParticipantLayout } to determine grid participants and horizontal participants
15
+ * @private
16
+ */
17
+ export interface UsePinnedParticipantLayoutArgs extends UseFloatingLocalVideoLayoutArgs {
18
+ pinnedParticipantUserIds: string[];
19
+ }
20
+ /**
21
+ * A layout result that defines grid participants and horizontal participants
22
+ * @private
23
+ */
24
+ export interface LayoutResult {
25
+ gridParticipants: VideoGalleryParticipant[];
26
+ horizontalGalleryParticipants: VideoGalleryParticipant[];
27
+ }
28
+ /**
29
+ * @private
30
+ */
31
+ export declare const useFloatingLocalVideoLayout: (props: UseFloatingLocalVideoLayoutArgs) => LayoutResult;
32
+ /**
33
+ * @private
34
+ */
35
+ export declare const usePinnedParticipantLayout: (props: UsePinnedParticipantLayoutArgs) => LayoutResult;
36
+ //# sourceMappingURL=videoGalleryLayoutUtils.d.ts.map
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT license.
3
3
  import { useCallback, useRef } from 'react';
4
- import { smartDominantSpeakerParticipants } from '../../gallery';
4
+ import { smartDominantSpeakerParticipants } from '../../../gallery';
5
5
  const DEFAULT_MAX_REMOTE_VIDEOSTREAMS = 4;
6
6
  const DEFAULT_MAX_AUDIO_DOMINANT_SPEAKERS = 6;
7
7
  /**
@@ -69,4 +69,48 @@ export const useFloatingLocalVideoLayout = (props) => {
69
69
  const horizontalGalleryParticipants = getHorizontalGalleryRemoteParticipants();
70
70
  return { gridParticipants, horizontalGalleryParticipants };
71
71
  };
72
- //# sourceMappingURL=videoGalleryUtils.js.map
72
+ /**
73
+ * @private
74
+ */
75
+ export const usePinnedParticipantLayout = (props) => {
76
+ // map remote participants by userId
77
+ const remoteParticipantMap = props.remoteParticipants.reduce((map, remoteParticipant) => {
78
+ map[remoteParticipant.userId] = remoteParticipant;
79
+ return map;
80
+ }, {});
81
+ // count pinned participants with video
82
+ let pinnedParticipantsWithVideoOnCount = 0;
83
+ // get pinned participants in the same order of pinned participant user ids using remoteParticipantMap
84
+ const pinnedParticipants = [];
85
+ props.pinnedParticipantUserIds.forEach((id) => {
86
+ var _a;
87
+ const pinnedParticipant = remoteParticipantMap[id];
88
+ if (pinnedParticipant) {
89
+ pinnedParticipants.push(pinnedParticipant);
90
+ if ((_a = pinnedParticipant.videoStream) === null || _a === void 0 ? void 0 : _a.isAvailable) {
91
+ pinnedParticipantsWithVideoOnCount++;
92
+ }
93
+ }
94
+ });
95
+ // get unpinned participants by filtering all remote participants using a set of pinned participant user ids
96
+ const pinnedParticipantUserIdSet = new Set(props.pinnedParticipantUserIds);
97
+ const unpinnedParticipants = props.remoteParticipants.filter((p) => !pinnedParticipantUserIdSet.has(p.userId));
98
+ const floatingLocalVideoLayoutProps = Object.assign(Object.assign({}, props), {
99
+ // if there are pinned participants then we should only consider unpinned participants
100
+ remoteParticipants: unpinnedParticipants,
101
+ // if there is a maximum of remote video streams we need to subtract pinned participants with video
102
+ maxRemoteVideoStreams: props.maxRemoteVideoStreams
103
+ ? props.maxRemoteVideoStreams - pinnedParticipantsWithVideoOnCount
104
+ : undefined });
105
+ const floatingLocalVideoLayout = useFloatingLocalVideoLayout(floatingLocalVideoLayoutProps);
106
+ if (props.pinnedParticipantUserIds.length === 0) {
107
+ return floatingLocalVideoLayout;
108
+ }
109
+ return {
110
+ gridParticipants: props.isScreenShareActive ? [] : pinnedParticipants,
111
+ horizontalGalleryParticipants: props.isScreenShareActive
112
+ ? pinnedParticipants.concat(floatingLocalVideoLayout.horizontalGalleryParticipants)
113
+ : floatingLocalVideoLayout.gridParticipants.concat(floatingLocalVideoLayout.horizontalGalleryParticipants)
114
+ };
115
+ };
116
+ //# sourceMappingURL=videoGalleryLayoutUtils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"videoGalleryLayoutUtils.js","sourceRoot":"","sources":["../../../../../../../../react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.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CAAC,CAAC,kBAAkB,CAAC,MAAM,CAAC,wBAAwB,CAAC,6BAA6B,CAAC;YACnF,CAAC,CAAC,wBAAwB,CAAC,gBAAgB,CAAC,MAAM,CAAC,wBAAwB,CAAC,6BAA6B,CAAC;KAC7G,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { useCallback, useRef } from 'react';\nimport { smartDominantSpeakerParticipants } from '../../../gallery';\nimport { VideoGalleryParticipant, VideoGalleryRemoteParticipant } from '../../../types';\n\n/**\n * Arguments for {@link useFloatingLocalVideoLayout } to determine grid participants and horizontal participants\n * @private\n */\nexport interface UseFloatingLocalVideoLayoutArgs {\n remoteParticipants: VideoGalleryRemoteParticipant[];\n dominantSpeakers?: string[];\n maxRemoteVideoStreams?: number;\n maxAudioDominantSpeakers?: number;\n isScreenShareActive?: boolean;\n}\n\n/**\n * Arguments for {@link usePinnedParticipantLayout } to determine grid participants and horizontal participants\n * @private\n */\nexport interface UsePinnedParticipantLayoutArgs extends UseFloatingLocalVideoLayoutArgs {\n pinnedParticipantUserIds: string[];\n}\n\n/**\n * A layout result that defines grid participants and horizontal participants\n * @private\n */\nexport interface LayoutResult {\n gridParticipants: VideoGalleryParticipant[];\n horizontalGalleryParticipants: VideoGalleryParticipant[];\n}\n\nconst DEFAULT_MAX_REMOTE_VIDEOSTREAMS = 4;\n\nconst DEFAULT_MAX_AUDIO_DOMINANT_SPEAKERS = 6;\n\n/**\n * @private\n */\nexport const useFloatingLocalVideoLayout = (props: UseFloatingLocalVideoLayoutArgs): LayoutResult => {\n const visibleVideoParticipants = useRef<VideoGalleryRemoteParticipant[]>([]);\n const visibleAudioParticipants = useRef<VideoGalleryRemoteParticipant[]>([]);\n\n const {\n remoteParticipants,\n dominantSpeakers,\n maxRemoteVideoStreams = DEFAULT_MAX_REMOTE_VIDEOSTREAMS,\n maxAudioDominantSpeakers = DEFAULT_MAX_AUDIO_DOMINANT_SPEAKERS,\n isScreenShareActive = false\n } = props;\n\n visibleVideoParticipants.current = smartDominantSpeakerParticipants({\n participants: remoteParticipants?.filter((p) => p.videoStream?.isAvailable) ?? [],\n dominantSpeakers,\n lastVisibleParticipants: visibleVideoParticipants.current,\n maxDominantSpeakers: maxRemoteVideoStreams\n }).slice(0, maxRemoteVideoStreams);\n\n const visibleVideoParticipantsSet = new Set(visibleVideoParticipants.current.map((p) => p.userId));\n\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n const callingParticipants = remoteParticipants.filter((p) => p.state === ('Connecting' || 'Ringing'));\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n const callingParticipantsSet = new Set(callingParticipants.map((p) => p.userId));\n\n visibleAudioParticipants.current = smartDominantSpeakerParticipants({\n participants:\n remoteParticipants?.filter(\n (p) =>\n !visibleVideoParticipantsSet.has(p.userId) &&\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ !callingParticipantsSet.has(\n p.userId\n )\n ) ?? [],\n dominantSpeakers,\n lastVisibleParticipants: visibleAudioParticipants.current,\n maxDominantSpeakers: maxAudioDominantSpeakers\n });\n\n const getGridParticipants = useCallback((): VideoGalleryRemoteParticipant[] => {\n if (isScreenShareActive) {\n return [];\n }\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n return visibleVideoParticipants.current.length > 0\n ? visibleVideoParticipants.current\n : visibleAudioParticipants.current.concat(callingParticipants);\n return visibleVideoParticipants.current.length > 0\n ? visibleVideoParticipants.current\n : visibleAudioParticipants.current;\n }, [\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ callingParticipants,\n isScreenShareActive\n ]);\n\n const gridParticipants = getGridParticipants();\n\n const getHorizontalGalleryRemoteParticipants = useCallback((): VideoGalleryRemoteParticipant[] => {\n if (isScreenShareActive) {\n // If screen sharing is active, assign video and audio participants as horizontal gallery participants\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n return visibleVideoParticipants.current.concat(visibleAudioParticipants.current.concat(callingParticipants));\n return visibleVideoParticipants.current.concat(visibleAudioParticipants.current);\n } else {\n // If screen sharing is not active, then assign all video tiles as grid tiles.\n // If there are no video tiles, then assign audio tiles as grid tiles.\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n return visibleVideoParticipants.current.length > 0\n ? visibleAudioParticipants.current.concat(callingParticipants)\n : [];\n return visibleVideoParticipants.current.length > 0 ? visibleAudioParticipants.current : [];\n }\n }, [\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ callingParticipants,\n isScreenShareActive\n ]);\n\n const horizontalGalleryParticipants = getHorizontalGalleryRemoteParticipants();\n\n return { gridParticipants, horizontalGalleryParticipants };\n};\n\n/**\n * @private\n */\nexport const usePinnedParticipantLayout = (props: UsePinnedParticipantLayoutArgs): LayoutResult => {\n // map remote participants by userId\n const remoteParticipantMap = props.remoteParticipants.reduce((map, remoteParticipant) => {\n map[remoteParticipant.userId] = remoteParticipant;\n return map;\n }, {});\n\n // count pinned participants with video\n let pinnedParticipantsWithVideoOnCount = 0;\n\n // get pinned participants in the same order of pinned participant user ids using remoteParticipantMap\n const pinnedParticipants: VideoGalleryRemoteParticipant[] = [];\n props.pinnedParticipantUserIds.forEach((id) => {\n const pinnedParticipant = remoteParticipantMap[id];\n if (pinnedParticipant) {\n pinnedParticipants.push(pinnedParticipant);\n if (pinnedParticipant.videoStream?.isAvailable) {\n pinnedParticipantsWithVideoOnCount++;\n }\n }\n });\n\n // get unpinned participants by filtering all remote participants using a set of pinned participant user ids\n const pinnedParticipantUserIdSet = new Set(props.pinnedParticipantUserIds);\n const unpinnedParticipants = props.remoteParticipants.filter((p) => !pinnedParticipantUserIdSet.has(p.userId));\n\n const floatingLocalVideoLayoutProps = {\n ...props,\n // if there are pinned participants then we should only consider unpinned participants\n remoteParticipants: unpinnedParticipants,\n // if there is a maximum of remote video streams we need to subtract pinned participants with video\n maxRemoteVideoStreams: props.maxRemoteVideoStreams\n ? props.maxRemoteVideoStreams - pinnedParticipantsWithVideoOnCount\n : undefined\n };\n\n const floatingLocalVideoLayout = useFloatingLocalVideoLayout(floatingLocalVideoLayoutProps);\n\n if (props.pinnedParticipantUserIds.length === 0) {\n return floatingLocalVideoLayout;\n }\n\n return {\n gridParticipants: props.isScreenShareActive ? [] : pinnedParticipants,\n horizontalGalleryParticipants: props.isScreenShareActive\n ? pinnedParticipants.concat(floatingLocalVideoLayout.horizontalGalleryParticipants)\n : floatingLocalVideoLayout.gridParticipants.concat(floatingLocalVideoLayout.horizontalGalleryParticipants)\n };\n};\n"]}
@@ -116,6 +116,10 @@ export interface VideoGalleryProps {
116
116
  * Camera control information for button to switch cameras.
117
117
  */
118
118
  localVideoCameraCycleButtonProps?: LocalVideoCameraCycleButtonProps;
119
+ /**
120
+ * List of pinned participant userIds
121
+ */
122
+ pinnedParticipants?: string[];
119
123
  /**
120
124
  * Whether to show the remote video tile contextual menu.
121
125
  * @defaultValue `true`
@@ -16,6 +16,8 @@ import { FloatingLocalVideoLayout } from './VideoGallery/FloatingLocalVideoLayou
16
16
  import { useIdentifiers } from '../identifiers';
17
17
  import { videoGalleryOuterDivStyle } from './styles/VideoGallery.styles';
18
18
  import { floatingLocalVideoTileStyle } from './VideoGallery/styles/FloatingLocalVideo.styles';
19
+ /* @conditional-compile-remove(pinned-participants) */
20
+ import { PinnedParticipantsLayout } from './VideoGallery/PinnedParticipantsLayout';
19
21
  /**
20
22
  * @private
21
23
  * Currently the Calling JS SDK supports up to 4 remote video streams
@@ -33,7 +35,7 @@ export const MAX_AUDIO_DOMINANT_SPEAKERS = 6;
33
35
  * @public
34
36
  */
35
37
  export const VideoGallery = (props) => {
36
- var _a, _b;
38
+ var _a, _b, _c;
37
39
  const { localParticipant, remoteParticipants = [], localVideoViewOptions, remoteVideoViewOptions, dominantSpeakers, onRenderLocalVideoTile, onRenderRemoteVideoTile, onCreateLocalStreamView, onDisposeLocalStreamView, onCreateRemoteStreamView, onDisposeRemoteStreamView, styles, layout, onRenderAvatar, showMuteIndicator, maxRemoteVideoStreams = DEFAULT_MAX_REMOTE_VIDEO_STREAMS, showCameraSwitcherInLocalPreview, localVideoCameraCycleButtonProps } = props;
38
40
  const ids = useIdentifiers();
39
41
  const theme = useTheme();
@@ -44,6 +46,11 @@ export const VideoGallery = (props) => {
44
46
  const containerWidth = _useContainerWidth(containerRef);
45
47
  const containerHeight = _useContainerHeight(containerRef);
46
48
  const isNarrow = containerWidth ? isNarrowWidth(containerWidth) : false;
49
+ /* @conditional-compile-remove(pinned-participants) */
50
+ const [pinnedParticipantsState, _] = React.useState([]);
51
+ /* @conditional-compile-remove(pinned-participants) */
52
+ // Use pinnedParticipants from props but if it is not defined use the maintained state of pinned participants
53
+ const pinnedParticipants = (_a = props.pinnedParticipants) !== null && _a !== void 0 ? _a : pinnedParticipantsState;
47
54
  /* @conditional-compile-remove(rooms) */
48
55
  const permissions = _usePermissions();
49
56
  /**
@@ -104,13 +111,50 @@ export const VideoGallery = (props) => {
104
111
  ]);
105
112
  const screenShareParticipant = remoteParticipants.find((participant) => { var _a; return (_a = participant.screenShareStream) === null || _a === void 0 ? void 0 : _a.isAvailable; });
106
113
  const localScreenShareStreamComponent = React.createElement(LocalScreenShare, { localParticipant: localParticipant });
107
- const remoteScreenShareComponent = screenShareParticipant && (React.createElement(RemoteScreenShare, Object.assign({}, screenShareParticipant, { renderElement: (_a = screenShareParticipant.screenShareStream) === null || _a === void 0 ? void 0 : _a.renderElement, onCreateRemoteStreamView: onCreateRemoteStreamView, onDisposeRemoteStreamView: onDisposeRemoteStreamView, isReceiving: (_b = screenShareParticipant.screenShareStream) === null || _b === void 0 ? void 0 : _b.isReceiving })));
114
+ const remoteScreenShareComponent = screenShareParticipant && (React.createElement(RemoteScreenShare, Object.assign({}, screenShareParticipant, { renderElement: (_b = screenShareParticipant.screenShareStream) === null || _b === void 0 ? void 0 : _b.renderElement, onCreateRemoteStreamView: onCreateRemoteStreamView, onDisposeRemoteStreamView: onDisposeRemoteStreamView, isReceiving: (_c = screenShareParticipant.screenShareStream) === null || _c === void 0 ? void 0 : _c.isReceiving })));
108
115
  const screenShareComponent = remoteScreenShareComponent
109
116
  ? remoteScreenShareComponent
110
117
  : localParticipant.isScreenSharingOn
111
118
  ? localScreenShareStreamComponent
112
119
  : undefined;
113
- const videoGalleryLayout = layout === 'floatingLocalVideo' ? (React.createElement(FloatingLocalVideoLayout, { remoteParticipants: remoteParticipants, onRenderRemoteParticipant: onRenderRemoteVideoTile !== null && onRenderRemoteVideoTile !== void 0 ? onRenderRemoteVideoTile : defaultOnRenderVideoTile, localVideoComponent: localVideoTile, screenShareComponent: screenShareComponent, showCameraSwitcherInLocalPreview: showCameraSwitcherInLocalPreview, maxRemoteVideoStreams: maxRemoteVideoStreams, dominantSpeakers: dominantSpeakers, parentWidth: containerWidth, parentHeight: containerHeight, styles: styles })) : (React.createElement(DefaultLayout, { remoteParticipants: remoteParticipants, onRenderRemoteParticipant: onRenderRemoteVideoTile !== null && onRenderRemoteVideoTile !== void 0 ? onRenderRemoteVideoTile : defaultOnRenderVideoTile, localVideoComponent: localVideoTile, screenShareComponent: screenShareComponent, maxRemoteVideoStreams: maxRemoteVideoStreams, dominantSpeakers: dominantSpeakers, parentWidth: containerWidth, styles: styles }));
120
+ const layoutProps = useMemo(() => ({
121
+ remoteParticipants,
122
+ /* @conditional-compile-remove(pinned-participants) */ pinnedParticipants,
123
+ screenShareComponent,
124
+ showCameraSwitcherInLocalPreview,
125
+ maxRemoteVideoStreams,
126
+ dominantSpeakers,
127
+ styles,
128
+ onRenderRemoteParticipant: onRenderRemoteVideoTile !== null && onRenderRemoteVideoTile !== void 0 ? onRenderRemoteVideoTile : defaultOnRenderVideoTile,
129
+ localVideoComponent: localVideoTile,
130
+ parentWidth: containerWidth,
131
+ parentHeight: containerHeight,
132
+ isLocalVideoFloating: layout === 'floatingLocalVideo'
133
+ }), [
134
+ remoteParticipants,
135
+ screenShareComponent,
136
+ showCameraSwitcherInLocalPreview,
137
+ maxRemoteVideoStreams,
138
+ dominantSpeakers,
139
+ styles,
140
+ localVideoTile,
141
+ containerWidth,
142
+ containerHeight,
143
+ onRenderRemoteVideoTile,
144
+ defaultOnRenderVideoTile,
145
+ layout,
146
+ /* @conditional-compile-remove(pinned-participants) */ pinnedParticipants
147
+ ]);
148
+ const videoGalleryLayout = useMemo(() => {
149
+ /* @conditional-compile-remove(pinned-participants) */
150
+ if (layoutProps.pinnedParticipants.length > 0) {
151
+ return React.createElement(PinnedParticipantsLayout, Object.assign({}, layoutProps));
152
+ }
153
+ if (layout === 'floatingLocalVideo') {
154
+ return React.createElement(FloatingLocalVideoLayout, Object.assign({}, layoutProps));
155
+ }
156
+ return React.createElement(DefaultLayout, Object.assign({}, layoutProps));
157
+ }, [layout, layoutProps]);
114
158
  return (React.createElement("div", { "data-ui-id": ids.videoGallery, ref: containerRef, className: mergeStyles(videoGalleryOuterDivStyle, styles === null || styles === void 0 ? void 0 : styles.root) }, videoGalleryLayout));
115
159
  };
116
160
  //# sourceMappingURL=VideoGallery.js.map
@@ -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,iBAAiB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAUtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO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AAkB,EAAE,kBAAkB,EACtC,yBAAyB,EAAE,uBAAuB,aAAvB,uBAAuB,cAAvB,uBAAuB,GAAI,wBAAwB,EAC9E,mBAAmB,EAAE,cAAc,EACnC,oBAAoB,EAAE,oBAAoB,EAC1C,qBAAqB,EAAE,qBAAqB,EAC5C,gBAAgB,EAAE,gBAAgB,EAClC,WAAW,EAAE,cAAc,EAC3B,MAAM,EAAE,MAAM,GACd,CACH,CAAC;IAEJ,OAAO,CACL,2CACc,GAAG,CAAC,YAAY,EAC5B,GAAG,EAAE,YAAY,EACjB,SAAS,EAAE,WAAW,CAAC,yBAAyB,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,CAAC,IAE9D,kBAAkB,CACf,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 { useLocale } from '../localization';\nimport { useTheme } from '../theming';\nimport {\n BaseCustomStyles,\n OnRenderAvatarCallback,\n VideoGalleryLocalParticipant,\n VideoGalleryRemoteParticipant,\n VideoStreamOptions,\n CreateVideoStreamViewResult\n} 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';\n/* @conditional-compile-remove(rooms) */\nimport { _usePermissions } from '../permissions';\nimport { DefaultLayout } from './VideoGallery/DefaultLayout';\nimport { FloatingLocalVideoLayout } from './VideoGallery/FloatingLocalVideoLayout';\nimport { useIdentifiers } from '../identifiers';\nimport { videoGalleryOuterDivStyle } from './styles/VideoGallery.styles';\nimport { floatingLocalVideoTileStyle } from './VideoGallery/styles/FloatingLocalVideo.styles';\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 * @private\n * Set aside only 6 dominant speakers for remaining audio participants\n */\nexport const MAX_AUDIO_DOMINANT_SPEAKERS = 6;\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 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 /** 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 /* @conditional-compile-remove(pinned-participants) */\n /** Menu text shown in Video Tile contextual menu for setting a remote participants video to fit in frame */\n fitRemoteParticipantToFrame: string;\n /* @conditional-compile-remove(pinned-participants) */\n /** Menu text shown in Video Tile contextual menu for setting a remote participants video to fill the frame */\n fillRemoteParticipantFrame: string;\n}\n\n/**\n * @public\n */\nexport type VideoGalleryLayout = 'default' | 'floatingLocalVideo';\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}\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 /** Callback to dispose a remote video stream view */\n onDisposeRemoteStreamView?: (userId: string) => Promise<void>;\n /** Callback to render a particpant 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 /* @conditional-compile-remove(pinned-participants) */\n /**\n * Whether to show the remote video tile contextual menu.\n * @defaultValue `true`\n */\n showRemoteVideoTileContextualMenu?: boolean;\n}\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 onDisposeRemoteStreamView,\n styles,\n layout,\n onRenderAvatar,\n showMuteIndicator,\n maxRemoteVideoStreams = DEFAULT_MAX_REMOTE_VIDEO_STREAMS,\n showCameraSwitcherInLocalPreview,\n localVideoCameraCycleButtonProps\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 shouldFloatLocalVideo = !!(layout === 'floatingLocalVideo' && 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 /* @conditional-compile-remove(rooms) */\n const permissions = _usePermissions();\n\n /**\n * Utility function for memoized rendering of LocalParticipant.\n */\n const localVideoTile = useMemo((): JSX.Element /* @conditional-compile-remove(rooms) */ | undefined => {\n /* @conditional-compile-remove(rooms) */\n if (!permissions.cameraButton) {\n return undefined;\n }\n if (onRenderLocalVideoTile) {\n return onRenderLocalVideoTile(localParticipant);\n }\n\n const localVideoTileStyles = concatStyleSets(\n shouldFloatLocalVideo ? floatingLocalVideoTileStyle : {},\n {\n root: { borderRadius: theme.effects.roundedCorner4 }\n },\n styles?.localVideo\n );\n\n const initialsName = !localParticipant.displayName ? strings.displayNamePlaceholder : localParticipant.displayName;\n\n return (\n <Stack key=\"local-video-tile-key\" tabIndex={0} aria-label={strings.localVideoMovementLabel} role={'dialog'}>\n <_LocalVideoTile\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={isNarrow ? '' : strings.localVideoLabel}\n initialsName={initialsName}\n localVideoViewOptions={localVideoViewOptions}\n onRenderAvatar={onRenderAvatar}\n showLabel={!(shouldFloatLocalVideo && isNarrow)}\n showMuteIndicator={showMuteIndicator}\n showCameraSwitcherInLocalPreview={showCameraSwitcherInLocalPreview}\n localVideoCameraCycleButtonProps={localVideoCameraCycleButtonProps}\n localVideoCameraSwitcherLabel={strings.localVideoCameraSwitcherLabel}\n localVideoSelectedDescription={strings.localVideoSelectedDescription}\n styles={localVideoTileStyles}\n />\n </Stack>\n );\n }, [\n isNarrow,\n localParticipant,\n localVideoCameraCycleButtonProps,\n localVideoViewOptions,\n onCreateLocalStreamView,\n onDisposeLocalStreamView,\n onRenderAvatar,\n onRenderLocalVideoTile,\n shouldFloatLocalVideo,\n showCameraSwitcherInLocalPreview,\n showMuteIndicator,\n strings.localVideoCameraSwitcherLabel,\n strings.localVideoLabel,\n strings.localVideoMovementLabel,\n strings.localVideoSelectedDescription,\n strings.displayNamePlaceholder,\n styles?.localVideo,\n theme.effects.roundedCorner4,\n /* @conditional-compile-remove(rooms) */ permissions.cameraButton\n ]);\n\n const defaultOnRenderVideoTile = useCallback(\n (participant: VideoGalleryRemoteParticipant, isVideoParticipant?: boolean) => {\n const remoteVideoStream = participant.videoStream;\n return (\n <_RemoteVideoTile\n key={participant.userId}\n userId={participant.userId}\n remoteParticipant={participant}\n onCreateRemoteStreamView={isVideoParticipant ? onCreateRemoteStreamView : undefined}\n onDisposeRemoteStreamView={isVideoParticipant ? onDisposeRemoteStreamView : undefined}\n isAvailable={isVideoParticipant ? remoteVideoStream?.isAvailable : false}\n isReceiving={isVideoParticipant ? remoteVideoStream?.isReceiving : false}\n renderElement={isVideoParticipant ? remoteVideoStream?.renderElement : undefined}\n remoteVideoViewOptions={isVideoParticipant ? remoteVideoViewOptions : undefined}\n onRenderAvatar={onRenderAvatar}\n showMuteIndicator={showMuteIndicator}\n strings={strings}\n /* @conditional-compile-remove(PSTN-calls) */\n participantState={participant.state}\n /* @conditional-compile-remove(pinned-participants) */\n showRemoteVideoTileContextualMenu={props.showRemoteVideoTileContextualMenu}\n />\n );\n },\n [\n onCreateRemoteStreamView,\n onDisposeRemoteStreamView,\n remoteVideoViewOptions,\n onRenderAvatar,\n showMuteIndicator,\n strings,\n /* @conditional-compile-remove(pinned-participants) */\n props.showRemoteVideoTileContextualMenu\n ]\n );\n\n const screenShareParticipant = remoteParticipants.find((participant) => participant.screenShareStream?.isAvailable);\n\n const localScreenShareStreamComponent = <LocalScreenShare localParticipant={localParticipant} />;\n\n const remoteScreenShareComponent = screenShareParticipant && (\n <RemoteScreenShare\n {...screenShareParticipant}\n renderElement={screenShareParticipant.screenShareStream?.renderElement}\n onCreateRemoteStreamView={onCreateRemoteStreamView}\n onDisposeRemoteStreamView={onDisposeRemoteStreamView}\n isReceiving={screenShareParticipant.screenShareStream?.isReceiving}\n />\n );\n\n const screenShareComponent = remoteScreenShareComponent\n ? remoteScreenShareComponent\n : localParticipant.isScreenSharingOn\n ? localScreenShareStreamComponent\n : undefined;\n\n const videoGalleryLayout =\n layout === 'floatingLocalVideo' ? (\n <FloatingLocalVideoLayout\n remoteParticipants={remoteParticipants}\n onRenderRemoteParticipant={onRenderRemoteVideoTile ?? defaultOnRenderVideoTile}\n localVideoComponent={localVideoTile}\n screenShareComponent={screenShareComponent}\n showCameraSwitcherInLocalPreview={showCameraSwitcherInLocalPreview}\n maxRemoteVideoStreams={maxRemoteVideoStreams}\n dominantSpeakers={dominantSpeakers}\n parentWidth={containerWidth}\n parentHeight={containerHeight}\n styles={styles}\n />\n ) : (\n <DefaultLayout\n remoteParticipants={remoteParticipants}\n onRenderRemoteParticipant={onRenderRemoteVideoTile ?? defaultOnRenderVideoTile}\n localVideoComponent={localVideoTile}\n screenShareComponent={screenShareComponent}\n maxRemoteVideoStreams={maxRemoteVideoStreams}\n dominantSpeakers={dominantSpeakers}\n parentWidth={containerWidth}\n styles={styles}\n />\n );\n\n return (\n <div\n data-ui-id={ids.videoGallery}\n ref={containerRef}\n className={mergeStyles(videoGalleryOuterDivStyle, styles?.root)}\n >\n {videoGalleryLayout}\n </div>\n );\n};\n\"../../../acs-ui-common/src\""]}
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,iBAAiB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAUtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC5F,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAIrE,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,wCAAwC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,wBAAwB,EAAE,MAAM,yCA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1E,CACF,CAAC;IAEF,MAAM,kBAAkB,GAAG,OAAO,CAAC,GAAG,EAAE;QACtC,sDAAsD;QACtD,IAAI,WAAW,CAAC,kBAAkB,CAAC,MAAM,GAAG,CAAC,EAAE;YAC7C,OAAO,oBAAC,wBAAwB,oBAAK,WAAW,EAAI,CAAC;SACtD;QACD,IAAI,MAAM,KAAK,oBAAoB,EAAE;YACnC,OAAO,oBAAC,wBAAwB,oBAAK,WAAW,EAAI,CAAC;SACtD;QACD,OAAO,oBAAC,aAAa,oBAAK,WAAW,EAAI,CAAC;IAC5C,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC;IAE1B,OAAO,CACL,2CACc,GAAG,CAAC,YAAY,EAC5B,GAAG,EAAE,YAAY,EACjB,SAAS,EAAE,WAAW,CAAC,yBAAyB,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,CAAC,IAE9D,kBAAkB,CACf,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 { useLocale } from '../localization';\nimport { useTheme } from '../theming';\nimport {\n BaseCustomStyles,\n OnRenderAvatarCallback,\n VideoGalleryLocalParticipant,\n VideoGalleryRemoteParticipant,\n VideoStreamOptions,\n CreateVideoStreamViewResult\n} 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';\n/* @conditional-compile-remove(rooms) */\nimport { _usePermissions } from '../permissions';\nimport { DefaultLayout } from './VideoGallery/DefaultLayout';\nimport { FloatingLocalVideoLayout } from './VideoGallery/FloatingLocalVideoLayout';\nimport { useIdentifiers } from '../identifiers';\nimport { videoGalleryOuterDivStyle } from './styles/VideoGallery.styles';\nimport { floatingLocalVideoTileStyle } from './VideoGallery/styles/FloatingLocalVideo.styles';\n/* @conditional-compile-remove(pinned-participants) */\nimport { PinnedParticipantsLayout } from './VideoGallery/PinnedParticipantsLayout';\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 * @private\n * Set aside only 6 dominant speakers for remaining audio participants\n */\nexport const MAX_AUDIO_DOMINANT_SPEAKERS = 6;\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 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 /** 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 /* @conditional-compile-remove(pinned-participants) */\n /** Menu text shown in Video Tile contextual menu for setting a remote participants video to fit in frame */\n fitRemoteParticipantToFrame: string;\n /* @conditional-compile-remove(pinned-participants) */\n /** Menu text shown in Video Tile contextual menu for setting a remote participants video to fill the frame */\n fillRemoteParticipantFrame: string;\n}\n\n/**\n * @public\n */\nexport type VideoGalleryLayout = 'default' | 'floatingLocalVideo';\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}\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 /** Callback to dispose a remote video stream view */\n onDisposeRemoteStreamView?: (userId: string) => Promise<void>;\n /** Callback to render a particpant 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 /* @conditional-compile-remove(pinned-participants) */\n /**\n * List of pinned participant userIds\n */\n pinnedParticipants?: string[];\n /* @conditional-compile-remove(pinned-participants) */\n /**\n * Whether to show the remote video tile contextual menu.\n * @defaultValue `true`\n */\n showRemoteVideoTileContextualMenu?: boolean;\n}\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 onDisposeRemoteStreamView,\n styles,\n layout,\n onRenderAvatar,\n showMuteIndicator,\n maxRemoteVideoStreams = DEFAULT_MAX_REMOTE_VIDEO_STREAMS,\n showCameraSwitcherInLocalPreview,\n localVideoCameraCycleButtonProps\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 shouldFloatLocalVideo = !!(layout === 'floatingLocalVideo' && 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 /* @conditional-compile-remove(pinned-participants) */\n const [pinnedParticipantsState, _] = React.useState<string[]>([]);\n /* @conditional-compile-remove(pinned-participants) */\n // Use pinnedParticipants from props but if it is not defined use the maintained state of pinned participants\n const pinnedParticipants = props.pinnedParticipants ?? pinnedParticipantsState;\n\n /* @conditional-compile-remove(rooms) */\n const permissions = _usePermissions();\n\n /**\n * Utility function for memoized rendering of LocalParticipant.\n */\n const localVideoTile = useMemo((): JSX.Element /* @conditional-compile-remove(rooms) */ | undefined => {\n /* @conditional-compile-remove(rooms) */\n if (!permissions.cameraButton) {\n return undefined;\n }\n if (onRenderLocalVideoTile) {\n return onRenderLocalVideoTile(localParticipant);\n }\n\n const localVideoTileStyles = concatStyleSets(\n shouldFloatLocalVideo ? floatingLocalVideoTileStyle : {},\n {\n root: { borderRadius: theme.effects.roundedCorner4 }\n },\n styles?.localVideo\n );\n\n const initialsName = !localParticipant.displayName ? strings.displayNamePlaceholder : localParticipant.displayName;\n\n return (\n <Stack key=\"local-video-tile-key\" tabIndex={0} aria-label={strings.localVideoMovementLabel} role={'dialog'}>\n <_LocalVideoTile\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={isNarrow ? '' : strings.localVideoLabel}\n initialsName={initialsName}\n localVideoViewOptions={localVideoViewOptions}\n onRenderAvatar={onRenderAvatar}\n showLabel={!(shouldFloatLocalVideo && isNarrow)}\n showMuteIndicator={showMuteIndicator}\n showCameraSwitcherInLocalPreview={showCameraSwitcherInLocalPreview}\n localVideoCameraCycleButtonProps={localVideoCameraCycleButtonProps}\n localVideoCameraSwitcherLabel={strings.localVideoCameraSwitcherLabel}\n localVideoSelectedDescription={strings.localVideoSelectedDescription}\n styles={localVideoTileStyles}\n />\n </Stack>\n );\n }, [\n isNarrow,\n localParticipant,\n localVideoCameraCycleButtonProps,\n localVideoViewOptions,\n onCreateLocalStreamView,\n onDisposeLocalStreamView,\n onRenderAvatar,\n onRenderLocalVideoTile,\n shouldFloatLocalVideo,\n showCameraSwitcherInLocalPreview,\n showMuteIndicator,\n strings.localVideoCameraSwitcherLabel,\n strings.localVideoLabel,\n strings.localVideoMovementLabel,\n strings.localVideoSelectedDescription,\n strings.displayNamePlaceholder,\n styles?.localVideo,\n theme.effects.roundedCorner4,\n /* @conditional-compile-remove(rooms) */ permissions.cameraButton\n ]);\n\n const defaultOnRenderVideoTile = useCallback(\n (participant: VideoGalleryRemoteParticipant, isVideoParticipant?: boolean) => {\n const remoteVideoStream = participant.videoStream;\n return (\n <_RemoteVideoTile\n key={participant.userId}\n userId={participant.userId}\n remoteParticipant={participant}\n onCreateRemoteStreamView={isVideoParticipant ? onCreateRemoteStreamView : undefined}\n onDisposeRemoteStreamView={isVideoParticipant ? onDisposeRemoteStreamView : undefined}\n isAvailable={isVideoParticipant ? remoteVideoStream?.isAvailable : false}\n isReceiving={isVideoParticipant ? remoteVideoStream?.isReceiving : false}\n renderElement={isVideoParticipant ? remoteVideoStream?.renderElement : undefined}\n remoteVideoViewOptions={isVideoParticipant ? remoteVideoViewOptions : undefined}\n onRenderAvatar={onRenderAvatar}\n showMuteIndicator={showMuteIndicator}\n strings={strings}\n /* @conditional-compile-remove(PSTN-calls) */\n participantState={participant.state}\n /* @conditional-compile-remove(pinned-participants) */\n showRemoteVideoTileContextualMenu={props.showRemoteVideoTileContextualMenu}\n />\n );\n },\n [\n onCreateRemoteStreamView,\n onDisposeRemoteStreamView,\n remoteVideoViewOptions,\n onRenderAvatar,\n showMuteIndicator,\n strings,\n /* @conditional-compile-remove(pinned-participants) */\n props.showRemoteVideoTileContextualMenu\n ]\n );\n\n const screenShareParticipant = remoteParticipants.find((participant) => participant.screenShareStream?.isAvailable);\n\n const localScreenShareStreamComponent = <LocalScreenShare localParticipant={localParticipant} />;\n\n const remoteScreenShareComponent = screenShareParticipant && (\n <RemoteScreenShare\n {...screenShareParticipant}\n renderElement={screenShareParticipant.screenShareStream?.renderElement}\n onCreateRemoteStreamView={onCreateRemoteStreamView}\n onDisposeRemoteStreamView={onDisposeRemoteStreamView}\n isReceiving={screenShareParticipant.screenShareStream?.isReceiving}\n />\n );\n\n const screenShareComponent = remoteScreenShareComponent\n ? remoteScreenShareComponent\n : localParticipant.isScreenSharingOn\n ? localScreenShareStreamComponent\n : undefined;\n\n const layoutProps = useMemo(\n () => ({\n remoteParticipants,\n /* @conditional-compile-remove(pinned-participants) */ pinnedParticipants,\n screenShareComponent,\n showCameraSwitcherInLocalPreview,\n maxRemoteVideoStreams,\n dominantSpeakers,\n styles,\n onRenderRemoteParticipant: onRenderRemoteVideoTile ?? defaultOnRenderVideoTile,\n localVideoComponent: localVideoTile,\n parentWidth: containerWidth,\n parentHeight: containerHeight,\n isLocalVideoFloating: layout === 'floatingLocalVideo'\n }),\n [\n remoteParticipants,\n screenShareComponent,\n showCameraSwitcherInLocalPreview,\n maxRemoteVideoStreams,\n dominantSpeakers,\n styles,\n localVideoTile,\n containerWidth,\n containerHeight,\n onRenderRemoteVideoTile,\n defaultOnRenderVideoTile,\n layout,\n /* @conditional-compile-remove(pinned-participants) */ pinnedParticipants\n ]\n );\n\n const videoGalleryLayout = useMemo(() => {\n /* @conditional-compile-remove(pinned-participants) */\n if (layoutProps.pinnedParticipants.length > 0) {\n return <PinnedParticipantsLayout {...layoutProps} />;\n }\n if (layout === 'floatingLocalVideo') {\n return <FloatingLocalVideoLayout {...layoutProps} />;\n }\n return <DefaultLayout {...layoutProps} />;\n }, [layout, layoutProps]);\n\n return (\n <div\n data-ui-id={ids.videoGallery}\n ref={containerRef}\n className={mergeStyles(videoGalleryOuterDivStyle, styles?.root)}\n >\n {videoGalleryLayout}\n </div>\n );\n};\n\"../../../acs-ui-common/src\""]}
@@ -109,11 +109,13 @@ export const messageBarType = (errorType) => {
109
109
  case 'callNoSpeakerFound':
110
110
  case 'callNoMicrophoneFound':
111
111
  case 'callMicrophoneAccessDenied':
112
+ case 'callMicrophoneAccessDeniedSafari':
112
113
  case 'callMicrophoneMutedBySystem':
113
114
  case 'callMicrophoneUnmutedBySystem':
114
115
  case 'callMacOsMicrophoneAccessDenied':
115
116
  case 'callLocalVideoFreeze':
116
117
  case 'callCameraAccessDenied':
118
+ case 'callCameraAccessDeniedSafari':
117
119
  case 'callCameraAlreadyInUse':
118
120
  case 'callVideoStoppedBySystem':
119
121
  case 'callVideoRecoveredBySystem':
@@ -141,11 +143,13 @@ export const customIconName = {
141
143
  callNoSpeakerFound: 'ErrorBarCallNoSpeakerFound',
142
144
  callNoMicrophoneFound: 'ErrorBarCallNoMicrophoneFound',
143
145
  callMicrophoneAccessDenied: 'ErrorBarCallMicrophoneAccessDenied',
146
+ callMicrophoneAccessDeniedSafari: 'ErrorBarCallMicrophoneAccessDenied',
144
147
  callMicrophoneMutedBySystem: 'ErrorBarCallMicrophoneMutedBySystem',
145
148
  callMicrophoneUnmutedBySystem: 'ErrorBarCallMicrophoneUnmutedBySystem',
146
149
  callMacOsMicrophoneAccessDenied: 'ErrorBarCallMacOsMicrophoneAccessDenied',
147
150
  callLocalVideoFreeze: 'ErrorBarCallLocalVideoFreeze',
148
151
  callCameraAccessDenied: 'ErrorBarCallCameraAccessDenied',
152
+ callCameraAccessDeniedSafari: 'ErrorBarCallCameraAccessDenied',
149
153
  callCameraAlreadyInUse: 'ErrorBarCallCameraAlreadyInUse',
150
154
  callVideoStoppedBySystem: 'ErrorBarCallVideoStoppedBySystem',
151
155
  callVideoRecoveredBySystem: 'ErrorBarCallVideoRecoveredBySystem',