@100mslive/roomkit-react 0.1.6-alpha.2 → 0.1.6-alpha.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. package/dist/{HLSView-QMU5JK7U.js → HLSView-HL455FYH.js} +3 -3
  2. package/dist/Prebuilt/components/Leave/DesktopLeaveRoom.d.ts +2 -1
  3. package/dist/Prebuilt/components/Leave/MwebLeaveRoom.d.ts +2 -1
  4. package/dist/{VirtualBackground-37FXUPYO.js → VirtualBackground-6EP3X7MO.js} +3 -3
  5. package/dist/{chunk-WVGGQZK4.js → chunk-6JF3GAOH.js} +65 -77
  6. package/dist/chunk-6JF3GAOH.js.map +7 -0
  7. package/dist/{chunk-KBVIZGYW.js → chunk-KAJJ56J4.js} +2 -2
  8. package/dist/{chunk-KBVIZGYW.js.map → chunk-KAJJ56J4.js.map} +1 -1
  9. package/dist/{chunk-ZKE2N5LH.js → chunk-UXBTLGWY.js} +2 -2
  10. package/dist/{conference-FJJQ4TXX.js → conference-MPZNWHV5.js} +72 -50
  11. package/dist/conference-MPZNWHV5.js.map +7 -0
  12. package/dist/index.cjs.js +165 -153
  13. package/dist/index.cjs.js.map +3 -3
  14. package/dist/index.js +2 -2
  15. package/dist/meta.cjs.json +43 -43
  16. package/dist/meta.esbuild.json +75 -75
  17. package/package.json +6 -6
  18. package/src/Button/Button.tsx +6 -6
  19. package/src/Prebuilt/components/Chat/Chat.jsx +1 -3
  20. package/src/Prebuilt/components/Chat/useEmojiPickerStyles.js +1 -0
  21. package/src/Prebuilt/components/Footer/Footer.tsx +1 -1
  22. package/src/Prebuilt/components/Footer/ParticipantList.jsx +4 -3
  23. package/src/Prebuilt/components/Footer/RoleAccordion.tsx +1 -1
  24. package/src/Prebuilt/components/Header/HeaderComponents.jsx +2 -8
  25. package/src/Prebuilt/components/Leave/DesktopLeaveRoom.tsx +7 -9
  26. package/src/Prebuilt/components/Leave/LeaveRoom.tsx +6 -2
  27. package/src/Prebuilt/components/Leave/MwebLeaveRoom.tsx +7 -4
  28. package/src/Prebuilt/components/Notifications/Notifications.jsx +4 -10
  29. package/src/Prebuilt/components/RoleChangeRequestModal.tsx +1 -2
  30. package/src/Prebuilt/components/ScreenshareTile.jsx +15 -7
  31. package/src/Prebuilt/components/SidePaneTabs.tsx +78 -57
  32. package/src/Prebuilt/components/conference.jsx +9 -1
  33. package/dist/chunk-WVGGQZK4.js.map +0 -7
  34. package/dist/conference-FJJQ4TXX.js.map +0 -7
  35. /package/dist/{HLSView-QMU5JK7U.js.map → HLSView-HL455FYH.js.map} +0 -0
  36. /package/dist/{VirtualBackground-37FXUPYO.js.map → VirtualBackground-6EP3X7MO.js.map} +0 -0
  37. /package/dist/{chunk-ZKE2N5LH.js.map → chunk-UXBTLGWY.js.map} +0 -0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ActionTile
3
- } from "./chunk-ZKE2N5LH.js";
3
+ } from "./chunk-UXBTLGWY.js";
4
4
  import {
5
5
  APP_DATA,
6
6
  Accordion,
@@ -84,7 +84,7 @@ import {
84
84
  useUrlToEmbed,
85
85
  useUserPreferences,
86
86
  useWaitingViewerRole
87
- } from "./chunk-WVGGQZK4.js";
87
+ } from "./chunk-6JF3GAOH.js";
88
88
  import {
89
89
  Box,
90
90
  Flex,
@@ -103,7 +103,7 @@ import {
103
103
  slideLeftAndFade,
104
104
  styled,
105
105
  textEllipsis
106
- } from "./chunk-KBVIZGYW.js";
106
+ } from "./chunk-KAJJ56J4.js";
107
107
 
