@100mslive/roomkit-react 0.3.2-alpha.0 → 0.3.2-alpha.2
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{HLSView-C5XHK2VY.js → HLSView-SF6SAQ5J.js} +2 -2
- package/dist/Prebuilt/components/Footer/ParticipantList.d.ts +2 -1
- package/dist/Prebuilt/components/Footer/RoleAccordion.d.ts +1 -0
- package/dist/Prebuilt/components/hooks/useGroupOnStageActions.d.ts +10 -0
- package/dist/Prebuilt/components/hooks/usePeerOnStageActions.d.ts +14 -0
- package/dist/{chunk-E7AEJ446.js → chunk-OYWNLHYU.js} +607 -490
- package/dist/chunk-OYWNLHYU.js.map +7 -0
- package/dist/index.cjs.js +1968 -1839
- package/dist/index.cjs.js.map +4 -4
- package/dist/index.js +1 -1
- package/dist/meta.cjs.json +323 -210
- package/dist/meta.esbuild.json +136 -23
- package/package.json +7 -6
- package/src/Prebuilt/components/Footer/ParticipantList.tsx +90 -66
- package/src/Prebuilt/components/Footer/RoleAccordion.tsx +20 -1
- package/src/Prebuilt/components/MwebLandscapePrompt.tsx +1 -1
- package/src/Prebuilt/components/VideoLayouts/ProminenceLayout.tsx +0 -1
- package/src/Prebuilt/components/hooks/useGroupOnStageActions.tsx +54 -0
- package/src/Prebuilt/components/hooks/usePeerOnStageActions.tsx +49 -0
- package/src/Prebuilt/layouts/SidePane.tsx +0 -1
- package/dist/chunk-E7AEJ446.js.map +0 -7
- /package/dist/{HLSView-C5XHK2VY.js.map → HLSView-SF6SAQ5J.js.map} +0 -0
package/dist/meta.esbuild.json
CHANGED
@@ -4691,7 +4691,7 @@
|
|
4691
4691
|
"format": "cjs"
|
4692
4692
|
},
|
4693
4693
|
"../hms-video-store/dist/index.js": {
|
4694
|
-
"bytes":
|
4694
|
+
"bytes": 326185,
|
4695
4695
|
"imports": [
|
4696
4696
|
{
|
4697
4697
|
"path": "../../node_modules/reselect/es/index.js",
|
@@ -6010,8 +6010,39 @@
|
|
6010
6010
|
],
|
6011
6011
|
"format": "esm"
|
6012
6012
|
},
|
6013
|
+
"src/Prebuilt/components/hooks/useGroupOnStageActions.tsx": {
|
6014
|
+
"bytes": 1795,
|
6015
|
+
"imports": [
|
6016
|
+
{
|
6017
|
+
"path": "ts-pattern",
|
6018
|
+
"kind": "import-statement",
|
6019
|
+
"external": true
|
6020
|
+
},
|
6021
|
+
{
|
6022
|
+
"path": "@100mslive/react-sdk",
|
6023
|
+
"kind": "import-statement",
|
6024
|
+
"external": true
|
6025
|
+
},
|
6026
|
+
{
|
6027
|
+
"path": "src/Prebuilt/provider/roomLayoutProvider/hooks/useRoomLayoutScreen.ts",
|
6028
|
+
"kind": "import-statement",
|
6029
|
+
"original": "../../provider/roomLayoutProvider/hooks/useRoomLayoutScreen"
|
6030
|
+
},
|
6031
|
+
{
|
6032
|
+
"path": "<define:process.env>",
|
6033
|
+
"kind": "import-statement",
|
6034
|
+
"external": true
|
6035
|
+
},
|
6036
|
+
{
|
6037
|
+
"path": "<runtime>",
|
6038
|
+
"kind": "import-statement",
|
6039
|
+
"external": true
|
6040
|
+
}
|
6041
|
+
],
|
6042
|
+
"format": "esm"
|
6043
|
+
},
|
6013
6044
|
"src/Prebuilt/components/Footer/RoleAccordion.tsx": {
|
6014
|
-
"bytes":
|
6045
|
+
"bytes": 5566,
|
6015
6046
|
"imports": [
|
6016
6047
|
{
|
6017
6048
|
"path": "react",
|
@@ -6043,6 +6074,16 @@
|
|
6043
6074
|
"kind": "import-statement",
|
6044
6075
|
"original": "../../../Accordion"
|
6045
6076
|
},
|
6077
|
+
{
|
6078
|
+
"path": "src/Button/index.tsx",
|
6079
|
+
"kind": "import-statement",
|
6080
|
+
"original": "../../../Button"
|
6081
|
+
},
|
6082
|
+
{
|
6083
|
+
"path": "src/Divider/index.ts",
|
6084
|
+
"kind": "import-statement",
|
6085
|
+
"original": "../../../Divider"
|
6086
|
+
},
|
6046
6087
|
{
|
6047
6088
|
"path": "src/Layout/index.tsx",
|
6048
6089
|
"kind": "import-statement",
|
@@ -6063,6 +6104,11 @@
|
|
6063
6104
|
"kind": "import-statement",
|
6064
6105
|
"original": "./RoleOptions"
|
6065
6106
|
},
|
6107
|
+
{
|
6108
|
+
"path": "src/Prebuilt/components/hooks/useGroupOnStageActions.tsx",
|
6109
|
+
"kind": "import-statement",
|
6110
|
+
"original": "../hooks/useGroupOnStageActions"
|
6111
|
+
},
|
6066
6112
|
{
|
6067
6113
|
"path": "src/Prebuilt/common/utils.js",
|
6068
6114
|
"kind": "import-statement",
|
@@ -6076,8 +6122,39 @@
|
|
6076
6122
|
],
|
6077
6123
|
"format": "esm"
|
6078
6124
|
},
|
6125
|
+
"src/Prebuilt/components/hooks/usePeerOnStageActions.tsx": {
|
6126
|
+
"bytes": 1672,
|
6127
|
+
"imports": [
|
6128
|
+
{
|
6129
|
+
"path": "react",
|
6130
|
+
"kind": "import-statement",
|
6131
|
+
"external": true
|
6132
|
+
},
|
6133
|
+
{
|
6134
|
+
"path": "@100mslive/react-sdk",
|
6135
|
+
"kind": "import-statement",
|
6136
|
+
"external": true
|
6137
|
+
},
|
6138
|
+
{
|
6139
|
+
"path": "src/Prebuilt/provider/roomLayoutProvider/hooks/useRoomLayoutScreen.ts",
|
6140
|
+
"kind": "import-statement",
|
6141
|
+
"original": "../../provider/roomLayoutProvider/hooks/useRoomLayoutScreen"
|
6142
|
+
},
|
6143
|
+
{
|
6144
|
+
"path": "<define:process.env>",
|
6145
|
+
"kind": "import-statement",
|
6146
|
+
"external": true
|
6147
|
+
},
|
6148
|
+
{
|
6149
|
+
"path": "<runtime>",
|
6150
|
+
"kind": "import-statement",
|
6151
|
+
"external": true
|
6152
|
+
}
|
6153
|
+
],
|
6154
|
+
"format": "esm"
|
6155
|
+
},
|
6079
6156
|
"src/Prebuilt/components/Footer/ParticipantList.tsx": {
|
6080
|
-
"bytes":
|
6157
|
+
"bytes": 12623,
|
6081
6158
|
"imports": [
|
6082
6159
|
{
|
6083
6160
|
"path": "react",
|
@@ -6104,6 +6181,11 @@
|
|
6104
6181
|
"kind": "import-statement",
|
6105
6182
|
"original": "../../.."
|
6106
6183
|
},
|
6184
|
+
{
|
6185
|
+
"path": "src/IconButton/index.tsx",
|
6186
|
+
"kind": "import-statement",
|
6187
|
+
"original": "../../../IconButton"
|
6188
|
+
},
|
6107
6189
|
{
|
6108
6190
|
"path": "src/Prebuilt/IconButton.tsx",
|
6109
6191
|
"kind": "import-statement",
|
@@ -6134,6 +6216,11 @@
|
|
6134
6216
|
"kind": "import-statement",
|
6135
6217
|
"original": "../AppData/useSidepane"
|
6136
6218
|
},
|
6219
|
+
{
|
6220
|
+
"path": "src/Prebuilt/components/hooks/usePeerOnStageActions.tsx",
|
6221
|
+
"kind": "import-statement",
|
6222
|
+
"original": "../hooks/usePeerOnStageActions"
|
6223
|
+
},
|
6137
6224
|
{
|
6138
6225
|
"path": "src/Prebuilt/common/hooks.ts",
|
6139
6226
|
"kind": "import-statement",
|
@@ -9321,7 +9408,7 @@
|
|
9321
9408
|
"format": "esm"
|
9322
9409
|
},
|
9323
9410
|
"src/Prebuilt/layouts/SidePane.tsx": {
|
9324
|
-
"bytes":
|
9411
|
+
"bytes": 6575,
|
9325
9412
|
"imports": [
|
9326
9413
|
{
|
9327
9414
|
"path": "react",
|
@@ -10039,7 +10126,7 @@
|
|
10039
10126
|
"format": "esm"
|
10040
10127
|
},
|
10041
10128
|
"src/Prebuilt/components/VideoLayouts/ProminenceLayout.tsx": {
|
10042
|
-
"bytes":
|
10129
|
+
"bytes": 2519,
|
10043
10130
|
"imports": [
|
10044
10131
|
{
|
10045
10132
|
"path": "react",
|
@@ -12200,7 +12287,7 @@
|
|
12200
12287
|
"format": "esm"
|
12201
12288
|
},
|
12202
12289
|
"src/Prebuilt/components/MwebLandscapePrompt.tsx": {
|
12203
|
-
"bytes":
|
12290
|
+
"bytes": 3095,
|
12204
12291
|
"imports": [
|
12205
12292
|
{
|
12206
12293
|
"path": "react",
|
@@ -13627,7 +13714,7 @@
|
|
13627
13714
|
"dist/index.js": {
|
13628
13715
|
"imports": [
|
13629
13716
|
{
|
13630
|
-
"path": "dist/chunk-
|
13717
|
+
"path": "dist/chunk-OYWNLHYU.js",
|
13631
13718
|
"kind": "import-statement"
|
13632
13719
|
}
|
13633
13720
|
],
|
@@ -13700,16 +13787,16 @@
|
|
13700
13787
|
"inputs": {},
|
13701
13788
|
"bytes": 1822
|
13702
13789
|
},
|
13703
|
-
"dist/HLSView-
|
13790
|
+
"dist/HLSView-SF6SAQ5J.js.map": {
|
13704
13791
|
"imports": [],
|
13705
13792
|
"exports": [],
|
13706
13793
|
"inputs": {},
|
13707
13794
|
"bytes": 89757
|
13708
13795
|
},
|
13709
|
-
"dist/HLSView-
|
13796
|
+
"dist/HLSView-SF6SAQ5J.js": {
|
13710
13797
|
"imports": [
|
13711
13798
|
{
|
13712
|
-
"path": "dist/chunk-
|
13799
|
+
"path": "dist/chunk-OYWNLHYU.js",
|
13713
13800
|
"kind": "import-statement"
|
13714
13801
|
},
|
13715
13802
|
{
|
@@ -13927,13 +14014,13 @@
|
|
13927
14014
|
},
|
13928
14015
|
"bytes": 55042
|
13929
14016
|
},
|
13930
|
-
"dist/chunk-
|
14017
|
+
"dist/chunk-OYWNLHYU.js.map": {
|
13931
14018
|
"imports": [],
|
13932
14019
|
"exports": [],
|
13933
14020
|
"inputs": {},
|
13934
|
-
"bytes":
|
14021
|
+
"bytes": 3179405
|
13935
14022
|
},
|
13936
|
-
"dist/chunk-
|
14023
|
+
"dist/chunk-OYWNLHYU.js": {
|
13937
14024
|
"imports": [
|
13938
14025
|
{
|
13939
14026
|
"path": "react",
|
@@ -15200,6 +15287,26 @@
|
|
15200
15287
|
"kind": "import-statement",
|
15201
15288
|
"external": true
|
15202
15289
|
},
|
15290
|
+
{
|
15291
|
+
"path": "ts-pattern",
|
15292
|
+
"kind": "import-statement",
|
15293
|
+
"external": true
|
15294
|
+
},
|
15295
|
+
{
|
15296
|
+
"path": "@100mslive/react-sdk",
|
15297
|
+
"kind": "import-statement",
|
15298
|
+
"external": true
|
15299
|
+
},
|
15300
|
+
{
|
15301
|
+
"path": "react",
|
15302
|
+
"kind": "import-statement",
|
15303
|
+
"external": true
|
15304
|
+
},
|
15305
|
+
{
|
15306
|
+
"path": "@100mslive/react-sdk",
|
15307
|
+
"kind": "import-statement",
|
15308
|
+
"external": true
|
15309
|
+
},
|
15203
15310
|
{
|
15204
15311
|
"path": "react",
|
15205
15312
|
"kind": "import-statement",
|
@@ -16301,7 +16408,7 @@
|
|
16301
16408
|
"external": true
|
16302
16409
|
},
|
16303
16410
|
{
|
16304
|
-
"path": "dist/HLSView-
|
16411
|
+
"path": "dist/HLSView-SF6SAQ5J.js",
|
16305
16412
|
"kind": "dynamic-import"
|
16306
16413
|
},
|
16307
16414
|
{
|
@@ -16776,7 +16883,7 @@
|
|
16776
16883
|
],
|
16777
16884
|
"inputs": {
|
16778
16885
|
"<define:process.env>": {
|
16779
|
-
"bytesInOutput":
|
16886
|
+
"bytesInOutput": 18284
|
16780
16887
|
},
|
16781
16888
|
"../../node_modules/lodash/lodash.js": {
|
16782
16889
|
"bytesInOutput": 224291
|
@@ -17052,7 +17159,7 @@
|
|
17052
17159
|
"bytesInOutput": 2709
|
17053
17160
|
},
|
17054
17161
|
"src/Prebuilt/provider/roomLayoutProvider/index.tsx": {
|
17055
|
-
"bytesInOutput":
|
17162
|
+
"bytesInOutput": 1121
|
17056
17163
|
},
|
17057
17164
|
"src/Prebuilt/provider/roomLayoutProvider/hooks/useFetchRoomLayout.ts": {
|
17058
17165
|
"bytesInOutput": 2254
|
@@ -17214,7 +17321,7 @@
|
|
17214
17321
|
"bytesInOutput": 10031
|
17215
17322
|
},
|
17216
17323
|
"../hms-video-store/dist/index.js": {
|
17217
|
-
"bytesInOutput":
|
17324
|
+
"bytesInOutput": 48592
|
17218
17325
|
},
|
17219
17326
|
"../../node_modules/reselect/es/index.js": {
|
17220
17327
|
"bytesInOutput": 2539
|
@@ -17316,7 +17423,7 @@
|
|
17316
17423
|
"bytesInOutput": 1404
|
17317
17424
|
},
|
17318
17425
|
"src/Prebuilt/components/Footer/ParticipantList.tsx": {
|
17319
|
-
"bytesInOutput":
|
17426
|
+
"bytesInOutput": 11800
|
17320
17427
|
},
|
17321
17428
|
"src/Prebuilt/components/Connection/ConnectionIndicator.tsx": {
|
17322
17429
|
"bytesInOutput": 3749
|
@@ -17328,11 +17435,17 @@
|
|
17328
17435
|
"bytesInOutput": 1290
|
17329
17436
|
},
|
17330
17437
|
"src/Prebuilt/components/Footer/RoleAccordion.tsx": {
|
17331
|
-
"bytesInOutput":
|
17438
|
+
"bytesInOutput": 4964
|
17332
17439
|
},
|
17333
17440
|
"src/Prebuilt/components/Footer/RoleOptions.tsx": {
|
17334
17441
|
"bytesInOutput": 7326
|
17335
17442
|
},
|
17443
|
+
"src/Prebuilt/components/hooks/useGroupOnStageActions.tsx": {
|
17444
|
+
"bytesInOutput": 1801
|
17445
|
+
},
|
17446
|
+
"src/Prebuilt/components/hooks/usePeerOnStageActions.tsx": {
|
17447
|
+
"bytesInOutput": 1806
|
17448
|
+
},
|
17336
17449
|
"src/Prebuilt/components/Footer/PollsToggle.tsx": {
|
17337
17450
|
"bytesInOutput": 1073
|
17338
17451
|
},
|
@@ -17349,7 +17462,7 @@
|
|
17349
17462
|
"bytesInOutput": 9637
|
17350
17463
|
},
|
17351
17464
|
"src/Prebuilt/layouts/SidePane.tsx": {
|
17352
|
-
"bytesInOutput":
|
17465
|
+
"bytesInOutput": 6274
|
17353
17466
|
},
|
17354
17467
|
"src/Prebuilt/components/Polls/Polls.tsx": {
|
17355
17468
|
"bytesInOutput": 735
|
@@ -17574,7 +17687,7 @@
|
|
17574
17687
|
"bytesInOutput": 2494
|
17575
17688
|
},
|
17576
17689
|
"src/Prebuilt/components/VideoLayouts/ProminenceLayout.tsx": {
|
17577
|
-
"bytesInOutput":
|
17690
|
+
"bytesInOutput": 2339
|
17578
17691
|
},
|
17579
17692
|
"src/Prebuilt/components/hooks/useRoleProminencePeers.tsx": {
|
17580
17693
|
"bytesInOutput": 1046
|
@@ -17646,7 +17759,7 @@
|
|
17646
17759
|
"bytesInOutput": 491
|
17647
17760
|
},
|
17648
17761
|
"src/Prebuilt/components/MwebLandscapePrompt.tsx": {
|
17649
|
-
"bytesInOutput":
|
17762
|
+
"bytesInOutput": 2928
|
17650
17763
|
},
|
17651
17764
|
"src/Prebuilt/components/Notifications/index.tsx": {
|
17652
17765
|
"bytesInOutput": 27
|
@@ -17730,7 +17843,7 @@
|
|
17730
17843
|
"bytesInOutput": 651
|
17731
17844
|
}
|
17732
17845
|
},
|
17733
|
-
"bytes":
|
17846
|
+
"bytes": 1304788
|
17734
17847
|
}
|
17735
17848
|
}
|
17736
17849
|
}
|
package/package.json
CHANGED
@@ -4,13 +4,14 @@
|
|
4
4
|
"main": "dist/index.cjs.js",
|
5
5
|
"module": "dist/index.js",
|
6
6
|
"typings": "dist/index.d.ts",
|
7
|
+
"type": "module",
|
7
8
|
"keywords": [
|
8
9
|
"100mslive",
|
9
10
|
"react",
|
10
11
|
"prebuilt",
|
11
12
|
"roomkit"
|
12
13
|
],
|
13
|
-
"version": "0.3.2-alpha.
|
14
|
+
"version": "0.3.2-alpha.2",
|
14
15
|
"author": "100ms",
|
15
16
|
"license": "MIT",
|
16
17
|
"repository": {
|
@@ -82,11 +83,11 @@
|
|
82
83
|
"react": ">=17.0.2 <19.0.0"
|
83
84
|
},
|
84
85
|
"dependencies": {
|
85
|
-
"@100mslive/hls-player": "0.3.2-alpha.
|
86
|
+
"@100mslive/hls-player": "0.3.2-alpha.2",
|
86
87
|
"@100mslive/hms-noise-cancellation": "0.0.0-alpha.1",
|
87
|
-
"@100mslive/hms-virtual-background": "1.13.2-alpha.
|
88
|
-
"@100mslive/react-icons": "0.10.2-alpha.
|
89
|
-
"@100mslive/react-sdk": "0.10.2-alpha.
|
88
|
+
"@100mslive/hms-virtual-background": "1.13.2-alpha.2",
|
89
|
+
"@100mslive/react-icons": "0.10.2-alpha.2",
|
90
|
+
"@100mslive/react-sdk": "0.10.2-alpha.2",
|
90
91
|
"@100mslive/types-prebuilt": "0.12.7",
|
91
92
|
"@emoji-mart/data": "^1.0.6",
|
92
93
|
"@emoji-mart/react": "^1.0.1",
|
@@ -122,5 +123,5 @@
|
|
122
123
|
"uuid": "^8.3.2",
|
123
124
|
"worker-timers": "^7.0.40"
|
124
125
|
},
|
125
|
-
"gitHead": "
|
126
|
+
"gitHead": "8689984dfac962416e160878c8a5821c88cdc8dd"
|
126
127
|
}
|
@@ -9,24 +9,30 @@ import {
|
|
9
9
|
selectIsPeerAudioEnabled,
|
10
10
|
selectLocalPeerID,
|
11
11
|
selectPeerCount,
|
12
|
-
selectPeerMetadata,
|
13
12
|
selectPermissions,
|
14
|
-
useHMSActions,
|
15
13
|
useHMSStore,
|
16
14
|
} from '@100mslive/react-sdk';
|
17
|
-
import {
|
15
|
+
import {
|
16
|
+
AddIcon,
|
17
|
+
ChangeRoleIcon,
|
18
|
+
CrossIcon,
|
19
|
+
HandIcon,
|
20
|
+
MicOffIcon,
|
21
|
+
PeopleIcon,
|
22
|
+
SearchIcon,
|
23
|
+
VerticalMenuIcon,
|
24
|
+
} from '@100mslive/react-icons';
|
18
25
|
import { Accordion, Box, config as cssConfig, Dropdown, Flex, Input, Text, textEllipsis } from '../../..';
|
26
|
+
import { IconButton as BaseIconButton } from '../../../IconButton';
|
19
27
|
// @ts-ignore: No implicit Any
|
20
28
|
import IconButton from '../../IconButton';
|
21
29
|
import { ConnectionIndicator } from '../Connection/ConnectionIndicator';
|
22
30
|
import { RemoveParticipant } from '../RemoveParticipant';
|
23
31
|
import { RoleAccordion } from './RoleAccordion';
|
24
|
-
import {
|
25
|
-
ConferencingScreenElements,
|
26
|
-
useRoomLayoutConferencingScreen,
|
27
|
-
} from '../../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';
|
32
|
+
import { useRoomLayoutConferencingScreen } from '../../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';
|
28
33
|
// @ts-ignore: No implicit Any
|
29
34
|
import { useIsSidepaneTypeOpen, useSidepaneToggle } from '../AppData/useSidepane';
|
35
|
+
import { usePeerOnStageActions } from '../hooks/usePeerOnStageActions';
|
30
36
|
import { useParticipants } from '../../common/hooks';
|
31
37
|
// @ts-ignore: No implicit Any
|
32
38
|
import { getFormattedCount } from '../../common/utils';
|
@@ -146,10 +152,12 @@ export const ParticipantCount = () => {
|
|
146
152
|
export const Participant = ({
|
147
153
|
peer,
|
148
154
|
isConnected,
|
155
|
+
isHandRaisedAccordion,
|
149
156
|
style,
|
150
157
|
}: {
|
151
158
|
peer: HMSPeer;
|
152
159
|
isConnected: boolean;
|
160
|
+
isHandRaisedAccordion?: boolean;
|
153
161
|
style: React.CSSProperties;
|
154
162
|
}) => {
|
155
163
|
const localPeerId = useHMSStore(selectLocalPeerID);
|
@@ -175,7 +183,12 @@ export const Participant = ({
|
|
175
183
|
{peer.name} {localPeerId === peer.id ? '(You)' : ''}
|
176
184
|
</Text>
|
177
185
|
{isConnected && peer.roleName ? (
|
178
|
-
<ParticipantActions
|
186
|
+
<ParticipantActions
|
187
|
+
peerId={peer.id}
|
188
|
+
isLocal={peer.id === localPeerId}
|
189
|
+
role={peer.roleName}
|
190
|
+
isHandRaisedAccordion={isHandRaisedAccordion}
|
191
|
+
/>
|
179
192
|
) : null}
|
180
193
|
</Flex>
|
181
194
|
);
|
@@ -247,7 +260,17 @@ const VirtualizedParticipants = ({
|
|
247
260
|
* shows settings to change for a participant like changing their role
|
248
261
|
*/
|
249
262
|
const ParticipantActions = React.memo(
|
250
|
-
({
|
263
|
+
({
|
264
|
+
peerId,
|
265
|
+
role,
|
266
|
+
isLocal,
|
267
|
+
isHandRaisedAccordion,
|
268
|
+
}: {
|
269
|
+
peerId: string;
|
270
|
+
role: string;
|
271
|
+
isLocal: boolean;
|
272
|
+
isHandRaisedAccordion?: boolean;
|
273
|
+
}) => {
|
251
274
|
const isHandRaised = useHMSStore(selectHasPeerHandRaised(peerId));
|
252
275
|
const canChangeRole = useHMSStore(selectPermissions)?.changeRole;
|
253
276
|
const canRemoveOthers = useHMSStore(selectPermissions)?.removeOthers;
|
@@ -264,72 +287,73 @@ const ParticipantActions = React.memo(
|
|
264
287
|
gap: '$8',
|
265
288
|
}}
|
266
289
|
>
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
290
|
+
{isHandRaisedAccordion ? (
|
291
|
+
<HandRaisedAccordionParticipantActions peerId={peerId} role={role} />
|
292
|
+
) : (
|
293
|
+
<>
|
294
|
+
<ConnectionIndicator peerId={peerId} />
|
295
|
+
{isHandRaised && (
|
296
|
+
<Flex
|
297
|
+
align="center"
|
298
|
+
justify="center"
|
299
|
+
css={{ p: '$1', c: '$on_surface_high', bg: '$surface_bright', borderRadius: '$round' }}
|
300
|
+
>
|
301
|
+
<HandIcon height={19} width={19} />
|
302
|
+
</Flex>
|
303
|
+
)}
|
304
|
+
{isAudioMuted ? (
|
305
|
+
<Flex
|
306
|
+
align="center"
|
307
|
+
justify="center"
|
308
|
+
css={{ p: '$2', c: '$on_surface_high', bg: '$surface_bright', borderRadius: '$round' }}
|
309
|
+
>
|
310
|
+
<MicOffIcon height={19} width={19} />
|
311
|
+
</Flex>
|
312
|
+
) : null}
|
286
313
|
|
287
|
-
|
288
|
-
|
289
|
-
)
|
314
|
+
{shouldShowMoreActions && !isLocal ? <ParticipantMoreActions peerId={peerId} role={role} /> : null}
|
315
|
+
</>
|
316
|
+
)}
|
290
317
|
</Flex>
|
291
318
|
);
|
292
319
|
},
|
293
320
|
);
|
294
321
|
|
295
|
-
const
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
322
|
+
const HandRaisedAccordionParticipantActions = ({ peerId, role }: { peerId: string; role: string }) => {
|
323
|
+
const { handleStageAction, lowerPeerHand, shouldShowStageRoleChange, isInStage } = usePeerOnStageActions({
|
324
|
+
peerId,
|
325
|
+
role,
|
326
|
+
});
|
327
|
+
return (
|
328
|
+
<>
|
329
|
+
<BaseIconButton
|
330
|
+
css={{ p: '$1', c: '$on_surface_high', bg: '$surface_bright', borderRadius: '$round' }}
|
331
|
+
onClick={() => lowerPeerHand()}
|
332
|
+
>
|
333
|
+
<CrossIcon height={19} width={19} />
|
334
|
+
</BaseIconButton>
|
335
|
+
{shouldShowStageRoleChange && !isInStage && (
|
336
|
+
<BaseIconButton
|
337
|
+
css={{ p: '$1', c: '$on_surface_high', bg: '$primary_default', borderRadius: '$round' }}
|
338
|
+
onClick={() => handleStageAction()}
|
339
|
+
>
|
340
|
+
<AddIcon height={19} width={19} />
|
341
|
+
</BaseIconButton>
|
342
|
+
)}
|
343
|
+
</>
|
344
|
+
);
|
345
|
+
};
|
346
|
+
|
347
|
+
const ParticipantMoreActions = ({ peerId, role }: { peerId: string; role: string }) => {
|
307
348
|
const {
|
349
|
+
open,
|
350
|
+
setOpen,
|
308
351
|
bring_to_stage_label,
|
309
352
|
remove_from_stage_label,
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
} =
|
314
|
-
const isInStage = role === on_stage_role;
|
315
|
-
const shouldShowStageRoleChange =
|
316
|
-
canChangeRole &&
|
317
|
-
((isInStage && remove_from_stage_label) || (off_stage_roles?.includes(role) && bring_to_stage_label));
|
318
|
-
const prevRole = useHMSStore(selectPeerMetadata(peerId))?.prevRole;
|
319
|
-
const [open, setOpen] = useState(false);
|
320
|
-
|
321
|
-
const handleStageAction = async () => {
|
322
|
-
if (isInStage) {
|
323
|
-
prevRole && hmsActions.changeRoleOfPeer(peerId, prevRole, true);
|
324
|
-
} else if (on_stage_role) {
|
325
|
-
await hmsActions.changeRoleOfPeer(peerId, on_stage_role, skip_preview_for_role_change);
|
326
|
-
if (skip_preview_for_role_change) {
|
327
|
-
await hmsActions.lowerRemotePeerHand(peerId);
|
328
|
-
}
|
329
|
-
}
|
330
|
-
setOpen(false);
|
331
|
-
};
|
332
|
-
|
353
|
+
handleStageAction,
|
354
|
+
isInStage,
|
355
|
+
shouldShowStageRoleChange,
|
356
|
+
} = usePeerOnStageActions({ peerId, role });
|
333
357
|
return (
|
334
358
|
<Dropdown.Root open={open} onOpenChange={value => setOpen(value)} modal={false}>
|
335
359
|
<Dropdown.Trigger
|
@@ -4,10 +4,13 @@ import { FixedSizeList } from 'react-window';
|
|
4
4
|
import { HMSPeer, selectIsLargeRoom, useHMSStore, usePaginatedParticipants } from '@100mslive/react-sdk';
|
5
5
|
import { ChevronRightIcon } from '@100mslive/react-icons';
|
6
6
|
import { Accordion } from '../../../Accordion';
|
7
|
+
import { Button } from '../../../Button';
|
8
|
+
import { HorizontalDivider } from '../../../Divider';
|
7
9
|
import { Flex } from '../../../Layout';
|
8
10
|
import { Text } from '../../../Text';
|
9
11
|
import { Participant } from './ParticipantList';
|
10
12
|
import { RoleOptions } from './RoleOptions';
|
13
|
+
import { useGroupOnStageActions } from '../hooks/useGroupOnStageActions';
|
11
14
|
// @ts-ignore: No implicit Any
|
12
15
|
import { getFormattedCount } from '../../common/utils';
|
13
16
|
|
@@ -16,6 +19,7 @@ const ITER_TIMER = 5000;
|
|
16
19
|
|
17
20
|
export interface ItemData {
|
18
21
|
peerList: HMSPeer[];
|
22
|
+
isHandRaisedAccordion?: boolean;
|
19
23
|
isConnected: boolean;
|
20
24
|
}
|
21
25
|
|
@@ -29,6 +33,7 @@ export const VirtualizedParticipantItem = React.memo(
|
|
29
33
|
<Participant
|
30
34
|
key={data.peerList[index].id}
|
31
35
|
peer={data.peerList[index]}
|
36
|
+
isHandRaisedAccordion={data.isHandRaisedAccordion}
|
32
37
|
isConnected={data.isConnected}
|
33
38
|
style={style}
|
34
39
|
/>
|
@@ -63,6 +68,9 @@ export const RoleAccordion = ({
|
|
63
68
|
peersInAccordion = peersInAccordion.filter(peer => peer.name.toLowerCase().includes(filter.search || ''));
|
64
69
|
}
|
65
70
|
}
|
71
|
+
const { bringAllToStage, bring_to_stage_label, canBringToStage, lowerAllHands } = useGroupOnStageActions({
|
72
|
+
peers: peersInAccordion,
|
73
|
+
});
|
66
74
|
|
67
75
|
useEffect(() => {
|
68
76
|
if (!isOffStageRole || !isLargeRoom) {
|
@@ -113,7 +121,7 @@ export const RoleAccordion = ({
|
|
113
121
|
<Accordion.Content contentStyles={{ border: '1px solid $border_default', borderTop: 'none' }}>
|
114
122
|
<FixedSizeList
|
115
123
|
itemSize={ROW_HEIGHT}
|
116
|
-
itemData={{ peerList: peersInAccordion, isConnected }}
|
124
|
+
itemData={{ peerList: peersInAccordion, isConnected, isHandRaisedAccordion }}
|
117
125
|
itemKey={itemKey}
|
118
126
|
itemCount={peersInAccordion.length}
|
119
127
|
width={width}
|
@@ -140,6 +148,17 @@ export const RoleAccordion = ({
|
|
140
148
|
<ChevronRightIcon />
|
141
149
|
</Flex>
|
142
150
|
) : null}
|
151
|
+
{isHandRaisedAccordion && (
|
152
|
+
<>
|
153
|
+
<HorizontalDivider />
|
154
|
+
<Flex css={{ w: '100%', p: '$6', gap: '$4' }} justify="center">
|
155
|
+
<Button variant="standard" onClick={() => lowerAllHands()}>
|
156
|
+
Lower All Hands
|
157
|
+
</Button>
|
158
|
+
{canBringToStage && <Button onClick={() => bringAllToStage()}>{bring_to_stage_label}</Button>}
|
159
|
+
</Flex>
|
160
|
+
</>
|
161
|
+
)}
|
143
162
|
</Accordion.Content>
|
144
163
|
</Accordion.Item>
|
145
164
|
);
|
@@ -32,7 +32,7 @@ export const MwebLandscapePrompt = () => {
|
|
32
32
|
// Angle check needed to diff bw mobile and desktop
|
33
33
|
setShowMwebLandscapePrompt(
|
34
34
|
match({ angle, isLandscapeHLSStream, isLandscape, type })
|
35
|
-
.with({ isLandscapeHLSStream }, () => false)
|
35
|
+
.with({ isLandscapeHLSStream: true }, () => false)
|
36
36
|
.with({ angle: P.when(angle => angle && angle >= 90) }, ({ type }) => type.includes('landscape'))
|
37
37
|
.otherwise(() => isLandscape),
|
38
38
|
);
|
@@ -36,7 +36,6 @@ const SecondarySection = ({
|
|
36
36
|
hasSidebar,
|
37
37
|
}: React.PropsWithChildren<{ tiles: TrackWithPeerAndDimensions[]; edgeToEdge?: boolean; hasSidebar?: boolean }>) => {
|
38
38
|
const tileLayoutProps = useVideoTileContext();
|
39
|
-
console.log('secondary section', { tilesLength: tiles?.length });
|
40
39
|
if (!tiles?.length) {
|
41
40
|
return null;
|
42
41
|
}
|