@100mslive/roomkit-react 0.1.7-alpha.0 → 0.1.8-alpha.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 (64) hide show
  1. package/dist/AudioLevel/AudioLevel.d.ts +5 -8
  2. package/dist/AudioLevel/index.d.ts +2 -1
  3. package/dist/AudioLevel/useBorderAudioLevel.d.ts +8 -0
  4. package/dist/{HLSView-F5BDZVT2.js → HLSView-IQRPLYNH.js} +8 -6
  5. package/dist/{HLSView-F5BDZVT2.js.map → HLSView-IQRPLYNH.js.map} +2 -2
  6. package/dist/Prebuilt/components/Chip.d.ts +12 -0
  7. package/dist/Prebuilt/components/PrebuiltDialogPortal.d.ts +4 -0
  8. package/dist/Prebuilt/components/RoleChangeRequest/RequestPrompt.d.ts +9 -0
  9. package/dist/VideoTile/StyledVideoTile.d.ts +445 -3
  10. package/dist/{VirtualBackground-THDRYDRA.js → VirtualBackground-GP4ATXD3.js} +3 -3
  11. package/dist/{chunk-JSH7SKEH.js → chunk-2H5NIZB7.js} +2 -2
  12. package/dist/{chunk-CDYRVICT.js → chunk-GLYGPYNS.js} +574 -1196
  13. package/dist/chunk-GLYGPYNS.js.map +7 -0
  14. package/dist/{chunk-U3G743OY.js → chunk-Z3O2WGWV.js} +2 -2
  15. package/dist/{chunk-U3G743OY.js.map → chunk-Z3O2WGWV.js.map} +1 -1
  16. package/dist/{conference-6IVZHILI.js → conference-JD35TNH4.js} +1545 -840
  17. package/dist/conference-JD35TNH4.js.map +7 -0
  18. package/dist/index.cjs.js +5975 -5849
  19. package/dist/index.cjs.js.map +4 -4
  20. package/dist/index.js +4 -2
  21. package/dist/meta.cjs.json +1633 -1399
  22. package/dist/meta.esbuild.json +1689 -1454
  23. package/package.json +6 -6
  24. package/src/AudioLevel/AudioLevel.tsx +79 -30
  25. package/src/AudioLevel/audio-level.png +0 -0
  26. package/src/AudioLevel/index.ts +2 -1
  27. package/src/AudioLevel/useBorderAudioLevel.tsx +34 -0
  28. package/src/Input/Input.tsx +1 -1
  29. package/src/Prebuilt/App.tsx +1 -0
  30. package/src/Prebuilt/components/Chat/ChatBody.jsx +125 -106
  31. package/src/Prebuilt/components/{Chip.jsx → Chip.tsx} +13 -2
  32. package/src/Prebuilt/components/Footer/ParticipantList.jsx +24 -13
  33. package/src/Prebuilt/components/Footer/RoleAccordion.tsx +43 -3
  34. package/src/Prebuilt/components/Leave/DesktopLeaveRoom.tsx +41 -46
  35. package/src/Prebuilt/components/Leave/MwebLeaveRoom.tsx +23 -35
  36. package/src/Prebuilt/components/MoreSettings/ChangeNameModal.jsx +3 -2
  37. package/src/Prebuilt/components/MoreSettings/EmbedUrl.jsx +3 -2
  38. package/src/Prebuilt/components/MwebLandscapePrompt.jsx +58 -0
  39. package/src/Prebuilt/components/Notifications/HLSFailureModal.jsx +3 -2
  40. package/src/Prebuilt/components/Notifications/PermissionErrorModal.jsx +3 -2
  41. package/src/Prebuilt/components/PrebuiltDialogPortal.tsx +6 -0
  42. package/src/Prebuilt/components/Preview/PreviewJoin.tsx +9 -6
  43. package/src/Prebuilt/components/RaiseHand.jsx +4 -11
  44. package/src/Prebuilt/components/RoleChangeModal.jsx +3 -2
  45. package/src/Prebuilt/components/RoleChangeRequest/RequestPrompt.tsx +67 -0
  46. package/src/Prebuilt/components/{RoleChangeRequestModal.tsx → RoleChangeRequest/RoleChangeRequestModal.tsx} +18 -50
  47. package/src/Prebuilt/components/Settings/SettingsModal.jsx +3 -2
  48. package/src/Prebuilt/components/Settings/StartRecording.jsx +3 -2
  49. package/src/Prebuilt/components/StatsForNerds.jsx +3 -2
  50. package/src/Prebuilt/components/VideoTile.jsx +34 -75
  51. package/src/Prebuilt/components/conference.jsx +1 -1
  52. package/src/Prebuilt/components/hooks/useMetadata.jsx +2 -1
  53. package/src/Prebuilt/components/pdfAnnotator/pdfFileOptions.jsx +3 -2
  54. package/src/Prebuilt/components/pdfAnnotator/shareScreenOptions.jsx +4 -29
  55. package/src/Prebuilt/components/pdfAnnotator/uploadedFile.jsx +3 -2
  56. package/src/Prebuilt/layouts/HLSView.jsx +4 -2
  57. package/src/Prebuilt/layouts/SidePane.tsx +0 -1
  58. package/src/Prebuilt/primitives/DialogContent.jsx +5 -4
  59. package/src/VideoTile/StyledVideoTile.tsx +10 -14
  60. package/dist/chunk-CDYRVICT.js.map +0 -7
  61. package/dist/conference-6IVZHILI.js.map +0 -7
  62. /package/dist/Prebuilt/components/{RoleChangeRequestModal.d.ts → RoleChangeRequest/RoleChangeRequestModal.d.ts} +0 -0
  63. /package/dist/{VirtualBackground-THDRYDRA.js.map → VirtualBackground-GP4ATXD3.js.map} +0 -0
  64. /package/dist/{chunk-JSH7SKEH.js.map → chunk-2H5NIZB7.js.map} +0 -0
