@azure/communication-react 1.4.3-alpha-202212060013.0 → 1.4.3-alpha-202212080013.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 (44) hide show
  1. package/dist/dist-cjs/communication-react/index.js +664 -522
  2. package/dist/dist-cjs/communication-react/index.js.map +1 -1
  3. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  4. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  5. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.d.ts +12 -0
  6. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js +16 -0
  7. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js.map +1 -1
  8. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js +2 -13
  9. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js.map +1 -1
  10. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js +8 -0
  11. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js.map +1 -1
  12. package/dist/dist-esm/react-components/src/components/VideoGallery/DefaultLayout.d.ts +41 -0
  13. package/dist/dist-esm/react-components/src/components/VideoGallery/DefaultLayout.js +45 -0
  14. package/dist/dist-esm/react-components/src/components/VideoGallery/DefaultLayout.js.map +1 -0
  15. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideo.d.ts +12 -0
  16. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideo.js +41 -0
  17. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideo.js.map +1 -0
  18. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.d.ts +49 -0
  19. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.js +61 -0
  20. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.js.map +1 -0
  21. package/dist/dist-esm/react-components/src/components/VideoGallery/VideoGalleryResponsiveHorizontalGallery.d.ts +12 -0
  22. package/dist/dist-esm/react-components/src/components/VideoGallery/VideoGalleryResponsiveHorizontalGallery.js +18 -0
  23. package/dist/dist-esm/react-components/src/components/VideoGallery/VideoGalleryResponsiveHorizontalGallery.js.map +1 -0
  24. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/DefaultLayout.styles.d.ts +6 -0
  25. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/DefaultLayout.styles.js +9 -0
  26. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/DefaultLayout.styles.js.map +1 -0
  27. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideo.styles.d.ts +61 -0
  28. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideo.styles.js +117 -0
  29. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideo.styles.js.map +1 -0
  30. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideoLayout.styles.d.ts +14 -0
  31. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideoLayout.styles.js +28 -0
  32. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideoLayout.styles.js.map +1 -0
  33. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveHorizontalGallery.styles.d.ts +59 -0
  34. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveHorizontalGallery.styles.js +64 -0
  35. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveHorizontalGallery.styles.js.map +1 -0
  36. package/dist/dist-esm/react-components/src/components/VideoGallery/videoGalleryUtils.d.ts +17 -0
  37. package/dist/dist-esm/react-components/src/components/VideoGallery/videoGalleryUtils.js +72 -0
  38. package/dist/dist-esm/react-components/src/components/VideoGallery/videoGalleryUtils.js.map +1 -0
  39. package/dist/dist-esm/react-components/src/components/VideoGallery.js +15 -118
  40. package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
  41. package/dist/dist-esm/react-components/src/components/styles/VideoGallery.styles.d.ts +1 -95
  42. package/dist/dist-esm/react-components/src/components/styles/VideoGallery.styles.js +1 -137
  43. package/dist/dist-esm/react-components/src/components/styles/VideoGallery.styles.js.map +1 -1
  44. package/package.json +8 -8
