@100mslive/roomkit-react 0.2.8-alpha.7 → 0.2.8-alpha.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. package/dist/{HLSView-MYKM5AXS.js → HLSView-TOMPA4E4.js} +191 -188
  2. package/dist/HLSView-TOMPA4E4.js.map +7 -0
  3. package/dist/Prebuilt/components/HMSVideo/HLSQualitySelector.d.ts +3 -2
  4. package/dist/Prebuilt/components/HMSVideo/VideoProgress.d.ts +1 -3
  5. package/dist/Prebuilt/components/HMSVideo/index.d.ts +1 -3
  6. package/dist/Prebuilt/components/HMSVideo/utils.d.ts +0 -1
  7. package/dist/Prebuilt/components/Leave/DesktopLeaveRoom.d.ts +2 -1
  8. package/dist/Prebuilt/components/Leave/LeaveRoom.d.ts +2 -1
  9. package/dist/Prebuilt/components/Leave/MwebLeaveRoom.d.ts +2 -1
  10. package/dist/Prebuilt/components/RaiseHand.d.ts +4 -1
  11. package/dist/Sheet/Sheet.d.ts +1 -0
  12. package/dist/{chunk-DRBTAFKN.js → chunk-FUDX3LDB.js} +820 -723
  13. package/dist/chunk-FUDX3LDB.js.map +7 -0
  14. package/dist/index.cjs.js +1324 -1220
  15. package/dist/index.cjs.js.map +4 -4
  16. package/dist/index.js +1 -1
  17. package/dist/meta.cjs.json +274 -209
  18. package/dist/meta.esbuild.json +283 -216
  19. package/package.json +6 -6
  20. package/src/Button/Button.tsx +4 -4
  21. package/src/Fieldset/Fieldset.tsx +1 -1
  22. package/src/Input/PasswordInput.stories.tsx +1 -1
  23. package/src/Pagination/StyledPagination.stories.tsx +2 -2
  24. package/src/Prebuilt/IconButton.tsx +1 -1
  25. package/src/Prebuilt/components/Chat/Chat.tsx +41 -1
  26. package/src/Prebuilt/components/Chat/ChatFooter.tsx +19 -15
  27. package/src/Prebuilt/components/EmojiReaction.jsx +32 -22
  28. package/src/Prebuilt/components/Footer/RoleOptions.tsx +125 -126
  29. package/src/Prebuilt/components/HMSVideo/HLSQualitySelector.tsx +85 -78
  30. package/src/Prebuilt/components/HMSVideo/HMSVideo.jsx +3 -4
  31. package/src/Prebuilt/components/HMSVideo/MwebHLSViewTitle.tsx +49 -56
  32. package/src/Prebuilt/components/HMSVideo/VideoProgress.tsx +6 -6
  33. package/src/Prebuilt/components/HMSVideo/VideoTime.tsx +2 -1
  34. package/src/Prebuilt/components/HMSVideo/utils.ts +0 -8
  35. package/src/Prebuilt/components/IconButtonWithOptions/IconButtonWithOptions.tsx +1 -1
  36. package/src/Prebuilt/components/Leave/DesktopLeaveRoom.tsx +50 -46
  37. package/src/Prebuilt/components/Leave/LeaveRoom.tsx +10 -5
  38. package/src/Prebuilt/components/Leave/MwebLeaveRoom.tsx +12 -6
  39. package/src/Prebuilt/components/MoreSettings/SplitComponents/MwebOptions.tsx +5 -2
  40. package/src/Prebuilt/components/Notifications/HandRaisedNotifications.tsx +4 -1
  41. package/src/Prebuilt/components/Polls/Voting/Voting.tsx +3 -2
  42. package/src/Prebuilt/components/Polls/common/OptionInputWithDelete.tsx +1 -1
  43. package/src/Prebuilt/components/Polls/common/utils.ts +2 -2
  44. package/src/Prebuilt/components/RaiseHand.tsx +8 -2
  45. package/src/Prebuilt/components/RoomDetails/RoomDetailsPane.tsx +41 -14
  46. package/src/Prebuilt/components/pdfAnnotator/shareScreenOptions.jsx +2 -2
  47. package/src/Prebuilt/components/pdfAnnotator/uploadedFile.jsx +1 -1
  48. package/src/Prebuilt/layouts/HLSView.jsx +58 -47
  49. package/src/Prebuilt/layouts/SidePane.tsx +1 -2
  50. package/src/Prebuilt/layouts/VideoStreamingSection.tsx +3 -2
  51. package/src/Prebuilt/primitives/DialogContent.jsx +1 -1
  52. package/src/Sheet/Sheet.tsx +3 -3
  53. package/dist/HLSView-MYKM5AXS.js.map +0 -7
  54. package/dist/chunk-DRBTAFKN.js.map +0 -7
