@100mslive/roomkit-react 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/dist/{ActiveSpeakerView-I4XBBOOY.js → ActiveSpeakerView-CLXH5CT7.js} +6 -6
  2. package/dist/{ActiveSpeakerView-ELWK3LNE.css → ActiveSpeakerView-KIIG3P3H.css} +2 -2
  3. package/dist/{PinnedTrackView-NWN3H5EZ.css.map → ActiveSpeakerView-KIIG3P3H.css.map} +1 -1
  4. package/dist/{HLSView-UPP5PDCE.css → HLSView-2BZD2FSZ.css} +2 -2
  5. package/dist/{ActiveSpeakerView-ELWK3LNE.css.map → HLSView-2BZD2FSZ.css.map} +1 -1
  6. package/dist/{HLSView-VXI2RN37.js → HLSView-RIXB2GY3.js} +5 -5
  7. package/dist/{PinnedTrackView-NWN3H5EZ.css → PinnedTrackView-IKIDDCHG.css} +2 -2
  8. package/dist/{conference-JFEDNIUG.css.map → PinnedTrackView-IKIDDCHG.css.map} +1 -1
  9. package/dist/{PinnedTrackView-V2COEYUL.js → PinnedTrackView-ZGNZXO4J.js} +6 -6
  10. package/dist/{VirtualBackground-4RPLPBOQ.js → VirtualBackground-PPX7DVS3.js} +3 -3
  11. package/dist/{chunk-2SV2DRIF.js → chunk-CIV5V5QF.js} +116 -126
  12. package/dist/chunk-CIV5V5QF.js.map +7 -0
  13. package/dist/{chunk-PLKNFRDT.js → chunk-E7WZYH2U.js} +2 -2
  14. package/dist/{chunk-YJCBCMH4.js → chunk-G24GH7QG.js} +2 -2
  15. package/dist/{chunk-YJCBCMH4.js.map → chunk-G24GH7QG.js.map} +1 -1
  16. package/dist/{chunk-S4QRZ4VV.js → chunk-GEPWMIT4.js} +2 -2
  17. package/dist/{chunk-MJNJRHS3.js → chunk-LMSP5ETL.js} +568 -561
  18. package/dist/chunk-LMSP5ETL.js.map +7 -0
  19. package/dist/{conference-JFEDNIUG.css → conference-IQN7SXQI.css} +2 -2
  20. package/dist/{HLSView-UPP5PDCE.css.map → conference-IQN7SXQI.css.map} +1 -1
  21. package/dist/{conference-DGJFMV3O.js → conference-ORQKXGY3.js} +11 -11
  22. package/dist/index.cjs.css +1 -1
  23. package/dist/index.cjs.css.map +1 -1
  24. package/dist/index.cjs.js +911 -916
  25. package/dist/index.cjs.js.map +3 -3
  26. package/dist/index.css +1 -1
  27. package/dist/index.css.map +1 -1
  28. package/dist/index.js +4 -4
  29. package/dist/meta.cjs.json +38 -18
  30. package/dist/meta.esbuild.json +122 -102
  31. package/dist/{transcription-KASUU6FK.js → transcription-ETHBK5TS.js} +3 -3
  32. package/package.json +7 -7
  33. package/src/Prebuilt/components/AppData/useUISettings.js +6 -2
  34. package/src/Prebuilt/components/Chip.jsx +1 -0
  35. package/src/Prebuilt/components/IconButtonWithOptions/IconButtonWithOptions.jsx +1 -0
  36. package/src/Prebuilt/components/TileMenu.jsx +10 -17
  37. package/dist/chunk-2SV2DRIF.js.map +0 -7
  38. package/dist/chunk-MJNJRHS3.js.map +0 -7
  39. /package/dist/{ActiveSpeakerView-I4XBBOOY.js.map → ActiveSpeakerView-CLXH5CT7.js.map} +0 -0
  40. /package/dist/{HLSView-VXI2RN37.js.map → HLSView-RIXB2GY3.js.map} +0 -0
  41. /package/dist/{PinnedTrackView-V2COEYUL.js.map → PinnedTrackView-ZGNZXO4J.js.map} +0 -0
  42. /package/dist/{VirtualBackground-4RPLPBOQ.js.map → VirtualBackground-PPX7DVS3.js.map} +0 -0
  43. /package/dist/{chunk-PLKNFRDT.js.map → chunk-E7WZYH2U.js.map} +0 -0
  44. /package/dist/{chunk-S4QRZ4VV.js.map → chunk-GEPWMIT4.js.map} +0 -0
  45. /package/dist/{conference-DGJFMV3O.js.map → conference-ORQKXGY3.js.map} +0 -0
  46. /package/dist/{transcription-KASUU6FK.js.map → transcription-ETHBK5TS.js.map} +0 -0
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Box,
3
3
  Text
