@100mslive/roomkit-react 0.3.16-alpha.1 → 0.3.16-alpha.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.
- package/dist/{HLSView-T2PXKR6I.css → HLSView-OECKVTGC.css} +3 -3
- package/dist/{HLSView-T2PXKR6I.css.map → HLSView-OECKVTGC.css.map} +1 -1
- package/dist/{HLSView-ERPYXVOY.js → HLSView-TBAYH564.js} +2 -2
- package/dist/{chunk-NKC36NL4.js → chunk-ADT3Q26H.js} +56 -18
- package/dist/chunk-ADT3Q26H.js.map +7 -0
- package/dist/index.cjs.css +2 -2
- package/dist/index.cjs.css.map +1 -1
- package/dist/index.cjs.js +60 -26
- package/dist/index.cjs.js.map +4 -4
- package/dist/index.css +2 -2
- package/dist/index.css.map +1 -1
- package/dist/index.js +1 -1
- package/dist/meta.cjs.json +34 -19
- package/dist/meta.esbuild.json +46 -31
- package/package.json +7 -7
- package/src/Prebuilt/components/ConferenceScreen.tsx +13 -1
- package/src/Prebuilt/components/Footer/ParticipantList.tsx +1 -4
- package/src/Prebuilt/components/Notifications/HandRaisedNotifications.tsx +33 -0
- package/src/Prebuilt/components/Preview/PreviewJoin.tsx +3 -1
- package/src/Prebuilt/components/Toast/ToastConfig.jsx +2 -2
- package/dist/chunk-NKC36NL4.js.map +0 -7
- /package/dist/{HLSView-ERPYXVOY.js.map → HLSView-TBAYH564.js.map} +0 -0
package/dist/meta.esbuild.json
CHANGED
|
@@ -5591,7 +5591,7 @@
|
|
|
5591
5591
|
"format": "cjs"
|
|
5592
5592
|
},
|
|
5593
5593
|
"../hms-video-store/dist/index.js": {
|
|
5594
|
-
"bytes":
|
|
5594
|
+
"bytes": 356549,
|
|
5595
5595
|
"imports": [
|
|
5596
5596
|
{
|
|
5597
5597
|
"path": "../../node_modules/reselect/es/index.js",
|
|
@@ -7074,7 +7074,7 @@
|
|
|
7074
7074
|
"format": "esm"
|
|
7075
7075
|
},
|
|
7076
7076
|
"src/Prebuilt/components/Footer/ParticipantList.tsx": {
|
|
7077
|
-
"bytes":
|
|
7077
|
+
"bytes": 13909,
|
|
7078
7078
|
"imports": [
|
|
7079
7079
|
{
|
|
7080
7080
|
"path": "react",
|
|
@@ -10256,7 +10256,7 @@
|
|
|
10256
10256
|
"format": "esm"
|
|
10257
10257
|
},
|
|
10258
10258
|
"src/Prebuilt/components/Preview/PreviewJoin.tsx": {
|
|
10259
|
-
"bytes":
|
|
10259
|
+
"bytes": 10118,
|
|
10260
10260
|
"imports": [
|
|
10261
10261
|
{
|
|
10262
10262
|
"path": "react",
|
|
@@ -11248,7 +11248,7 @@
|
|
|
11248
11248
|
],
|
|
11249
11249
|
"format": "esm"
|
|
11250
11250
|
},
|
|
11251
|
-
"../../../../../../../tmp/tmp-
|
|
11251
|
+
"../../../../../../../tmp/tmp-2785-lIWJeGC2ezlG/190bf79b6eb2/tldraw.css": {
|
|
11252
11252
|
"bytes": 80111,
|
|
11253
11253
|
"imports": [
|
|
11254
11254
|
{
|
|
@@ -11298,7 +11298,7 @@
|
|
|
11298
11298
|
}
|
|
11299
11299
|
]
|
|
11300
11300
|
},
|
|
11301
|
-
"../../../../../../../tmp/tmp-
|
|
11301
|
+
"../../../../../../../tmp/tmp-2785-lIWJeGC2ezlG/190bf79b6940/index.css": {
|
|
11302
11302
|
"bytes": 597,
|
|
11303
11303
|
"imports": [
|
|
11304
11304
|
{
|
|
@@ -11307,7 +11307,7 @@
|
|
|
11307
11307
|
"external": true
|
|
11308
11308
|
},
|
|
11309
11309
|
{
|
|
11310
|
-
"path": "../../../../../../../tmp/tmp-
|
|
11310
|
+
"path": "../../../../../../../tmp/tmp-2785-lIWJeGC2ezlG/190bf79b6eb2/tldraw.css",
|
|
11311
11311
|
"kind": "import-rule",
|
|
11312
11312
|
"original": "@tldraw/tldraw/tldraw.css"
|
|
11313
11313
|
}
|
|
@@ -11382,7 +11382,7 @@
|
|
|
11382
11382
|
"original": "../../common/constants"
|
|
11383
11383
|
},
|
|
11384
11384
|
{
|
|
11385
|
-
"path": "../../../../../../../tmp/tmp-
|
|
11385
|
+
"path": "../../../../../../../tmp/tmp-2785-lIWJeGC2ezlG/190bf79b6940/index.css",
|
|
11386
11386
|
"kind": "import-statement",
|
|
11387
11387
|
"original": "@100mslive/hms-whiteboard/index.css"
|
|
11388
11388
|
},
|
|
@@ -12745,7 +12745,7 @@
|
|
|
12745
12745
|
"format": "esm"
|
|
12746
12746
|
},
|
|
12747
12747
|
"src/Prebuilt/components/ConferenceScreen.tsx": {
|
|
12748
|
-
"bytes":
|
|
12748
|
+
"bytes": 8221,
|
|
12749
12749
|
"imports": [
|
|
12750
12750
|
{
|
|
12751
12751
|
"path": "react",
|
|
@@ -13353,18 +13353,28 @@
|
|
|
13353
13353
|
"format": "esm"
|
|
13354
13354
|
},
|
|
13355
13355
|
"src/Prebuilt/components/Notifications/HandRaisedNotifications.tsx": {
|
|
13356
|
-
"bytes":
|
|
13356
|
+
"bytes": 3057,
|
|
13357
13357
|
"imports": [
|
|
13358
13358
|
{
|
|
13359
13359
|
"path": "react",
|
|
13360
13360
|
"kind": "import-statement",
|
|
13361
13361
|
"external": true
|
|
13362
13362
|
},
|
|
13363
|
+
{
|
|
13364
|
+
"path": "react-use",
|
|
13365
|
+
"kind": "import-statement",
|
|
13366
|
+
"external": true
|
|
13367
|
+
},
|
|
13363
13368
|
{
|
|
13364
13369
|
"path": "@100mslive/react-sdk",
|
|
13365
13370
|
"kind": "import-statement",
|
|
13366
13371
|
"external": true
|
|
13367
13372
|
},
|
|
13373
|
+
{
|
|
13374
|
+
"path": "src/Prebuilt/provider/roomLayoutProvider/index.tsx",
|
|
13375
|
+
"kind": "import-statement",
|
|
13376
|
+
"original": "../../provider/roomLayoutProvider"
|
|
13377
|
+
},
|
|
13368
13378
|
{
|
|
13369
13379
|
"path": "src/Prebuilt/components/Toast/ToastBatcher.js",
|
|
13370
13380
|
"kind": "import-statement",
|
|
@@ -15223,7 +15233,7 @@
|
|
|
15223
15233
|
"dist/index.js": {
|
|
15224
15234
|
"imports": [
|
|
15225
15235
|
{
|
|
15226
|
-
"path": "dist/chunk-
|
|
15236
|
+
"path": "dist/chunk-ADT3Q26H.js",
|
|
15227
15237
|
"kind": "import-statement"
|
|
15228
15238
|
}
|
|
15229
15239
|
],
|
|
@@ -15299,16 +15309,16 @@
|
|
|
15299
15309
|
"inputs": {},
|
|
15300
15310
|
"bytes": 1882
|
|
15301
15311
|
},
|
|
15302
|
-
"dist/HLSView-
|
|
15312
|
+
"dist/HLSView-TBAYH564.js.map": {
|
|
15303
15313
|
"imports": [],
|
|
15304
15314
|
"exports": [],
|
|
15305
15315
|
"inputs": {},
|
|
15306
15316
|
"bytes": 100275
|
|
15307
15317
|
},
|
|
15308
|
-
"dist/HLSView-
|
|
15318
|
+
"dist/HLSView-TBAYH564.js": {
|
|
15309
15319
|
"imports": [
|
|
15310
15320
|
{
|
|
15311
|
-
"path": "dist/chunk-
|
|
15321
|
+
"path": "dist/chunk-ADT3Q26H.js",
|
|
15312
15322
|
"kind": "import-statement"
|
|
15313
15323
|
},
|
|
15314
15324
|
{
|
|
@@ -15486,7 +15496,7 @@
|
|
|
15486
15496
|
"default"
|
|
15487
15497
|
],
|
|
15488
15498
|
"entryPoint": "src/Prebuilt/layouts/HLSView.jsx",
|
|
15489
|
-
"cssBundle": "dist/HLSView-
|
|
15499
|
+
"cssBundle": "dist/HLSView-OECKVTGC.css",
|
|
15490
15500
|
"inputs": {
|
|
15491
15501
|
"src/Prebuilt/layouts/HLSView.jsx": {
|
|
15492
15502
|
"bytesInOutput": 27671
|
|
@@ -15545,13 +15555,13 @@
|
|
|
15545
15555
|
},
|
|
15546
15556
|
"bytes": 61702
|
|
15547
15557
|
},
|
|
15548
|
-
"dist/chunk-
|
|
15558
|
+
"dist/chunk-ADT3Q26H.js.map": {
|
|
15549
15559
|
"imports": [],
|
|
15550
15560
|
"exports": [],
|
|
15551
15561
|
"inputs": {},
|
|
15552
|
-
"bytes":
|
|
15562
|
+
"bytes": 3473419
|
|
15553
15563
|
},
|
|
15554
|
-
"dist/chunk-
|
|
15564
|
+
"dist/chunk-ADT3Q26H.js": {
|
|
15555
15565
|
"imports": [
|
|
15556
15566
|
{
|
|
15557
15567
|
"path": "react",
|
|
@@ -18079,7 +18089,7 @@
|
|
|
18079
18089
|
"external": true
|
|
18080
18090
|
},
|
|
18081
18091
|
{
|
|
18082
|
-
"path": "dist/HLSView-
|
|
18092
|
+
"path": "dist/HLSView-TBAYH564.js",
|
|
18083
18093
|
"kind": "dynamic-import"
|
|
18084
18094
|
},
|
|
18085
18095
|
{
|
|
@@ -18277,6 +18287,11 @@
|
|
|
18277
18287
|
"kind": "import-statement",
|
|
18278
18288
|
"external": true
|
|
18279
18289
|
},
|
|
18290
|
+
{
|
|
18291
|
+
"path": "react-use",
|
|
18292
|
+
"kind": "import-statement",
|
|
18293
|
+
"external": true
|
|
18294
|
+
},
|
|
18280
18295
|
{
|
|
18281
18296
|
"path": "@100mslive/react-sdk",
|
|
18282
18297
|
"kind": "import-statement",
|
|
@@ -18668,7 +18683,7 @@
|
|
|
18668
18683
|
],
|
|
18669
18684
|
"inputs": {
|
|
18670
18685
|
"<define:process.env>": {
|
|
18671
|
-
"bytesInOutput":
|
|
18686
|
+
"bytesInOutput": 17979
|
|
18672
18687
|
},
|
|
18673
18688
|
"../../node_modules/lodash/lodash.js": {
|
|
18674
18689
|
"bytesInOutput": 224289
|
|
@@ -19001,7 +19016,7 @@
|
|
|
19001
19016
|
"bytesInOutput": 4698
|
|
19002
19017
|
},
|
|
19003
19018
|
"src/Prebuilt/components/ConferenceScreen.tsx": {
|
|
19004
|
-
"bytesInOutput":
|
|
19019
|
+
"bytesInOutput": 7403
|
|
19005
19020
|
},
|
|
19006
19021
|
"src/Prebuilt/components/Footer/Footer.tsx": {
|
|
19007
19022
|
"bytesInOutput": 3306
|
|
@@ -19301,7 +19316,7 @@
|
|
|
19301
19316
|
"bytesInOutput": 1564
|
|
19302
19317
|
},
|
|
19303
19318
|
"src/Prebuilt/components/Footer/ParticipantList.tsx": {
|
|
19304
|
-
"bytesInOutput":
|
|
19319
|
+
"bytesInOutput": 13109
|
|
19305
19320
|
},
|
|
19306
19321
|
"src/Prebuilt/components/Connection/ConnectionIndicator.tsx": {
|
|
19307
19322
|
"bytesInOutput": 3876
|
|
@@ -19340,7 +19355,7 @@
|
|
|
19340
19355
|
"bytesInOutput": 3077
|
|
19341
19356
|
},
|
|
19342
19357
|
"src/Prebuilt/components/Preview/PreviewJoin.tsx": {
|
|
19343
|
-
"bytesInOutput":
|
|
19358
|
+
"bytesInOutput": 10077
|
|
19344
19359
|
},
|
|
19345
19360
|
"src/Prebuilt/layouts/SidePane.tsx": {
|
|
19346
19361
|
"bytesInOutput": 6439
|
|
@@ -19567,7 +19582,7 @@
|
|
|
19567
19582
|
"src/Prebuilt/components/VideoLayouts/WhiteboardLayout.tsx": {
|
|
19568
19583
|
"bytesInOutput": 2830
|
|
19569
19584
|
},
|
|
19570
|
-
"../../../../../../../tmp/tmp-
|
|
19585
|
+
"../../../../../../../tmp/tmp-2785-lIWJeGC2ezlG/190bf79b6940/index.css": {
|
|
19571
19586
|
"bytesInOutput": 0
|
|
19572
19587
|
},
|
|
19573
19588
|
"src/Prebuilt/common/PeersSorter.ts": {
|
|
@@ -19637,7 +19652,7 @@
|
|
|
19637
19652
|
"bytesInOutput": 1350
|
|
19638
19653
|
},
|
|
19639
19654
|
"src/Prebuilt/components/Notifications/HandRaisedNotifications.tsx": {
|
|
19640
|
-
"bytesInOutput":
|
|
19655
|
+
"bytesInOutput": 3074
|
|
19641
19656
|
},
|
|
19642
19657
|
"src/Prebuilt/components/Toast/ToastBatcher.js": {
|
|
19643
19658
|
"bytesInOutput": 1983
|
|
@@ -19730,7 +19745,7 @@
|
|
|
19730
19745
|
"bytesInOutput": 2632
|
|
19731
19746
|
}
|
|
19732
19747
|
},
|
|
19733
|
-
"bytes":
|
|
19748
|
+
"bytes": 1443928
|
|
19734
19749
|
},
|
|
19735
19750
|
"dist/index.css.map": {
|
|
19736
19751
|
"imports": [],
|
|
@@ -19792,22 +19807,22 @@
|
|
|
19792
19807
|
}
|
|
19793
19808
|
],
|
|
19794
19809
|
"inputs": {
|
|
19795
|
-
"../../../../../../../tmp/tmp-
|
|
19810
|
+
"../../../../../../../tmp/tmp-2785-lIWJeGC2ezlG/190bf79b6eb2/tldraw.css": {
|
|
19796
19811
|
"bytesInOutput": 75223
|
|
19797
19812
|
},
|
|
19798
|
-
"../../../../../../../tmp/tmp-
|
|
19813
|
+
"../../../../../../../tmp/tmp-2785-lIWJeGC2ezlG/190bf79b6940/index.css": {
|
|
19799
19814
|
"bytesInOutput": 401
|
|
19800
19815
|
}
|
|
19801
19816
|
},
|
|
19802
19817
|
"bytes": 75901
|
|
19803
19818
|
},
|
|
19804
|
-
"dist/HLSView-
|
|
19819
|
+
"dist/HLSView-OECKVTGC.css.map": {
|
|
19805
19820
|
"imports": [],
|
|
19806
19821
|
"exports": [],
|
|
19807
19822
|
"inputs": {},
|
|
19808
19823
|
"bytes": 122402
|
|
19809
19824
|
},
|
|
19810
|
-
"dist/HLSView-
|
|
19825
|
+
"dist/HLSView-OECKVTGC.css": {
|
|
19811
19826
|
"imports": [
|
|
19812
19827
|
{
|
|
19813
19828
|
"path": "https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap",
|
|
@@ -19861,10 +19876,10 @@
|
|
|
19861
19876
|
}
|
|
19862
19877
|
],
|
|
19863
19878
|
"inputs": {
|
|
19864
|
-
"../../../../../../../tmp/tmp-
|
|
19879
|
+
"../../../../../../../tmp/tmp-2785-lIWJeGC2ezlG/190bf79b6eb2/tldraw.css": {
|
|
19865
19880
|
"bytesInOutput": 75223
|
|
19866
19881
|
},
|
|
19867
|
-
"../../../../../../../tmp/tmp-
|
|
19882
|
+
"../../../../../../../tmp/tmp-2785-lIWJeGC2ezlG/190bf79b6940/index.css": {
|
|
19868
19883
|
"bytesInOutput": 401
|
|
19869
19884
|
}
|
|
19870
19885
|
},
|
package/package.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"prebuilt",
|
|
11
11
|
"roomkit"
|
|
12
12
|
],
|
|
13
|
-
"version": "0.3.16-alpha.
|
|
13
|
+
"version": "0.3.16-alpha.3",
|
|
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.16-alpha.
|
|
78
|
+
"@100mslive/hls-player": "0.3.16-alpha.3",
|
|
79
79
|
"@100mslive/hms-noise-cancellation": "0.0.1",
|
|
80
|
-
"@100mslive/hms-virtual-background": "1.13.16-alpha.
|
|
81
|
-
"@100mslive/hms-whiteboard": "0.0.6-alpha.
|
|
82
|
-
"@100mslive/react-icons": "0.10.16-alpha.
|
|
83
|
-
"@100mslive/react-sdk": "0.10.16-alpha.
|
|
80
|
+
"@100mslive/hms-virtual-background": "1.13.16-alpha.3",
|
|
81
|
+
"@100mslive/hms-whiteboard": "0.0.6-alpha.3",
|
|
82
|
+
"@100mslive/react-icons": "0.10.16-alpha.3",
|
|
83
|
+
"@100mslive/react-sdk": "0.10.16-alpha.3",
|
|
84
84
|
"@100mslive/types-prebuilt": "0.12.9",
|
|
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": "
|
|
120
|
+
"gitHead": "29cf5bab0d55c5bbaff581afae570ec967cdef3d"
|
|
121
121
|
}
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
selectAppData,
|
|
7
7
|
selectIsConnectedToRoom,
|
|
8
8
|
selectRoomState,
|
|
9
|
+
useAwayNotifications,
|
|
9
10
|
useHMSActions,
|
|
10
11
|
useHMSStore,
|
|
11
12
|
} from '@100mslive/react-sdk';
|
|
@@ -50,6 +51,7 @@ export const ConferenceScreen = () => {
|
|
|
50
51
|
const isMobileDevice = isAndroid || isIOS || isIPadOS;
|
|
51
52
|
const dropdownListRef = useRef<string[]>();
|
|
52
53
|
const [isHLSStarted] = useSetAppDataByKey(APP_DATA.hlsStarted);
|
|
54
|
+
const { requestPermission } = useAwayNotifications();
|
|
53
55
|
|
|
54
56
|
// using it in hls stream to show action button when chat is disabled
|
|
55
57
|
const showChat = !!screenProps.elements?.chat;
|
|
@@ -99,10 +101,20 @@ export const ConferenceScreen = () => {
|
|
|
99
101
|
speakerAutoSelectionBlacklist: ['Yeti Stereo Microphone'],
|
|
100
102
|
},
|
|
101
103
|
})
|
|
104
|
+
.then(() => requestPermission())
|
|
102
105
|
.catch(console.error);
|
|
103
106
|
autoRoomJoined.current = true;
|
|
104
107
|
}
|
|
105
|
-
}, [
|
|
108
|
+
}, [
|
|
109
|
+
authTokenInAppData,
|
|
110
|
+
endpoints?.init,
|
|
111
|
+
hmsActions,
|
|
112
|
+
isConnectedToRoom,
|
|
113
|
+
isPreviewScreenEnabled,
|
|
114
|
+
roomState,
|
|
115
|
+
userName,
|
|
116
|
+
requestPermission,
|
|
117
|
+
]);
|
|
106
118
|
|
|
107
119
|
useEffect(() => {
|
|
108
120
|
onJoinFunc?.();
|
|
@@ -194,7 +194,6 @@ export const Participant = ({
|
|
|
194
194
|
<ParticipantActions
|
|
195
195
|
peerId={peer.id}
|
|
196
196
|
peerType={peer.type}
|
|
197
|
-
isLocal={peer.id === localPeerId}
|
|
198
197
|
role={peer.roleName}
|
|
199
198
|
isHandRaisedAccordion={isHandRaisedAccordion}
|
|
200
199
|
/>
|
|
@@ -273,12 +272,10 @@ const ParticipantActions = React.memo(
|
|
|
273
272
|
peerId,
|
|
274
273
|
peerType,
|
|
275
274
|
role,
|
|
276
|
-
isLocal,
|
|
277
275
|
isHandRaisedAccordion,
|
|
278
276
|
}: {
|
|
279
277
|
peerId: string;
|
|
280
278
|
role: string;
|
|
281
|
-
isLocal: boolean;
|
|
282
279
|
isHandRaisedAccordion?: boolean;
|
|
283
280
|
peerType: HMSPeerType;
|
|
284
281
|
}) => {
|
|
@@ -331,7 +328,7 @@ const ParticipantActions = React.memo(
|
|
|
331
328
|
</Flex>
|
|
332
329
|
) : null}
|
|
333
330
|
|
|
334
|
-
{shouldShowMoreActions
|
|
331
|
+
{shouldShowMoreActions ? <ParticipantMoreActions peerId={peerId} role={role} /> : null}
|
|
335
332
|
</>
|
|
336
333
|
)}
|
|
337
334
|
</Flex>
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
import { useEffect } from 'react';
|
|
2
|
+
import { useDebounce } from 'react-use';
|
|
2
3
|
import {
|
|
3
4
|
HMSNotificationTypes,
|
|
4
5
|
HMSRoomState,
|
|
6
|
+
selectHandRaisedPeers,
|
|
5
7
|
selectHasPeerHandRaised,
|
|
8
|
+
selectIsLocalScreenShared,
|
|
6
9
|
selectPeerByID,
|
|
7
10
|
selectRoomState,
|
|
11
|
+
useAwayNotifications,
|
|
8
12
|
useHMSNotifications,
|
|
9
13
|
useHMSStore,
|
|
10
14
|
useHMSVanillaStore,
|
|
11
15
|
} from '@100mslive/react-sdk';
|
|
16
|
+
import { useRoomLayout } from '../../provider/roomLayoutProvider';
|
|
12
17
|
// @ts-ignore: No implicit Any
|
|
13
18
|
import { ToastBatcher } from '../Toast/ToastBatcher';
|
|
14
19
|
import { useRoomLayoutConferencingScreen } from '../../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';
|
|
@@ -22,6 +27,9 @@ export const HandRaisedNotifications = () => {
|
|
|
22
27
|
const vanillaStore = useHMSVanillaStore();
|
|
23
28
|
const { on_stage_exp } = useRoomLayoutConferencingScreen().elements || {};
|
|
24
29
|
const isSubscribing = !!useSubscribedNotifications(SUBSCRIBED_NOTIFICATIONS.METADATA_UPDATED);
|
|
30
|
+
const amIScreenSharing = useHMSStore(selectIsLocalScreenShared);
|
|
31
|
+
const { showNotification } = useAwayNotifications();
|
|
32
|
+
const logoURL = useRoomLayout()?.logo?.url;
|
|
25
33
|
|
|
26
34
|
useEffect(() => {
|
|
27
35
|
if (!notification?.data) {
|
|
@@ -32,6 +40,7 @@ export const HandRaisedNotifications = () => {
|
|
|
32
40
|
if (roomState !== HMSRoomState.Connected || notification.data.isLocal || !isSubscribing) {
|
|
33
41
|
return;
|
|
34
42
|
}
|
|
43
|
+
|
|
35
44
|
const hasPeerHandRaised = vanillaStore.getState(selectHasPeerHandRaised(notification.data.id));
|
|
36
45
|
const peer = vanillaStore.getState(selectPeerByID(notification.data.id));
|
|
37
46
|
if (hasPeerHandRaised) {
|
|
@@ -41,5 +50,29 @@ export const HandRaisedNotifications = () => {
|
|
|
41
50
|
}
|
|
42
51
|
}, [isSubscribing, notification, on_stage_exp, roomState, vanillaStore]);
|
|
43
52
|
|
|
53
|
+
useDebounce(
|
|
54
|
+
() => {
|
|
55
|
+
if (!notification?.data) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// Don't show toast message in case of local peer.
|
|
60
|
+
if (roomState !== HMSRoomState.Connected || notification.data.isLocal || !isSubscribing) {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const hasPeerHandRaised = vanillaStore.getState(selectHasPeerHandRaised(notification.data.id));
|
|
65
|
+
const peer = vanillaStore.getState(selectPeerByID(notification.data.id));
|
|
66
|
+
const handRaisedPeers = vanillaStore.getState(selectHandRaisedPeers);
|
|
67
|
+
if (amIScreenSharing && hasPeerHandRaised) {
|
|
68
|
+
const title = `${peer?.name} ${
|
|
69
|
+
handRaisedPeers.length > 1 ? `and ${handRaisedPeers.length - 1} others` : ''
|
|
70
|
+
} raised hand`;
|
|
71
|
+
showNotification(title, { icon: logoURL });
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
1000,
|
|
75
|
+
[isSubscribing, notification, roomState, vanillaStore, amIScreenSharing],
|
|
76
|
+
);
|
|
44
77
|
return null;
|
|
45
78
|
};
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
selectRoomState,
|
|
9
9
|
selectVideoTrackByID,
|
|
10
10
|
useAVToggle,
|
|
11
|
+
useAwayNotifications,
|
|
11
12
|
useHMSStore,
|
|
12
13
|
useParticipants,
|
|
13
14
|
usePreviewJoin,
|
|
@@ -100,6 +101,7 @@ const PreviewJoin = ({
|
|
|
100
101
|
},
|
|
101
102
|
asRole,
|
|
102
103
|
});
|
|
104
|
+
const { requestPermission } = useAwayNotifications();
|
|
103
105
|
const roomState = useHMSStore(selectRoomState);
|
|
104
106
|
const savePreferenceAndJoin = useCallback(() => {
|
|
105
107
|
setPreviewPreference({
|
|
@@ -115,7 +117,7 @@ const PreviewJoin = ({
|
|
|
115
117
|
if (skipPreview) {
|
|
116
118
|
savePreferenceAndJoin();
|
|
117
119
|
} else {
|
|
118
|
-
preview();
|
|
120
|
+
preview().then(() => requestPermission());
|
|
119
121
|
}
|
|
120
122
|
}
|
|
121
123
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -111,7 +111,7 @@ export const ToastConfig = {
|
|
|
111
111
|
const count = new Set(notifications.map(notification => notification.data?.id)).size;
|
|
112
112
|
return {
|
|
113
113
|
title: `${notifications[notifications.length - 1].data?.name} ${
|
|
114
|
-
count > 1 ?
|
|
114
|
+
count > 1 ? `and ${count} others` : ''
|
|
115
115
|
} raised hand`,
|
|
116
116
|
icon: <HandIcon />,
|
|
117
117
|
};
|
|
@@ -129,7 +129,7 @@ export const ToastConfig = {
|
|
|
129
129
|
const count = new Set(notifications.map(notification => notification.data?.id)).size;
|
|
130
130
|
return {
|
|
131
131
|
title: `${notifications[notifications.length - 1].data?.name} ${
|
|
132
|
-
count > 1 ?
|
|
132
|
+
count > 1 ? `and ${count} others` : ''
|
|
133
133
|
} raised hand`,
|
|
134
134
|
icon: <HandIcon />,
|
|
135
135
|
action: <HandRaiseAction isSingleHandRaise={false} />,
|