108
108
  // src/Prebuilt/components/conference.jsx
109
109
  import React62, { useEffect as useEffect25, useRef as useRef14, useState as useState35 } from "react";
@@ -335,7 +335,8 @@ var LeaveSessionContent = ({
335
335
  // src/Prebuilt/components/Leave/DesktopLeaveRoom.tsx
336
336
  var DesktopLeaveRoom = ({
337
337
  leaveRoom,
338
- screenType
338
+ screenType,
339
+ endRoom
339
340
  }) => {
340
341
  const [open, setOpen] = useState2(false);
341
342
  const [showLeaveRoomAlert, setShowLeaveRoomAlert] = useState2(false);
@@ -343,12 +344,12 @@ var DesktopLeaveRoom = ({
343
344
  const isConnected = useHMSStore2(selectIsConnectedToRoom2);
344
345
  const permissions = useHMSStore2(selectPermissions);
345
346
  const { isStreamingOn } = useRecordingStreaming();
346
- const showStream = (permissions == null ? void 0 : permissions.hlsStreaming) && isStreamingOn;
347
+ const showStream = screenType !== "hls_live_streaming" && isStreamingOn;
347
348
  useDropdownList({ open: open || showEndStreamAlert || showLeaveRoomAlert, name: "LeaveRoom" });
348
349
  if (!permissions || !isConnected) {
349
350
  return null;
350
351
  }
351
- return /* @__PURE__ */ React6.createElement(Fragment2, null, permissions.hlsStreaming ? /* @__PURE__ */ React6.createElement(Flex, null, /* @__PURE__ */ React6.createElement(
352
+ return /* @__PURE__ */ React6.createElement(Fragment2, null, screenType !== "hls_live_streaming" && ((permissions == null ? void 0 : permissions.hlsStreaming) || (permissions == null ? void 0 : permissions.endRoom)) ? /* @__PURE__ */ React6.createElement(Flex, null, /* @__PURE__ */ React6.createElement(
352
353
  LeaveIconButton,
353
354
  {
354
355
  key: "LeaveRoom",
@@ -358,11 +359,7 @@ var DesktopLeaveRoom = ({
358
359
  borderBottomRightRadius: 0
359
360
  },
360
361
  onClick: () => {
361
- if (screenType === "hls_live_streaming") {
362
- setShowLeaveRoomAlert(true);
363
- } else {
364
- leaveRoom({ endstream: false });
365
- }
362
+ leaveRoom({ endstream: false });
366
363
  }
367
364
  },
368
365
  /* @__PURE__ */ React6.createElement(Tooltip, { title: "Leave Room" }, /* @__PURE__ */ React6.createElement(Box, null, /* @__PURE__ */ React6.createElement(ExitIcon, { style: { transform: "rotate(180deg)" } })))
@@ -400,7 +397,7 @@ var DesktopLeaveRoom = ({
400
397
  css: { p: 0 }
401
398
  }
402
399
  )
403
- ), isStreamingOn && (permissions == null ? void 0 : permissions.hlsStreaming) ? /* @__PURE__ */ React6.createElement(
400
+ ), (permissions == null ? void 0 : permissions.endRoom) || (permissions == null ? void 0 : permissions.hlsStreaming) ? /* @__PURE__ */ React6.createElement(
404
401
  Dropdown.Item,
405
402
  {
406
403
  css: {
@@ -443,7 +440,7 @@ var DesktopLeaveRoom = ({
443
440
  EndSessionContent,
444
441
  {
445
442
  setShowEndStreamAlert,
446
- leaveRoom,
443
+ leaveRoom: isStreamingOn ? leaveRoom : endRoom,
447
444
  isStreamingOn,
448
445
  isModal: true
449
446
  }
@@ -456,7 +453,8 @@ import { selectIsConnectedToRoom as selectIsConnectedToRoom3, selectPermissions
456
453
  import { ExitIcon as ExitIcon2, StopIcon as StopIcon2 } from "@100mslive/react-icons";
457
454
  var MwebLeaveRoom = ({
458
455
  leaveRoom,
459
- screenType
456
+ screenType,
457
+ endRoom
460
458
  }) => {
461
459
  const [open, setOpen] = useState3(false);
462
460
  const [showLeaveRoomAlert, setShowLeaveRoomAlert] = useState3(false);
@@ -464,12 +462,12 @@ var MwebLeaveRoom = ({
464
462
  const isConnected = useHMSStore3(selectIsConnectedToRoom3);
465
463
  const permissions = useHMSStore3(selectPermissions2);
466
464
  const { isStreamingOn } = useRecordingStreaming2();
467
- const showStream = (permissions == null ? void 0 : permissions.hlsStreaming) && isStreamingOn;
465
+ const showStream = screenType !== "hls_live_streaming" && isStreamingOn;
468
466
  useDropdownList({ open, name: "LeaveRoom" });
469
467
  if (!permissions || !isConnected) {
470
468
  return null;
471
469
  }
472
- return /* @__PURE__ */ React7.createElement(Fragment3, null, (permissions == null ? void 0 : permissions.hlsStreaming) ? /* @__PURE__ */ React7.createElement(Sheet.Root, { open, onOpenChange: setOpen }, /* @__PURE__ */ React7.createElement(Sheet.Trigger, { asChild: true }, /* @__PURE__ */ React7.createElement(
470
+ return /* @__PURE__ */ React7.createElement(Fragment3, null, screenType !== "hls_live_streaming" ? /* @__PURE__ */ React7.createElement(Sheet.Root, { open, onOpenChange: setOpen }, /* @__PURE__ */ React7.createElement(Sheet.Trigger, { asChild: true }, /* @__PURE__ */ React7.createElement(
473
471
  LeaveIconButton,
474
472
  {
475
473
  key: "LeaveRoom",
@@ -491,7 +489,7 @@ var MwebLeaveRoom = ({
491
489
  onClick: () => leaveRoom({ endstream: false }),
492
490
  css: { pt: 0, mt: "$10", color: "$on_surface_low", "&:hover": { color: "$on_surface_high" } }
493
491
  }
494
- ), isStreamingOn && (permissions == null ? void 0 : permissions.hlsStreaming) ? /* @__PURE__ */ React7.createElement(
492
+ ), (permissions == null ? void 0 : permissions.endRoom) || (permissions == null ? void 0 : permissions.hlsStreaming) ? /* @__PURE__ */ React7.createElement(
495
493
  LeaveCard,
496
494
  {
497
495
  title: showStream ? "End Stream" : "End Session",
@@ -523,7 +521,7 @@ var MwebLeaveRoom = ({
523
521
  EndSessionContent,
524
522
  {
525
523
  setShowEndStreamAlert,
526
- leaveRoom,
524
+ leaveRoom: isStreamingOn ? leaveRoom : endRoom,
527
525
  isStreamingOn
528
526
  }
529
527
  ))), screenType === "hls_live_streaming" ? /* @__PURE__ */ React7.createElement(Sheet.Root, { open: showLeaveRoomAlert, onOpenChange: setShowLeaveRoomAlert }, /* @__PURE__ */ React7.createElement(Sheet.Content, { css: { bg: "$surface_dim", p: "$10", pb: "$12" } }, /* @__PURE__ */ React7.createElement(LeaveSessionContent, { setShowLeaveRoomAlert, leaveRoom }))) : null);
@@ -555,6 +553,10 @@ var LeaveRoom = ({ screenType }) => {
555
553
  ToastManager.addToast({ title: "Error in stopping the stream", type: "error" });
556
554
  }
557
555
  });
556
+ const endRoom = () => {
557
+ hmsActions.endRoom(false, "End Room");
558
+ redirectToLeave();
559
+ };
558
560
  const leaveRoom = (_0) => __async(void 0, [_0], function* ({ endstream = false }) {
559
561
  if (endstream || hlsState.running && peersWithStreamingRights.length === 1) {
560
562
  yield stopStream();
@@ -565,7 +567,7 @@ var LeaveRoom = ({ screenType }) => {
565
567
  if (!permissions || !isConnected) {
566
568
  return null;
567
569
  }
568
- return isMobile ? /* @__PURE__ */ React8.createElement(MwebLeaveRoom, { leaveRoom, screenType }) : /* @__PURE__ */ React8.createElement(DesktopLeaveRoom, { leaveRoom, screenType });
570
+ return isMobile ? /* @__PURE__ */ React8.createElement(MwebLeaveRoom, { leaveRoom, screenType, endRoom }) : /* @__PURE__ */ React8.createElement(DesktopLeaveRoom, { leaveRoom, screenType, endRoom });
569
571
  };
570
572
 
571
573
  // src/Prebuilt/components/MoreSettings/MoreSettings.tsx
@@ -2821,7 +2823,7 @@ var RoleAccordion = ({
2821
2823
  return null;
2822
2824
  }
2823
2825
  const height = ROW_HEIGHT * peerList.length;
2824
- return /* @__PURE__ */ React34.createElement(Flex, { direction: "column", css: { flexGrow: 1, "&:hover .role_actions": { visibility: "visible" } }, ref }, /* @__PURE__ */ React34.createElement(
2826
+ return /* @__PURE__ */ React34.createElement(Flex, { direction: "column", css: { "&:hover .role_actions": { visibility: "visible" } }, ref }, /* @__PURE__ */ React34.createElement(
2825
2827
  Accordion.Root,
2826
2828
  {
2827
2829
  type: "single",
@@ -2942,10 +2944,11 @@ var VirtualizedParticipants = ({ peersOrderedByRoles = {}, isConnected, filter,
2942
2944
  direction: "column",
2943
2945
  css: {
2944
2946
  gap: "$8",
2945
- maxHeight: "100%",
2946
2947
  overflowY: "auto",
2947
2948
  overflowX: "hidden",
2948
- pr: "$3"
2949
+ pr: "$10",
2950
+ mr: "-$10",
2951
+ flex: "1 1 0"
2949
2952
  }
2950
2953
  },
2951
2954
  /* @__PURE__ */ React35.createElement(
@@ -3105,7 +3108,7 @@ var ParticipantSearch = ({ onSearch, placeholder, inSidePane = false }) => {
3105
3108
  {
3106
3109
  align: "center",
3107
3110
  css: {
3108
- p: isMobile ? "$0 $6" : "$2 0",
3111
+ p: isMobile ? "0" : "$2 0",
3109
3112
  mb: "$2",
3110
3113
  position: "relative",
3111
3114
  color: "$on_surface_medium",
@@ -3134,7 +3137,7 @@ var ParticipantSearch = ({ onSearch, placeholder, inSidePane = false }) => {
3134
3137
  };
3135
3138
 
3136
3139
  // src/Prebuilt/components/Footer/Footer.tsx
3137
- var VirtualBackground = React36.lazy(() => import("./VirtualBackground-37FXUPYO.js"));
3140
+ var VirtualBackground = React36.lazy(() => import("./VirtualBackground-6EP3X7MO.js"));
3138
3141
  var Footer2 = ({
3139
3142
  screenType,
3140
3143
  elements
@@ -3160,7 +3163,7 @@ var Footer2 = ({
3160
3163
  gap: "$10",
3161
3164
  position: "relative",
3162
3165
  // To prevent it from showing over the sidepane if chat type is not overlay
3163
- zIndex: isOverlayChat ? 20 : 1
3166
+ zIndex: isOverlayChat && isChatOpen ? 20 : 1
3164
3167
  }
3165
3168
  }
3166
3169
  },
@@ -3842,11 +3845,6 @@ var Tile = ({ peerId, width = "100%", height = "100%" }) => {
3842
3845
  const isAudioOnly = useUISettings(UI_SETTINGS.isAudioOnly);
3843
3846
  const [isMouseHovered, setIsMouseHovered] = useState24(false);
3844
3847
  const showStatsOnTiles = useUISettings(UI_SETTINGS.showStatsOnTiles);
3845
- const label = getVideoTileLabel({
3846
- peerName: peer.name,
3847
- isLocal: false,
3848
- track
3849
- });
3850
3848
  const fullscreenRef = useRef7(null);
3851
3849
  const [fullscreen, setFullscreen] = useState24(false);
3852
3850
  const isFullscreen = useFullscreen2(fullscreenRef, fullscreen, {
@@ -3860,6 +3858,11 @@ var Tile = ({ peerId, width = "100%", height = "100%" }) => {
3860
3858
  if (!peer) {
3861
3859
  return null;
3862
3860
  }
3861
+ const label = getVideoTileLabel({
3862
+ peerName: peer == null ? void 0 : peer.name,
3863
+ isLocal: false,
3864
+ track
3865
+ });
3863
3866
  return /* @__PURE__ */ React47.createElement(StyledVideoTile.Root, { css: { width, height, p: 0, minHeight: 0 }, "data-testid": "screenshare_tile" }, /* @__PURE__ */ React47.createElement(
3864
3867
  StyledVideoTile.Container,
3865
3868
  {
@@ -3884,7 +3887,16 @@ var Tile = ({ peerId, width = "100%", height = "100%" }) => {
3884
3887
  }
3885
3888
  ) : null,
3886
3889
  /* @__PURE__ */ React47.createElement(StyledVideoTile.Info, { css: labelStyles }, label),
3887
- isMouseHovered && !(peer == null ? void 0 : peer.isLocal) ? /* @__PURE__ */ React47.createElement(TileMenu_default, { isScreenshare: true, peerID: peer == null ? void 0 : peer.id, audioTrackID: audioTrack == null ? void 0 : audioTrack.id, videoTrackID: track == null ? void 0 : track.id }) : null
3890
+ isMouseHovered && !peer.isLocal ? /* @__PURE__ */ React47.createElement(
3891
+ TileMenu_default,
3892
+ {
3893
+ isScreenshare: true,
3894
+ peerID: peer.id,
3895
+ audioTrackID: audioTrack == null ? void 0 : audioTrack.id,
3896
+ videoTrackID: track == null ? void 0 : track.id,
3897
+ enableSpotlightingPeer: false
3898
+ }
3899
+ ) : null
3888
3900
  ));
3889
3901
  };
3890
3902
  var ScreenshareTile = React47.memo(Tile);
@@ -4250,11 +4262,12 @@ var PDFEmbedComponent = () => {
4250
4262
 
4251
4263
  // src/Prebuilt/layouts/SidePane.tsx
4252
4264
  import React58 from "react";
4253
- import { useMedia as useMedia14 } from "react-use";
4265
+ import { useMedia as useMedia15 } from "react-use";
4254
4266
  import { selectAppData as selectAppData3, selectVideoTrackByPeerID, useHMSStore as useHMSStore33 } from "@100mslive/react-sdk";
4255
4267
 
4256
4268
  // src/Prebuilt/components/SidePaneTabs.tsx
4257
4269
  import React55, { useEffect as useEffect21, useState as useState32 } from "react";
4270
+ import { useMedia as useMedia14 } from "react-use";
4258
4271
  import { selectPeerCount as selectPeerCount3, useHMSStore as useHMSStore30 } from "@100mslive/react-sdk";
4259
4272
  import { CrossIcon as CrossIcon7 } from "@100mslive/react-icons";
4260
4273
 
@@ -4683,6 +4696,7 @@ var useEmojiPickerStyles = (showing) => {
4683
4696
  font-family: var(--hms-ui-fonts-sans);
4684
4697
  }
4685
4698
  .sticky {
4699
+ top: 0.25rem;
4686
4700
  background-color: var(--hms-ui-colors-surface_bright);
4687
4701
  margin-top: 0.5rem;
4688
4702
  }
@@ -4912,8 +4926,8 @@ var PinnedMessage = ({ clearPinnedMessage }) => {
4912
4926
  )
4913
4927
  ) : null;
4914
4928
  };
4915
- var Chat = ({ screenType, hideControls = false }) => {
4916
- var _a, _b, _c;
4929
+ var Chat = ({ screenType }) => {
4930
+ var _a, _b;
4917
4931
  const notification = useHMSNotifications(HMSNotificationTypes.PEER_LEFT);
4918
4932
  const [peerSelector, setPeerSelector] = useSetSubscribedChatSelector(CHAT_SELECTOR.PEER_ID);
4919
4933
  const [roleSelector, setRoleSelector] = useSetSubscribedChatSelector(CHAT_SELECTOR.ROLE);
@@ -4966,12 +4980,10 @@ var Chat = ({ screenType, hideControls = false }) => {
4966
4980
  direction: "column",
4967
4981
  css: {
4968
4982
  size: "100%",
4969
- gap: "$4",
4970
- marginTop: hideControls && ((_a = elements == null ? void 0 : elements.chat) == null ? void 0 : _a.is_overlay) ? "$17" : "0",
4971
- transition: "margin 0.3s ease-in-out"
4983
+ gap: "$4"
4972
4984
  }
4973
4985
  },
4974
- isMobile && ((_b = elements == null ? void 0 : elements.chat) == null ? void 0 : _b.is_overlay) ? null : /* @__PURE__ */ React54.createElement(React54.Fragment, null, ((_c = elements == null ? void 0 : elements.chat) == null ? void 0 : _c.allow_pinning_messages) ? /* @__PURE__ */ React54.createElement(PinnedMessage, { clearPinnedMessage: setPinnedMessage }) : null),
4986
+ isMobile && ((_a = elements == null ? void 0 : elements.chat) == null ? void 0 : _a.is_overlay) ? null : /* @__PURE__ */ React54.createElement(React54.Fragment, null, ((_b = elements == null ? void 0 : elements.chat) == null ? void 0 : _b.allow_pinning_messages) ? /* @__PURE__ */ React54.createElement(PinnedMessage, { clearPinnedMessage: setPinnedMessage }) : null),
4975
4987
  /* @__PURE__ */ React54.createElement(
4976
4988
  ChatBody,
4977
4989
  {
@@ -5058,6 +5070,7 @@ var tabTriggerCSS = {
5058
5070
  justifyContent: "center"
5059
5071
  };
5060
5072
  var SidePaneTabs = React55.memo(({ active = SIDE_PANE_OPTIONS.CHAT, screenType, hideControls }) => {
5073
+ var _a;
5061
5074
  const toggleChat = useSidepaneToggle(SIDE_PANE_OPTIONS.CHAT);
5062
5075
  const toggleParticipants = useSidepaneToggle(SIDE_PANE_OPTIONS.PARTICIPANTS);
5063
5076
  const resetSidePane = useSidepaneReset();
@@ -5067,6 +5080,9 @@ var SidePaneTabs = React55.memo(({ active = SIDE_PANE_OPTIONS.CHAT, screenType,
5067
5080
  const showChat = !!(elements == null ? void 0 : elements.chat);
5068
5081
  const showParticipants = !!(elements == null ? void 0 : elements.participant_list);
5069
5082
  const hideTabs = !(showChat && showParticipants);
5083
+ const isMobile = useMedia14(config.media.md);
5084
+ const isOverlayChat = !!((_a = elements == null ? void 0 : elements.chat) == null ? void 0 : _a.is_overlay) && isMobile;
5085
+ const isChatOpen = useIsSidepaneTypeOpen(SIDE_PANE_OPTIONS.CHAT);
5070
5086
  useEffect21(() => {
5071
5087
  if (activeTab === SIDE_PANE_OPTIONS.CHAT && !showChat && showParticipants) {
5072
5088
  setActiveTab(SIDE_PANE_OPTIONS.PARTICIPANTS);
@@ -5076,16 +5092,21 @@ var SidePaneTabs = React55.memo(({ active = SIDE_PANE_OPTIONS.CHAT, screenType,
5076
5092
  resetSidePane();
5077
5093
  }
5078
5094
  }, [showChat, activeTab, showParticipants, resetSidePane]);
5095
+ useEffect21(() => {
5096
+ setActiveTab(active);
5097
+ }, [active]);
5079
5098
  return /* @__PURE__ */ React55.createElement(
5080
5099
  Flex,
5081
5100
  {
5082
5101
  direction: "column",
5083
5102
  css: {
5084
5103
  color: "$on_primary_high",
5085
- h: "100%"
5104
+ h: "100%",
5105
+ marginTop: hideControls && isOverlayChat ? "$17" : "0",
5106
+ transition: "margin 0.3s ease-in-out"
5086
5107
  }
5087
5108
  },
5088
- hideTabs ? /* @__PURE__ */ React55.createElement(React55.Fragment, null, /* @__PURE__ */ React55.createElement(Text, { variant: "sm", css: { fontWeight: "$semiBold", p: "$4", c: "$on_surface_high", pr: "$12" } }, showChat ? "Chat" : `Participants (${peerCount})`), showChat ? /* @__PURE__ */ React55.createElement(Chat, { screenType, hideControls }) : /* @__PURE__ */ React55.createElement(ParticipantList, null)) : /* @__PURE__ */ React55.createElement(
5109
+ isOverlayChat && isChatOpen && showChat ? /* @__PURE__ */ React55.createElement(Chat, { screenType }) : /* @__PURE__ */ React55.createElement(React55.Fragment, null, hideTabs ? /* @__PURE__ */ React55.createElement(React55.Fragment, null, /* @__PURE__ */ React55.createElement(Text, { variant: "sm", css: { fontWeight: "$semiBold", p: "$4", c: "$on_surface_high", pr: "$12" } }, showChat ? "Chat" : `Participants (${peerCount})`), showChat ? /* @__PURE__ */ React55.createElement(Chat, { screenType }) : /* @__PURE__ */ React55.createElement(ParticipantList, null)) : /* @__PURE__ */ React55.createElement(
5089
5110
  Tabs.Root,
5090
5111
  {
5091
5112
  value: activeTab,
@@ -5119,12 +5140,12 @@ var SidePaneTabs = React55.memo(({ active = SIDE_PANE_OPTIONS.CHAT, screenType,
5119
5140
  ")"
5120
5141
  )),
5121
5142
  /* @__PURE__ */ React55.createElement(Tabs.Content, { value: SIDE_PANE_OPTIONS.PARTICIPANTS, css: { p: 0 } }, /* @__PURE__ */ React55.createElement(ParticipantList, null)),
5122
- /* @__PURE__ */ React55.createElement(Tabs.Content, { value: SIDE_PANE_OPTIONS.CHAT, css: { p: 0 } }, /* @__PURE__ */ React55.createElement(Chat, { screenType, hideControls }))
5123
- ),
5124
- /* @__PURE__ */ React55.createElement(
5143
+ /* @__PURE__ */ React55.createElement(Tabs.Content, { value: SIDE_PANE_OPTIONS.CHAT, css: { p: 0 } }, /* @__PURE__ */ React55.createElement(Chat, { screenType }))
5144
+ )),
5145
+ isOverlayChat && isChatOpen ? null : /* @__PURE__ */ React55.createElement(
5125
5146
  IconButton,
5126
5147
  {
5127
- css: { position: "absolute", right: "$10", top: "$11" },
5148
+ css: { position: "absolute", right: "$10", top: "$11", "@md": { top: "$8", right: "$8" } },
5128
5149
  onClick: (e) => {
5129
5150
  e.stopPropagation();
5130
5151
  if (activeTab === SIDE_PANE_OPTIONS.CHAT) {
@@ -5356,7 +5377,7 @@ var SidePane = ({
5356
5377
  hideControls = false
5357
5378
  }) => {
5358
5379
  var _a, _b;
5359
- const isMobile = useMedia14(config.media.md);
5380
+ const isMobile = useMedia15(config.media.md);
5360
5381
  const sidepane = useHMSStore33(selectAppData3(APP_DATA.sidePane));
5361
5382
  const activeScreensharePeerId = useHMSStore33(selectAppData3(APP_DATA.activeScreensharePeerId));
5362
5383
  const trackId = (_a = useHMSStore33(selectVideoTrackByPeerID(activeScreensharePeerId))) == null ? void 0 : _a.id;
@@ -5487,7 +5508,7 @@ var WaitingView = React59.memo(() => {
5487
5508
  });
5488
5509
 
5489
5510
  // src/Prebuilt/layouts/VideoStreamingSection.tsx
5490
- var HLSView = React60.lazy(() => import("./HLSView-QMU5JK7U.js"));
5511
+ var HLSView = React60.lazy(() => import("./HLSView-HL455FYH.js"));
5491
5512
  var VideoStreamingSection = ({
5492
5513
  screenType,
5493
5514
  elements,
@@ -5564,7 +5585,6 @@ var RoleChangeRequestModal = () => {
5564
5585
  return;
5565
5586
  }
5566
5587
  (() => __async(void 0, null, function* () {
5567
- yield updateMetaData({ prevRole: currentRole });
5568
5588
  yield hmsActions.preview({ asRole: roleChangeRequest.role.name });
5569
5589
  }))();
5570
5590
  }, [hmsActions, roleChangeRequest, currentRole, updateMetaData]);
@@ -5601,7 +5621,7 @@ var RoleChangeRequestModal = () => {
5601
5621
  body,
5602
5622
  onAction: () => __async(void 0, null, function* () {
5603
5623
  yield hmsActions.acceptChangeRole(roleChangeRequest);
5604
- yield updateMetaData({ isHandRaised: false });
5624
+ yield updateMetaData({ isHandRaised: false, prevRole: currentRole });
5605
5625
  }),
5606
5626
  actionText: "Accept"
5607
5627
  }
@@ -5642,6 +5662,7 @@ var Conference = () => {
5642
5662
  setHideControls((value) => !value);
5643
5663
  }
5644
5664
  };
5665
+ const autoRoomJoined = useRef14(isPreviewScreenEnabled);
5645
5666
  useEffect25(() => {
5646
5667
  let timeout = null;
5647
5668
  dropdownListRef.current = dropdownList || [];
@@ -5673,7 +5694,7 @@ var Conference = () => {
5673
5694
  }
5674
5695
  }, [isConnectedToRoom, prevState, roomState, navigate, role, roomId, isPreviewScreenEnabled]);
5675
5696
  useEffect25(() => {
5676
- if (authTokenInAppData && !isConnectedToRoom && !isPreviewScreenEnabled && roomState !== HMSRoomState.Connecting) {
5697
+ if (authTokenInAppData && !isConnectedToRoom && !isPreviewScreenEnabled && roomState !== HMSRoomState.Connecting && !autoRoomJoined.current) {
5677
5698
  hmsActions.join({
5678
5699
  userName,
5679
5700
  authToken: authTokenInAppData,
@@ -5684,6 +5705,7 @@ var Conference = () => {
5684
5705
  speakerAutoSelectionBlacklist: ["Yeti Stereo Microphone"]
5685
5706
  }
5686
5707
  }).catch(console.error);
5708
+ autoRoomJoined.current = true;
5687
5709
  }
5688
5710
  }, [authTokenInAppData, endpoints == null ? void 0 : endpoints.init, hmsActions, isConnectedToRoom, isPreviewScreenEnabled, roomState, userName]);
5689
5711
  useEffect25(() => {
@@ -5759,4 +5781,4 @@ var conference_default = Conference;
5759
5781
  export {
5760
5782
  conference_default as default
5761
5783
  };
5762
- //# sourceMappingURL=conference-FJJQ4TXX.js.map
5784
+ //# sourceMappingURL=conference-MPZNWHV5.js.map