@@ -54,6 +54,7 @@ import { useDropdownList } from '../../hooks/useDropdownList';
54
54
  // @ts-ignore: No implicit any
55
55
  import { useMyMetadata } from '../../hooks/useMetadata';
56
56
  import { useUnreadPollQuizPresent } from '../../hooks/useUnreadPollQuizPresent';
57
+ import { useLandscapeHLSStream, useMobileHLSStream } from '../../../common/hooks';
57
58
  // @ts-ignore: No implicit any
58
59
  import { getFormattedCount } from '../../../common/utils';
59
60
  // @ts-ignore: No implicit any
@@ -99,6 +100,8 @@ export const MwebOptions = ({
99
100
  const { unreadPollQuiz, setUnreadPollQuiz } = useUnreadPollQuizPresent();
100
101
  const { title, description } = useRoomLayoutHeader();
101
102
  const toggleDetailsSheet = useSheetToggle(SHEET_OPTIONS.ROOM_DETAILS);
103
+ const isMobileHLSStream = useMobileHLSStream();
104
+ const isLandscapeHLSStream = useLandscapeHLSStream();
102
105
 
103
106
  useDropdownList({ open: openModals.size > 0 || openOptionsSheet || openSettingsSheet, name: 'MoreSettings' });
104
107
 
@@ -121,7 +124,7 @@ export const MwebOptions = ({
121
124
  <Sheet.Root open={openOptionsSheet} onOpenChange={setOpenOptionsSheet}>
122
125
  <Tooltip title="More options">
123
126
  <Sheet.Trigger asChild data-testid="more_settings_btn">
124
- <IconButton css={{ '@md': { bg: screenType === 'hls_live_streaming' ? '$surface_default' : '' } }}>
127
+ <IconButton css={{ bg: isMobileHLSStream || isLandscapeHLSStream ? '$surface_default' : '' }}>
125
128
  <HamburgerMenuIcon />
126
129
  </IconButton>
127
130
  </Sheet.Trigger>
@@ -197,7 +200,7 @@ export const MwebOptions = ({
197
200
  </ActionTile.Root>
198
201
  ) : null} */}
199
202
 
200
- {elements?.emoji_reactions && (
203
+ {elements?.emoji_reactions && !(isLandscapeHLSStream || isMobileHLSStream) && (
201
204
  <ActionTile.Root
202
205
  onClick={() => {
203
206
  setShowEmojiCard(true);
@@ -3,6 +3,7 @@ import {
3
3
  HMSNotificationTypes,
4
4
  HMSRoomState,
5
5
  selectHasPeerHandRaised,
6
+ selectPeerByID,
6
7
  selectRoomState,
7
8
  useHMSNotifications,
8
9
  useHMSStore,
@@ -32,8 +33,10 @@ export const HandRaisedNotifications = () => {
32
33
  return;
33
34
  }
34
35
  const hasPeerHandRaised = vanillaStore.getState(selectHasPeerHandRaised(notification.data.id));
36
+ const peer = vanillaStore.getState(selectPeerByID(notification.data.id));
35
37
  if (hasPeerHandRaised) {
36
- ToastBatcher.showToast({ notification, type: on_stage_exp ? 'RAISE_HAND_HLS' : 'RAISE_HAND' });
38
+ const showCTA = peer?.roleName && (on_stage_exp?.off_stage_roles || [])?.includes(peer.roleName);
39
+ ToastBatcher.showToast({ notification, type: showCTA ? 'RAISE_HAND_HLS' : 'RAISE_HAND' });
37
40
  console.debug('Metadata updated', notification.data);
38
41
  }
39
42
  }, [isSubscribing, notification, on_stage_exp, roomState, vanillaStore]);
@@ -38,9 +38,9 @@ export const Voting = ({ id, toggleVoting }: { id: string; toggleVoting: () => v
38
38
  <Flex
39
39
  align="center"
40
40
  css={{
41
- gap: '$6',
41
+ gap: '$4',
42
42
  py: '$6',
43
- px: '$10',
43
+ px: '$8',
44
44
  my: '$4',
45
45
  w: '100%',
46
46
  color: '$on_surface_high',
@@ -60,6 +60,7 @@ export const Voting = ({ id, toggleVoting }: { id: string; toggleVoting: () => v
60
60
  marginLeft: 'auto',
61
61
  cursor: 'pointer',
62
62
  '&:hover': { opacity: '0.8' },
63
+ height: 'fit-content',
63
64
  }}
64
65
  >
65
66
  <CrossIcon onClick={toggleVoting} />
@@ -29,7 +29,7 @@ export const OptionInputWithDelete = ({
29
29
  key={index}
30
30
  onChange={event => handleOptionTextChange(index, event.target.value)}
31
31
  />
32
- <IconButton onClick={() => removeOption(index)} css={{ bg: '$transparent', border: 'none' }}>
32
+ <IconButton onClick={() => removeOption(index)} css={{ bg: 'transparent', border: 'none' }}>
33
33
  <TrashIcon />
34
34
  </IconButton>
35
35
  </>
@@ -4,7 +4,7 @@ export const getFormattedTime = (milliseconds: number | undefined, precise = tru
4
4
  const totalSeconds = milliseconds / 1000;
5
5
  const hours = Math.floor(totalSeconds / 3600);
6
6
  const minutes = Math.floor((totalSeconds % 3600) / 60);
7
- const seconds = precise ? totalSeconds % 60 : Math.floor(totalSeconds % 60);
7
+ const seconds = totalSeconds % 60;
8
8
 
9
9
  let formattedTime = '';
10
10
  if (hours) {
@@ -16,7 +16,7 @@ export const getFormattedTime = (milliseconds: number | undefined, precise = tru
16
16
  if (!precise && (hours || minutes)) {
17
17
  return formattedTime;
18
18
  }
19
- formattedTime += `${seconds}s`;
19
+ formattedTime += `${precise ? seconds.toFixed(3) : Math.floor(seconds)}s`;
20
20
 
21
21
  return formattedTime;
22
22
  };
@@ -1,16 +1,22 @@
1
1
  import React from 'react';
2
2
  import { HandIcon, HandRaiseSlashedIcon } from '@100mslive/react-icons';
3
+ import { CSS } from '../../Theme';
3
4
  import { Tooltip } from '../../Tooltip';
4
5
  // @ts-ignore: No implicit Any
5
6
  import IconButton from '../IconButton';
6
7
  // @ts-ignore: No implicit Any
7
8
  import { useMyMetadata } from './hooks/useMetadata';
8
9
 
9
- export const RaiseHand = () => {
10
+ export const RaiseHand = ({ css }: { css?: CSS }) => {
10
11
  const { isHandRaised, toggleHandRaise } = useMyMetadata();
11
12
  return (
12
13
  <Tooltip title={isHandRaised ? 'Lower hand' : 'Raise hand'}>
13
- <IconButton data-testid="hand_raise_btn" active={!isHandRaised} onClick={async () => await toggleHandRaise()}>
14
+ <IconButton
15
+ data-testid="hand_raise_btn"
16
+ css={css}
17
+ active={!isHandRaised}
18
+ onClick={async () => await toggleHandRaise()}
19
+ >
14
20
  {isHandRaised ? <HandRaiseSlashedIcon /> : <HandIcon />}
15
21
  </IconButton>
16
22
  </Tooltip>
@@ -2,31 +2,32 @@ import React from 'react';
2
2
  import { CrossIcon } from '@100mslive/react-icons';
3
3
  import { Box, Flex } from '../../../Layout';
4
4
  import { Text } from '../../../Text';
5
+ // @ts-ignore: No implicit any
6
+ import { Logo } from '../Header/HeaderComponents';
5
7
  import { RoomDetailsRow } from './RoomDetailsRow';
6
8
  import { useRoomLayoutHeader } from '../../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';
7
9
  // @ts-ignore
8
10
  import { useSidepaneToggle } from '../AppData/useSidepane';
11
+ import { useMobileHLSStream } from '../../common/hooks';
9
12
  import { SIDE_PANE_OPTIONS } from '../../common/constants';
10
13
 
11
14
  export const RoomDetailsPane = () => {
12
- const { title, description, details } = useRoomLayoutHeader();
13
- const toggleDetailsPane = useSidepaneToggle(SIDE_PANE_OPTIONS.ROOM_DETAILS);
15
+ const { description } = useRoomLayoutHeader();
16
+ const isMwebHLSStream = useMobileHLSStream();
14
17
  return (
15
18
  <Box css={{ flex: '1 1 0' }}>
16
- <Flex justify="between" align="center" css={{ w: '100%' }}>
17
- <Text variant="h6">{title}</Text>
18
- <Flex
19
- onClick={toggleDetailsPane}
20
- css={{ color: '$on_surface_high', cursor: 'pointer', '&:hover': { opacity: '0.8' } }}
21
- >
22
- <CrossIcon />
19
+ {isMwebHLSStream ? (
20
+ <Flex direction="row" align="center" gap="2">
21
+ <Logo />
22
+ <ShowRoomDetailHeader />
23
23
  </Flex>
24
- </Flex>
25
-
26
- <RoomDetailsRow details={details} />
27
-
24
+ ) : (
25
+ <ShowRoomDetailHeader />
26
+ )}
28
27
  <Box css={{ mt: '$10' }}>
29
- <Text css={{ color: '$on_surface_high', fontWeight: '$semiBold' }}>Description</Text>
28
+ <Text css={{ color: '$on_surface_high', fontWeight: '$semiBold', display: isMwebHLSStream ? 'none' : '' }}>
29
+ Description
30
+ </Text>
30
31
  <Text variant="sm" css={{ c: '$on_surface_medium' }}>
31
32
  {description}
32
33
  </Text>
@@ -34,3 +35,29 @@ export const RoomDetailsPane = () => {
34
35
  </Box>
35
36
  );
36
37
  };
38
+
39
+ const ShowRoomDetailHeader = () => {
40
+ const { title, details } = useRoomLayoutHeader();
41
+ const toggleDetailsPane = useSidepaneToggle(SIDE_PANE_OPTIONS.ROOM_DETAILS);
42
+ const isMwebHLSStream = useMobileHLSStream();
43
+ return (
44
+ <Flex direction="column">
45
+ <Flex justify="between" align="center" css={{ w: '100%' }}>
46
+ <Text variant="h6">{title}</Text>
47
+ {!isMwebHLSStream && (
48
+ <Flex
49
+ onClick={toggleDetailsPane}
50
+ css={{
51
+ color: '$on_surface_high',
52
+ cursor: 'pointer',
53
+ '&:hover': { opacity: '0.8' },
54
+ }}
55
+ >
56
+ <CrossIcon />
57
+ </Flex>
58
+ )}
59
+ </Flex>
60
+ <RoomDetailsRow details={details} />
61
+ </Flex>
62
+ );
63
+ };
@@ -61,7 +61,7 @@ export function ShareScreenOptions() {
61
61
  pt: '$10',
62
62
  pb: '$6',
63
63
  '&:hover': {
64
- bg: '$transparent',
64
+ bg: 'transparent',
65
65
  cursor: 'default',
66
66
  },
67
67
  }}
@@ -78,7 +78,7 @@ export function ShareScreenOptions() {
78
78
  pt: '$6',
79
79
  pb: '$10',
80
80
  '&:hover': {
81
- bg: '$transparent',
81
+ bg: 'transparent',
82
82
  cursor: 'default',
83
83
  },
84
84
  }}
@@ -36,7 +36,7 @@ export const UploadedFile = ({ pdfFile, setPDFFile, onOpenChange }) => {
36
36
  w: '100%',
37
37
  '&:focus': {
38
38
  boxShadow: '0 0 0 1px $colors$primary_default',
39
- border: '1px solid $transparent',
39
+ border: '1px solid transparent',
40
40
  },
41
41
  mb: 0,
42
42
  mt: '$6',
@@ -43,7 +43,7 @@ const toastMap = {};
43
43
 
44
44
  const HLSView = () => {
45
45
  const videoRef = useRef(null);
46
- const hlsViewRef = useRef(null);
46
+ const hlsViewRef = useRef();
47
47
  const hlsState = useHMSStore(selectHLSState);
48
48
  const enablHlsStats = useHMSStore(selectAppData(APP_DATA.hlsStats));
49
49
  const { elements, screenType } = useRoomLayoutConferencingScreen();
@@ -170,25 +170,27 @@ const HLSView = () => {
170
170
  const poll = vanillaStore.getState(selectPollByID(pollId));
171
171
  const pollStartedBy = vanillaStore.getState(selectPeerNameByID(poll.startedBy)) || 'Participant';
172
172
  // launch poll
173
- const toastID = ToastManager.addToast({
174
- title: `${pollStartedBy} started a ${poll.type}: ${poll.title}`,
175
- action: (
176
- <Button
177
- onClick={() => togglePollView(pollId)}
178
- variant="standard"
179
- css={{
180
- backgroundColor: '$surface_bright',
181
- fontWeight: '$semiBold',
182
- color: '$on_surface_high',
183
- p: '$xs $md',
184
- }}
185
- >
186
- {poll.type === 'quiz' ? 'Answer' : 'Vote'}
187
- </Button>
188
- ),
189
- duration: Infinity,
190
- });
191
- toastMap[pollId] = toastID;
173
+ if (!toastMap[pollId]) {
174
+ const toastID = ToastManager.addToast({
175
+ title: `${pollStartedBy} started a ${poll.type}: ${poll.title}`,
176
+ action: (
177
+ <Button
178
+ onClick={() => togglePollView(pollId)}
179
+ variant="standard"
180
+ css={{
181
+ backgroundColor: '$surface_bright',
182
+ fontWeight: '$semiBold',
183
+ color: '$on_surface_high',
184
+ p: '$xs $md',
185
+ }}
186
+ >
187
+ {poll.type === 'quiz' ? 'Answer' : 'Vote'}
188
+ </Button>
189
+ ),
190
+ duration: Infinity,
191
+ });
192
+ toastMap[pollId] = toastID;
193
+ }
192
194
  return;
193
195
  }
194
196
  switch (parsedPayload.type) {
@@ -297,7 +299,7 @@ const HLSView = () => {
297
299
  }, []);
298
300
  const onDoubleClickHandler = useCallback(
299
301
  event => {
300
- if (!(isMobile || isLandscape)) {
302
+ if (!(isMobile || isLandscape) || hlsState?.variants[0]?.playlist_type !== HLSPlaylistType.DVR) {
301
303
  return;
302
304
  }
303
305
  const sidePercentage = (event.screenX * 100) / event.target.clientWidth;
@@ -312,7 +314,7 @@ const HLSView = () => {
312
314
  setIsSeekEnabled(false);
313
315
  }, 200);
314
316
  },
315
- [isLandscape, isMobile, onSeekTo],
317
+ [hlsState?.variants, isLandscape, isMobile, onSeekTo],
316
318
  );
317
319
  const onClickHandler = useCallback(() => {
318
320
  if (!(isMobile || isLandscape)) {
@@ -399,7 +401,7 @@ const HLSView = () => {
399
401
  <>
400
402
  {isMobile || isLandscape ? (
401
403
  <>
402
- {!showLoader && (
404
+ {!showLoader && hlsState?.variants[0]?.playlist_type === HLSPlaylistType.DVR && (
403
405
  <Flex
404
406
  align="center"
405
407
  justify="center"
@@ -463,14 +465,14 @@ const HLSView = () => {
463
465
  }}
464
466
  >
465
467
  <HMSVideoPlayer.Controls.Left>
466
- <LeaveRoom screenType={screenType} />
468
+ {hlsViewRef.current && <LeaveRoom screenType={screenType} container={hlsViewRef.current} />}
467
469
  </HMSVideoPlayer.Controls.Left>
468
470
  <HMSVideoPlayer.Controls.Right>
469
471
  {isLandscape && <ChatToggle />}
470
472
  {hasCaptions && !isHlsAutoplayBlocked && (
471
473
  <HLSCaptionSelector isEnabled={isCaptionEnabled} />
472
474
  )}
473
- {availableLayers.length > 0 && !isHlsAutoplayBlocked ? (
475
+ {hlsViewRef.current && availableLayers.length > 0 && !isHlsAutoplayBlocked ? (
474
476
  <HLSQualitySelector
475
477
  layers={availableLayers}
476
478
  onOpenChange={setQualityDropDownOpen}
@@ -478,6 +480,7 @@ const HLSView = () => {
478
480
  selection={currentSelectedQuality}
479
481
  onQualityChange={handleQuality}
480
482
  isAuto={isUserSelectedAuto}
483
+ containerRef={hlsViewRef.current}
481
484
  />
482
485
  ) : null}
483
486
  <HLSAutoplayBlockedPrompt open={isHlsAutoplayBlocked} unblockAutoPlay={unblockAutoPlay} />
@@ -493,7 +496,7 @@ const HLSView = () => {
493
496
  align="start"
494
497
  css={{
495
498
  position: 'absolute',
496
- bottom: '0',
499
+ bottom: isFullScreen && hlsState?.variants[0]?.playlist_type === HLSPlaylistType.DVR ? '$8' : '0',
497
500
  left: '0',
498
501
  zIndex: 1,
499
502
  background:
@@ -508,7 +511,7 @@ const HLSView = () => {
508
511
  opacity: controlsVisible ? `1` : '0',
509
512
  }}
510
513
  >
511
- <HMSVideoPlayer.Progress isDvr={hlsState?.variants[0]?.playlist_type === HLSPlaylistType.DVR} />
514
+ {hlsState?.variants[0]?.playlist_type === HLSPlaylistType.DVR ? <HMSVideoPlayer.Progress /> : null}
512
515
  <HMSVideoPlayer.Controls.Root
513
516
  css={{
514
517
  p: '$4 $8',
@@ -517,24 +520,28 @@ const HLSView = () => {
517
520
  <HMSVideoPlayer.Controls.Left>
518
521
  {!(isMobile || isLandscape) && (
519
522
  <>
520
- <HMSVideoPlayer.Seeker
521
- onClick={() => {
522
- onSeekTo(-10);
523
- }}
524
- title="backward"
525
- >
526
- <BackwardArrowIcon width={20} height={20} />
527
- </HMSVideoPlayer.Seeker>
528
- <HMSVideoPlayer.PlayPauseButton isPaused={isPaused} />
529
- <HMSVideoPlayer.Seeker
530
- onClick={() => {
531
- onSeekTo(10);
532
- }}
533
- title="forward"
534
- >
535
- <ForwardArrowIcon width={20} height={20} />
536
- </HMSVideoPlayer.Seeker>
537
- {!isVideoLive ? <HMSVideoPlayer.Duration /> : null}
523
+ {hlsState?.variants[0]?.playlist_type === HLSPlaylistType.DVR ? (
524
+ <>
525
+ <HMSVideoPlayer.Seeker
526
+ onClick={() => {
527
+ onSeekTo(-10);
528
+ }}
529
+ title="backward"
530
+ >
531
+ <BackwardArrowIcon width={20} height={20} />
532
+ </HMSVideoPlayer.Seeker>
533
+ <HMSVideoPlayer.PlayPauseButton isPaused={isPaused} />
534
+ <HMSVideoPlayer.Seeker
535
+ onClick={() => {
536
+ onSeekTo(10);
537
+ }}
538
+ title="forward"
539
+ >
540
+ <ForwardArrowIcon width={20} height={20} />
541
+ </HMSVideoPlayer.Seeker>
542
+ {!isVideoLive ? <HMSVideoPlayer.Duration /> : null}
543
+ </>
544
+ ) : null}
538
545
  <HMSVideoPlayer.Volume />
539
546
  </>
540
547
  )}
@@ -569,7 +576,11 @@ const HLSView = () => {
569
576
  </Flex>
570
577
  </Tooltip>
571
578
  </IconButton>
572
- {(isMobile || isLandscape) && !isVideoLive ? <HMSVideoPlayer.Duration /> : null}
579
+ {(isMobile || isLandscape) &&
580
+ !isVideoLive &&
581
+ hlsState?.variants[0]?.playlist_type === HLSPlaylistType.DVR ? (
582
+ <HMSVideoPlayer.Duration />
583
+ ) : null}
573
584
  </HMSVideoPlayer.Controls.Left>
574
585
 
575
586
  <HMSVideoPlayer.Controls.Right>
@@ -602,7 +613,7 @@ const HLSView = () => {
602
613
  ) : (
603
614
  <Flex align="center" justify="center" direction="column" css={{ size: '100%', px: '$10' }}>
604
615
  <Flex align="center" gap="2" css={{ position: 'absolute', left: '$4', top: '$4', zIndex: 1 }}>
605
- <LeaveRoom screenType={screenType} />
616
+ {isMobile || isLandscape ? <LeaveRoom screenType={screenType} /> : null}
606
617
  </Flex>
607
618
  <Flex css={{ c: '$on_surface_high', r: '$round', bg: '$surface_default', p: '$2' }}>
608
619
  {streamEnded ? <ColoredHandIcon height={56} width={56} /> : <GoLiveIcon height={56} width={56} />}
@@ -60,8 +60,7 @@ const Wrapper = styled('div', {
60
60
  mobileStream: {
61
61
  true: {
62
62
  '@md': {
63
- position: 'unset !important',
64
- background: 'red',
63
+ position: 'unset',
65
64
  },
66
65
  },
67
66
  },
@@ -31,7 +31,7 @@ import {
31
31
  // @ts-ignore: No implicit Any
32
32
  } from '../components/AppData/useUISettings';
33
33
  import { useCloseScreenshareWhiteboard } from '../components/hooks/useCloseScreenshareWhiteboard';
34
- import { useMobileHLSStream } from '../common/hooks';
34
+ import { useLandscapeHLSStream, useMobileHLSStream } from '../common/hooks';
35
35
  // @ts-ignore: No implicit Any
36
36
  import { SESSION_STORE_KEY } from '../common/constants';
37
37
 
@@ -57,6 +57,7 @@ export const VideoStreamingSection = ({
57
57
  const urlToIframe = useUrlToEmbed();
58
58
  const pdfAnnotatorActive = usePDFConfig();
59
59
  const isMobileHLSStream = useMobileHLSStream();
60
+ const isLandscapeHLSStream = useLandscapeHLSStream();
60
61
  useCloseScreenshareWhiteboard();
61
62
 
62
63
  useEffect(() => {
@@ -104,7 +105,7 @@ export const VideoStreamingSection = ({
104
105
  css={{
105
106
  size: '100%',
106
107
  position: 'relative',
107
- gap: '$4',
108
+ gap: isMobileHLSStream || isLandscapeHLSStream ? '0' : '$4',
108
109
  }}
109
110
  direction={isMobileHLSStream ? 'column' : 'row'}
110
111
  >
@@ -216,7 +216,7 @@ export const DialogInputFile = ({ value, onChange, placeholder, disabled, type,
216
216
  '&:hover': {
217
217
  border: 'none',
218
218
  background: 'none',
219
- bg: '$transparent !important',
219
+ bg: 'transparent !important',
220
220
  },
221
221
  }}
222
222
  >
@@ -92,11 +92,11 @@ const StyledContent = styled(DialogPrimitive.Content, {
92
92
 
93
93
  type SheetContentVariants = VariantProps<typeof StyledContent>;
94
94
  type DialogContentPrimitiveProps = React.ComponentProps<typeof DialogPrimitive.Content>;
95
- type SheetContentProps = DialogContentPrimitiveProps & SheetContentVariants & { css?: CSS };
95
+ type SheetContentProps = DialogContentPrimitiveProps & SheetContentVariants & { css?: CSS; container?: HTMLElement };
96
96
 
97
97
  const SheetContent = React.forwardRef<React.ElementRef<typeof StyledContent>, SheetContentProps>(
98
- ({ children, ...props }, forwardedRef) => (
99
- <Dialog.Portal>
98
+ ({ children, container, ...props }, forwardedRef) => (
99
+ <Dialog.Portal container={container}>
100
100
  <StyledOverlay />
101
101
  <StyledContent {...props} ref={forwardedRef}>
102
102
  {children}