@@ -0,0 +1,18 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT license.
3
+ import { concatStyleSets, Stack } from '@fluentui/react';
4
+ import React, { useMemo } from 'react';
5
+ import { ResponsiveHorizontalGallery } from '../ResponsiveHorizontalGallery';
6
+ import { HORIZONTAL_GALLERY_BUTTON_WIDTH, HORIZONTAL_GALLERY_GAP } from '../styles/HorizontalGallery.styles';
7
+ import { horizontalGalleryContainerStyle, horizontalGalleryStyle, LARGE_HORIZONTAL_GALLERY_TILE_SIZE_REM, SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM } from './styles/VideoGalleryResponsiveHorizontalGallery.styles';
8
+ /**
9
+ * A ResponsiveHorizontalGallery styled for the @link{VideoGallery}
10
+ */
11
+ export const VideoGalleryResponsiveHorizontalGallery = (props) => {
12
+ const { shouldFloatLocalVideo = false, isNarrow = false, horizontalGalleryElements, styles } = props;
13
+ const containerStyles = useMemo(() => horizontalGalleryContainerStyle(shouldFloatLocalVideo, isNarrow), [shouldFloatLocalVideo, isNarrow]);
14
+ const galleryStyles = useMemo(() => concatStyleSets(horizontalGalleryStyle(isNarrow), styles), [isNarrow, styles]);
15
+ return (React.createElement(Stack, { styles: { root: { paddingTop: '0.5rem' } } },
16
+ React.createElement(ResponsiveHorizontalGallery, { key: "responsive-horizontal-gallery", containerStyles: containerStyles, horizontalGalleryStyles: galleryStyles, childWidthRem: isNarrow ? SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM.width : LARGE_HORIZONTAL_GALLERY_TILE_SIZE_REM.width, buttonWidthRem: HORIZONTAL_GALLERY_BUTTON_WIDTH, gapWidthRem: HORIZONTAL_GALLERY_GAP }, horizontalGalleryElements)));
17
+ };
18
+ //# sourceMappingURL=VideoGalleryResponsiveHorizontalGallery.js.map
@@ -0,0 +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"]}
@@ -0,0 +1,6 @@
1
+ import { IStackStyles } from '@fluentui/react';
2
+ /**
3
+ * @private
4
+ */
5
+ export declare const rootLayoutStyle: IStackStyles;
6
+ //# sourceMappingURL=DefaultLayout.styles.d.ts.map
@@ -0,0 +1,9 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT license.
3
+ /**
4
+ * @private
5
+ */
6
+ export const rootLayoutStyle = {
7
+ root: { position: 'relative', height: '100%', width: '100%', padding: '0.5rem' }
8
+ };
9
+ //# sourceMappingURL=DefaultLayout.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DefaultLayout.styles.js","sourceRoot":"","sources":["../../../../../../../../react-components/src/components/VideoGallery/styles/DefaultLayout.styles.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAiB;IAC3C,IAAI,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE;CACjF,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { IStackStyles } from '@fluentui/react';\n\n/**\n * @private\n */\nexport const rootLayoutStyle: IStackStyles = {\n root: { position: 'relative', height: '100%', width: '100%', padding: '0.5rem' }\n};\n"]}
@@ -0,0 +1,61 @@
1
+ import { IButtonStyles, IModalStyleProps, IModalStyles, IStackStyles, IStyle, IStyleFunctionOrObject, Theme } from '@fluentui/react';
2
+ import { VideoTileStylesProps } from '../../VideoTile';
3
+ /**
4
+ * @private
5
+ */
6
+ export declare const videoGalleryOuterDivStyle: string;
7
+ /**
8
+ * @private
9
+ */
10
+ export declare const videoGalleryContainerStyle: IStackStyles;
11
+ /**
12
+ * Small floating modal width and height in rem for small screen
13
+ */
14
+ export declare const SMALL_FLOATING_MODAL_SIZE_PX: {
15
+ width: number;
16
+ height: number;
17
+ };
18
+ /**
19
+ * Large floating modal width and height in rem for large screen
20
+ */
21
+ export declare const LARGE_FLOATING_MODAL_SIZE_PX: {
22
+ width: number;
23
+ height: number;
24
+ };
25
+ /**
26
+ * @private
27
+ * z-index to ensure that the local video tile is above the video gallery.
28
+ */
29
+ export declare const LOCAL_VIDEO_TILE_ZINDEX = 2;
30
+ /**
31
+ * @private
32
+ */
33
+ export declare const localVideoTileContainerStyle: (theme: Theme, isNarrow?: boolean | undefined) => IStyle;
34
+ /**
35
+ * @private
36
+ */
37
+ export declare const localVideoTileWithControlsContainerStyle: (theme: Theme, isNarrow?: boolean | undefined) => IStackStyles;
38
+ /**
39
+ * @private
40
+ */
41
+ export declare const floatingLocalVideoModalStyle: (theme: Theme, isNarrow?: boolean | undefined) => IStyleFunctionOrObject<IModalStyleProps, IModalStyles>;
42
+ /**
43
+ * Padding equal to the amount the modal should stay inside the bounds of the container.
44
+ * i.e. if this is 8px, the modal should always be at least 8px inside the container at all times on all sides.
45
+ * @private
46
+ */
47
+ export declare const localVideoTileOuterPaddingPX = 8;
48
+ /**
49
+ * @private
50
+ */
51
+ export declare const floatingLocalVideoTileStyle: VideoTileStylesProps;
52
+ /**
53
+ * @private
54
+ */
55
+ export declare const localVideoCameraCycleButtonStyles: (theme: Theme) => IButtonStyles;
56
+ /**
57
+ * Styles for the local video tile modal when it is focused, will cause keyboard move icon to appear over video
58
+ * @private
59
+ */
60
+ export declare const localVideoModalStyles: Partial<IModalStyles>;
61
+ //# sourceMappingURL=FloatingLocalVideo.styles.d.ts.map
@@ -0,0 +1,117 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT license.
3
+ import { concatStyleSets, mergeStyles } from '@fluentui/react';
4
+ import { _pxToRem } from "../../../../../acs-ui-common/src";
5
+ /**
6
+ * @private
7
+ */
8
+ export const videoGalleryOuterDivStyle = mergeStyles({ position: 'relative', width: '100%', height: '100%' });
9
+ /**
10
+ * @private
11
+ */
12
+ export const videoGalleryContainerStyle = {
13
+ root: { position: 'relative', height: '100%', width: '100%', padding: '0.5rem' }
14
+ };
15
+ /**
16
+ * Small floating modal width and height in rem for small screen
17
+ */
18
+ export const SMALL_FLOATING_MODAL_SIZE_PX = { width: 64, height: 88 };
19
+ /**
20
+ * Large floating modal width and height in rem for large screen
21
+ */
22
+ export const LARGE_FLOATING_MODAL_SIZE_PX = { width: 160, height: 120 };
23
+ /**
24
+ * @private
25
+ * z-index to ensure that the local video tile is above the video gallery.
26
+ */
27
+ export const LOCAL_VIDEO_TILE_ZINDEX = 2;
28
+ /**
29
+ * @private
30
+ */
31
+ export const localVideoTileContainerStyle = (theme, isNarrow) => {
32
+ return Object.assign({ minWidth: isNarrow ? _pxToRem(SMALL_FLOATING_MODAL_SIZE_PX.width) : _pxToRem(LARGE_FLOATING_MODAL_SIZE_PX.width), minHeight: isNarrow ? _pxToRem(SMALL_FLOATING_MODAL_SIZE_PX.height) : _pxToRem(LARGE_FLOATING_MODAL_SIZE_PX.height), position: 'absolute', bottom: _pxToRem(localVideoTileOuterPaddingPX), borderRadius: theme.effects.roundedCorner4, overflow: 'hidden' }, (theme.rtl
33
+ ? { left: _pxToRem(localVideoTileOuterPaddingPX) }
34
+ : { right: _pxToRem(localVideoTileOuterPaddingPX) }));
35
+ };
36
+ /**
37
+ * @private
38
+ */
39
+ export const localVideoTileWithControlsContainerStyle = (theme, isNarrow) => {
40
+ return concatStyleSets(localVideoTileContainerStyle(theme, isNarrow), {
41
+ root: { boxShadow: theme.effects.elevation8 }
42
+ });
43
+ };
44
+ /**
45
+ * @private
46
+ */
47
+ export const floatingLocalVideoModalStyle = (theme, isNarrow) => {
48
+ return concatStyleSets({
49
+ main: localVideoTileContainerStyle(theme, isNarrow)
50
+ }, {
51
+ main: {
52
+ boxShadow: theme.effects.elevation8,
53
+ ':focus-within': {
54
+ boxShadow: theme.effects.elevation16,
55
+ border: `${_pxToRem(2)} solid ${theme.palette.neutralPrimary}`
56
+ }
57
+ }
58
+ }, localVideoModalStyles);
59
+ };
60
+ /**
61
+ * Padding equal to the amount the modal should stay inside the bounds of the container.
62
+ * i.e. if this is 8px, the modal should always be at least 8px inside the container at all times on all sides.
63
+ * @private
64
+ */
65
+ export const localVideoTileOuterPaddingPX = 8;
66
+ /**
67
+ * @private
68
+ */
69
+ export const floatingLocalVideoTileStyle = {
70
+ root: {
71
+ position: 'absolute',
72
+ zIndex: LOCAL_VIDEO_TILE_ZINDEX,
73
+ height: '100%',
74
+ width: '100%'
75
+ }
76
+ };
77
+ /**
78
+ * @private
79
+ */
80
+ export const localVideoCameraCycleButtonStyles = (theme) => {
81
+ return {
82
+ root: {
83
+ position: 'absolute',
84
+ width: _pxToRem(32),
85
+ height: _pxToRem(32),
86
+ right: '0rem',
87
+ top: '0rem',
88
+ color: '#FFFFFF',
89
+ zIndex: 2,
90
+ background: 'rgba(0,0,0,0.4)',
91
+ borderRadius: theme.effects.roundedCorner2
92
+ },
93
+ rootFocused: {
94
+ // styles to remove the unwanted white highlight and blue colour after tapping on button.
95
+ color: '#FFFFFF',
96
+ background: 'rgba(0,0,0,0.4)' // sets opacity of background to be visible on all backdrops in video stream.
97
+ },
98
+ icon: {
99
+ paddingLeft: _pxToRem(3),
100
+ paddingRight: _pxToRem(3),
101
+ margin: 0
102
+ },
103
+ flexContainer: {
104
+ paddingBottom: _pxToRem(8)
105
+ }
106
+ };
107
+ };
108
+ /**
109
+ * Styles for the local video tile modal when it is focused, will cause keyboard move icon to appear over video
110
+ * @private
111
+ */
112
+ export const localVideoModalStyles = {
113
+ keyboardMoveIconContainer: {
114
+ zIndex: LOCAL_VIDEO_TILE_ZINDEX + 1 // zIndex to set the keyboard movement Icon above the other layers in the video tile.
115
+ }
116
+ };
117
+ //# sourceMappingURL=FloatingLocalVideo.styles.js.map
@@ -0,0 +1 @@
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,QAAQ,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;AAE9G;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAiB;IACtD,IAAI,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE;CACjF,CAAC;AAEF;;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;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC;AAEzC;;GAEG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,KAAY,EAAE,QAAkB,EAAU,EAAE;IACvF,uBACE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,4BAA4B,CAAC,KAAK,CAAC,CAA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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\""]}
@@ -0,0 +1,14 @@
1
+ import { IStackStyles, IStyle } from '@fluentui/react';
2
+ /**
3
+ * @private
4
+ */
5
+ export declare const rootLayoutStyle: IStackStyles;
6
+ /**
7
+ * @private
8
+ */
9
+ export declare const innerLayoutStyle: IStackStyles;
10
+ /**
11
+ * @private
12
+ */
13
+ export declare const layerHostStyle: IStyle;
14
+ //# sourceMappingURL=FloatingLocalVideoLayout.styles.d.ts.map
@@ -0,0 +1,28 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT license.
3
+ /**
4
+ * @private
5
+ */
6
+ export const rootLayoutStyle = {
7
+ root: { position: 'relative', height: '100%', width: '100%' }
8
+ };
9
+ /**
10
+ * @private
11
+ */
12
+ export const innerLayoutStyle = {
13
+ root: { position: 'relative', height: '100%', width: '100%', padding: '0.5rem' }
14
+ };
15
+ /**
16
+ * @private
17
+ */
18
+ export const layerHostStyle = {
19
+ position: 'absolute',
20
+ left: 0,
21
+ top: 0,
22
+ width: '100%',
23
+ height: '100%',
24
+ overflow: 'hidden',
25
+ // pointer events for layerHost set to none to make descendants interactive
26
+ pointerEvents: 'none'
27
+ };
28
+ //# sourceMappingURL=FloatingLocalVideoLayout.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FloatingLocalVideoLayout.styles.js","sourceRoot":"","sources":["../../../../../../../../react-components/src/components/VideoGallery/styles/FloatingLocalVideoLayout.styles.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAiB;IAC3C,IAAI,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;CAC9D,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAiB;IAC5C,IAAI,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE;CACjF,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAW;IACpC,QAAQ,EAAE,UAAU;IACpB,IAAI,EAAE,CAAC;IACP,GAAG,EAAE,CAAC;IACN,KAAK,EAAE,MAAM;IACb,MAAM,EAAE,MAAM;IACd,QAAQ,EAAE,QAAQ;IAClB,2EAA2E;IAC3E,aAAa,EAAE,MAAM;CACtB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { IStackStyles, IStyle } from '@fluentui/react';\n\n/**\n * @private\n */\nexport const rootLayoutStyle: IStackStyles = {\n root: { position: 'relative', height: '100%', width: '100%' }\n};\n\n/**\n * @private\n */\nexport const innerLayoutStyle: IStackStyles = {\n root: { position: 'relative', height: '100%', width: '100%', padding: '0.5rem' }\n};\n\n/**\n * @private\n */\nexport const layerHostStyle: IStyle = {\n position: 'absolute',\n left: 0,\n top: 0,\n width: '100%',\n height: '100%',\n overflow: 'hidden',\n // pointer events for layerHost set to none to make descendants interactive\n pointerEvents: 'none'\n};\n"]}
@@ -0,0 +1,59 @@
1
+ import { IStyle } from '@fluentui/react';
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
+ /**
18
+ * @private
19
+ */
20
+ export declare const horizontalGalleryContainerStyle: (shouldFloatLocalVideo: boolean, isNarrow: boolean) => IStyle;
21
+ /**
22
+ * @private
23
+ */
24
+ export declare const horizontalGalleryStyle: (isNarrow: boolean) => HorizontalGalleryStyles;
25
+ /**
26
+ * Small horizontal gallery tile size in rem
27
+ * @private
28
+ */
29
+ export declare const SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM: {
30
+ height: number;
31
+ width: number;
32
+ };
33
+ /**
34
+ * Large horizontal gallery tile size in rem
35
+ * @private
36
+ */
37
+ export declare const LARGE_HORIZONTAL_GALLERY_TILE_SIZE_REM: {
38
+ height: number;
39
+ width: number;
40
+ };
41
+ /**
42
+ * @private
43
+ */
44
+ export declare const SMALL_HORIZONTAL_GALLERY_TILE_STYLE: {
45
+ minHeight: string;
46
+ minWidth: string;
47
+ maxHeight: string;
48
+ maxWidth: string;
49
+ };
50
+ /**
51
+ * @private
52
+ */
53
+ export declare const LARGE_HORIZONTAL_GALLERY_TILE_STYLE: {
54
+ minHeight: string;
55
+ minWidth: string;
56
+ maxHeight: string;
57
+ maxWidth: string;
58
+ };
59
+ //# sourceMappingURL=VideoGalleryResponsiveHorizontalGallery.styles.d.ts.map
@@ -0,0 +1,64 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT license.
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 };
12
+ /**
13
+ * @private
14
+ */
15
+ export const horizontalGalleryContainerStyle = (shouldFloatLocalVideo, isNarrow) => {
16
+ return {
17
+ minHeight: isNarrow
18
+ ? `${SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM.height}rem`
19
+ : `${LARGE_HORIZONTAL_GALLERY_TILE_SIZE_REM.height}rem`,
20
+ width: shouldFloatLocalVideo
21
+ ? isNarrow
22
+ ? `calc(100% - ${_pxToRem(SMALL_FLOATING_MODAL_SIZE_PX.width)})`
23
+ : `calc(100% - ${_pxToRem(LARGE_FLOATING_MODAL_SIZE_PX.width)})`
24
+ : '100%',
25
+ paddingRight: '0.5rem'
26
+ };
27
+ };
28
+ /**
29
+ * @private
30
+ */
31
+ export const horizontalGalleryStyle = (isNarrow) => {
32
+ return {
33
+ children: isNarrow ? SMALL_HORIZONTAL_GALLERY_TILE_STYLE : LARGE_HORIZONTAL_GALLERY_TILE_STYLE
34
+ };
35
+ };
36
+ /**
37
+ * Small horizontal gallery tile size in rem
38
+ * @private
39
+ */
40
+ export const SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM = { height: 5.5, width: 5.5 };
41
+ /**
42
+ * Large horizontal gallery tile size in rem
43
+ * @private
44
+ */
45
+ export const LARGE_HORIZONTAL_GALLERY_TILE_SIZE_REM = { height: 7.5, width: 10 };
46
+ /**
47
+ * @private
48
+ */
49
+ export const SMALL_HORIZONTAL_GALLERY_TILE_STYLE = {
50
+ minHeight: `${SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM.height}rem`,
51
+ minWidth: `${SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM.width}rem`,
52
+ maxHeight: `${SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM.height}rem`,
53
+ maxWidth: `${SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM.width}rem`
54
+ };
55
+ /**
56
+ * @private
57
+ */
58
+ export const LARGE_HORIZONTAL_GALLERY_TILE_STYLE = {
59
+ minHeight: `${LARGE_HORIZONTAL_GALLERY_TILE_SIZE_REM.height}rem`,
60
+ minWidth: `${LARGE_HORIZONTAL_GALLERY_TILE_SIZE_REM.width}rem`,
61
+ maxHeight: `${LARGE_HORIZONTAL_GALLERY_TILE_SIZE_REM.height}rem`,
62
+ maxWidth: `${LARGE_HORIZONTAL_GALLERY_TILE_SIZE_REM.width}rem`
63
+ };
64
+ //# sourceMappingURL=VideoGalleryResponsiveHorizontalGallery.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VideoGalleryResponsiveHorizontalGallery.styles.js","sourceRoot":"","sources":["../../../../../../../../react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveHorizontalGall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E,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\""]}
@@ -0,0 +1,17 @@
1
+ import { VideoGalleryParticipant, VideoGalleryRemoteParticipant } from '../../types';
2
+ declare type LayoutResult = {
3
+ gridParticipants: VideoGalleryParticipant[];
4
+ horizontalGalleryParticipants: VideoGalleryParticipant[];
5
+ };
6
+ /**
7
+ * @private
8
+ */
9
+ export declare const useFloatingLocalVideoLayout: (props: {
10
+ remoteParticipants: VideoGalleryRemoteParticipant[];
11
+ dominantSpeakers?: string[];
12
+ maxRemoteVideoStreams?: number;
13
+ maxAudioDominantSpeakers?: number;
14
+ isScreenShareActive?: boolean;
15
+ }) => LayoutResult;
16
+ export {};
17
+ //# sourceMappingURL=videoGalleryUtils.d.ts.map
@@ -0,0 +1,72 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT license.
3
+ import { useCallback, useRef } from 'react';
4
+ import { smartDominantSpeakerParticipants } from '../../gallery';
5
+ const DEFAULT_MAX_REMOTE_VIDEOSTREAMS = 4;
6
+ const DEFAULT_MAX_AUDIO_DOMINANT_SPEAKERS = 6;
7
+ /**
8
+ * @private
9
+ */
10
+ export const useFloatingLocalVideoLayout = (props) => {
11
+ var _a, _b;
12
+ const visibleVideoParticipants = useRef([]);
13
+ const visibleAudioParticipants = useRef([]);
14
+ const { remoteParticipants, dominantSpeakers, maxRemoteVideoStreams = DEFAULT_MAX_REMOTE_VIDEOSTREAMS, maxAudioDominantSpeakers = DEFAULT_MAX_AUDIO_DOMINANT_SPEAKERS, isScreenShareActive = false } = props;
15
+ visibleVideoParticipants.current = smartDominantSpeakerParticipants({
16
+ participants: (_a = remoteParticipants === null || remoteParticipants === void 0 ? void 0 : remoteParticipants.filter((p) => { var _a; return (_a = p.videoStream) === null || _a === void 0 ? void 0 : _a.isAvailable; })) !== null && _a !== void 0 ? _a : [],
17
+ dominantSpeakers,
18
+ lastVisibleParticipants: visibleVideoParticipants.current,
19
+ maxDominantSpeakers: maxRemoteVideoStreams
20
+ }).slice(0, maxRemoteVideoStreams);
21
+ const visibleVideoParticipantsSet = new Set(visibleVideoParticipants.current.map((p) => p.userId));
22
+ /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
23
+ const callingParticipants = remoteParticipants.filter((p) => p.state === ('Connecting' || 'Ringing'));
24
+ /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
25
+ const callingParticipantsSet = new Set(callingParticipants.map((p) => p.userId));
26
+ visibleAudioParticipants.current = smartDominantSpeakerParticipants({
27
+ participants: (_b = remoteParticipants === null || remoteParticipants === void 0 ? void 0 : remoteParticipants.filter((p) => !visibleVideoParticipantsSet.has(p.userId) &&
28
+ /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ !callingParticipantsSet.has(p.userId))) !== null && _b !== void 0 ? _b : [],
29
+ dominantSpeakers,
30
+ lastVisibleParticipants: visibleAudioParticipants.current,
31
+ maxDominantSpeakers: maxAudioDominantSpeakers
32
+ });
33
+ const getGridParticipants = useCallback(() => {
34
+ if (isScreenShareActive) {
35
+ return [];
36
+ }
37
+ /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
38
+ return visibleVideoParticipants.current.length > 0
39
+ ? visibleVideoParticipants.current
40
+ : visibleAudioParticipants.current.concat(callingParticipants);
41
+ return visibleVideoParticipants.current.length > 0
42
+ ? visibleVideoParticipants.current
43
+ : visibleAudioParticipants.current;
44
+ }, [
45
+ /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ callingParticipants,
46
+ isScreenShareActive
47
+ ]);
48
+ const gridParticipants = getGridParticipants();
49
+ const getHorizontalGalleryRemoteParticipants = useCallback(() => {
50
+ if (isScreenShareActive) {
51
+ // If screen sharing is active, assign video and audio participants as horizontal gallery participants
52
+ /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
53
+ return visibleVideoParticipants.current.concat(visibleAudioParticipants.current.concat(callingParticipants));
54
+ return visibleVideoParticipants.current.concat(visibleAudioParticipants.current);
55
+ }
56
+ else {
57
+ // If screen sharing is not active, then assign all video tiles as grid tiles.
58
+ // If there are no video tiles, then assign audio tiles as grid tiles.
59
+ /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
60
+ return visibleVideoParticipants.current.length > 0
61
+ ? visibleAudioParticipants.current.concat(callingParticipants)
62
+ : [];
63
+ return visibleVideoParticipants.current.length > 0 ? visibleAudioParticipants.current : [];
64
+ }
65
+ }, [
66
+ /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ callingParticipants,
67
+ isScreenShareActive
68
+ ]);
69
+ const horizontalGalleryParticipants = getHorizontalGalleryRemoteParticipants();
70
+ return { gridParticipants, horizontalGalleryParticipants };
71
+ };
72
+ //# sourceMappingURL=videoGalleryUtils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"videoGalleryUtils.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/VideoGallery/videoGalleryUtils.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,gCAAgC,EAAE,MAAM,eAAe,CAAC;AAQjE,MAAM,+BAA+B,GAAG,CAAC,CAAC;AAE1C,MAAM,mCAAmC,GAAG,CAAC,CAAC;AAE9C;;GAEG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,KAM3C,EAAgB,EAAE;;IACjB,MAAM,wBAAwB,GAAG,MAAM,CAAkC,EAAE,CAAC,CAAC;IAC7E,MAAM,wBAAwB,GAAG,MAAM,CAAkC,EAAE,CAAC,CAAC;IAE7E,MAAM,EACJ,kBAAkB,EAClB,gBAAgB,EAChB,qBAAqB,GAAG,+BAA+B,EACvD,wBAAwB,GAAG,mCAAmC,EAC9D,mBAAmB,GAAG,KAAK,EAC5B,GAAG,KAAK,CAAC;IAEV,wBAAwB,CAAC,OAAO,GAAG,gCAAgC,CAAC;QAClE,YAAY,EAAE,MAAA,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,WAAC,OAAA,MAAA,CAAC,CAAC,WAAW,0CAAE,WAAW,CAAA,EAAA,CAAC,mCAAI,EAAE;QACjF,gBAAgB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E,CAAC;IAE/E,OAAO,EAAE,gBAAgB,EAAE,6BAA6B,EAAE,CAAC;AAC7D,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\ntype 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: {\n remoteParticipants: VideoGalleryRemoteParticipant[];\n dominantSpeakers?: string[];\n maxRemoteVideoStreams?: number;\n maxAudioDominantSpeakers?: number;\n isScreenShareActive?: boolean;\n}): 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"]}