@100mslive/roomkit-react 0.3.3-alpha.7 → 0.3.3-alpha.9
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{HLSView-UJVFWWXD.js → HLSView-TG3T5EM7.js} +2 -2
- package/dist/Prebuilt/components/RaiseHand.d.ts +1 -1
- package/dist/{chunk-D73DSBZU.js → chunk-YOZJ7OPW.js} +33 -21
- package/dist/{chunk-D73DSBZU.js.map → chunk-YOZJ7OPW.js.map} +4 -4
- package/dist/index.cjs.js +481 -472
- package/dist/index.cjs.js.map +4 -4
- package/dist/index.js +1 -1
- package/dist/meta.cjs.json +39 -34
- package/dist/meta.esbuild.json +45 -40
- package/package.json +7 -7
- package/src/Prebuilt/components/Chat/ChatFooter.tsx +4 -2
- package/src/Prebuilt/components/ConferenceScreen.tsx +4 -1
- package/src/Prebuilt/components/Footer/Footer.tsx +4 -1
- package/src/Prebuilt/components/IconButtonWithOptions/IconButtonWithOptions.tsx +2 -2
- package/src/Prebuilt/components/MoreSettings/SplitComponents/DesktopOptions.tsx +1 -0
- package/src/Prebuilt/components/MoreSettings/SplitComponents/MwebOptions.tsx +5 -1
- package/src/Prebuilt/components/PreviousRoleInMetadata.tsx +1 -0
- package/src/Prebuilt/components/RaiseHand.tsx +1 -7
- package/src/Prebuilt/components/RoleChangeRequest/RoleChangeRequestModal.tsx +1 -0
- package/src/Prebuilt/components/hooks/{useMetadata.tsx → useMetadata.jsx} +8 -2
- package/dist/Prebuilt/components/hooks/useMetadata.d.ts +0 -8
- /package/dist/{HLSView-UJVFWWXD.js.map → HLSView-TG3T5EM7.js.map} +0 -0
@@ -34,8 +34,8 @@ const IconSection = styled(IconButton, {
|
|
34
34
|
},
|
35
35
|
'@md': {
|
36
36
|
mx: 0,
|
37
|
-
borderTopRightRadius: '$1',
|
38
|
-
borderBottomRightRadius: '$1',
|
37
|
+
borderTopRightRadius: '$1 !important',
|
38
|
+
borderBottomRightRadius: '$1 !important',
|
39
39
|
},
|
40
40
|
variants: {
|
41
41
|
...variants,
|
@@ -29,6 +29,7 @@ import { FullScreenItem } from '../FullScreenItem';
|
|
29
29
|
import { MuteAllModal } from '../MuteAllModal';
|
30
30
|
// @ts-ignore: No implicit any
|
31
31
|
import { useDropdownList } from '../../hooks/useDropdownList';
|
32
|
+
// @ts-ignore: No implicit any
|
32
33
|
import { useMyMetadata } from '../../hooks/useMetadata';
|
33
34
|
// @ts-ignore: No implicit any
|
34
35
|
import { APP_DATA, isMacOS } from '../../../common/constants';
|
@@ -6,6 +6,7 @@ import {
|
|
6
6
|
selectIsConnectedToRoom,
|
7
7
|
selectPeerCount,
|
8
8
|
selectPermissions,
|
9
|
+
useAVToggle,
|
9
10
|
useHMSActions,
|
10
11
|
useHMSStore,
|
11
12
|
useRecordingStreaming,
|
@@ -50,6 +51,7 @@ import { usePollViewToggle, useSidepaneToggle } from '../../AppData/useSidepane'
|
|
50
51
|
import { useShowPolls } from '../../AppData/useUISettings';
|
51
52
|
// @ts-ignore: No implicit any
|
52
53
|
import { useDropdownList } from '../../hooks/useDropdownList';
|
54
|
+
// @ts-ignore: No implicit any
|
53
55
|
import { useMyMetadata } from '../../hooks/useMetadata';
|
54
56
|
import { useUnreadPollQuizPresent } from '../../hooks/useUnreadPollQuizPresent';
|
55
57
|
import { useLandscapeHLSStream, useMobileHLSStream } from '../../../common/hooks';
|
@@ -93,6 +95,8 @@ export const MwebOptions = ({
|
|
93
95
|
const peerCount = useHMSStore(selectPeerCount);
|
94
96
|
const emojiCardRef = useRef(null);
|
95
97
|
const { isBRBOn, toggleBRB, isHandRaised, toggleHandRaise } = useMyMetadata();
|
98
|
+
const { toggleAudio, toggleVideo } = useAVToggle();
|
99
|
+
const noAVPermissions = !(toggleAudio || toggleVideo);
|
96
100
|
const { unreadPollQuiz, setUnreadPollQuiz } = useUnreadPollQuizPresent();
|
97
101
|
const { title, description } = useRoomLayoutHeader();
|
98
102
|
const toggleDetailsSheet = useSheetToggle(SHEET_OPTIONS.ROOM_DETAILS);
|
@@ -171,7 +175,7 @@ export const MwebOptions = ({
|
|
171
175
|
</ActionTile.Root>
|
172
176
|
)}
|
173
177
|
|
174
|
-
{
|
178
|
+
{!noAVPermissions ? (
|
175
179
|
<ActionTile.Root
|
176
180
|
active={isHandRaised}
|
177
181
|
onClick={() => {
|
@@ -4,17 +4,11 @@ import { CSS } from '../../Theme';
|
|
4
4
|
import { Tooltip } from '../../Tooltip';
|
5
5
|
// @ts-ignore: No implicit Any
|
6
6
|
import IconButton from '../IconButton';
|
7
|
-
|
7
|
+
// @ts-ignore: No implicit Any
|
8
8
|
import { useMyMetadata } from './hooks/useMetadata';
|
9
9
|
|
10
10
|
export const RaiseHand = ({ css }: { css?: CSS }) => {
|
11
11
|
const { isHandRaised, toggleHandRaise } = useMyMetadata();
|
12
|
-
const { elements } = useRoomLayoutConferencingScreen();
|
13
|
-
|
14
|
-
if (!elements.hand_raise) {
|
15
|
-
return null;
|
16
|
-
}
|
17
|
-
|
18
12
|
return (
|
19
13
|
<Tooltip title={isHandRaised ? 'Lower hand' : 'Raise hand'}>
|
20
14
|
<IconButton
|
@@ -13,6 +13,7 @@ import { Flex, Text } from '../../..';
|
|
13
13
|
import { PreviewControls, PreviewTile } from '../Preview/PreviewJoin';
|
14
14
|
import { RequestPrompt } from './RequestPrompt';
|
15
15
|
import { useRoomLayoutPreviewScreen } from '../../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';
|
16
|
+
// @ts-ignore: No implicit Any
|
16
17
|
import { useMyMetadata } from '../hooks/useMetadata';
|
17
18
|
// @ts-ignore: No implicit Any
|
18
19
|
import { ROLE_CHANGE_DECLINED } from '../../common/constants';
|
@@ -15,7 +15,7 @@ export const useMyMetadata = () => {
|
|
15
15
|
const metaData = useHMSStore(selectPeerMetadata(localPeerId));
|
16
16
|
const isHandRaised = useHMSStore(selectHasPeerHandRaised(localPeerId));
|
17
17
|
|
18
|
-
const update = async
|
18
|
+
const update = async updatedFields => {
|
19
19
|
try {
|
20
20
|
// get current state from store and merge updated fields
|
21
21
|
const currentMetadata = vanillaStore.getState(selectPeerMetadata(localPeerId));
|
@@ -24,7 +24,6 @@ export const useMyMetadata = () => {
|
|
24
24
|
} catch (error) {
|
25
25
|
console.error('failed to update metadata ', updatedFields);
|
26
26
|
}
|
27
|
-
return false;
|
28
27
|
};
|
29
28
|
|
30
29
|
const toggleHandRaise = useCallback(async () => {
|
@@ -44,6 +43,12 @@ export const useMyMetadata = () => {
|
|
44
43
|
}
|
45
44
|
}, [metaData?.isBRBOn]); //eslint-disable-line
|
46
45
|
|
46
|
+
const setPrevRole = async role => {
|
47
|
+
await update({
|
48
|
+
prevRole: role,
|
49
|
+
});
|
50
|
+
};
|
51
|
+
|
47
52
|
return {
|
48
53
|
isHandRaised,
|
49
54
|
isBRBOn: !!metaData?.isBRBOn,
|
@@ -51,5 +56,6 @@ export const useMyMetadata = () => {
|
|
51
56
|
updateMetaData: update,
|
52
57
|
toggleHandRaise,
|
53
58
|
toggleBRB,
|
59
|
+
setPrevRole,
|
54
60
|
};
|
55
61
|
};
|
File without changes
|