4
- } from "./chunk-S4QRZ4VV.js";
4
+ } from "./chunk-GEPWMIT4.js";
5
5
  import {
6
6
  IconButton_default,
7
7
  SESSION_STORE_KEY,
@@ -12,7 +12,7 @@ import {
12
12
  __spreadValues,
13
13
  define_process_env_default,
14
14
  init_define_process_env
15
- } from "./chunk-YJCBCMH4.js";
15
+ } from "./chunk-G24GH7QG.js";
16
16
 
17
17
  // src/Prebuilt/plugins/transcription/index.jsx
18
18
  init_define_process_env();
@@ -353,4 +353,4 @@ function TranscriptionButton() {
353
353
  export {
354
354
  TranscriptionButton as default
355
355
  };
356
- //# sourceMappingURL=transcription-KASUU6FK.js.map
356
+ //# sourceMappingURL=transcription-ETHBK5TS.js.map
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "prebuilt",
11
11
  "roomkit"
12
12
  ],
13
- "version": "0.1.2",
13
+ "version": "0.1.3",
14
14
  "author": "100ms",
15
15
  "license": "MIT",
16
16
  "files": [
@@ -75,11 +75,11 @@
75
75
  "react": ">=17.0.2 <19.0.0"
76
76
  },
77
77
  "dependencies": {
78
- "@100mslive/hls-player": "0.1.11",
79
- "@100mslive/hms-virtual-background": "1.11.11",
80
- "@100mslive/react-icons": "0.8.11",
81
- "@100mslive/react-sdk": "0.8.11",
82
- "@100mslive/types-prebuilt": "0.8.0",
78
+ "@100mslive/hls-player": "0.1.12",
79
+ "@100mslive/hms-virtual-background": "1.11.12",
80
+ "@100mslive/react-icons": "0.8.12",
81
+ "@100mslive/react-sdk": "0.8.12",
82
+ "@100mslive/types-prebuilt": "0.10.0",
83
83
  "@emoji-mart/data": "^1.0.6",
84
84
  "@emoji-mart/react": "^1.0.1",
85
85
  "@radix-ui/react-accordion": "1.0.0",
@@ -117,5 +117,5 @@
117
117
  "worker-timers": "^7.0.40",
118
118
  "zipyai": "^1.3.24"
119
119
  },
120
- "gitHead": "b40c957e0577e36fd1efd2658e7b3d9a1a1a5baa"
120
+ "gitHead": "36325cc67ade1606bc59107ea8df8480537fe7ee"
121
121
  }