@@ -0,0 +1,67 @@
1
+ import React from 'react';
2
+ import { useMedia } from 'react-use';
3
+ import { Box, Button, config as cssConfig, Dialog, Flex, Text } from '../../..';
4
+ import { Sheet } from '../../../Sheet';
5
+ import { PrebuiltDialogPortal } from '../PrebuiltDialogPortal';
6
+
7
+ export const RequestPrompt = ({
8
+ open = true,
9
+ onOpenChange,
10
+ title,
11
+ body,
12
+ actionText = 'Accept',
13
+ onAction,
14
+ }: {
15
+ open?: boolean;
16
+ onOpenChange: (value: boolean) => void;
17
+ title: string;
18
+ body: React.ReactNode;
19
+ actionText?: string;
20
+ onAction: () => void;
21
+ }) => {
22
+ const isMobile = useMedia(cssConfig.media.md);
23
+
24
+ if (isMobile) {
25
+ return (
26
+ <Sheet.Root open={open} onOpenChange={onOpenChange}>
27
+ <Sheet.Content css={{ py: '$8' }}>
28
+ <Text css={{ fontWeight: '$semiBold', c: '$on_surface_high', '@md': { px: '$8' } }}>{title}</Text>
29
+ {body}
30
+ <RequestActions actionText={actionText} onAction={onAction} />
31
+ </Sheet.Content>
32
+ </Sheet.Root>
33
+ );
34
+ }
35
+
36
+ return (
37
+ <Dialog.Root open={open} onOpenChange={onOpenChange}>
38
+ <PrebuiltDialogPortal>
39
+ <Dialog.Overlay />
40
+ <Dialog.Content css={{ p: '$10' }}>
41
+ <Dialog.Title css={{ p: 0, display: 'flex', flexDirection: 'row', gap: '$md', justifyContent: 'center' }}>
42
+ <Text variant="h6">{title}</Text>
43
+ </Dialog.Title>
44
+ <Box css={{ mt: '$4', mb: '$10' }}>{body}</Box>
45
+ <RequestActions actionText={actionText} onAction={onAction} />
46
+ </Dialog.Content>
47
+ </PrebuiltDialogPortal>
48
+ </Dialog.Root>
49
+ );
50
+ };
51
+
52
+ const RequestActions = ({ onAction, actionText }: { actionText?: string; onAction: () => void }) => (
53
+ <Flex justify="center" align="center" css={{ width: '100%', gap: '$md', '@md': { mt: '$8', px: '$8' } }}>
54
+ <Box css={{ width: '50%' }}>
55
+ <Dialog.Close css={{ width: '100%' }}>
56
+ <Button variant="standard" outlined css={{ width: '100%' }}>
57
+ Decline
58
+ </Button>
59
+ </Dialog.Close>
60
+ </Box>
61
+ <Box css={{ width: '50%' }}>
62
+ <Button variant="primary" css={{ width: '100%' }} onClick={onAction}>
63
+ {actionText}
64
+ </Button>
65
+ </Box>
66
+ </Flex>
67
+ );
@@ -7,13 +7,14 @@ import {
7
7
  useHMSActions,
8
8
  useHMSStore,
9
9
  } from '@100mslive/react-sdk';
