@100mslive/roomkit-react 0.3.25-alpha.11 → 0.3.25-alpha.13

Sign up to get free protection for your applications and to get access to all the features.
@@ -5779,7 +5779,7 @@
5779
5779
  "format": "cjs"
5780
5780
  },
5781
5781
  "../hms-video-store/dist/index.js": {
5782
- "bytes": 375694,
5782
+ "bytes": 375616,
5783
5783
  "imports": [
5784
5784
  {
5785
5785
  "path": "../../node_modules/reselect/es/index.js",
@@ -8324,7 +8324,7 @@
8324
8324
  "format": "esm"
8325
8325
  },
8326
8326
  "src/Prebuilt/components/Polls/Voting/QuestionCard.jsx": {
8327
- "bytes": 7266,
8327
+ "bytes": 7496,
8328
8328
  "imports": [
8329
8329
  {
8330
8330
  "path": "react",
@@ -11321,7 +11321,7 @@
11321
11321
  ],
11322
11322
  "format": "esm"
11323
11323
  },
11324
- "../../../../../../../tmp/tmp-2754-sWQHcs31h8MU/1939c10dc5d1/tldraw.css": {
11324
+ "../../../../../../../tmp/tmp-2910-RQKPnqLOm5UM/193af4d17723/tldraw.css": {
11325
11325
  "bytes": 80111,
11326
11326
  "imports": [
11327
11327
  {
@@ -11371,7 +11371,7 @@
11371
11371
  }
11372
11372
  ]
11373
11373
  },
11374
- "../../../../../../../tmp/tmp-2754-sWQHcs31h8MU/1939c10dbfc0/index.css": {
11374
+ "../../../../../../../tmp/tmp-2910-RQKPnqLOm5UM/193af4d171d1/index.css": {
11375
11375
  "bytes": 597,
11376
11376
  "imports": [
11377
11377
  {
@@ -11380,7 +11380,7 @@
11380
11380
  "external": true
11381
11381
  },
11382
11382
  {
11383
- "path": "../../../../../../../tmp/tmp-2754-sWQHcs31h8MU/1939c10dc5d1/tldraw.css",
11383
+ "path": "../../../../../../../tmp/tmp-2910-RQKPnqLOm5UM/193af4d17723/tldraw.css",
11384
11384
  "kind": "import-rule",
11385
11385
  "original": "@tldraw/tldraw/tldraw.css"
11386
11386
  }
@@ -11455,7 +11455,7 @@
11455
11455
  "original": "../../common/constants"
11456
11456
  },
11457
11457
  {
11458
- "path": "../../../../../../../tmp/tmp-2754-sWQHcs31h8MU/1939c10dbfc0/index.css",
11458
+ "path": "../../../../../../../tmp/tmp-2910-RQKPnqLOm5UM/193af4d171d1/index.css",
11459
11459
  "kind": "import-statement",
11460
11460
  "original": "@100mslive/hms-whiteboard/index.css"
11461
11461
  },
@@ -15714,7 +15714,7 @@
15714
15714
  "imports": [],
15715
15715
  "exports": [],
15716
15716
  "inputs": {},
15717
- "bytes": 3624493
15717
+ "bytes": 3624601
15718
15718
  },
15719
15719
  "dist/index.cjs.js": {
15720
15720
  "imports": [
@@ -19052,7 +19052,7 @@
19052
19052
  "cssBundle": "dist/index.cjs.css",
19053
19053
  "inputs": {
19054
19054
  "<define:process.env>": {
19055
- "bytesInOutput": 18048
19055
+ "bytesInOutput": 18066
19056
19056
  },
19057
19057
  "../../node_modules/lodash/lodash.js": {
19058
19058
  "bytesInOutput": 224306
@@ -19781,7 +19781,7 @@
19781
19781
  "bytesInOutput": 1383
19782
19782
  },
19783
19783
  "src/Prebuilt/components/Polls/Voting/QuestionCard.jsx": {
19784
- "bytesInOutput": 7868
19784
+ "bytesInOutput": 8123
19785
19785
  },
19786
19786
  "src/Prebuilt/components/Polls/Voting/TimedVoting.tsx": {
19787
19787
  "bytesInOutput": 1786
@@ -19930,7 +19930,7 @@
19930
19930
  "src/Prebuilt/components/VideoLayouts/WhiteboardLayout.tsx": {
19931
19931
  "bytesInOutput": 3051
19932
19932
  },
19933
- "../../../../../../../tmp/tmp-2754-sWQHcs31h8MU/1939c10dbfc0/index.css": {
19933
+ "../../../../../../../tmp/tmp-2910-RQKPnqLOm5UM/193af4d171d1/index.css": {
19934
19934
  "bytesInOutput": 0
19935
19935
  },
19936
19936
  "src/Prebuilt/common/PeersSorter.ts": {
@@ -20165,7 +20165,7 @@
20165
20165
  "bytesInOutput": 2777
20166
20166
  }
20167
20167
  },
20168
- "bytes": 1504656
20168
+ "bytes": 1504929
20169
20169
  },
20170
20170
  "dist/index.cjs.css.map": {
20171
20171
  "imports": [],
@@ -20227,10 +20227,10 @@
20227
20227
  }
20228
20228
  ],
20229
20229
  "inputs": {
20230
- "../../../../../../../tmp/tmp-2754-sWQHcs31h8MU/1939c10dc5d1/tldraw.css": {
20230
+ "../../../../../../../tmp/tmp-2910-RQKPnqLOm5UM/193af4d17723/tldraw.css": {
20231
20231
  "bytesInOutput": 75223
20232
20232
  },
20233
- "../../../../../../../tmp/tmp-2754-sWQHcs31h8MU/1939c10dbfc0/index.css": {
20233
+ "../../../../../../../tmp/tmp-2910-RQKPnqLOm5UM/193af4d171d1/index.css": {
20234
20234
  "bytesInOutput": 401
20235
20235
  }
20236
20236
  },
@@ -5779,7 +5779,7 @@
5779
5779
  "format": "cjs"
5780
5780
  },
5781
5781
  "../hms-video-store/dist/index.js": {
5782
- "bytes": 375694,
5782
+ "bytes": 375616,
5783
5783
  "imports": [
5784
5784
  {
5785
5785
  "path": "../../node_modules/reselect/es/index.js",
@@ -8324,7 +8324,7 @@
8324
8324
  "format": "esm"
8325
8325
  },
8326
8326
  "src/Prebuilt/components/Polls/Voting/QuestionCard.jsx": {
8327
- "bytes": 7266,
8327
+ "bytes": 7496,
8328
8328
  "imports": [
8329
8329
  {
8330
8330
  "path": "react",
@@ -11321,7 +11321,7 @@
11321
11321
  ],
11322
11322
  "format": "esm"
11323
11323
  },
11324
- "../../../../../../../tmp/tmp-2754-VfoSKNhhh1jc/1939c10dd073/tldraw.css": {
11324
+ "../../../../../../../tmp/tmp-2910-fbcbae7Sp7ue/193af4d17712/tldraw.css": {
11325
11325
  "bytes": 80111,
11326
11326
  "imports": [
11327
11327
  {
@@ -11371,7 +11371,7 @@
11371
11371
  }
11372
11372
  ]
11373
11373
  },
11374
- "../../../../../../../tmp/tmp-2754-VfoSKNhhh1jc/1939c10dd042/index.css": {
11374
+ "../../../../../../../tmp/tmp-2910-fbcbae7Sp7ue/193af4d170f0/index.css": {
11375
11375
  "bytes": 597,
11376
11376
  "imports": [
11377
11377
  {
@@ -11380,7 +11380,7 @@
11380
11380
  "external": true
11381
11381
  },
11382
11382
  {
11383
- "path": "../../../../../../../tmp/tmp-2754-VfoSKNhhh1jc/1939c10dd073/tldraw.css",
11383
+ "path": "../../../../../../../tmp/tmp-2910-fbcbae7Sp7ue/193af4d17712/tldraw.css",
11384
11384
  "kind": "import-rule",
11385
11385
  "original": "@tldraw/tldraw/tldraw.css"
11386
11386
  }
@@ -11455,7 +11455,7 @@
11455
11455
  "original": "../../common/constants"
11456
11456
  },
11457
11457
  {
11458
- "path": "../../../../../../../tmp/tmp-2754-VfoSKNhhh1jc/1939c10dd042/index.css",
11458
+ "path": "../../../../../../../tmp/tmp-2910-fbcbae7Sp7ue/193af4d170f0/index.css",
11459
11459
  "kind": "import-statement",
11460
11460
  "original": "@100mslive/hms-whiteboard/index.css"
11461
11461
  },
@@ -15714,7 +15714,7 @@
15714
15714
  "imports": [],
15715
15715
  "exports": [],
15716
15716
  "inputs": {},
15717
- "bytes": 3664416
15717
+ "bytes": 3664647
15718
15718
  },
15719
15719
  "dist/index.js": {
15720
15720
  "imports": [
@@ -19118,7 +19118,7 @@
19118
19118
  "cssBundle": "dist/index.css",
19119
19119
  "inputs": {
19120
19120
  "<define:process.env>": {
19121
- "bytesInOutput": 18048
19121
+ "bytesInOutput": 18066
19122
19122
  },
19123
19123
  "../../node_modules/lodash/lodash.js": {
19124
19124
  "bytesInOutput": 224301
@@ -19847,7 +19847,7 @@
19847
19847
  "bytesInOutput": 1304
19848
19848
  },
19849
19849
  "src/Prebuilt/components/Polls/Voting/QuestionCard.jsx": {
19850
- "bytesInOutput": 7598
19850
+ "bytesInOutput": 7875
19851
19851
  },
19852
19852
  "src/Prebuilt/components/Polls/Voting/TimedVoting.tsx": {
19853
19853
  "bytesInOutput": 1738
@@ -19996,7 +19996,7 @@
19996
19996
  "src/Prebuilt/components/VideoLayouts/WhiteboardLayout.tsx": {
19997
19997
  "bytesInOutput": 2830
19998
19998
  },
19999
- "../../../../../../../tmp/tmp-2754-VfoSKNhhh1jc/1939c10dd042/index.css": {
19999
+ "../../../../../../../tmp/tmp-2910-fbcbae7Sp7ue/193af4d170f0/index.css": {
20000
20000
  "bytesInOutput": 0
20001
20001
  },
20002
20002
  "src/Prebuilt/common/PeersSorter.ts": {
@@ -20132,7 +20132,7 @@
20132
20132
  "bytesInOutput": 1686
20133
20133
  },
20134
20134
  "src/Prebuilt/components/Notifications/HandRaisedNotifications.tsx": {
20135
- "bytesInOutput": 3074
20135
+ "bytesInOutput": 3079
20136
20136
  },
20137
20137
  "src/Prebuilt/components/Toast/ToastBatcher.js": {
20138
20138
  "bytesInOutput": 1983
@@ -20231,7 +20231,7 @@
20231
20231
  "bytesInOutput": 2632
20232
20232
  }
20233
20233
  },
20234
- "bytes": 1449711
20234
+ "bytes": 1450011
20235
20235
  },
20236
20236
  "dist/index.css.map": {
20237
20237
  "imports": [],
@@ -20293,10 +20293,10 @@
20293
20293
  }
20294
20294
  ],
20295
20295
  "inputs": {
20296
- "../../../../../../../tmp/tmp-2754-VfoSKNhhh1jc/1939c10dd073/tldraw.css": {
20296
+ "../../../../../../../tmp/tmp-2910-fbcbae7Sp7ue/193af4d17712/tldraw.css": {
20297
20297
  "bytesInOutput": 75223
20298
20298
  },
20299
- "../../../../../../../tmp/tmp-2754-VfoSKNhhh1jc/1939c10dd042/index.css": {
20299
+ "../../../../../../../tmp/tmp-2910-fbcbae7Sp7ue/193af4d170f0/index.css": {
20300
20300
  "bytesInOutput": 401
20301
20301
  }
20302
20302
  },
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "prebuilt",
11
11
  "roomkit"
12
12
  ],
13
- "version": "0.3.25-alpha.11",
13
+ "version": "0.3.25-alpha.13",
14
14
  "author": "100ms",
15
15
  "license": "MIT",
16
16
  "repository": {
@@ -75,12 +75,12 @@
75
75
  "react": ">=17.0.2 <19.0.0"
76
76
  },
77
77
  "dependencies": {
78
- "@100mslive/hls-player": "0.3.25-alpha.11",
78
+ "@100mslive/hls-player": "0.3.25-alpha.13",
79
79
  "@100mslive/hms-noise-cancellation": "0.0.1",
80
- "@100mslive/hms-virtual-background": "1.13.25-alpha.11",
81
- "@100mslive/hms-whiteboard": "0.0.15-alpha.11",
82
- "@100mslive/react-icons": "0.10.25-alpha.11",
83
- "@100mslive/react-sdk": "0.10.25-alpha.11",
80
+ "@100mslive/hms-virtual-background": "1.13.25-alpha.13",
81
+ "@100mslive/hms-whiteboard": "0.0.15-alpha.13",
82
+ "@100mslive/react-icons": "0.10.25-alpha.13",
83
+ "@100mslive/react-sdk": "0.10.25-alpha.13",
84
84
  "@100mslive/types-prebuilt": "0.12.12",
85
85
  "@emoji-mart/data": "^1.0.6",
86
86
  "@emoji-mart/react": "^1.0.1",
@@ -117,5 +117,5 @@
117
117
  "uuid": "^8.3.2",
118
118
  "worker-timers": "^7.0.40"
119
119
  },
120
- "gitHead": "8582301c371682e99e292bfc95494592c353007b"
120
+ "gitHead": "57d11f75a35daa3710b725415b15a0b99011b3d0"
121
121
  }
@@ -1,7 +1,14 @@
1
1
  // @ts-check
2
2
  import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
3
3
  import { match } from 'ts-pattern';
4
- import { selectLocalPeer, selectLocalPeerRoleName, useHMSActions, useHMSStore } from '@100mslive/react-sdk';
4
+ import {
5
+ HMSRoomState,
6
+ selectLocalPeer,
7
+ selectLocalPeerRoleName,
8
+ selectRoomState,
9
+ useHMSActions,
10
+ useHMSStore,
11
+ } from '@100mslive/react-sdk';
5
12
  import { CheckCircleIcon, ChevronDownIcon, CrossCircleIcon } from '@100mslive/react-icons';
6
13
  import { Box, Button, Flex, Text } from '../../../../';
7
14
  import { checkCorrectAnswer } from '../../../common/utils';
@@ -27,7 +34,7 @@ export const QuestionCard = ({
27
34
  }) => {
28
35
  const actions = useHMSActions();
29
36
  const localPeer = useHMSStore(selectLocalPeer);
30
-
37
+ const roomState = useHMSStore(selectRoomState);
31
38
  const isLocalPeerCreator = localPeer?.id === startedBy;
32
39
  const localPeerRoleName = useHMSStore(selectLocalPeerRoleName);
33
40
  const roleCanViewResponse =
@@ -183,13 +190,19 @@ export const QuestionCard = ({
183
190
  ) : null}
184
191
  </Box>
185
192
  {isLive && (
186
- <QuestionActions isValidVote={isValidVote} onVote={handleVote} response={localPeerChoice} isQuiz={isQuiz} />
193
+ <QuestionActions
194
+ disableVote={roomState !== HMSRoomState.Connected}
195
+ isValidVote={isValidVote}
196
+ onVote={handleVote}
197
+ response={localPeerChoice}
198
+ isQuiz={isQuiz}
199
+ />
187
200
  )}
188
201
  </Box>
189
202
  );
190
203
  };
191
204
 
192
- const QuestionActions = ({ isValidVote, response, isQuiz, onVote }) => {
205
+ const QuestionActions = ({ isValidVote, response, isQuiz, onVote, disableVote }) => {
193
206
  return (
194
207
  <Flex align="center" justify="end" css={{ gap: '$4', w: '100%' }}>
195
208
  {response ? (
@@ -199,7 +212,7 @@ const QuestionActions = ({ isValidVote, response, isQuiz, onVote }) => {
199
212
  {!isQuiz && !response.skipped ? 'Voted' : null}
200
213
  </Text>
201
214
  ) : (
202
- <Button css={{ p: '$xs $10', fontWeight: '$semiBold' }} disabled={!isValidVote} onClick={onVote}>
215
+ <Button css={{ p: '$xs $10', fontWeight: '$semiBold' }} disabled={!isValidVote || disableVote} onClick={onVote}>
203
216
  {isQuiz ? 'Answer' : 'Vote'}
204
217
  </Button>
205
218
  )}