@100mslive/roomkit-react 0.1.2 → 0.1.4-alpha.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. package/dist/{ActiveSpeakerView-ELWK3LNE.css → ActiveSpeakerView-AGL73O6U.css} +2 -2
  2. package/dist/{PinnedTrackView-NWN3H5EZ.css.map → ActiveSpeakerView-AGL73O6U.css.map} +2 -2
  3. package/dist/{ActiveSpeakerView-I4XBBOOY.js → ActiveSpeakerView-UPFD5RXA.js} +6 -6
  4. package/dist/{HLSView-UPP5PDCE.css → HLSView-64OG755F.css} +2 -2
  5. package/dist/{ActiveSpeakerView-ELWK3LNE.css.map → HLSView-64OG755F.css.map} +2 -2
  6. package/dist/{HLSView-VXI2RN37.js → HLSView-T267ZHOS.js} +5 -5
  7. package/dist/{PinnedTrackView-V2COEYUL.js → PinnedTrackView-O4FHHHOV.js} +6 -6
  8. package/dist/{PinnedTrackView-NWN3H5EZ.css → PinnedTrackView-YWAZ2342.css} +2 -2
  9. package/dist/{conference-JFEDNIUG.css.map → PinnedTrackView-YWAZ2342.css.map} +2 -2
  10. package/dist/{VirtualBackground-4RPLPBOQ.js → VirtualBackground-BCKXNDTD.js} +3 -3
  11. package/dist/{chunk-2SV2DRIF.js → chunk-3HMUOAD6.js} +116 -126
  12. package/dist/chunk-3HMUOAD6.js.map +7 -0
  13. package/dist/{chunk-S4QRZ4VV.js → chunk-6GXDYWD5.js} +2 -2
  14. package/dist/{chunk-MJNJRHS3.js → chunk-NLZVUXR3.js} +568 -561
  15. package/dist/chunk-NLZVUXR3.js.map +7 -0
  16. package/dist/{chunk-PLKNFRDT.js → chunk-ORPC2GYB.js} +2 -2
  17. package/dist/{chunk-YJCBCMH4.js → chunk-YE4RPJYG.js} +2 -2
  18. package/dist/{chunk-YJCBCMH4.js.map → chunk-YE4RPJYG.js.map} +1 -1
  19. package/dist/{conference-JFEDNIUG.css → conference-7KHWJZLG.css} +2 -2
  20. package/dist/{HLSView-UPP5PDCE.css.map → conference-7KHWJZLG.css.map} +2 -2
  21. package/dist/{conference-DGJFMV3O.js → conference-ETISNCLN.js} +11 -11
  22. package/dist/index.cjs.css +1 -1
  23. package/dist/index.cjs.css.map +2 -2
  24. package/dist/index.cjs.js +913 -916
  25. package/dist/index.cjs.js.map +3 -3
  26. package/dist/index.css +1 -1
  27. package/dist/index.css.map +2 -2
  28. package/dist/index.js +4 -4
  29. package/dist/meta.cjs.json +40 -20
  30. package/dist/meta.esbuild.json +126 -106
  31. package/dist/{transcription-KASUU6FK.js → transcription-JJQ4UAIK.js} +3 -3
  32. package/package.json +10 -10
  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-UPFD5RXA.js.map} +0 -0
  40. /package/dist/{HLSView-VXI2RN37.js.map → HLSView-T267ZHOS.js.map} +0 -0
  41. /package/dist/{PinnedTrackView-V2COEYUL.js.map → PinnedTrackView-O4FHHHOV.js.map} +0 -0
  42. /package/dist/{VirtualBackground-4RPLPBOQ.js.map → VirtualBackground-BCKXNDTD.js.map} +0 -0
  43. /package/dist/{chunk-S4QRZ4VV.js.map → chunk-6GXDYWD5.js.map} +0 -0
  44. /package/dist/{chunk-PLKNFRDT.js.map → chunk-ORPC2GYB.js.map} +0 -0
  45. /package/dist/{conference-DGJFMV3O.js.map → conference-ETISNCLN.js.map} +0 -0
  46. /package/dist/{transcription-KASUU6FK.js.map → transcription-JJQ4UAIK.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-6GXDYWD5.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-YE4RPJYG.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-JJQ4UAIK.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.4-alpha.0",
14
14
  "author": "100ms",
15
15
  "license": "MIT",
16
16
  "files": [
@@ -75,20 +75,20 @@
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.13-alpha.0",
79
+ "@100mslive/hms-virtual-background": "1.11.13-alpha.0",
80
+ "@100mslive/react-icons": "0.8.13-alpha.0",
81
+ "@100mslive/react-sdk": "0.8.13-alpha.0",
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",
86
86
  "@radix-ui/react-checkbox": "1.0.0",
87
87
  "@radix-ui/react-collapsible": "1.0.0",
88
88
  "@radix-ui/react-dialog": "1.0.0",
89
- "@radix-ui/react-dropdown-menu": "1.0.0",
89
+ "@radix-ui/react-dropdown-menu": "2.0.5",
90
90
  "@radix-ui/react-label": "1.0.0",
91
- "@radix-ui/react-popover": "1.0.0",
91
+ "@radix-ui/react-popover": "1.0.6",
92
92
  "@radix-ui/react-progress": "1.0.0",
93
93
  "@radix-ui/react-radio-group": "1.0.0",
94
94
  "@radix-ui/react-select": "1.0.0",
@@ -96,7 +96,7 @@
96
96
  "@radix-ui/react-switch": "1.0.0",
97
97
  "@radix-ui/react-tabs": "1.0.0",
98
98
  "@radix-ui/react-toast": "1.0.0",
99
- "@radix-ui/react-tooltip": "1.0.0",
99
+ "@radix-ui/react-tooltip": "1.0.6",
100
100
  "@stitches/react": "^1.2.8",
101
101
  "@tldraw/tldraw": "^1.18.4",
102
102
  "emoji-mart": "^5.2.2",
@@ -117,5 +117,5 @@
117
117
  "worker-timers": "^7.0.40",
118
118
  "zipyai": "^1.3.24"
119
119
  },
120
- "gitHead": "b40c957e0577e36fd1efd2658e7b3d9a1a1a5baa"
120
+ "gitHead": "149d1cf9dd51d27800097d81057207e52a046797"
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} />