@100mslive/roomkit-react 0.1.6 → 0.1.7-alpha.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. package/dist/{HLSView-4NSE37G7.js → HLSView-F5BDZVT2.js} +22 -4
  2. package/dist/HLSView-F5BDZVT2.js.map +7 -0
  3. package/dist/{VirtualBackground-A5UM363O.js → VirtualBackground-THDRYDRA.js} +3 -3
  4. package/dist/{chunk-Q6U22HIE.js → chunk-CDYRVICT.js} +189 -174
  5. package/dist/chunk-CDYRVICT.js.map +7 -0
  6. package/dist/{chunk-BUWIMYLW.js → chunk-JSH7SKEH.js} +2 -2
  7. package/dist/{chunk-NMOZ33TX.js → chunk-U3G743OY.js} +3 -2
  8. package/dist/{chunk-NMOZ33TX.js.map → chunk-U3G743OY.js.map} +2 -2
  9. package/dist/{conference-S7R3O4OC.js → conference-6IVZHILI.js} +89 -75
  10. package/dist/conference-6IVZHILI.js.map +7 -0
  11. package/dist/index.cjs.js +332 -281
  12. package/dist/index.cjs.js.map +4 -4
  13. package/dist/index.js +2 -2
  14. package/dist/meta.cjs.json +78 -63
  15. package/dist/meta.esbuild.json +111 -97
  16. package/package.json +6 -6
  17. package/src/Prebuilt/common/hooks.js +1 -2
  18. package/src/Prebuilt/common/utils.js +0 -2
  19. package/src/Prebuilt/components/Chat/ChatFooter.tsx +1 -0
  20. package/src/Prebuilt/components/Footer/Footer.tsx +4 -1
  21. package/src/Prebuilt/components/Footer/ParticipantList.jsx +7 -8
  22. package/src/Prebuilt/components/Header/ParticipantFilter.jsx +9 -12
  23. package/src/Prebuilt/components/MoreSettings/SplitComponents/MwebOptions.tsx +4 -2
  24. package/src/Prebuilt/components/Notifications/Notifications.jsx +14 -1
  25. package/src/Prebuilt/components/Notifications/PeerNotifications.jsx +4 -15
  26. package/src/Prebuilt/components/Preview/PreviewJoin.tsx +8 -3
  27. package/src/Prebuilt/components/RaiseHand.jsx +10 -6
  28. package/src/Prebuilt/components/RoleChangeRequestModal.tsx +3 -2
  29. package/src/Prebuilt/components/SidePaneTabs.tsx +21 -2
  30. package/src/Prebuilt/components/VideoTile.jsx +6 -3
  31. package/src/Prebuilt/components/hooks/useMetadata.jsx +14 -4
  32. package/src/Prebuilt/layouts/HLSView.jsx +19 -1
  33. package/src/Tooltip/Tooltip.tsx +1 -1
  34. package/src/fixtures/peers.ts +5 -3
  35. package/dist/HLSView-4NSE37G7.js.map +0 -7
  36. package/dist/chunk-Q6U22HIE.js.map +0 -7
  37. package/dist/conference-S7R3O4OC.js.map +0 -7
  38. /package/dist/{VirtualBackground-A5UM363O.js.map → VirtualBackground-THDRYDRA.js.map} +0 -0
  39. /package/dist/{chunk-BUWIMYLW.js.map → chunk-JSH7SKEH.js.map} +0 -0
@@ -35,7 +35,7 @@ import {
35
35
  textEllipsis,
36
36
  theme,
37
37
  toastAnimation
38
- } from "./chunk-NMOZ33TX.js";
38
+ } from "./chunk-U3G743OY.js";
39
39
 
40
40
  // src/Button/Button.tsx
41
41
  import React2 from "react";
@@ -1997,7 +1997,7 @@ import {
1997
1997
  HMSRoomProvider,
1998
1998
  selectIsConnectedToRoom as selectIsConnectedToRoom6,
1999
1999
  useHMSActions as useHMSActions20,
2000
- useHMSStore as useHMSStore31
2000
+ useHMSStore as useHMSStore30
2001
2001
  } from "@100mslive/react-sdk";
2002
2002
 
2003
2003
  // src/Prebuilt/components/AppData/AppData.jsx
@@ -2950,11 +2950,13 @@ import React30, { useCallback as useCallback8, useEffect as useEffect16 } from "
2950
2950
  import { useNavigate as useNavigate2, useParams as useParams2 } from "react-router-dom";
2951
2951
  import {
2952
2952
  HMSNotificationTypes as HMSNotificationTypes7,
2953
- HMSRoomState as HMSRoomState3,
2954
- selectRoomState as selectRoomState3,
2953
+ HMSRoomState as HMSRoomState2,
2954
+ selectHasPeerHandRaised,
2955
+ selectRoomState as selectRoomState2,
2955
2956
  useCustomEvent,
2956
2957
  useHMSNotifications as useHMSNotifications7,
2957
- useHMSStore as useHMSStore8
2958
+ useHMSStore as useHMSStore7,
2959
+ useHMSVanillaStore as useHMSVanillaStore4
2958
2960
  } from "@100mslive/react-sdk";
2959
2961
 
2960
2962
  // src/Prebuilt/provider/roomLayoutProvider/index.tsx