@@ -2,8 +2,10 @@ import { useCallback } from 'react';
2
2
  import {
3
3
  selectAppData,
4
4
  selectAppDataByPath,
5
+ selectAudioTrackByPeerID,
5
6
  selectSessionStore,
6
7
  selectTrackByID,
8
+ selectVideoTrackByPeerID,
7
9
  useHMSActions,
8
10
  useHMSStore,
9
11
  useHMSVanillaStore,
@@ -86,8 +88,10 @@ export const usePDFAnnotator = () => {
86
88
  };
87
89
  export const usePinnedTrack = () => {
88
90
  const pinnedTrackId = useHMSStore(selectAppData(APP_DATA.pinnedTrackId));
89
- const spotlightTrackId = useHMSStore(selectSessionStore(SESSION_STORE_KEY.SPOTLIGHT));
90
- return useHMSStore(selectTrackByID(pinnedTrackId || spotlightTrackId));
91
+ const spotlightPeerId = useHMSStore(selectSessionStore(SESSION_STORE_KEY.SPOTLIGHT));
92
+ const spotlightVideoTrackId = useHMSStore(selectVideoTrackByPeerID(spotlightPeerId))?.id;
93
+ const spotlightAudioTrackId = useHMSStore(selectAudioTrackByPeerID(spotlightPeerId))?.id;
94
+ return useHMSStore(selectTrackByID(pinnedTrackId || spotlightVideoTrackId || spotlightAudioTrackId));
91
95
  };
92
96
 
93
97
  export const useSubscribedNotifications = notificationKey => {
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import { Flex } from '../../Layout';
2
3
  import { Text } from '../../Text';
3
4
 
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import { VerticalMenuIcon } from '@100mslive/react-icons';
2
3
  import { Dropdown } from '../../../Dropdown';
3
4
  import { Box, Flex } from '../../../Layout';
@@ -37,24 +37,18 @@ import { APP_DATA, FEATURE_LIST, REMOTE_STOP_SCREENSHARE_TYPE, SESSION_STORE_KEY
37
37
  const isSameTile = ({ trackId, videoTrackID, audioTrackID }) =>
38
38
  trackId && ((videoTrackID && videoTrackID === trackId) || (audioTrackID && audioTrackID === trackId));
39
39
 
40
- const SpotlightActions = ({ audioTrackID, videoTrackID }) => {
40
+ const SpotlightActions = ({ peerId }) => {
41
41
  const hmsActions = useHMSActions();
42
- const spotlightTrackId = useHMSStore(selectSessionStore(SESSION_STORE_KEY.SPOTLIGHT));
43
- const isTileSpotlighted = isSameTile({
44
- trackId: spotlightTrackId,
45
- videoTrackID,
46
- audioTrackID,
47
- });
42
+ const spotlightPeerId = useHMSStore(selectSessionStore(SESSION_STORE_KEY.SPOTLIGHT));
43
+ const isTileSpotlighted = spotlightPeerId === peerId;
48
44
 
49
- const setSpotlightTrackId = trackId =>
45
+ const setSpotlightPeerId = peer =>
50
46
  hmsActions.sessionStore
51
- .set(SESSION_STORE_KEY.SPOTLIGHT, trackId)
47
+ .set(SESSION_STORE_KEY.SPOTLIGHT, peer)
52
48
  .catch(err => ToastManager.addToast({ title: err.description }));
53
49
 
54
50
  return (
55
- <StyledMenuTile.ItemButton
56
- onClick={() => (isTileSpotlighted ? setSpotlightTrackId() : setSpotlightTrackId(videoTrackID || audioTrackID))}
57
- >
51
+ <StyledMenuTile.ItemButton onClick={() => (isTileSpotlighted ? setSpotlightPeerId() : setSpotlightPeerId(peerId))}>
58
52
  <StarIcon />
59
53
  <span>{isTileSpotlighted ? 'Remove from Spotlight' : 'Spotlight Tile for everyone'}</span>
60
54
  </StyledMenuTile.ItemButton>
@@ -82,8 +76,6 @@ const PinActions = ({ audioTrackID, videoTrackID }) => {
82
76
  );
83
77
  };
84
78
 
85
- const showSpotlight = process.env.REACT_APP_ENV === 'qa';
86
-
87
79
  /**
88
80
  * Taking peerID as peer won't necesarilly have tracks
89
81
  */
@@ -92,11 +84,12 @@ const TileMenu = ({ audioTrackID, videoTrackID, peerID, isScreenshare = false })
92
84
  const actions = useHMSActions();
93
85
  const localPeerID = useHMSStore(selectLocalPeerID);
94
86
  const isLocal = localPeerID === peerID;
95
- const { removeOthers } = useHMSStore(selectPermissions);
87
+ const { removeOthers, changeRole } = useHMSStore(selectPermissions);
96
88
  const { isAudioEnabled, isVideoEnabled, setVolume, toggleAudio, toggleVideo, volume } = useRemoteAVToggle(
97
89
  audioTrackID,
98
90
  videoTrackID,
99
91
  );
92
+ const showSpotlight = changeRole;
100
93
  const { sendEvent } = useCustomEvent({
101
94
  type: REMOTE_STOP_SCREENSHARE_TYPE,
102
95
  });
@@ -131,7 +124,7 @@ const TileMenu = ({ audioTrackID, videoTrackID, peerID, isScreenshare = false })
131
124
  showPinAction && (
132
125
  <>
133
126
  <PinActions audioTrackID={audioTrackID} videoTrackID={videoTrackID} />
134
- {showSpotlight && <SpotlightActions audioTrackID={audioTrackID} videoTrackID={videoTrackID} />}
127
+ {showSpotlight && <SpotlightActions peerId={peerID} />}
135
128
  </>
136
129
  )
137
130
  ) : (
@@ -168,7 +161,7 @@ const TileMenu = ({ audioTrackID, videoTrackID, peerID, isScreenshare = false })
168
161
  {showPinAction && (
169
162
  <>
170
163
  <PinActions audioTrackID={audioTrackID} videoTrackID={videoTrackID} />
171
- {showSpotlight && <SpotlightActions audioTrackID={audioTrackID} videoTrackID={videoTrackID} />}
164
+ {showSpotlight && <SpotlightActions peerId={peerID} />}
172
165
  </>
173
166
  )}
174
167
  <SimulcastLayers trackId={videoTrackID} />