10
+ import { Flex, Text } from '../../..';
10
11
  // @ts-ignore: No implicit Any
11
- import { PreviewControls, PreviewTile } from './Preview/PreviewJoin';
12
- import { Box, Button, Dialog, Flex, Text } from '../..';
12
+ import { PreviewControls, PreviewTile } from '../Preview/PreviewJoin';
13
+ import { RequestPrompt } from './RequestPrompt';
13
14
  // @ts-ignore: No implicit Any
14
- import { useMyMetadata } from './hooks/useMetadata';
15
+ import { useMyMetadata } from '../hooks/useMetadata';
15
16
  // @ts-ignore: No implicit Any
16
- import { ROLE_CHANGE_DECLINED } from '../common/constants';
17
+ import { ROLE_CHANGE_DECLINED } from '../../common/constants';
17
18
 
18
19
  export const RoleChangeRequestModal = () => {
19
20
  const hmsActions = useHMSActions();
@@ -38,7 +39,14 @@ export const RoleChangeRequestModal = () => {
38
39
 
39
40
  const body = (
40
41
  <>
41
- <Text css={{ fontWeight: 400, c: '$on_surface_medium', textAlign: 'center' }}>
42
+ <Text
43
+ variant="xs"
44
+ css={{
45
+ c: '$on_surface_medium',
46
+ textAlign: 'center',
47
+ '@md': { textAlign: 'left', borderBottom: '1px solid $border_bright', pb: '$4', px: '$8' },
48
+ }}
49
+ >
42
50
  Setup your audio and video before joining
43
51
  </Text>
44
52
  <Flex
@@ -48,20 +56,22 @@ export const RoleChangeRequestModal = () => {
48
56
  '@sm': { width: '100%' },
49
57
  flexDirection: 'column',
50
58
  mt: '$6',
59
+ '@md': { px: '$8' },
51
60
  }}
52
61
  >
53
62
  <PreviewTile name={name || ''} />
63
+
54
64
  <PreviewControls hideSettings={true} />
55
65
  </Flex>
56
66
  </>
57
67
  );
58
68
 
59
69
  return (
60
- <RequestDialog
61
- title={`You're invited to join the ${roleChangeRequest.role.name} role`}
70
+ <RequestPrompt
71
+ title="You're invited to join the stage"
62
72
  onOpenChange={async value => {
63
73
  if (!value) {
64
- await hmsActions.rejectChangeRole(roleChangeRequest);
74
+ hmsActions.rejectChangeRole(roleChangeRequest);
65
75
  sendEvent({ ...roleChangeRequest, peerName: name }, { peerId: roleChangeRequest.requestedBy?.id });
66
76
  await hmsActions.cancelMidCallPreview();
67
77
  await hmsActions.lowerLocalPeerHand();
@@ -77,45 +87,3 @@ export const RoleChangeRequestModal = () => {
77
87
  />
78
88
  );
79
89
  };
80
-
81
- const RequestDialog = ({
82
- open = true,
83
- onOpenChange,
84
- title,
85
- body,
86
- actionText = 'Accept',
87
- onAction,
88
- }: {
89
- open?: boolean;
90
- onOpenChange: (value: boolean) => void;
91
- title: string;
92
- body: React.ReactNode;
93
- actionText?: string;
94
- onAction: () => void;
95
- }) => (
96
- <Dialog.Root open={open} onOpenChange={onOpenChange}>
97
- <Dialog.Portal>
98
- <Dialog.Overlay />
99
- <Dialog.Content css={{ p: '$10' }}>
100
- <Dialog.Title css={{ p: 0, display: 'flex', flexDirection: 'row', gap: '$md', justifyContent: 'center' }}>
101
- <Text variant="h6">{title}</Text>
102
- </Dialog.Title>
103
- <Box css={{ mt: '$4', mb: '$10' }}>{body}</Box>
104
- <Flex justify="center" align="center" css={{ width: '100%', gap: '$md' }}>
105
- <Box css={{ width: '50%' }}>
106
- <Dialog.Close css={{ width: '100%' }}>
107
- <Button variant="standard" outlined css={{ width: '100%' }}>
108
- Cancel
109
- </Button>
110
- </Dialog.Close>
111
- </Box>
112
- <Box css={{ width: '50%' }}>
113
- <Button variant="primary" css={{ width: '100%' }} onClick={onAction}>
114
- {actionText}
115
- </Button>
116
- </Box>
117
- </Flex>
118
- </Dialog.Content>
119
- </Dialog.Portal>
120
- </Dialog.Root>
121
- );
@@ -9,6 +9,7 @@ import { Sheet } from '../../../Sheet';
9
9
  import { Tabs } from '../../../Tabs';
10
10
  import { Text } from '../../../Text';
11
11
  import { config as cssConfig } from '../../../Theme';
12
+ import { PrebuiltDialogPortal } from '../PrebuiltDialogPortal';
12
13
  import { settingContent, settingsList } from './common.js';
13
14
 
14
15
  const SettingsModal = ({ open, onOpenChange, screenType, children = <></> }) => {
@@ -186,7 +187,7 @@ const DesktopSettingModal = ({
186
187
  return (
187
188
  <Dialog.Root open={open} onOpenChange={onOpenChange}>
188
189
  <Dialog.Trigger asChild>{children}</Dialog.Trigger>
189
- <Dialog.Portal>
190
+ <PrebuiltDialogPortal>
190
191
  <Dialog.Overlay />
191
192
  <Dialog.Content
192
193
  css={{
@@ -256,7 +257,7 @@ const DesktopSettingModal = ({
256
257
  </IconButton>
257
258
  </Dialog.Close>
258
259
  </Dialog.Content>
259
- </Dialog.Portal>
260
+ </PrebuiltDialogPortal>
260
261
  </Dialog.Root>
261
262
  );
262
263
  };
@@ -2,6 +2,7 @@ import React, { useState } from 'react';
2
2
  import { selectPermissions, useHMSActions, useHMSStore, useRecordingStreaming } from '@100mslive/react-sdk';
3
3
  import { AlertTriangleIcon } from '@100mslive/react-icons';
4
4
  import { Button, Dialog, Flex, Text } from '../../../';
5
+ import { PrebuiltDialogPortal } from '../PrebuiltDialogPortal';
5
6
  import { ResolutionInput } from '../Streaming/ResolutionInput';
6
7
  import { getResolution } from '../Streaming/RTMPStreaming';
7
8
  import { ToastManager } from '../Toast/ToastManager';
@@ -21,7 +22,7 @@ const StartRecording = ({ open, onOpenChange }) => {
21
22
  if (isBrowserRecordingOn) {
22
23
  return (
23
24
  <Dialog.Root open={open} onOpenChange={onOpenChange}>
24
- <Dialog.Portal>
25
+ <PrebuiltDialogPortal>
25
26
  <Dialog.Content
26
27
  css={{
27
28
  width: 'min(400px,80%)',
@@ -66,7 +67,7 @@ const StartRecording = ({ open, onOpenChange }) => {
66
67
  </Button>
67
68
  </Flex>
68
69
  </Dialog.Content>
69
- </Dialog.Portal>
70
+ </PrebuiltDialogPortal>
70
71
  </Dialog.Root>
71
72
  );
72
73
  }
@@ -15,6 +15,7 @@ import { Dialog } from '../../Modal';
15
15
  import { Switch } from '../../Switch';
16
16
  import { Text } from '../../Text';
17
17
  import { DialogDropdownTrigger } from '../primitives/DropdownTrigger';
18
+ import { PrebuiltDialogPortal } from './PrebuiltDialogPortal';
18
19
  import { useSetUiSettings } from './AppData/useUISettings';
19
20
  import { useDropdownSelection } from './hooks/useDropdownSelection';
20
21
  import { UI_SETTINGS } from '../common/constants';
@@ -39,7 +40,7 @@ export const StatsForNerds = ({ onOpenChange }) => {
39
40
 
40
41
  return (
41
42
  <Dialog.Root defaultOpen onOpenChange={onOpenChange}>
42
- <Dialog.Portal>
43
+ <PrebuiltDialogPortal>
43
44
  <Dialog.Overlay />
44
45
  <Dialog.Content
45
46
  css={{
@@ -118,7 +119,7 @@ export const StatsForNerds = ({ onOpenChange }) => {
118
119
  <TrackStats trackID={selectedStat.id} layer={selectedStat.layer} local={selectedStat.local} />
119
120
  )}
120
121
  </Dialog.Content>
121
- </Dialog.Portal>
122
+ </PrebuiltDialogPortal>
122
123
  </Dialog.Root>
123
124
  );
124
125
  };
@@ -1,4 +1,4 @@
1
- import React, { Fragment, useCallback, useEffect, useMemo, useRef, useState } from 'react';
1
+ import React, { Fragment, useCallback, useMemo, useRef, useState } from 'react';
2
2
  import { useMedia } from 'react-use';
3
3
  import {
4
4
  selectAudioTrackByPeerID,
@@ -8,19 +8,17 @@ import {
8
8
  selectPeerMetadata,
9
9
  selectPeerNameByID,
10
10
  selectSessionStore,
11
- selectTrackAudioByID,
12
11
  selectVideoTrackByID,
13
12
  selectVideoTrackByPeerID,
14
13
  useHMSStore,
15
- useHMSVanillaStore,
16
14
  } from '@100mslive/react-sdk';
17
15
  import { BrbTileIcon, HandIcon, MicOffIcon } from '@100mslive/react-icons';
18
16
  import TileConnection from './Connection/TileConnection';
19
17
  import TileMenu, { isSameTile } from './TileMenu/TileMenu';
18
+ import { AudioLevel } from '../../AudioLevel';
20
19
  import { Avatar } from '../../Avatar';
21
- import { Box, Flex } from '../../Layout';
22
20
  import { VideoTileStats } from '../../Stats';
23
- import { config as cssConfig, keyframes } from '../../Theme';
21
+ import { config as cssConfig } from '../../Theme';
24
22
  import { Video } from '../../Video';
25
23
  import { StyledVideoTile } from '../../VideoTile';
26
24
  import { getVideoTileLabel } from './peerTileUtils';
@@ -72,21 +70,34 @@ const Tile = ({
72
70
  const onHoverHandler = useCallback(event => {
73
71
  setIsMouseHovered(event.type === 'mouseenter');
74
72
  }, []);
75
- const isTileBigEnoughToShowStats = height >= 180 && width >= 180;
76
- const avatarSize = useMemo(() => {
77
- if (!width || !height) {
78
- return undefined;
73
+
74
+ const ref = useRef(null);
75
+ const calculatedHeight = ref.current?.clientHeight || '';
76
+ const calculatedWidth = ref.current?.clientWidth || '';
77
+
78
+ const isTileBigEnoughToShowStats = calculatedHeight >= 180 && calculatedWidth >= 180;
79
+
80
+ const [avatarSize, attribBoxSize] = useMemo(() => {
81
+ if (!calculatedWidth || !calculatedHeight) {
82
+ return [undefined, undefined];
79
83
  }
80
- if (width <= 150 || height <= 150) {
81
- return 'small';
82
- } else if (width <= 300 || height <= 300) {
83
- return 'medium';
84
+ let avatarSize = 'large';
85
+ if (calculatedWidth <= 150 || calculatedHeight <= 150) {
86
+ avatarSize = 'small';
87
+ } else if (calculatedWidth <= 300 || calculatedHeight <= 300) {
88
+ avatarSize = 'medium';
84
89
  }
85
- return 'large';
86
- }, [width, height]);
90
+ let attribBoxSize = 'medium';
91
+ if (calculatedWidth <= 180 || calculatedHeight <= 180) {
92
+ attribBoxSize = 'small';
93
+ }
94
+
95
+ return [avatarSize, attribBoxSize];
96
+ }, [calculatedWidth, calculatedHeight]);
87
97
 
88
98
  return (
89
99
  <StyledVideoTile.Root
100
+ ref={ref}
90
101
  css={{
91
102
  width,
92
103
  height,
@@ -131,14 +142,13 @@ const Tile = ({
131
142
 
132
143
  {!hideAudioMuteOnTile ? (
133
144
  isAudioMuted ? (
134
- <StyledVideoTile.AudioIndicator
135
- data-testid="participant_audio_mute_icon"
136
- size={width && height && (width < 180 || height < 180) ? 'small' : 'medium'}
137
- >
145
+ <StyledVideoTile.AudioIndicator data-testid="participant_audio_mute_icon" size={attribBoxSize}>
138
146
  <MicOffIcon />
139
147
  </StyledVideoTile.AudioIndicator>
140
148
  ) : (
141
- <AudioLevel trackId={audioTrack?.id} />
149
+ <StyledVideoTile.AudioIndicator size={attribBoxSize}>
150
+ <AudioLevel trackId={audioTrack?.id} size={attribBoxSize} />
151
+ </StyledVideoTile.AudioIndicator>
142
152
  )
143
153
  ) : null}
144
154
  {isMouseHovered || (isDragabble && isMobile) ? (
@@ -150,7 +160,7 @@ const Tile = ({
150
160
  enableSpotlightingPeer={enableSpotlightingPeer}
151
161
  />
152
162
  ) : null}
153
- {!hideMetadataOnTile && <PeerMetadata peerId={peerId} />}
163
+ {!hideMetadataOnTile && <PeerMetadata peerId={peerId} size={attribBoxSize} />}
154
164
 
155
165
  <TileConnection
156
166
  hideLabel={hideParticipantNameOnTile}
@@ -167,58 +177,7 @@ const Tile = ({
167
177
  );
168
178
  };
169
179
 
170
- const metaStyles = { top: '$4', left: '$4', width: '$14', height: '$14' };
171
-
172
- const heightAnimation = value =>
173
- keyframes({
174
- '50%': {
175
- transform: `scale3d(1,${value},1)`,
176
- },
177
- '100%': {
178
- transform: `scale3d(1,1,1)`,
179
- },
180
- });
181
-
182
- const AudioLevelIndicator = ({ trackId, value, delay }) => {
183
- const vanillaStore = useHMSVanillaStore();
184
- const ref = useRef();
185
-
186
- useEffect(() => {
187
- const unsubscribe = vanillaStore.subscribe(audioLevel => {
188
- if (ref.current) {
189
- ref.current.style['animation'] = `${heightAnimation(
190
- audioLevel ? value : 1,
191
- )} 0.3s cubic-bezier(0.61, 1, 0.88, 1) infinite ${delay}s`;
192
- }
193
- }, selectTrackAudioByID(trackId));
194
- return unsubscribe;
195
- }, [vanillaStore, trackId, value, delay]);
196
- return (
197
- <Box
198
- ref={ref}
199
- css={{
200
- w: 4,
201
- height: 6,
202
- r: 2,
203
- bg: '$on_primary_high',
204
- }}
205
- />
206
- );
207
- };
208
-
209
- export const AudioLevel = ({ trackId }) => {
210
- return (
211
- <StyledVideoTile.AudioIndicator>
212
- <Flex align="center" justify="center" css={{ gap: '$2' }}>
213
- {[3, 2, 3].map((v, i) => (
214
- <AudioLevelIndicator trackId={trackId} value={v} delay={i * 0.15} key={i} />
215
- ))}
216
- </Flex>
217
- </StyledVideoTile.AudioIndicator>
218
- );
219
- };
220
-
221
- const PeerMetadata = ({ peerId }) => {
180
+ const PeerMetadata = ({ peerId, size }) => {
222
181
  const metaData = useHMSStore(selectPeerMetadata(peerId));
223
182
  const isBRB = metaData?.isBRBOn || false;
224
183
  const isHandRaised = useHMSStore(selectHasPeerHandRaised(peerId));
@@ -226,12 +185,12 @@ const PeerMetadata = ({ peerId }) => {
226
185
  return (
227
186
  <Fragment>
228
187
  {isHandRaised ? (
229
- <StyledVideoTile.AttributeBox css={metaStyles} data-testid="raiseHand_icon_onTile">
188
+ <StyledVideoTile.AttributeBox size={size} data-testid="raiseHand_icon_onTile">
230
189
  <HandIcon width={24} height={24} />
231
190
  </StyledVideoTile.AttributeBox>
232
191
  ) : null}
233
192
  {isBRB ? (
234
- <StyledVideoTile.AttributeBox css={metaStyles} data-testid="brb_icon_onTile">
193
+ <StyledVideoTile.AttributeBox size={size} data-testid="brb_icon_onTile">
235
194
  <BrbTileIcon width={22} height={22} />
236
195
  </StyledVideoTile.AttributeBox>
237
196
  ) : null}
@@ -13,12 +13,12 @@ import { Footer } from './Footer/Footer';
13
13
  import { HLSFailureModal } from './Notifications/HLSFailureModal';
14
14
  import { ActivatedPIP } from './PIP/PIPComponent';
15
15
  import { PictureInPicture } from './PIP/PIPManager';
16
+ import { RoleChangeRequestModal } from './RoleChangeRequest/RoleChangeRequestModal';
16
17
  import { Box, Flex } from '../../Layout';
17
18
  import { useHMSPrebuiltContext } from '../AppContext';
18
19
  import { VideoStreamingSection } from '../layouts/VideoStreamingSection';
19
20
  import FullPageProgress from './FullPageProgress';
20
21
  import { Header } from './Header';
21
- import { RoleChangeRequestModal } from './RoleChangeRequestModal';
22
22
  import {
23
23
  useRoomLayoutConferencingScreen,
24
24
  useRoomLayoutPreviewScreen,
@@ -31,12 +31,13 @@ export const useMyMetadata = () => {
31
31
  await hmsActions.lowerLocalPeerHand();
32
32
  } else {
33
33
  await hmsActions.raiseLocalPeerHand();
34
+ await update({ isBRBOn: false });
34
35
  }
35
36
  }, [isHandRaised]); //eslint-disable-line
36
37
 
37
38
  const toggleBRB = useCallback(async () => {
38
39
  const newValue = !metaData?.isBRBOn;
39
- await update({ isBRBOn: !metaData?.isBRBOn });
40
+ await update({ isBRBOn: newValue });
40
41
  if (newValue) {
41
42
  await hmsActions.lowerLocalPeerHand();
42
43
  }
@@ -1,6 +1,7 @@
1
1
  import React, { useState } from 'react';
2
2
  import { Dialog, Flex } from '../../../';
3
3
  import { DialogInputFile } from '../../primitives/DialogContent';
4
+ import { PrebuiltDialogPortal } from '../PrebuiltDialogPortal';
4
5
  import { PDFHeader } from './pdfHeader';
5
6
  import { SubmitPDF } from './submitPdf';
6
7
  import { UploadedFile } from './uploadedFile';
@@ -10,7 +11,7 @@ export function PDFFileOptions({ onOpenChange }) {
10
11
 
11
12
  return !pdfFile ? (
12
13
  <Dialog.Root defaultOpen onOpenChange={onOpenChange}>
13
- <Dialog.Portal>
14
+ <PrebuiltDialogPortal>
14
15
  <Dialog.Overlay />
15
16
  <Dialog.Content
16
17
  css={{
@@ -34,7 +35,7 @@ export function PDFFileOptions({ onOpenChange }) {
34
35
  <SubmitPDF pdfFile={pdfFile} onOpenChange={onOpenChange} />
35
36
  </Flex>
36
37
  </Dialog.Content>
37
- </Dialog.Portal>
38
+ </PrebuiltDialogPortal>
38
39
  </Dialog.Root>
39
40
  ) : (
40
41
  <UploadedFile pdfFile={pdfFile} setPDFFile={setPDFFile} onOpenChange={onOpenChange} />
@@ -3,7 +3,7 @@ import { useScreenShare } from '@100mslive/react-sdk';
3
3
  import { StarIcon, VerticalMenuIcon } from '@100mslive/react-icons';
4
4
  import PDFShareImg from './../../images/pdf-share.png';
5
5
  import ScreenShareImg from './../../images/screen-share.png';
6
- import { Box, Button, Dropdown, Flex, IconButton, Text, Tooltip } from '../../../';
6
+ import { Box, Dropdown, Flex, IconButton, Text, Tooltip } from '../../../';
7
7
  import { ShareMenuIcon } from '../ShareMenuIcon';
8
8
  import { PDFFileOptions } from './pdfFileOptions';
9
9
 
@@ -75,7 +75,8 @@ export function ShareScreenOptions() {
75
75
  alignItems: 'flex-start',
76
76
  gap: '$8',
77
77
  px: '$10',
78
- py: '$6',
78
+ pt: '$6',
79
+ pb: '$10',
79
80
  '&:hover': {
80
81
  bg: '$transparent',
81
82
  cursor: 'default',
@@ -163,7 +164,7 @@ export function ShareScreenOptions() {
163
164
  align="center"
164
165
  css={{
165
166
  position: 'absolute',
166
- top: '29%',
167
+ top: '35%',
167
168
  left: '54%',
168
169
  padding: '$2 $4',
169
170
  r: '$2',
@@ -200,32 +201,6 @@ export function ShareScreenOptions() {
200
201
  </Flex>
201
202
  </Flex>
202
203
  </Dropdown.Item>
203
- <Dropdown.Item
204
- css={{
205
- px: '$10',
206
- pb: '$10',
207
- pt: '$6',
208
- '&:hover': {
209
- bg: '$transparent',
210
- cursor: 'default',
211
- },
212
- }}
213
- >
214
- <Button
215
- variant="standard"
216
- outlined
217
- type="submit"
218
- onClick={() => {
219
- updateState(MODALS.SHARE, false);
220
- }}
221
- data-testid="share_btn"
222
- css={{
223
- w: '100%',
224
- }}
225
- >
226
- Cancel
227
- </Button>
228
- </Dropdown.Item>
229
204
  </Dropdown.Content>
230
205
  </Dropdown.Root>
231
206
  {openModals.has(MODALS.PDF_SHARE) && (
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import { TrashIcon } from '@100mslive/react-icons';
3
3
  import { Dialog, Flex, Text } from '../../../';
4
4
  import { DialogRow } from '../../primitives/DialogContent';
5
+ import { PrebuiltDialogPortal } from '../PrebuiltDialogPortal';
5
6
  import { PDFHeader } from './pdfHeader';
6
7
  import { PDFInfo } from './pdfInfo';
7
8
  import { SubmitPDF } from './submitPdf';
@@ -10,7 +11,7 @@ export const UploadedFile = ({ pdfFile, setPDFFile, onOpenChange }) => {
10
11
  const [fileName, ext] = pdfFile.name.split('.');
11
12
  return (
12
13
  <Dialog.Root defaultOpen onOpenChange={onOpenChange}>
13
- <Dialog.Portal>
14
+ <PrebuiltDialogPortal>
14
15
  <Dialog.Overlay />
15
16
  <Dialog.Content
16
17
  css={{
@@ -65,7 +66,7 @@ export const UploadedFile = ({ pdfFile, setPDFFile, onOpenChange }) => {
65
66
  <SubmitPDF pdfFile={pdfFile} onOpenChange={onOpenChange} />
66
67
  </Flex>
67
68
  </Dialog.Content>
68
- </Dialog.Portal>
69
+ </PrebuiltDialogPortal>
69
70
  </Dialog.Root>
70
71
  );
71
72
  };
@@ -272,10 +272,12 @@ const HLSView = () => {
272
272
  top: '40%',
273
273
  left: '50%',
274
274
  transform: 'translateY(-40%) translateX(-50%)',
275
- padding: '$4 $14',
275
+ padding: '$8 14px $8 18px',
276
276
  display: 'inline-flex',
277
- r: '$0',
277
+ r: '50%',
278
+ gap: '$1',
278
279
  bg: '$primary_default',
280
+ zIndex: 21,
279
281
  }}
280
282
  >
281
283
  <IconButton onClick={async () => await hlsPlayer?.play()} data-testid="play_btn">
@@ -64,7 +64,6 @@ const SidePane = ({
64
64
  <VideoTile
65
65
  peerId={activeScreensharePeerId}
66
66
  trackId={trackId}
67
- width="100%"
68
67
  height={225}
69
68
  rootCSS={{ p: 0, alignSelf: 'start', flexShrink: 0 }}
70
69
  {...tileLayout}
@@ -1,5 +1,6 @@
1
1
  import React, { useRef } from 'react';
2
2
  import { CheckIcon, CloudUploadIcon, CrossIcon } from '@100mslive/react-icons';
3
+ import { PrebuiltDialogPortal } from '../components/PrebuiltDialogPortal';
3
4
  import { Button } from '../../Button';
4
5
  import { Checkbox } from '../../Checkbox';
5
6
  import { HorizontalDivider } from '../../Divider';
@@ -14,7 +15,7 @@ import { Text } from '../../Text';
14
15
 
15
16
  export const DialogContent = ({ Icon, title, closeable = true, children, css, iconCSS = {}, ...props }) => {
16
17
  return (
17
- <Dialog.Portal>
18
+ <PrebuiltDialogPortal>
18
19
  <Dialog.Overlay />
19
20
  <Dialog.Content css={{ width: 'min(600px, 100%)', ...css }} {...props}>
20
21
  <Dialog.Title>
@@ -35,7 +36,7 @@ export const DialogContent = ({ Icon, title, closeable = true, children, css, ic
35
36
  <HorizontalDivider css={{ mt: '0.8rem' }} />
36
37
  <Box>{children}</Box>
37
38
  </Dialog.Content>
38
- </Dialog.Portal>
39
+ </PrebuiltDialogPortal>
39
40
  );
40
41
  };
41
42
 
@@ -60,7 +61,7 @@ export const ErrorDialog = ({ open = true, onOpenChange, title, children, ...pro
60
61
 
61
62
  export const RequestDialog = ({ open = true, onOpenChange, title, body, actionText = 'Accept', onAction, Icon }) => (
62
63
  <Dialog.Root open={open} onOpenChange={onOpenChange}>
63
- <Dialog.Portal>
64
+ <PrebuiltDialogPortal>
64
65
  <Dialog.Overlay />
65
66
  <Dialog.Content css={{ width: 'min(400px,80%)', p: '$10' }}>
66
67
  <Dialog.Title css={{ p: 0, display: 'flex', flexDirection: 'row', gap: '$md' }}>
@@ -97,7 +98,7 @@ export const RequestDialog = ({ open = true, onOpenChange, title, body, actionTe
97
98
  </Box>
98
99
  </Flex>
99
100
  </Dialog.Content>
100
- </Dialog.Portal>
101
+ </PrebuiltDialogPortal>
101
102
  </Dialog.Root>
102
103
  );
103
104