@@ -3413,41 +3415,7 @@ var InitErrorModal = ({ notification }) => {
3413
3415
 
3414
3416
  // src/Prebuilt/components/Notifications/PeerNotifications.jsx
3415
3417
  import { useEffect as useEffect10 } from "react";
3416
- import {
3417
- HMSNotificationTypes,
3418
- HMSRoomState as HMSRoomState2,
3419
- selectRoomState as selectRoomState2,
3420
- useHMSNotifications,
3421
- useHMSStore as useHMSStore7
3422
- } from "@100mslive/react-sdk";
3423
-
3424
- // src/Prebuilt/common/utils.js
3425
- var getMetadata = (metadataString) => {
3426
- try {
3427
- return !metadataString ? {} : JSON.parse(metadataString);
3428
- } catch (error) {
3429
- return {};
3430
- }
3431
- };
3432
- var isScreenshareSupported = () => {
3433
- return typeof navigator.mediaDevices.getDisplayMedia !== "undefined";
3434
- };
3435
- var isInternalRole = (role) => role && role.startsWith("__internal");
3436
- var getFormattedCount = (num) => {
3437
- const formatter = new Intl.NumberFormat("en", { notation: "compact", maximumFractionDigits: 2 });
3438
- const formattedNum = formatter.format(num);
3439
- return formattedNum;
3440
- };
3441
- var formatTime = (timeInSeconds) => {
3442
- timeInSeconds = Math.floor(timeInSeconds / 1e3);
3443
- const hours = Math.floor(timeInSeconds / 3600);
3444
- const minutes = Math.floor(timeInSeconds % 3600 / 60);
3445
- const seconds = timeInSeconds % 60;
3446
- const hour = hours !== 0 ? `${hours < 10 ? "0" : ""}${hours}:` : "";
3447
- return `${hour}${minutes < 10 ? "0" : ""}${minutes}:${seconds < 10 ? "0" : ""}${seconds}`;
3448
- };
3449
-
3450
- // src/Prebuilt/components/Notifications/PeerNotifications.jsx
3418
+ import { HMSNotificationTypes, useHMSNotifications } from "@100mslive/react-sdk";
3451
3419
  var notificationTypes = [
3452
3420
  HMSNotificationTypes.PEER_LIST,
3453
3421
  HMSNotificationTypes.PEER_JOINED,
@@ -3457,19 +3425,14 @@ var PeerNotifications = () => {
3457
3425
  const notification = useHMSNotifications(notificationTypes);
3458
3426
  const isPeerJoinSubscribed = useSubscribedNotifications(SUBSCRIBED_NOTIFICATIONS.PEER_JOINED);
3459
3427
  const isPeerLeftSubscribed = useSubscribedNotifications(SUBSCRIBED_NOTIFICATIONS.PEER_LEFT);
3460
- const roomState = useHMSStore7(selectRoomState2);
3461
3428
  useEffect10(() => {
3462
- var _a7, _b7;
3463
- if (roomState !== HMSRoomState2.Connected) {
3464
- return;
3465
- }
3466
- if (!notification || ((_a7 = notification == null ? void 0 : notification.data) == null ? void 0 : _a7.roleName) && isInternalRole(notification.data.roleName)) {
3429
+ if (!(notification == null ? void 0 : notification.data)) {
3467
3430
  return;
3468
3431
  }
3469
3432
  console.debug(`[${notification.type}]`, notification);
3470
3433
  switch (notification.type) {
3471
3434
  case HMSNotificationTypes.PEER_LIST:
3472
- if (!isPeerJoinSubscribed || ((_b7 = notification.data) == null ? void 0 : _b7.length) === 0) {
3435
+ if (!isPeerJoinSubscribed || notification.data.length === 0) {
3473
3436
  return;
3474
3437
  }
3475
3438
  break;
@@ -3487,7 +3450,7 @@ var PeerNotifications = () => {
3487
3450
  return;
3488
3451
  }
3489
3452
  ToastBatcher.showToast({ notification });
3490
- }, [notification, isPeerJoinSubscribed, isPeerLeftSubscribed, roomState]);
3453
+ }, [notification, isPeerJoinSubscribed, isPeerLeftSubscribed]);
3491
3454
  return null;
3492
3455
  };
3493
3456
 
@@ -4178,16 +4141,42 @@ var useRedirectToLeave = () => {
4178
4141
  return { redirectToLeave: redirect };
4179
4142
  };
4180
4143
 
4144
+ // src/Prebuilt/common/utils.js
4145
+ var getMetadata = (metadataString) => {
4146
+ try {
4147
+ return !metadataString ? {} : JSON.parse(metadataString);
4148
+ } catch (error) {
4149
+ return {};
4150
+ }
4151
+ };
4152
+ var isScreenshareSupported = () => {
4153
+ return typeof navigator.mediaDevices.getDisplayMedia !== "undefined";
4154
+ };
4155
+ var getFormattedCount = (num) => {
4156
+ const formatter = new Intl.NumberFormat("en", { notation: "compact", maximumFractionDigits: 2 });
4157
+ const formattedNum = formatter.format(num);
4158
+ return formattedNum;
4159
+ };
4160
+ var formatTime = (timeInSeconds) => {
4161
+ timeInSeconds = Math.floor(timeInSeconds / 1e3);
4162
+ const hours = Math.floor(timeInSeconds / 3600);
4163
+ const minutes = Math.floor(timeInSeconds % 3600 / 60);
4164
+ const seconds = timeInSeconds % 60;
4165
+ const hour = hours !== 0 ? `${hours < 10 ? "0" : ""}${hours}:` : "";
4166
+ return `${hour}${minutes < 10 ? "0" : ""}${minutes}:${seconds < 10 ? "0" : ""}${seconds}`;
4167
+ };
4168
+
4181
4169
  // src/Prebuilt/components/Notifications/Notifications.jsx
4182
4170
  function Notifications() {
4183
4171
  const notification = useHMSNotifications7();
4184
4172
  const navigate = useNavigate2();
4185
4173
  const params = useParams2();
4186
4174
  const subscribedNotifications = useSubscribedNotifications() || {};
4187
- const roomState = useHMSStore8(selectRoomState3);
4175
+ const roomState = useHMSStore7(selectRoomState2);
4188
4176
  const updateRoomLayoutForRole = useUpdateRoomLayout();
4189
4177
  const isNotificationDisabled = useIsNotificationDisabled();
4190
4178
  const { redirectToLeave } = useRedirectToLeave();
4179
+ const vanillaStore = useHMSVanillaStore4();
4191
4180
  const handleRoleChangeDenied = useCallback8((request) => {
4192
4181
  ToastManager.addToast({
4193
4182
  title: `${request.peerName} denied your request to join the ${request.role.name} role`,
@@ -4201,8 +4190,18 @@ function Notifications() {
4201
4190
  return;
4202
4191
  }
4203
4192
  switch (notification.type) {
4193
+ case HMSNotificationTypes7.HAND_RAISE_CHANGED: {
4194
+ if (roomState !== HMSRoomState2.Connected || notification.data.isLocal) {
4195
+ return;
4196
+ }
4197
+ const hasPeerHandRaised = vanillaStore.getState(selectHasPeerHandRaised(notification.data.id));
4198
+ if (hasPeerHandRaised) {
4199
+ ToastBatcher.showToast({ notification, type: "RAISE_HAND" });
4200
+ }
4201
+ break;
4202
+ }
4204
4203
  case HMSNotificationTypes7.METADATA_UPDATED:
4205
- if (roomState !== HMSRoomState3.Connected) {
4204
+ if (roomState !== HMSRoomState2.Connected) {
4206
4205
  return;
4207
4206
  }
4208
4207
  const metadata = getMetadata((_a7 = notification.data) == null ? void 0 : _a7.metadata);
@@ -4292,7 +4291,7 @@ function Notifications() {
4292
4291
  if (isNotificationDisabled) {
4293
4292
  return null;
4294
4293
  }
4295
- return /* @__PURE__ */ React30.createElement(React30.Fragment, null, /* @__PURE__ */ React30.createElement(TrackUnmuteModal, null), /* @__PURE__ */ React30.createElement(TrackBulkUnmuteModal, null), /* @__PURE__ */ React30.createElement(TrackNotifications, null), /* @__PURE__ */ React30.createElement(PeerNotifications, null), /* @__PURE__ */ React30.createElement(ReconnectNotifications, null), /* @__PURE__ */ React30.createElement(AutoplayBlockedModal, null), /* @__PURE__ */ React30.createElement(PermissionErrorModal, null), /* @__PURE__ */ React30.createElement(InitErrorModal, { notification }));
4294
+ return /* @__PURE__ */ React30.createElement(React30.Fragment, null, /* @__PURE__ */ React30.createElement(TrackUnmuteModal, null), /* @__PURE__ */ React30.createElement(TrackBulkUnmuteModal, null), /* @__PURE__ */ React30.createElement(TrackNotifications, null), roomState === HMSRoomState2.Connected ? /* @__PURE__ */ React30.createElement(PeerNotifications, null) : null, /* @__PURE__ */ React30.createElement(ReconnectNotifications, null), /* @__PURE__ */ React30.createElement(AutoplayBlockedModal, null), /* @__PURE__ */ React30.createElement(PermissionErrorModal, null), /* @__PURE__ */ React30.createElement(InitErrorModal, { notification }));
4296
4295
  }
4297
4296
 
4298
4297
  // src/Prebuilt/components/PostLeave.jsx
@@ -4303,14 +4302,14 @@ import { ExitIcon } from "@100mslive/react-icons";
4303
4302
  // src/Prebuilt/components/Header/Header.tsx
4304
4303
  import React36 from "react";
4305
4304
  import { useMedia as useMedia3 } from "react-use";
4306
- import { HMSRoomState as HMSRoomState5, selectRoomState as selectRoomState5, useHMSStore as useHMSStore17 } from "@100mslive/react-sdk";
4305
+ import { HMSRoomState as HMSRoomState4, selectRoomState as selectRoomState4, useHMSStore as useHMSStore16 } from "@100mslive/react-sdk";
4307
4306
 
4308
4307
  // src/Prebuilt/components/Header/HeaderComponents.jsx
4309
4308
  import React31, { useEffect as useEffect17, useState as useState11 } from "react";
4310
- import { selectDominantSpeaker, useHMSStore as useHMSStore9 } from "@100mslive/react-sdk";
4309
+ import { selectDominantSpeaker, useHMSStore as useHMSStore8 } from "@100mslive/react-sdk";
4311
4310
  import { VolumeOneIcon } from "@100mslive/react-icons";
4312
4311
  var SpeakerTag = () => {
4313
- const dominantSpeaker = useHMSStore9(selectDominantSpeaker);
4312
+ const dominantSpeaker = useHMSStore8(selectDominantSpeaker);
4314
4313
  return dominantSpeaker && dominantSpeaker.name && /* @__PURE__ */ React31.createElement(
4315
4314
  Flex,
4316
4315
  {
@@ -4358,13 +4357,13 @@ var Logo = () => {
4358
4357
  import React34, { useCallback as useCallback13, useEffect as useEffect19, useRef as useRef5, useState as useState13 } from "react";
4359
4358
  import { useMedia as useMedia2 } from "react-use";
4360
4359
  import {
4361
- HMSRoomState as HMSRoomState4,
4360
+ HMSRoomState as HMSRoomState3,
4362
4361
  selectHLSState as selectHLSState2,
4363
4362
  selectIsConnectedToRoom as selectIsConnectedToRoom2,
4364
4363
  selectPermissions,
4365
- selectRoomState as selectRoomState4,
4364
+ selectRoomState as selectRoomState3,
4366
4365
  useHMSActions as useHMSActions12,
4367
- useHMSStore as useHMSStore15,
4366
+ useHMSStore as useHMSStore14,
4368
4367
  useRecordingStreaming as useRecordingStreaming2
4369
4368
  } from "@100mslive/react-sdk";
4370
4369
  import { AlertTriangleIcon, CrossIcon as CrossIcon4, RecordIcon } from "@100mslive/react-icons";
@@ -4468,7 +4467,7 @@ var Sheet = {
4468
4467
 
4469
4468
  // src/Prebuilt/components/Header/AdditionalRoomState.jsx
4470
4469
  import React33, { useState as useState12 } from "react";
4471
- import { selectLocalPeerID as selectLocalPeerID3, selectPeerSharingVideoPlaylist, useHMSStore as useHMSStore14, useScreenShare } from "@100mslive/react-sdk";
4470
+ import { selectLocalPeerID as selectLocalPeerID3, selectPeerSharingVideoPlaylist, useHMSStore as useHMSStore13, useScreenShare } from "@100mslive/react-sdk";
4472
4471
  import {
4473
4472
  AudioPlayerIcon,
4474
4473
  ChevronDownIcon as ChevronDownIcon2,
@@ -4481,22 +4480,24 @@ import {
4481
4480
 
4482
4481
  // src/Prebuilt/plugins/whiteboard/useWhiteboardMetadata.js
4483
4482
  import { useCallback as useCallback10, useEffect as useEffect18, useMemo as useMemo2 } from "react";
4484
- import { selectLocalPeerID as selectLocalPeerID2, selectPeerByCondition, useHMSStore as useHMSStore11 } from "@100mslive/react-sdk";
4483
+ import { selectLocalPeerID as selectLocalPeerID2, selectPeerByCondition, useHMSStore as useHMSStore10 } from "@100mslive/react-sdk";
4485
4484
 
4486
4485
  // src/Prebuilt/components/hooks/useMetadata.jsx
4487
4486
  import { useCallback as useCallback9 } from "react";
4488
4487
  import {
4488
+ selectHasPeerHandRaised as selectHasPeerHandRaised2,
4489
4489
  selectLocalPeerID,
4490
4490
  selectPeerMetadata,
4491
4491
  useHMSActions as useHMSActions9,
4492
- useHMSStore as useHMSStore10,
4493
- useHMSVanillaStore as useHMSVanillaStore4
4492
+ useHMSStore as useHMSStore9,
4493
+ useHMSVanillaStore as useHMSVanillaStore5
4494
4494
  } from "@100mslive/react-sdk";
4495
4495
  var useMyMetadata = () => {
4496
4496
  const hmsActions = useHMSActions9();
4497
- const localPeerId = useHMSStore10(selectLocalPeerID);
4498
- const vanillaStore = useHMSVanillaStore4();
4499
- const metaData = useHMSStore10(selectPeerMetadata(localPeerId));
4497
+ const localPeerId = useHMSStore9(selectLocalPeerID);
4498
+ const vanillaStore = useHMSVanillaStore5();
4499
+ const metaData = useHMSStore9(selectPeerMetadata(localPeerId));
4500
+ const isHandRaised = useHMSStore9(selectHasPeerHandRaised2(localPeerId));
4500
4501
  const update = (updatedFields) => __async(void 0, null, function* () {
4501
4502
  try {
4502
4503
  const currentMetadata = vanillaStore.getState(selectPeerMetadata(localPeerId));
@@ -4507,10 +4508,18 @@ var useMyMetadata = () => {
4507
4508
  }
4508
4509
  });
4509
4510
  const toggleHandRaise = useCallback9(() => __async(void 0, null, function* () {
4510
- yield update({ isHandRaised: !(metaData == null ? void 0 : metaData.isHandRaised), isBRBOn: false });
4511
- }), [metaData == null ? void 0 : metaData.isHandRaised]);
4511
+ if (isHandRaised) {
4512
+ yield hmsActions.lowerLocalPeerHand();
4513
+ } else {
4514
+ yield hmsActions.raiseLocalPeerHand();
4515
+ }
4516
+ }), [isHandRaised]);
4512
4517
  const toggleBRB = useCallback9(() => __async(void 0, null, function* () {
4513
- yield update({ isBRBOn: !(metaData == null ? void 0 : metaData.isBRBOn), isHandRaised: false });
4518
+ const newValue = !(metaData == null ? void 0 : metaData.isBRBOn);
4519
+ yield update({ isBRBOn: !(metaData == null ? void 0 : metaData.isBRBOn) });
4520
+ if (newValue) {
4521
+ yield hmsActions.lowerLocalPeerHand();
4522
+ }
4514
4523
  }), [metaData == null ? void 0 : metaData.isBRBOn]);
4515
4524
  const setPrevRole = (role) => __async(void 0, null, function* () {
4516
4525
  yield update({
@@ -4518,7 +4527,7 @@ var useMyMetadata = () => {
4518
4527
  });
4519
4528
  });
4520
4529
  return {
4521
- isHandRaised: !!(metaData == null ? void 0 : metaData.isHandRaised),
4530
+ isHandRaised,
4522
4531
  isBRBOn: !!(metaData == null ? void 0 : metaData.isBRBOn),
4523
4532
  metaData,
4524
4533
  updateMetaData: update,
@@ -4533,9 +4542,9 @@ var isWhiteboardOwner = (peer) => {
4533
4542
  return !!getMetadata(peer == null ? void 0 : peer.metadata).whiteboardOwner;
4534
4543
  };
4535
4544
  var useWhiteboardMetadata = () => {
4536
- const localPeerID = useHMSStore11(selectLocalPeerID2);
4545
+ const localPeerID = useHMSStore10(selectLocalPeerID2);
4537
4546
  const { updateMetaData } = useMyMetadata();
4538
- const whiteboardOwner = useHMSStore11(selectPeerByCondition(isWhiteboardOwner));
4547
+ const whiteboardOwner = useHMSStore10(selectPeerByCondition(isWhiteboardOwner));
4539
4548
  const amIWhiteboardOwner = useMemo2(() => localPeerID === (whiteboardOwner == null ? void 0 : whiteboardOwner.id), [localPeerID, whiteboardOwner]);
4540
4549
  const toggleWhiteboard = useCallback10(() => __async(void 0, null, function* () {
4541
4550
  if (!define_process_env_default.REACT_APP_PUSHER_APP_KEY) {
@@ -4571,12 +4580,12 @@ import {
4571
4580
  selectAudioPlaylistTrackByPeerID,
4572
4581
  selectPeerSharingAudioPlaylist,
4573
4582
  useHMSActions as useHMSActions10,
4574
- useHMSStore as useHMSStore12
4583
+ useHMSStore as useHMSStore11
4575
4584
  } from "@100mslive/react-sdk";
4576
4585
  var usePlaylistMusic = () => {
4577
- const peer = useHMSStore12(selectPeerSharingAudioPlaylist);
4578
- const track = useHMSStore12(selectAudioPlaylistTrackByPeerID(peer == null ? void 0 : peer.id));
4579
- const selection = useHMSStore12(selectAudioPlaylist.selectedItem);
4586
+ const peer = useHMSStore11(selectPeerSharingAudioPlaylist);
4587
+ const track = useHMSStore11(selectAudioPlaylistTrackByPeerID(peer == null ? void 0 : peer.id));
4588
+ const selection = useHMSStore11(selectAudioPlaylist.selectedItem);
4580
4589
  const hmsActions = useHMSActions10();
4581
4590
  const play = useCallback11(
4582
4591
  (selectedId) => __async(void 0, null, function* () {
@@ -4602,12 +4611,12 @@ import {
4602
4611
  selectPeerSharingAudio,
4603
4612
  selectScreenShareAudioByPeerID,
4604
4613
  useHMSActions as useHMSActions11,
4605
- useHMSStore as useHMSStore13
4614
+ useHMSStore as useHMSStore12
4606
4615
  } from "@100mslive/react-sdk";
4607
4616
  var useScreenshareAudio = () => {
4608
4617
  const hmsActions = useHMSActions11();
4609
- const peer = useHMSStore13(selectPeerSharingAudio);
4610
- const track = useHMSStore13(selectScreenShareAudioByPeerID(peer == null ? void 0 : peer.id));
4618
+ const peer = useHMSStore12(selectPeerSharingAudio);
4619
+ const track = useHMSStore12(selectScreenShareAudioByPeerID(peer == null ? void 0 : peer.id));
4611
4620
  const handleMute = useCallback12(() => {
4612
4621
  if (!peer.isLocal) {
4613
4622
  hmsActions.setVolume(!track.volume ? 100 : 0, track.id);
@@ -4654,8 +4663,8 @@ var AdditionalRoomState = () => {
4654
4663
  !screenshareAudio.peer || !screenshareAudio.track,
4655
4664
  !((_d = screenshareAudio.peer) == null ? void 0 : _d.isLocal) && !((_e = screenshareAudio.track) == null ? void 0 : _e.enabled)
4656
4665
  ].some(Boolean);
4657
- const peerSharingPlaylist = useHMSStore14(selectPeerSharingVideoPlaylist);
4658
- const localPeerID = useHMSStore14(selectLocalPeerID3);
4666
+ const peerSharingPlaylist = useHMSStore13(selectPeerSharingVideoPlaylist);
4667
+ const localPeerID = useHMSStore13(selectLocalPeerID3);
4659
4668
  const isVideoPlayListPlaying = !!(peerSharingPlaylist == null ? void 0 : peerSharingPlaylist.id);
4660
4669
  const { screenSharingPeerName, screenSharingPeerId, screenShareVideoTrackId } = useScreenShare();
4661
4670
  const isVideoScreenSharingOn = !!screenShareVideoTrackId;
@@ -4735,7 +4744,7 @@ var AdditionalRoomState = () => {
4735
4744
  var LiveStatus = () => {
4736
4745
  var _a7;
4737
4746
  const { isHLSRunning, isRTMPRunning } = useRecordingStreaming2();
4738
- const hlsState = useHMSStore15(selectHLSState2);
4747
+ const hlsState = useHMSStore14(selectHLSState2);
4739
4748
  const isMobile = useMedia2(config.media.md);
4740
4749
  const intervalRef = useRef5(null);
4741
4750
  const [liveTime, setLiveTime] = useState13(0);
@@ -4780,7 +4789,7 @@ var LiveStatus = () => {
4780
4789
  };
4781
4790
  var RecordingStatus = () => {
4782
4791
  const { isBrowserRecordingOn, isServerRecordingOn, isHLSRecordingOn, isRecordingOn } = useRecordingStreaming2();
4783
- const permissions = useHMSStore15(selectPermissions);
4792
+ const permissions = useHMSStore14(selectPermissions);
4784
4793
  const isMobile = useMedia2(config.media.md);
4785
4794
  if (!isRecordingOn || // if only browser recording is enabled, stop recording is shown
4786
4795
  // so no need to show this as it duplicates
@@ -4813,7 +4822,7 @@ var RecordingStatus = () => {
4813
4822
  );
4814
4823
  };
4815
4824
  var StartRecording = () => {
4816
- const permissions = useHMSStore15(selectPermissions);
4825
+ const permissions = useHMSStore14(selectPermissions);
4817
4826
  const [open, setOpen] = useState13(false);
4818
4827
  const [recordingStarted, setRecordingState] = useSetAppDataByKey(APP_DATA.recordingStarted);
4819
4828
  const { isBrowserRecordingOn, isStreamingOn, isHLSRunning } = useRecordingStreaming2();
@@ -4880,10 +4889,10 @@ var StartRecording = () => {
4880
4889
  );
4881
4890
  };
4882
4891
  var StreamActions = () => {
4883
- const isConnected = useHMSStore15(selectIsConnectedToRoom2);
4892
+ const isConnected = useHMSStore14(selectIsConnectedToRoom2);
4884
4893
  const isMobile = useMedia2(config.media.md);
4885
- const roomState = useHMSStore15(selectRoomState4);
4886
- return /* @__PURE__ */ React34.createElement(Flex, { align: "center", css: { gap: "$4" } }, /* @__PURE__ */ React34.createElement(AdditionalRoomState, null), !isMobile && /* @__PURE__ */ React34.createElement(Flex, { align: "center", css: { gap: "$4" } }, /* @__PURE__ */ React34.createElement(RecordingStatus, null), roomState !== HMSRoomState4.Preview ? /* @__PURE__ */ React34.createElement(LiveStatus, null) : null), isConnected && !isMobile ? /* @__PURE__ */ React34.createElement(StartRecording, null) : null);
4894
+ const roomState = useHMSStore14(selectRoomState3);
4895
+ return /* @__PURE__ */ React34.createElement(Flex, { align: "center", css: { gap: "$4" } }, /* @__PURE__ */ React34.createElement(AdditionalRoomState, null), !isMobile && /* @__PURE__ */ React34.createElement(Flex, { align: "center", css: { gap: "$4" } }, /* @__PURE__ */ React34.createElement(RecordingStatus, null), roomState !== HMSRoomState3.Preview ? /* @__PURE__ */ React34.createElement(LiveStatus, null) : null), isConnected && !isMobile ? /* @__PURE__ */ React34.createElement(StartRecording, null) : null);
4887
4896
  };
4888
4897
  var StopRecordingInSheet = ({
4889
4898
  onStopRecording,
@@ -4911,16 +4920,16 @@ import {
4911
4920
  selectVideoTrackByID,
4912
4921
  useDevices,
4913
4922
  useHMSActions as useHMSActions13,
4914
- useHMSStore as useHMSStore16
4923
+ useHMSStore as useHMSStore15
4915
4924
  } from "@100mslive/react-sdk";
4916
4925
  import { CameraFlipIcon, CheckIcon as CheckIcon2, CrossIcon as CrossIcon5, SpeakerIcon } from "@100mslive/react-icons";
4917
4926
  var CamaraFlipActions = () => {
4918
4927
  const actions = useHMSActions13();
4919
4928
  const { allDevices } = useDevices();
4920
4929
  const { videoInput } = allDevices;
4921
- const isVideoOn = useHMSStore16(selectIsLocalVideoEnabled2);
4922
- const videoTrackId = useHMSStore16(selectLocalVideoTrackID);
4923
- const localVideoTrack = useHMSStore16(selectVideoTrackByID(videoTrackId));
4930
+ const isVideoOn = useHMSStore15(selectIsLocalVideoEnabled2);
4931
+ const videoTrackId = useHMSStore15(selectLocalVideoTrackID);
4932
+ const localVideoTrack = useHMSStore15(selectVideoTrackByID(videoTrackId));
4924
4933
  if (!videoInput || !(videoInput == null ? void 0 : videoInput.length) || !(localVideoTrack == null ? void 0 : localVideoTrack.facingMode)) {
4925
4934
  return null;
4926
4935
  }
@@ -5035,9 +5044,9 @@ var SelectWithLabel = ({ label, icon = /* @__PURE__ */ React35.createElement(Rea
5035
5044
 
5036
5045
  // src/Prebuilt/components/Header/Header.tsx
5037
5046
  var Header2 = () => {
5038
- const roomState = useHMSStore17(selectRoomState5);
5047
+ const roomState = useHMSStore16(selectRoomState4);
5039
5048
  const isMobile = useMedia3(config.media.md);
5040
- if (roomState !== HMSRoomState5.Connected) {
5049
+ if (roomState !== HMSRoomState4.Connected) {
5041
5050
  return /* @__PURE__ */ React36.createElement(React36.Fragment, null);
5042
5051
  }
5043
5052
  return /* @__PURE__ */ React36.createElement(Flex, { justify: "between", align: "center", css: { position: "relative", height: "100%" } }, /* @__PURE__ */ React36.createElement(Flex, { align: "center", gap: "2", css: { position: "absolute", left: "$10" } }, /* @__PURE__ */ React36.createElement(Logo, null), /* @__PURE__ */ React36.createElement(SpeakerTag, null), isMobile && /* @__PURE__ */ React36.createElement(Flex, { align: "center", css: { gap: "$4" } }, /* @__PURE__ */ React36.createElement(LiveStatus, null), /* @__PURE__ */ React36.createElement(RecordingStatus, null))), /* @__PURE__ */ React36.createElement(
@@ -5113,15 +5122,15 @@ import { useSearchParam } from "react-use";
5113
5122
 
5114
5123
  // src/Prebuilt/components/Preview/PreviewJoin.tsx
5115
5124
  import React55, { Fragment as Fragment6, Suspense, useCallback as useCallback17, useEffect as useEffect24, useState as useState19 } from "react";
5116
- import { useMedia as useMedia9 } from "react-use";
5125
+ import { useMedia as useMedia10 } from "react-use";
5117
5126
  import {
5118
- HMSRoomState as HMSRoomState7,
5127
+ HMSRoomState as HMSRoomState6,
5119
5128
  selectIsLocalVideoEnabled as selectIsLocalVideoEnabled5,
5120
5129
  selectLocalPeer,
5121
- selectRoomState as selectRoomState7,
5130
+ selectRoomState as selectRoomState6,
5122
5131
  selectVideoTrackByID as selectVideoTrackByID5,
5123
5132
  useAVToggle as useAVToggle2,
5124
- useHMSStore as useHMSStore26,
5133
+ useHMSStore as useHMSStore25,
5125
5134
  useParticipants,
5126
5135
  usePreviewJoin,
5127
5136
  useRecordingStreaming as useRecordingStreaming4
@@ -5132,14 +5141,14 @@ import { MicOffIcon as MicOffIcon4, SettingsIcon as SettingsIcon2 } from "@100ms
5132
5141
  import React39, { Fragment as Fragment2 } from "react";
5133
5142
  import {
5134
5143
  DeviceType as DeviceType2,
5135
- HMSRoomState as HMSRoomState6,
5144
+ HMSRoomState as HMSRoomState5,
5136
5145
  selectLocalVideoTrackID as selectLocalVideoTrackID2,
5137
- selectRoomState as selectRoomState6,
5146
+ selectRoomState as selectRoomState5,
5138
5147
  selectVideoTrackByID as selectVideoTrackByID2,
5139
5148
  useAVToggle,
5140
5149
  useDevices as useDevices2,
5141
5150
  useHMSActions as useHMSActions14,
5142
- useHMSStore as useHMSStore18
5151
+ useHMSStore as useHMSStore17
5143
5152
  } from "@100mslive/react-sdk";
5144
5153
  import { CameraFlipIcon as CameraFlipIcon2, MicOffIcon, MicOnIcon as MicOnIcon3, VideoOffIcon, VideoOnIcon } from "@100mslive/react-icons";
5145
5154
 
@@ -5279,9 +5288,9 @@ var AudioVideoToggle = ({ hideOptions = false }) => {
5279
5288
  }));
5280
5289
  const { isLocalVideoEnabled, isLocalAudioEnabled, toggleAudio, toggleVideo } = useAVToggle();
5281
5290
  const actions = useHMSActions14();
5282
- const videoTrackId = useHMSStore18(selectLocalVideoTrackID2);
5283
- const localVideoTrack = useHMSStore18(selectVideoTrackByID2(videoTrackId));
5284
- const roomState = useHMSStore18(selectRoomState6);
5291
+ const videoTrackId = useHMSStore17(selectLocalVideoTrackID2);
5292
+ const localVideoTrack = useHMSStore17(selectVideoTrackByID2(videoTrackId));
5293
+ const roomState = useHMSStore17(selectRoomState5);
5285
5294
  const hasAudioDevices = (audioInput == null ? void 0 : audioInput.length) > 0;
5286
5295
  const hasVideoDevices = (videoInput == null ? void 0 : videoInput.length) > 0;
5287
5296
  return /* @__PURE__ */ React39.createElement(Fragment2, null, toggleAudio ? hideOptions || !hasAudioDevices ? /* @__PURE__ */ React39.createElement(Tooltip, { title: `Turn ${isLocalAudioEnabled ? "off" : "on"} audio (${isMacOS ? "\u2318" : "ctrl"} + d)` }, /* @__PURE__ */ React39.createElement(
@@ -5330,7 +5339,7 @@ var AudioVideoToggle = ({ hideOptions = false }) => {
5330
5339
  active: isLocalVideoEnabled,
5331
5340
  onClick: toggleVideo
5332
5341
  }
5333
- ) : null, (localVideoTrack == null ? void 0 : localVideoTrack.facingMode) && roomState === HMSRoomState6.Preview ? /* @__PURE__ */ React39.createElement(Tooltip, { title: "Switch Camera", key: "switchCamera" }, /* @__PURE__ */ React39.createElement(
5342
+ ) : null, (localVideoTrack == null ? void 0 : localVideoTrack.facingMode) && roomState === HMSRoomState5.Preview ? /* @__PURE__ */ React39.createElement(Tooltip, { title: "Switch Camera", key: "switchCamera" }, /* @__PURE__ */ React39.createElement(
5334
5343
  IconButton_default,
5335
5344
  {
5336
5345
  onClick: () => __async(void 0, null, function* () {
@@ -5370,7 +5379,7 @@ import { PinIcon, SpotlightIcon } from "@100mslive/react-icons";
5370
5379
 
5371
5380
  // src/Prebuilt/components/Connection/ConnectionIndicator.tsx
5372
5381
  import React41 from "react";
5373
- import { selectConnectionQualityByPeerID as selectConnectionQualityByPeerID2, useHMSStore as useHMSStore19 } from "@100mslive/react-sdk";
5382
+ import { selectConnectionQualityByPeerID as selectConnectionQualityByPeerID2, useHMSStore as useHMSStore18 } from "@100mslive/react-sdk";
5374
5383
  import { PoorConnectivityIcon as PoorConnectivityIcon2 } from "@100mslive/react-icons";
5375
5384
 
5376
5385
  // src/Prebuilt/components/Connection/connectionQualityUtils.js
@@ -5424,7 +5433,7 @@ var ConnectionIndicator = ({
5424
5433
  hideBg = false
5425
5434
  }) => {
5426
5435
  var _a7;
5427
- const downlinkQuality = (_a7 = useHMSStore19(selectConnectionQualityByPeerID2(peerId))) == null ? void 0 : _a7.downlinkQuality;
5436
+ const downlinkQuality = (_a7 = useHMSStore18(selectConnectionQualityByPeerID2(peerId))) == null ? void 0 : _a7.downlinkQuality;
5428
5437
  const { theme: theme2 } = useTheme();
5429
5438
  const defaultColor = theme2.colors.surface_brighter;
5430
5439
  if (downlinkQuality === -1 || downlinkQuality === void 0) {
@@ -5536,7 +5545,7 @@ import {
5536
5545
  selectLocalVideoTrackID as selectLocalVideoTrackID3,
5537
5546
  selectVideoTrackByID as selectVideoTrackByID3,
5538
5547
  useDevices as useDevices3,
5539
- useHMSStore as useHMSStore20
5548
+ useHMSStore as useHMSStore19
5540
5549
  } from "@100mslive/react-sdk";
5541
5550
  import { MicOnIcon as MicOnIcon4, SpeakerIcon as SpeakerIcon2, VideoOnIcon as VideoOnIcon2 } from "@100mslive/react-icons";
5542
5551
 
@@ -5596,12 +5605,12 @@ var Settings = ({ setHide }) => {
5596
5605
  var _a7;
5597
5606
  const { allDevices, selectedDeviceIDs, updateDevice } = useDevices3();
5598
5607
  const { videoInput, audioInput, audioOutput } = allDevices;
5599
- const videoTrackId = useHMSStore20(selectLocalVideoTrackID3);
5600
- const isVideoOn = useHMSStore20(selectIsLocalVideoEnabled3);
5608
+ const videoTrackId = useHMSStore19(selectLocalVideoTrackID3);
5609
+ const isVideoOn = useHMSStore19(selectIsLocalVideoEnabled3);
5601
5610
  const shouldShowAudioOutput = "setSinkId" in HTMLMediaElement.prototype;
5602
5611
  const mirrorLocalVideo = useUISettings(UI_SETTINGS.mirrorLocalVideo);
5603
5612
  const trackSelector = selectVideoTrackByID3(videoTrackId);
5604
- const track = useHMSStore20(trackSelector);
5613
+ const track = useHMSStore19(trackSelector);
5605
5614
  const audioOutputFiltered = (_a7 = audioOutput == null ? void 0 : audioOutput.filter((item) => !!item.label)) != null ? _a7 : [];
5606
5615
  if (!(videoInput == null ? void 0 : videoInput.length) && !(audioInput == null ? void 0 : audioInput.length) && !(audioOutputFiltered == null ? void 0 : audioOutputFiltered.length)) {
5607
5616
  setHide(true);
@@ -5756,7 +5765,7 @@ var DeviceSettings_default = Settings;
5756
5765
 
5757
5766
  // src/Prebuilt/components/Settings/LayoutSettings.jsx
5758
5767
  import React46, { useCallback as useCallback14 } from "react";
5759
- import { selectIsLocalScreenShared, selectIsLocalVideoEnabled as selectIsLocalVideoEnabled4, useHMSActions as useHMSActions15, useHMSStore as useHMSStore21 } from "@100mslive/react-sdk";
5768
+ import { selectIsLocalScreenShared, selectIsLocalVideoEnabled as selectIsLocalVideoEnabled4, useHMSActions as useHMSActions15, useHMSStore as useHMSStore20 } from "@100mslive/react-sdk";
5760
5769
 
5761
5770
  // src/Prebuilt/components/Settings/SwitchWithLabel.jsx
5762
5771
  import React45 from "react";
@@ -5799,8 +5808,8 @@ var SwitchWithLabel_default = SwitchWithLabel;
5799
5808
  // src/Prebuilt/components/Settings/LayoutSettings.jsx
5800
5809
  var LayoutSettings = () => {
5801
5810
  const hmsActions = useHMSActions15();
5802
- const isLocalVideoEnabled = useHMSStore21(selectIsLocalVideoEnabled4);
5803
- const isLocalScreenShared = useHMSStore21(selectIsLocalScreenShared);
5811
+ const isLocalVideoEnabled = useHMSStore20(selectIsLocalVideoEnabled4);
5812
+ const isLocalScreenShared = useHMSStore20(selectIsLocalScreenShared);
5804
5813
  const [{ isAudioOnly, maxTileCount, mirrorLocalVideo }, setUISettings] = useSetUiSettings();
5805
5814
  const toggleIsAudioOnly = useCallback14(
5806
5815
  (isAudioOnlyModeOn) => __async(void 0, null, function* () {
@@ -6134,8 +6143,10 @@ var SettingsModal_default = SettingsModal;
6134
6143
 
6135
6144
  // src/Prebuilt/components/VideoTile.jsx
6136
6145
  import React53, { Fragment as Fragment5, useCallback as useCallback16, useEffect as useEffect23, useMemo as useMemo3, useRef as useRef7, useState as useState18 } from "react";
6146
+ import { useMedia as useMedia8 } from "react-use";
6137
6147
  import {
6138
6148
  selectAudioTrackByPeerID as selectAudioTrackByPeerID2,
6149
+ selectHasPeerHandRaised as selectHasPeerHandRaised3,
6139
6150
  selectIsPeerAudioEnabled,
6140
6151
  selectLocalPeerID as selectLocalPeerID5,
6141
6152
  selectPeerMetadata as selectPeerMetadata2,
@@ -6144,8 +6155,8 @@ import {
6144
6155
  selectTrackAudioByID,
6145
6156
  selectVideoTrackByID as selectVideoTrackByID4,
6146
6157
  selectVideoTrackByPeerID as selectVideoTrackByPeerID3,
6147
- useHMSStore as useHMSStore25,
6148
- useHMSVanillaStore as useHMSVanillaStore5
6158
+ useHMSStore as useHMSStore24,
6159
+ useHMSVanillaStore as useHMSVanillaStore6
6149
6160
  } from "@100mslive/react-sdk";
6150
6161
  import { BrbTileIcon, HandIcon as HandIcon3, MicOffIcon as MicOffIcon3 } from "@100mslive/react-icons";
6151
6162
 
@@ -6158,7 +6169,7 @@ import {
6158
6169
  selectPermissions as selectPermissions3,
6159
6170
  selectTrackByID as selectTrackByID3,
6160
6171
  selectVideoTrackByPeerID as selectVideoTrackByPeerID2,
6161
- useHMSStore as useHMSStore24,
6172
+ useHMSStore as useHMSStore23,
6162
6173
  useRemoteAVToggle as useRemoteAVToggle2
6163
6174
  } from "@100mslive/react-sdk";
6164
6175
  import { CrossIcon as CrossIcon8, VerticalMenuIcon as VerticalMenuIcon2 } from "@100mslive/react-icons";
@@ -6166,7 +6177,7 @@ import { CrossIcon as CrossIcon8, VerticalMenuIcon as VerticalMenuIcon2 } from "
6166
6177
  // src/Prebuilt/components/MoreSettings/ChangeNameModal.jsx
6167
6178
  import React50, { useState as useState16 } from "react";
6168
6179
  import { useMedia as useMedia5 } from "react-use";
6169
- import { selectLocalPeerName, useHMSActions as useHMSActions16, useHMSStore as useHMSStore22 } from "@100mslive/react-sdk";
6180
+ import { selectLocalPeerName, useHMSActions as useHMSActions16, useHMSStore as useHMSStore21 } from "@100mslive/react-sdk";
6170
6181
 
6171
6182
  // src/Prebuilt/components/MoreSettings/ChangeNameContent.jsx
6172
6183
  import React49 from "react";
@@ -6278,7 +6289,7 @@ var ChangeNameContent = ({
6278
6289
  var ChangeNameModal = ({ onOpenChange, openParentSheet = null }) => {
6279
6290
  const [previewPreference, setPreviewPreference] = useUserPreferences(UserPreferencesKeys.PREVIEW);
6280
6291
  const hmsActions = useHMSActions16();
6281
- const localPeerName = useHMSStore22(selectLocalPeerName);
6292
+ const localPeerName = useHMSStore21(selectLocalPeerName);
6282
6293
  const [currentName, setCurrentName] = useState16(localPeerName);
6283
6294
  const isMobile = useMedia5(config.media.md);
6284
6295
  const changeName = () => __async(void 0, null, function* () {
@@ -6325,7 +6336,7 @@ import {
6325
6336
  selectTrackByID as selectTrackByID2,
6326
6337
  useCustomEvent as useCustomEvent2,
6327
6338
  useHMSActions as useHMSActions17,
6328
- useHMSStore as useHMSStore23,
6339
+ useHMSStore as useHMSStore22,
6329
6340
  useRemoteAVToggle
6330
6341
  } from "@100mslive/react-sdk";
6331
6342
  import {
@@ -6350,7 +6361,7 @@ var SpotlightActions = ({
6350
6361
  }
6351
6362
  }) => {
6352
6363
  const hmsActions = useHMSActions17();
6353
- const spotlightPeerId = useHMSStore23(selectSessionStore2(SESSION_STORE_KEY.SPOTLIGHT));
6364
+ const spotlightPeerId = useHMSStore22(selectSessionStore2(SESSION_STORE_KEY.SPOTLIGHT));
6354
6365
  const isTileSpotlighted = spotlightPeerId === peerId;
6355
6366
  const setSpotlightPeerId = (peer) => hmsActions.sessionStore.set(SESSION_STORE_KEY.SPOTLIGHT, peer).catch((err) => ToastManager.addToast({ title: err.description }));
6356
6367
  return /* @__PURE__ */ React51.createElement(
@@ -6393,7 +6404,7 @@ var MinimiseInset = () => {
6393
6404
  };
6394
6405
  var SimulcastLayers = ({ trackId }) => {
6395
6406
  var _a7;
6396
- const track = useHMSStore23(selectTrackByID2(trackId));
6407
+ const track = useHMSStore22(selectTrackByID2(trackId));
6397
6408
  const actions = useHMSActions17();
6398
6409
  const bg = useDropdownSelection();
6399
6410
  if (!((_a7 = track == null ? void 0 : track.layerDefinitions) == null ? void 0 : _a7.length) || track.degraded || !track.enabled) {
@@ -6460,7 +6471,7 @@ var SimulcastLayers = ({ trackId }) => {
6460
6471
  };
6461
6472
  var TileMenuContent = (props) => {
6462
6473
  const actions = useHMSActions17();
6463
- const { removeOthers } = useHMSStore23(selectPermissions2);
6474
+ const { removeOthers } = useHMSStore22(selectPermissions2);
6464
6475
  const {
6465
6476
  videoTrackID,
6466
6477
  audioTrackID,
@@ -6580,17 +6591,17 @@ var TileMenu = ({
6580
6591
  var _a7, _b7;
6581
6592
  const [open, setOpen] = useState17(false);
6582
6593
  const { theme: theme2 } = useTheme();
6583
- const localPeerID = useHMSStore24(selectLocalPeerID4);
6594
+ const localPeerID = useHMSStore23(selectLocalPeerID4);
6584
6595
  const isLocal = localPeerID === peerID;
6585
- const { removeOthers } = useHMSStore24(selectPermissions3);
6596
+ const { removeOthers } = useHMSStore23(selectPermissions3);
6586
6597
  const { setVolume, toggleAudio, toggleVideo } = useRemoteAVToggle2(audioTrackID, videoTrackID);
6587
6598
  const showSpotlight = enableSpotlightingPeer;
6588
- const isPrimaryVideoTrack = ((_a7 = useHMSStore24(selectVideoTrackByPeerID2(peerID))) == null ? void 0 : _a7.id) === videoTrackID;
6599
+ const isPrimaryVideoTrack = ((_a7 = useHMSStore23(selectVideoTrackByPeerID2(peerID))) == null ? void 0 : _a7.id) === videoTrackID;
6589
6600
  const showPinAction = audioTrackID || videoTrackID && isPrimaryVideoTrack;
6590
- const track = useHMSStore24(selectTrackByID3(videoTrackID));
6601
+ const track = useHMSStore23(selectTrackByID3(videoTrackID));
6591
6602
  const hideSimulcastLayers = !((_b7 = track == null ? void 0 : track.layerDefinitions) == null ? void 0 : _b7.length) || track.degraded || !track.enabled;
6592
6603
  const isMobile = useMedia7(config.media.md);
6593
- const peer = useHMSStore24(selectPeerByID2(peerID));
6604
+ const peer = useHMSStore23(selectPeerByID2(peerID));
6594
6605
  const [showNameChangeModal, setShowNameChangeModal] = useState17(false);
6595
6606
  useDropdownList({ open, name: "TileMenu" });
6596
6607
  if (!(removeOthers || toggleAudio || toggleVideo || setVolume || showPinAction) && hideSimulcastLayers) {
@@ -6681,14 +6692,15 @@ var Tile = ({
6681
6692
  hideMetadataOnTile = false
6682
6693
  }) => {
6683
6694
  const trackSelector = trackId ? selectVideoTrackByID4(trackId) : selectVideoTrackByPeerID3(peerId);
6684
- const track = useHMSStore25(trackSelector);
6685
- const peerName = useHMSStore25(selectPeerNameByID(peerId));
6686
- const audioTrack = useHMSStore25(selectAudioTrackByPeerID2(peerId));
6687
- const localPeerID = useHMSStore25(selectLocalPeerID5);
6695
+ const track = useHMSStore24(trackSelector);
6696
+ const isMobile = useMedia8(config.media.md);
6697
+ const peerName = useHMSStore24(selectPeerNameByID(peerId));
6698
+ const audioTrack = useHMSStore24(selectAudioTrackByPeerID2(peerId));
6699
+ const localPeerID = useHMSStore24(selectLocalPeerID5);
6688
6700
  const isAudioOnly = useUISettings(UI_SETTINGS.isAudioOnly);
6689
6701
  const mirrorLocalVideo = useUISettings(UI_SETTINGS.mirrorLocalVideo);
6690
6702
  const showStatsOnTiles = useUISettings(UI_SETTINGS.showStatsOnTiles);
6691
- const isAudioMuted = !useHMSStore25(selectIsPeerAudioEnabled(peerId));
6703
+ const isAudioMuted = !useHMSStore24(selectIsPeerAudioEnabled(peerId));
6692
6704
  const isVideoMuted = !(track == null ? void 0 : track.enabled);
6693
6705
  const [isMouseHovered, setIsMouseHovered] = useState18(false);
6694
6706
  const isVideoDegraded = track == null ? void 0 : track.degraded;
@@ -6699,7 +6711,7 @@ var Tile = ({
6699
6711
  videoTrackID: track == null ? void 0 : track.id,
6700
6712
  audioTrackID: audioTrack == null ? void 0 : audioTrack.id
6701
6713
  });
6702
- const spotlighted = useHMSStore25(selectSessionStore3(SESSION_STORE_KEY.SPOTLIGHT)) === peerId;
6714
+ const spotlighted = useHMSStore24(selectSessionStore3(SESSION_STORE_KEY.SPOTLIGHT)) === peerId;
6703
6715
  const label = getVideoTileLabel({
6704
6716
  peerName,
6705
6717
  track,
@@ -6762,7 +6774,7 @@ var Tile = ({
6762
6774
  },
6763
6775
  /* @__PURE__ */ React53.createElement(MicOffIcon3, null)
6764
6776
  ) : /* @__PURE__ */ React53.createElement(AudioLevel, { trackId: audioTrack == null ? void 0 : audioTrack.id }) : null,
6765
- isMouseHovered || isDragabble ? /* @__PURE__ */ React53.createElement(
6777
+ isMouseHovered || isDragabble && isMobile ? /* @__PURE__ */ React53.createElement(
6766
6778
  TileMenu_default,
6767
6779
  {
6768
6780
  peerID: peerId,
@@ -6798,7 +6810,7 @@ var heightAnimation = (value) => keyframes({
6798
6810
  }
6799
6811
  });
6800
6812
  var AudioLevelIndicator = ({ trackId, value, delay }) => {
6801
- const vanillaStore = useHMSVanillaStore5();
6813
+ const vanillaStore = useHMSVanillaStore6();
6802
6814
  const ref = useRef7();
6803
6815
  useEffect23(() => {
6804
6816
  const unsubscribe = vanillaStore.subscribe((audioLevel) => {
@@ -6827,9 +6839,9 @@ var AudioLevel = ({ trackId }) => {
6827
6839
  return /* @__PURE__ */ React53.createElement(StyledVideoTile.AudioIndicator, null, /* @__PURE__ */ React53.createElement(Flex, { align: "center", justify: "center", css: { gap: "$2" } }, [3, 2, 3].map((v, i) => /* @__PURE__ */ React53.createElement(AudioLevelIndicator, { trackId, value: v, delay: i * 0.15, key: i }))));
6828
6840
  };
6829
6841
  var PeerMetadata = ({ peerId }) => {
6830
- const metaData = useHMSStore25(selectPeerMetadata2(peerId));
6831
- const isHandRaised = (metaData == null ? void 0 : metaData.isHandRaised) || false;
6842
+ const metaData = useHMSStore24(selectPeerMetadata2(peerId));
6832
6843
  const isBRB = (metaData == null ? void 0 : metaData.isBRBOn) || false;
6844
+ const isHandRaised = useHMSStore24(selectHasPeerHandRaised3(peerId));
6833
6845
  return /* @__PURE__ */ React53.createElement(Fragment5, null, isHandRaised ? /* @__PURE__ */ React53.createElement(StyledVideoTile.AttributeBox, { css: metaStyles, "data-testid": "raiseHand_icon_onTile" }, /* @__PURE__ */ React53.createElement(HandIcon3, { width: 24, height: 24 })) : null, isBRB ? /* @__PURE__ */ React53.createElement(StyledVideoTile.AttributeBox, { css: metaStyles, "data-testid": "brb_icon_onTile" }, /* @__PURE__ */ React53.createElement(BrbTileIcon, { width: 22, height: 22 })) : null);
6834
6846
  };
6835
6847
  var VideoTile = React53.memo(Tile);
@@ -6837,7 +6849,7 @@ var VideoTile_default = VideoTile;
6837
6849
 
6838
6850
  // src/Prebuilt/components/Preview/PreviewForm.tsx
6839
6851
  import React54 from "react";
6840
- import { useMedia as useMedia8 } from "react-use";
6852
+ import { useMedia as useMedia9 } from "react-use";
6841
6853
  import { JoinForm_JoinBtnType as JoinForm_JoinBtnType2 } from "@100mslive/types-prebuilt/elements/join_form";
6842
6854
  import { useRecordingStreaming as useRecordingStreaming3 } from "@100mslive/react-sdk";
6843
6855
  import { RadioIcon } from "@100mslive/react-icons";
@@ -6853,7 +6865,7 @@ var PreviewForm = ({
6853
6865
  const formSubmit = (e) => {
6854
6866
  e.preventDefault();
6855
6867
  };
6856
- const isMobile = useMedia8(config.media.md);
6868
+ const isMobile = useMedia9(config.media.md);
6857
6869
  const { isHLSRunning } = useRecordingStreaming3();
6858
6870
  const layout = useRoomLayout();
6859
6871
  const { join_form: joinForm = {} } = ((_c = (_b7 = (_a7 = layout == null ? void 0 : layout.screens) == null ? void 0 : _a7.preview) == null ? void 0 : _b7.default) == null ? void 0 : _c.elements) || {};
@@ -6903,7 +6915,7 @@ var Form = styled("form", {
6903
6915
  var PreviewForm_default = PreviewForm;
6904
6916
 
6905
6917
  // src/Prebuilt/components/Preview/PreviewJoin.tsx
6906
- var VirtualBackground = React55.lazy(() => import("./VirtualBackground-A5UM363O.js"));
6918
+ var VirtualBackground = React55.lazy(() => import("./VirtualBackground-THDRYDRA.js"));
6907
6919
  var getParticipantChipContent = (peerCount = 0) => {
6908
6920
  if (peerCount === 0) {
6909
6921
  return "You are the first to join";
@@ -6946,7 +6958,7 @@ var PreviewJoin = ({
6946
6958
  },
6947
6959
  asRole
6948
6960
  });
6949
- const roomState = useHMSStore26(selectRoomState7);
6961
+ const roomState = useHMSStore25(selectRoomState6);
6950
6962
  const savePreferenceAndJoin = useCallback17(() => {
6951
6963
  setPreviewPreference({
6952
6964
  name
@@ -6956,6 +6968,10 @@ var PreviewJoin = ({
6956
6968
  }, [join, name, setPreviewPreference, onJoin]);
6957
6969
  const roomLayout = useRoomLayout();
6958
6970
  const { preview_header: previewHeader = {} } = ((_c = (_b7 = (_a7 = roomLayout == null ? void 0 : roomLayout.screens) == null ? void 0 : _a7.preview) == null ? void 0 : _b7.default) == null ? void 0 : _c.elements) || {};
6971
+ const localPeer = useHMSStore25(selectLocalPeer);
6972
+ const videoTrack = useHMSStore25(selectVideoTrackByID5(localPeer == null ? void 0 : localPeer.videoTrack));
6973
+ const isMobile = useMedia10(config.media.md);
6974
+ const aspectRatio = (videoTrack == null ? void 0 : videoTrack.width) && (videoTrack == null ? void 0 : videoTrack.height) ? videoTrack.width / videoTrack.height : isMobile ? 9 / 16 : 16 / 9;
6959
6975
  useEffect24(() => {
6960
6976
  if (authToken) {
6961
6977
  if (skipPreview) {
@@ -6970,7 +6986,7 @@ var PreviewJoin = ({
6970
6986
  setName(initialName);
6971
6987
  }
6972
6988
  }, [initialName]);
6973
- return roomState === HMSRoomState7.Preview ? /* @__PURE__ */ React55.createElement(Container3, { css: { h: "100%", pt: "$10", "@md": { justifyContent: "space-between" } } }, toggleVideo ? null : /* @__PURE__ */ React55.createElement(Box, null), /* @__PURE__ */ React55.createElement(Flex, { direction: "column", justify: "center", css: { w: "100%", maxWidth: "640px" } }, /* @__PURE__ */ React55.createElement(Logo, null), /* @__PURE__ */ React55.createElement(
6989
+ return roomState === HMSRoomState6.Preview ? /* @__PURE__ */ React55.createElement(Container3, { css: { h: "100%", pt: "$10", "@md": { justifyContent: "space-between" } } }, toggleVideo ? null : /* @__PURE__ */ React55.createElement(Box, null), /* @__PURE__ */ React55.createElement(Flex, { direction: "column", justify: "center", css: { w: "100%", maxWidth: "640px" } }, /* @__PURE__ */ React55.createElement(Logo, null), /* @__PURE__ */ React55.createElement(
6974
6990
  Text,
6975
6991
  {
6976
6992
  variant: "h4",
@@ -7005,7 +7021,7 @@ var PreviewJoin = ({
7005
7021
  }
7006
7022
  },
7007
7023
  /* @__PURE__ */ React55.createElement(PreviewTile, { name, error: previewError })
7008
- ) : null, /* @__PURE__ */ React55.createElement(Box, { css: { w: "100%", maxWidth: "640px" } }, /* @__PURE__ */ React55.createElement(PreviewControls, { hideSettings: !toggleVideo && !toggleAudio }), /* @__PURE__ */ React55.createElement(
7024
+ ) : null, /* @__PURE__ */ React55.createElement(Box, { css: { w: "100%", maxWidth: `${aspectRatio * 360}px` } }, /* @__PURE__ */ React55.createElement(PreviewControls, { hideSettings: !toggleVideo && !toggleAudio }), /* @__PURE__ */ React55.createElement(
7009
7025
  PreviewForm_default,
7010
7026
  {
7011
7027
  name,
@@ -7024,15 +7040,15 @@ var Container3 = styled("div", __spreadProps(__spreadValues({
7024
7040
  px: "$10"
7025
7041
  }));
7026
7042
  var PreviewTile = ({ name, error }) => {
7027
- const localPeer = useHMSStore26(selectLocalPeer);
7043
+ const localPeer = useHMSStore25(selectLocalPeer);
7028
7044
  const { isLocalAudioEnabled, toggleAudio } = useAVToggle2();
7029
- const isVideoOn = useHMSStore26(selectIsLocalVideoEnabled5);
7045
+ const isVideoOn = useHMSStore25(selectIsLocalVideoEnabled5);
7030
7046
  const mirrorLocalVideo = useUISettings(UI_SETTINGS.mirrorLocalVideo);
7031
7047
  const trackSelector = selectVideoTrackByID5(localPeer == null ? void 0 : localPeer.videoTrack);
7032
- const track = useHMSStore26(trackSelector);
7048
+ const track = useHMSStore25(trackSelector);
7033
7049
  const showMuteIcon = !isLocalAudioEnabled || !toggleAudio;
7034
- const videoTrack = useHMSStore26(selectVideoTrackByID5(localPeer == null ? void 0 : localPeer.videoTrack));
7035
- const isMobile = useMedia9(config.media.md);
7050
+ const videoTrack = useHMSStore25(selectVideoTrackByID5(localPeer == null ? void 0 : localPeer.videoTrack));
7051
+ const isMobile = useMedia10(config.media.md);
7036
7052
  const aspectRatio = (videoTrack == null ? void 0 : videoTrack.width) && (videoTrack == null ? void 0 : videoTrack.height) ? videoTrack.width / videoTrack.height : isMobile ? 9 / 16 : 16 / 9;
7037
7053
  return /* @__PURE__ */ React55.createElement(
7038
7054
  StyledVideoTile.Container,
@@ -7040,7 +7056,7 @@ var PreviewTile = ({ name, error }) => {
7040
7056
  css: {
7041
7057
  bg: "$surface_default",
7042
7058
  aspectRatio,
7043
- height: "min(640px, 40vh)",
7059
+ height: "min(360px, 70vh)",
7044
7060
  maxWidth: "640px",
7045
7061
  overflow: "clip",
7046
7062
  "@md": {
@@ -7062,7 +7078,7 @@ var PreviewTile = ({ name, error }) => {
7062
7078
  );
7063
7079
  };
7064
7080
  var PreviewControls = ({ hideSettings }) => {
7065
- const isMobile = useMedia9(config.media.md);
7081
+ const isMobile = useMedia10(config.media.md);
7066
7082
  return /* @__PURE__ */ React55.createElement(
7067
7083
  Flex,
7068
7084
  {
@@ -7124,7 +7140,7 @@ var PreviewContainer_default = PreviewContainer;
7124
7140
 
7125
7141
  // src/Prebuilt/components/Toast/ToastContainer.jsx
7126
7142
  import React58, { useEffect as useEffect25, useState as useState20 } from "react";
7127
- import { selectIsConnectedToRoom as selectIsConnectedToRoom3, useHMSStore as useHMSStore27 } from "@100mslive/react-sdk";
7143
+ import { selectIsConnectedToRoom as selectIsConnectedToRoom3, useHMSStore as useHMSStore26 } from "@100mslive/react-sdk";
7128
7144
 
7129
7145
  // src/Prebuilt/components/Toast/Toast.jsx
7130
7146
  import React57 from "react";
@@ -7146,7 +7162,7 @@ var Toast2 = (_a7) => {
7146
7162
 
7147
7163
  // src/Prebuilt/components/Toast/ToastContainer.jsx
7148
7164
  var ToastContainer = () => {
7149
- const isConnected = useHMSStore27(selectIsConnectedToRoom3);
7165
+ const isConnected = useHMSStore26(selectIsConnectedToRoom3);
7150
7166
  const [toasts, setToast] = useState20([]);
7151
7167
  useEffect25(() => {
7152
7168
  ToastManager.addListener(setToast);
@@ -7168,13 +7184,13 @@ var ToastContainer = () => {
7168
7184
 
7169
7185
  // src/Prebuilt/plugins/FlyingEmoji.jsx
7170
7186
  import React59, { useCallback as useCallback18, useEffect as useEffect26, useMemo as useMemo4, useState as useState21 } from "react";
7171
- import { useMedia as useMedia10 } from "react-use";
7187
+ import { useMedia as useMedia11 } from "react-use";
7172
7188
  import {
7173
7189
  selectLocalPeerID as selectLocalPeerID6,
7174
7190
  selectPeerNameByID as selectPeerNameByID2,
7175
7191
  useCustomEvent as useCustomEvent3,
7176
- useHMSStore as useHMSStore28,
7177
- useHMSVanillaStore as useHMSVanillaStore6
7192
+ useHMSStore as useHMSStore27,
7193
+ useHMSVanillaStore as useHMSVanillaStore7
7178
7194
  } from "@100mslive/react-sdk";
7179
7195
  var emojiCount = 1;
7180
7196
  var flyAndFade = keyframes({
@@ -7200,10 +7216,10 @@ var getStartingPoints = (isMobile) => {
7200
7216
  return arr;
7201
7217
  };
7202
7218
  function FlyingEmoji() {
7203
- const localPeerId = useHMSStore28(selectLocalPeerID6);
7204
- const vanillaStore = useHMSVanillaStore6();
7219
+ const localPeerId = useHMSStore27(selectLocalPeerID6);
7220
+ const vanillaStore = useHMSVanillaStore7();
7205
7221
  const [emojis, setEmojis] = useState21([]);
7206
- const isMobile = useMedia10(config.media.md);
7222
+ const isMobile = useMedia11(config.media.md);
7207
7223
  const startingPoints = useMemo4(() => getStartingPoints(isMobile), [isMobile]);
7208
7224
  const showFlyingEmoji = useCallback18(
7209
7225
  ({ emojiId, senderId }) => {
@@ -7317,7 +7333,7 @@ import {
7317
7333
  selectIsConnectedToRoom as selectIsConnectedToRoom5,
7318
7334
  selectPermissions as selectPermissions4,
7319
7335
  useHMSActions as useHMSActions19,
7320
- useHMSStore as useHMSStore30,
7336
+ useHMSStore as useHMSStore29,
7321
7337
  useRecordingStreaming as useRecordingStreaming5
7322
7338
  } from "@100mslive/react-sdk";
7323
7339
 
@@ -7331,11 +7347,11 @@ import {
7331
7347
  selectPeerMetadata as selectPeerMetadata3,
7332
7348
  selectPeers,
7333
7349
  selectRemotePeers,
7334
- useHMSStore as useHMSStore29,
7335
- useHMSVanillaStore as useHMSVanillaStore7
7350
+ useHMSStore as useHMSStore28,
7351
+ useHMSVanillaStore as useHMSVanillaStore8
7336
7352
  } from "@100mslive/react-sdk";
7337
7353
  var useFilteredRoles = () => {
7338
- const roles = useHMSStore29(selectAvailableRoleNames2).filter((role) => !isInternalRole(role));
7354
+ const roles = useHMSStore28(selectAvailableRoleNames2);
7339
7355
  return roles;
7340
7356
  };
7341
7357
  var useShowStreamingUI = () => {
@@ -7346,12 +7362,12 @@ var useShowStreamingUI = () => {
7346
7362
  };
7347
7363
  var useParticipants2 = (params) => {
7348
7364
  var _a7;
7349
- const isConnected = useHMSStore29(selectIsConnectedToRoom4);
7350
- const peerCount = useHMSStore29(selectPeerCount);
7351
- const availableRoles = useHMSStore29(selectAvailableRoleNames2);
7352
- let participantList = useHMSStore29(isConnected ? selectPeers : selectRemotePeers);
7365
+ const isConnected = useHMSStore28(selectIsConnectedToRoom4);
7366
+ const peerCount = useHMSStore28(selectPeerCount);
7367
+ const availableRoles = useHMSStore28(selectAvailableRoleNames2);
7368
+ let participantList = useHMSStore28(isConnected ? selectPeers : selectRemotePeers);
7353
7369
  const rolesWithParticipants = Array.from(new Set(participantList.map((peer) => peer.roleName)));
7354
- const vanillaStore = useHMSVanillaStore7();
7370
+ const vanillaStore = useHMSVanillaStore8();
7355
7371
  if ((_a7 = params == null ? void 0 : params.metadata) == null ? void 0 : _a7.isHandRaised) {
7356
7372
  participantList = participantList.filter((peer) => {
7357
7373
  return vanillaStore.getState(selectPeerMetadata3(peer.id)).isHandRaised;
@@ -7370,10 +7386,10 @@ var useParticipants2 = (params) => {
7370
7386
  // src/Prebuilt/components/hooks/useAutoStartStreaming.tsx
7371
7387
  var useAutoStartStreaming = () => {
7372
7388
  const [isHLSStarted, setHLSStarted] = useSetAppDataByKey(APP_DATA.hlsStarted);
7373
- const permissions = useHMSStore30(selectPermissions4);
7389
+ const permissions = useHMSStore29(selectPermissions4);
7374
7390
  const showStreamingUI = useShowStreamingUI();
7375
7391
  const hmsActions = useHMSActions19();
7376
- const isConnected = useHMSStore30(selectIsConnectedToRoom5);
7392
+ const isConnected = useHMSStore29(selectIsConnectedToRoom5);
7377
7393
  const { isHLSRunning } = useRecordingStreaming5();
7378
7394
  const streamStartedRef = useRef9(false);
7379
7395
  const startHLS = useCallback20(() => __async(void 0, null, function* () {
@@ -7407,7 +7423,7 @@ var useAutoStartStreaming = () => {
7407
7423
  };
7408
7424
 
7409
7425
  // src/Prebuilt/App.tsx
7410
- var Conference = React61.lazy(() => import("./conference-S7R3O4OC.js"));
7426
+ var Conference = React61.lazy(() => import("./conference-6IVZHILI.js"));
7411
7427
  var HMSPrebuilt = React61.forwardRef(
7412
7428
  ({
7413
7429
  roomCode = "",
@@ -7581,7 +7597,7 @@ var RouteList = () => {
7581
7597
  )), isLeaveScreenEnabled ? /* @__PURE__ */ React61.createElement(Route, { path: "leave" }, /* @__PURE__ */ React61.createElement(Route, { path: ":roomId/:role", element: /* @__PURE__ */ React61.createElement(PostLeave_default, null) }), /* @__PURE__ */ React61.createElement(Route, { path: ":roomId", element: /* @__PURE__ */ React61.createElement(PostLeave_default, null) })) : null, /* @__PURE__ */ React61.createElement(Route, { path: "/:roomId/:role", element: /* @__PURE__ */ React61.createElement(Redirector, { showPreview: isPreviewScreenEnabled }) }), /* @__PURE__ */ React61.createElement(Route, { path: "/:roomId/", element: /* @__PURE__ */ React61.createElement(Redirector, { showPreview: isPreviewScreenEnabled }) }));
7582
7598
  };
7583
7599
  var BackSwipe = () => {
7584
- const isConnectedToRoom = useHMSStore31(selectIsConnectedToRoom6);
7600
+ const isConnectedToRoom = useHMSStore30(selectIsConnectedToRoom6);
7585
7601
  const hmsActions = useHMSActions20();
7586
7602
  useEffect29(() => {
7587
7603
  const onRouteLeave = () => __async(void 0, null, function* () {
@@ -7700,14 +7716,13 @@ export {
7700
7716
  DialogInputFile,
7701
7717
  FullPageProgress_default,
7702
7718
  ToastManager,
7703
- getMetadata,
7704
- isScreenshareSupported,
7705
- isInternalRole,
7706
- getFormattedCount,
7707
7719
  PictureInPicture,
7708
7720
  useRoomLayoutPreviewScreen,
7709
7721
  useRoomLayoutConferencingScreen,
7710
7722
  useRedirectToLeave,
7723
+ getMetadata,
7724
+ isScreenshareSupported,
7725
+ getFormattedCount,
7711
7726
  Sheet,
7712
7727
  useMyMetadata,
7713
7728
  StopRecordingInSheet,
@@ -7729,4 +7744,4 @@ export {
7729
7744
  HMSPrebuilt,
7730
7745
  Progress
7731
7746
  };
7732
- //# sourceMappingURL=chunk-Q6U22HIE.js.map
7747
+ //# sourceMappingURL=chunk-CDYRVICT.js.map