@100mslive/roomkit-react 0.3.17-alpha.10 → 0.3.17-alpha.11
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{HLSView-NMG7P72A.js → HLSView-42EL65Z3.js} +2 -2
- package/dist/{HLSView-2TQQHGUX.css → HLSView-7NVZOZKG.css} +3 -3
- package/dist/{HLSView-2TQQHGUX.css.map → HLSView-7NVZOZKG.css.map} +1 -1
- package/dist/Prebuilt/components/Notifications/ReconnectNotifications.d.ts +1 -2
- package/dist/{chunk-GCTIXYTC.js → chunk-Y4ZC5NAS.js} +270 -275
- package/dist/{chunk-GCTIXYTC.js.map → chunk-Y4ZC5NAS.js.map} +3 -3
- package/dist/index.cjs.css +2 -2
- package/dist/index.cjs.css.map +1 -1
- package/dist/index.cjs.js +109 -122
- 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 +25 -30
- package/dist/meta.esbuild.json +35 -40
- package/package.json +7 -7
- package/src/Prebuilt/components/Notifications/ReconnectNotifications.tsx +10 -37
- package/src/Prebuilt/components/Preview/PreviewJoin.tsx +3 -1
- package/src/Prebuilt/components/Toast/ToastConfig.jsx +2 -2
- package/src/Prebuilt/components/VirtualBackground/VBHandler.tsx +1 -2
- package/src/Prebuilt/components/VirtualBackground/VBPicker.tsx +2 -1
- package/src/Prebuilt/components/VirtualBackground/VBToggle.tsx +9 -2
- /package/dist/{HLSView-NMG7P72A.js.map → HLSView-42EL65Z3.js.map} +0 -0
package/dist/meta.esbuild.json
CHANGED
@@ -5616,7 +5616,7 @@
|
|
5616
5616
|
"format": "cjs"
|
5617
5617
|
},
|
5618
5618
|
"../hms-video-store/dist/index.js": {
|
5619
|
-
"bytes":
|
5619
|
+
"bytes": 362197,
|
5620
5620
|
"imports": [
|
5621
5621
|
{
|
5622
5622
|
"path": "../../node_modules/reselect/es/index.js",
|
@@ -6633,7 +6633,7 @@
|
|
6633
6633
|
"format": "esm"
|
6634
6634
|
},
|
6635
6635
|
"src/Prebuilt/components/VirtualBackground/VBToggle.tsx": {
|
6636
|
-
"bytes":
|
6636
|
+
"bytes": 1353,
|
6637
6637
|
"imports": [
|
6638
6638
|
{
|
6639
6639
|
"path": "react",
|
@@ -9888,7 +9888,7 @@
|
|
9888
9888
|
"format": "esm"
|
9889
9889
|
},
|
9890
9890
|
"src/Prebuilt/components/VirtualBackground/VBHandler.tsx": {
|
9891
|
-
"bytes":
|
9891
|
+
"bytes": 2719,
|
9892
9892
|
"imports": [
|
9893
9893
|
{
|
9894
9894
|
"path": "@100mslive/hms-virtual-background",
|
@@ -9909,7 +9909,7 @@
|
|
9909
9909
|
"format": "esm"
|
9910
9910
|
},
|
9911
9911
|
"src/Prebuilt/components/VirtualBackground/VBPicker.tsx": {
|
9912
|
-
"bytes":
|
9912
|
+
"bytes": 7990,
|
9913
9913
|
"imports": [
|
9914
9914
|
{
|
9915
9915
|
"path": "react",
|
@@ -10239,7 +10239,7 @@
|
|
10239
10239
|
"format": "esm"
|
10240
10240
|
},
|
10241
10241
|
"src/Prebuilt/components/Preview/PreviewJoin.tsx": {
|
10242
|
-
"bytes":
|
10242
|
+
"bytes": 10106,
|
10243
10243
|
"imports": [
|
10244
10244
|
{
|
10245
10245
|
"path": "react",
|
@@ -11231,7 +11231,7 @@
|
|
11231
11231
|
],
|
11232
11232
|
"format": "esm"
|
11233
11233
|
},
|
11234
|
-
"../../../../../../../tmp/tmp-
|
11234
|
+
"../../../../../../../tmp/tmp-2805-53IzBWEMg269/19122804f952/tldraw.css": {
|
11235
11235
|
"bytes": 80111,
|
11236
11236
|
"imports": [
|
11237
11237
|
{
|
@@ -11281,7 +11281,7 @@
|
|
11281
11281
|
}
|
11282
11282
|
]
|
11283
11283
|
},
|
11284
|
-
"../../../../../../../tmp/tmp-
|
11284
|
+
"../../../../../../../tmp/tmp-2805-53IzBWEMg269/19122804f1c0/index.css": {
|
11285
11285
|
"bytes": 597,
|
11286
11286
|
"imports": [
|
11287
11287
|
{
|
@@ -11290,7 +11290,7 @@
|
|
11290
11290
|
"external": true
|
11291
11291
|
},
|
11292
11292
|
{
|
11293
|
-
"path": "../../../../../../../tmp/tmp-
|
11293
|
+
"path": "../../../../../../../tmp/tmp-2805-53IzBWEMg269/19122804f952/tldraw.css",
|
11294
11294
|
"kind": "import-rule",
|
11295
11295
|
"original": "@tldraw/tldraw/tldraw.css"
|
11296
11296
|
}
|
@@ -11365,7 +11365,7 @@
|
|
11365
11365
|
"original": "../../common/constants"
|
11366
11366
|
},
|
11367
11367
|
{
|
11368
|
-
"path": "../../../../../../../tmp/tmp-
|
11368
|
+
"path": "../../../../../../../tmp/tmp-2805-53IzBWEMg269/19122804f1c0/index.css",
|
11369
11369
|
"kind": "import-statement",
|
11370
11370
|
"original": "@100mslive/hms-whiteboard/index.css"
|
11371
11371
|
},
|
@@ -13259,7 +13259,7 @@
|
|
13259
13259
|
"format": "esm"
|
13260
13260
|
},
|
13261
13261
|
"src/Prebuilt/components/Toast/ToastConfig.jsx": {
|
13262
|
-
"bytes":
|
13262
|
+
"bytes": 5242,
|
13263
13263
|
"imports": [
|
13264
13264
|
{
|
13265
13265
|
"path": "react",
|
@@ -13508,7 +13508,7 @@
|
|
13508
13508
|
"format": "esm"
|
13509
13509
|
},
|
13510
13510
|
"src/Prebuilt/components/Notifications/ReconnectNotifications.tsx": {
|
13511
|
-
"bytes":
|
13511
|
+
"bytes": 1248,
|
13512
13512
|
"imports": [
|
13513
13513
|
{
|
13514
13514
|
"path": "react",
|
@@ -13520,11 +13520,6 @@
|
|
13520
13520
|
"kind": "import-statement",
|
13521
13521
|
"external": true
|
13522
13522
|
},
|
13523
|
-
{
|
13524
|
-
"path": "src/index.ts",
|
13525
|
-
"kind": "import-statement",
|
13526
|
-
"original": "../../.."
|
13527
|
-
},
|
13528
13523
|
{
|
13529
13524
|
"path": "src/Prebuilt/components/Toast/ToastConfig.jsx",
|
13530
13525
|
"kind": "import-statement",
|
@@ -15252,7 +15247,7 @@
|
|
15252
15247
|
"dist/index.js": {
|
15253
15248
|
"imports": [
|
15254
15249
|
{
|
15255
|
-
"path": "dist/chunk-
|
15250
|
+
"path": "dist/chunk-Y4ZC5NAS.js",
|
15256
15251
|
"kind": "import-statement"
|
15257
15252
|
}
|
15258
15253
|
],
|
@@ -15328,16 +15323,16 @@
|
|
15328
15323
|
"inputs": {},
|
15329
15324
|
"bytes": 1882
|
15330
15325
|
},
|
15331
|
-
"dist/HLSView-
|
15326
|
+
"dist/HLSView-42EL65Z3.js.map": {
|
15332
15327
|
"imports": [],
|
15333
15328
|
"exports": [],
|
15334
15329
|
"inputs": {},
|
15335
15330
|
"bytes": 100275
|
15336
15331
|
},
|
15337
|
-
"dist/HLSView-
|
15332
|
+
"dist/HLSView-42EL65Z3.js": {
|
15338
15333
|
"imports": [
|
15339
15334
|
{
|
15340
|
-
"path": "dist/chunk-
|
15335
|
+
"path": "dist/chunk-Y4ZC5NAS.js",
|
15341
15336
|
"kind": "import-statement"
|
15342
15337
|
},
|
15343
15338
|
{
|
@@ -15515,7 +15510,7 @@
|
|
15515
15510
|
"default"
|
15516
15511
|
],
|
15517
15512
|
"entryPoint": "src/Prebuilt/layouts/HLSView.jsx",
|
15518
|
-
"cssBundle": "dist/HLSView-
|
15513
|
+
"cssBundle": "dist/HLSView-7NVZOZKG.css",
|
15519
15514
|
"inputs": {
|
15520
15515
|
"src/Prebuilt/layouts/HLSView.jsx": {
|
15521
15516
|
"bytesInOutput": 27671
|
@@ -15574,13 +15569,13 @@
|
|
15574
15569
|
},
|
15575
15570
|
"bytes": 61702
|
15576
15571
|
},
|
15577
|
-
"dist/chunk-
|
15572
|
+
"dist/chunk-Y4ZC5NAS.js.map": {
|
15578
15573
|
"imports": [],
|
15579
15574
|
"exports": [],
|
15580
15575
|
"inputs": {},
|
15581
|
-
"bytes":
|
15576
|
+
"bytes": 3487199
|
15582
15577
|
},
|
15583
|
-
"dist/chunk-
|
15578
|
+
"dist/chunk-Y4ZC5NAS.js": {
|
15584
15579
|
"imports": [
|
15585
15580
|
{
|
15586
15581
|
"path": "react",
|
@@ -18108,7 +18103,7 @@
|
|
18108
18103
|
"external": true
|
18109
18104
|
},
|
18110
18105
|
{
|
18111
|
-
"path": "dist/HLSView-
|
18106
|
+
"path": "dist/HLSView-42EL65Z3.js",
|
18112
18107
|
"kind": "dynamic-import"
|
18113
18108
|
},
|
18114
18109
|
{
|
@@ -18707,7 +18702,7 @@
|
|
18707
18702
|
],
|
18708
18703
|
"inputs": {
|
18709
18704
|
"<define:process.env>": {
|
18710
|
-
"bytesInOutput":
|
18705
|
+
"bytesInOutput": 17968
|
18711
18706
|
},
|
18712
18707
|
"../../node_modules/lodash/lodash.js": {
|
18713
18708
|
"bytesInOutput": 224289
|
@@ -19241,7 +19236,7 @@
|
|
19241
19236
|
"bytesInOutput": 9486
|
19242
19237
|
},
|
19243
19238
|
"../hms-video-store/dist/index.js": {
|
19244
|
-
"bytesInOutput":
|
19239
|
+
"bytesInOutput": 50318
|
19245
19240
|
},
|
19246
19241
|
"../../node_modules/reselect/es/index.js": {
|
19247
19242
|
"bytesInOutput": 2539
|
@@ -19331,7 +19326,7 @@
|
|
19331
19326
|
"bytesInOutput": 823
|
19332
19327
|
},
|
19333
19328
|
"src/Prebuilt/components/VirtualBackground/VBToggle.tsx": {
|
19334
|
-
"bytesInOutput":
|
19329
|
+
"bytesInOutput": 1280
|
19335
19330
|
},
|
19336
19331
|
"src/Prebuilt/components/Footer/ChatToggle.tsx": {
|
19337
19332
|
"bytesInOutput": 1564
|
@@ -19376,7 +19371,7 @@
|
|
19376
19371
|
"bytesInOutput": 3077
|
19377
19372
|
},
|
19378
19373
|
"src/Prebuilt/components/Preview/PreviewJoin.tsx": {
|
19379
|
-
"bytesInOutput":
|
19374
|
+
"bytesInOutput": 10093
|
19380
19375
|
},
|
19381
19376
|
"src/Prebuilt/layouts/SidePane.tsx": {
|
19382
19377
|
"bytesInOutput": 6436
|
@@ -19523,7 +19518,7 @@
|
|
19523
19518
|
"bytesInOutput": 1050
|
19524
19519
|
},
|
19525
19520
|
"src/Prebuilt/components/VirtualBackground/VBPicker.tsx": {
|
19526
|
-
"bytesInOutput":
|
19521
|
+
"bytesInOutput": 7926
|
19527
19522
|
},
|
19528
19523
|
"src/Prebuilt/components/VirtualBackground/VBCollection.tsx": {
|
19529
19524
|
"bytesInOutput": 1157
|
@@ -19600,7 +19595,7 @@
|
|
19600
19595
|
"src/Prebuilt/components/VideoLayouts/WhiteboardLayout.tsx": {
|
19601
19596
|
"bytesInOutput": 2830
|
19602
19597
|
},
|
19603
|
-
"../../../../../../../tmp/tmp-
|
19598
|
+
"../../../../../../../tmp/tmp-2805-53IzBWEMg269/19122804f1c0/index.css": {
|
19604
19599
|
"bytesInOutput": 0
|
19605
19600
|
},
|
19606
19601
|
"src/Prebuilt/common/PeersSorter.ts": {
|
@@ -19676,7 +19671,7 @@
|
|
19676
19671
|
"bytesInOutput": 1983
|
19677
19672
|
},
|
19678
19673
|
"src/Prebuilt/components/Toast/ToastConfig.jsx": {
|
19679
|
-
"bytesInOutput":
|
19674
|
+
"bytesInOutput": 6443
|
19680
19675
|
},
|
19681
19676
|
"src/Prebuilt/components/Notifications/InitErrorModal.tsx": {
|
19682
19677
|
"bytesInOutput": 1596
|
@@ -19694,7 +19689,7 @@
|
|
19694
19689
|
"bytesInOutput": 11963
|
19695
19690
|
},
|
19696
19691
|
"src/Prebuilt/components/Notifications/ReconnectNotifications.tsx": {
|
19697
|
-
"bytesInOutput":
|
19692
|
+
"bytesInOutput": 1243
|
19698
19693
|
},
|
19699
19694
|
"src/Prebuilt/components/Notifications/TrackBulkUnmuteModal.tsx": {
|
19700
19695
|
"bytesInOutput": 1867
|
@@ -19766,7 +19761,7 @@
|
|
19766
19761
|
"bytesInOutput": 2632
|
19767
19762
|
}
|
19768
19763
|
},
|
19769
|
-
"bytes":
|
19764
|
+
"bytes": 1445615
|
19770
19765
|
},
|
19771
19766
|
"dist/index.css.map": {
|
19772
19767
|
"imports": [],
|
@@ -19828,22 +19823,22 @@
|
|
19828
19823
|
}
|
19829
19824
|
],
|
19830
19825
|
"inputs": {
|
19831
|
-
"../../../../../../../tmp/tmp-
|
19826
|
+
"../../../../../../../tmp/tmp-2805-53IzBWEMg269/19122804f952/tldraw.css": {
|
19832
19827
|
"bytesInOutput": 75223
|
19833
19828
|
},
|
19834
|
-
"../../../../../../../tmp/tmp-
|
19829
|
+
"../../../../../../../tmp/tmp-2805-53IzBWEMg269/19122804f1c0/index.css": {
|
19835
19830
|
"bytesInOutput": 401
|
19836
19831
|
}
|
19837
19832
|
},
|
19838
19833
|
"bytes": 75901
|
19839
19834
|
},
|
19840
|
-
"dist/HLSView-
|
19835
|
+
"dist/HLSView-7NVZOZKG.css.map": {
|
19841
19836
|
"imports": [],
|
19842
19837
|
"exports": [],
|
19843
19838
|
"inputs": {},
|
19844
19839
|
"bytes": 122402
|
19845
19840
|
},
|
19846
|
-
"dist/HLSView-
|
19841
|
+
"dist/HLSView-7NVZOZKG.css": {
|
19847
19842
|
"imports": [
|
19848
19843
|
{
|
19849
19844
|
"path": "https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap",
|
@@ -19897,10 +19892,10 @@
|
|
19897
19892
|
}
|
19898
19893
|
],
|
19899
19894
|
"inputs": {
|
19900
|
-
"../../../../../../../tmp/tmp-
|
19895
|
+
"../../../../../../../tmp/tmp-2805-53IzBWEMg269/19122804f952/tldraw.css": {
|
19901
19896
|
"bytesInOutput": 75223
|
19902
19897
|
},
|
19903
|
-
"../../../../../../../tmp/tmp-
|
19898
|
+
"../../../../../../../tmp/tmp-2805-53IzBWEMg269/19122804f1c0/index.css": {
|
19904
19899
|
"bytesInOutput": 401
|
19905
19900
|
}
|
19906
19901
|
},
|
package/package.json
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
"prebuilt",
|
11
11
|
"roomkit"
|
12
12
|
],
|
13
|
-
"version": "0.3.17-alpha.
|
13
|
+
"version": "0.3.17-alpha.11",
|
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.17-alpha.
|
78
|
+
"@100mslive/hls-player": "0.3.17-alpha.11",
|
79
79
|
"@100mslive/hms-noise-cancellation": "0.0.1",
|
80
|
-
"@100mslive/hms-virtual-background": "1.13.17-alpha.
|
81
|
-
"@100mslive/hms-whiteboard": "0.0.7-alpha.
|
82
|
-
"@100mslive/react-icons": "0.10.17-alpha.
|
83
|
-
"@100mslive/react-sdk": "0.10.17-alpha.
|
80
|
+
"@100mslive/hms-virtual-background": "1.13.17-alpha.11",
|
81
|
+
"@100mslive/hms-whiteboard": "0.0.7-alpha.11",
|
82
|
+
"@100mslive/react-icons": "0.10.17-alpha.11",
|
83
|
+
"@100mslive/react-sdk": "0.10.17-alpha.11",
|
84
84
|
"@100mslive/types-prebuilt": "0.12.11",
|
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": "7d0349d2bb115d00c57dc2fcac070126c245bcb0"
|
121
121
|
}
|
@@ -1,6 +1,5 @@
|
|
1
|
-
import
|
1
|
+
import { useEffect, useRef } from 'react';
|
2
2
|
import { HMSNotificationTypes, useHMSNotifications } from '@100mslive/react-sdk';
|
3
|
-
import { Dialog, Flex, Loading, Text } from '../../..';
|
4
3
|
// @ts-ignore: No implicit Any
|
5
4
|
import { ToastConfig } from '../Toast/ToastConfig';
|
6
5
|
// @ts-ignore: No implicit Any
|
@@ -15,50 +14,24 @@ let notificationId: string | null = null;
|
|
15
14
|
|
16
15
|
export const ReconnectNotifications = () => {
|
17
16
|
const notification = useHMSNotifications(notificationTypes);
|
18
|
-
const
|
17
|
+
const prevErrorCode = useRef(0);
|
19
18
|
useEffect(() => {
|
20
19
|
if (!notification) {
|
21
20
|
return;
|
22
21
|
}
|
23
|
-
if (notification.type === HMSNotificationTypes.
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
22
|
+
if (notification.type === HMSNotificationTypes.RECONNECTED) {
|
23
|
+
notificationId = ToastManager.replaceToast(
|
24
|
+
notificationId,
|
25
|
+
ToastConfig.RECONNECTED.single([4005, 4006].includes(prevErrorCode.current)),
|
26
|
+
);
|
28
27
|
} else if (notification.type === HMSNotificationTypes.RECONNECTING) {
|
28
|
+
prevErrorCode.current = notification.data?.code || 0;
|
29
29
|
notificationId = ToastManager.replaceToast(
|
30
30
|
notificationId,
|
31
31
|
ToastConfig.RECONNECTING.single(notification.data?.message),
|
32
32
|
);
|
33
33
|
}
|
34
34
|
}, [notification]);
|
35
|
-
|
36
|
-
return
|
37
|
-
<Dialog.Root open={open} modal={true}>
|
38
|
-
<Dialog.Portal container={document.getElementById('conferencing')}>
|
39
|
-
<Dialog.Overlay />
|
40
|
-
<Dialog.Content
|
41
|
-
css={{
|
42
|
-
width: 'fit-content',
|
43
|
-
maxWidth: '80%',
|
44
|
-
p: '$4 $8',
|
45
|
-
position: 'relative',
|
46
|
-
top: 'unset',
|
47
|
-
bottom: '$9',
|
48
|
-
transform: 'translate(-50%, -100%)',
|
49
|
-
animation: 'none !important',
|
50
|
-
}}
|
51
|
-
>
|
52
|
-
<Flex align="center">
|
53
|
-
<div style={{ display: 'inline', margin: '0.25rem' }}>
|
54
|
-
<Loading size={16} />
|
55
|
-
</div>
|
56
|
-
<Text css={{ fontSize: '$space$8', color: '$on_surface_high' }}>
|
57
|
-
You lost your network connection. Trying to reconnect.
|
58
|
-
</Text>
|
59
|
-
</Flex>
|
60
|
-
</Dialog.Content>
|
61
|
-
</Dialog.Portal>
|
62
|
-
</Dialog.Root>
|
63
|
-
);
|
35
|
+
|
36
|
+
return null;
|
64
37
|
};
|
@@ -4,6 +4,7 @@ import {
|
|
4
4
|
HMSRoomState,
|
5
5
|
selectAppData,
|
6
6
|
selectIsLocalVideoEnabled,
|
7
|
+
selectIsVBEnabled,
|
7
8
|
selectLocalPeer,
|
8
9
|
selectRoomState,
|
9
10
|
selectVideoTrackByID,
|
@@ -253,6 +254,7 @@ export const PreviewTile = ({ name, error }: { name: string; error?: boolean })
|
|
253
254
|
|
254
255
|
export const PreviewControls = ({ hideSettings, vbEnabled }: { hideSettings: boolean; vbEnabled: boolean }) => {
|
255
256
|
const isMobile = useMedia(cssConfig.media.md);
|
257
|
+
const isVBEnabledForUser = useHMSStore(selectIsVBEnabled);
|
256
258
|
return (
|
257
259
|
<Flex
|
258
260
|
justify={hideSettings && isMobile ? 'center' : 'between'}
|
@@ -263,7 +265,7 @@ export const PreviewControls = ({ hideSettings, vbEnabled }: { hideSettings: boo
|
|
263
265
|
>
|
264
266
|
<Flex css={{ gap: '$4' }}>
|
265
267
|
<AudioVideoToggle />
|
266
|
-
{vbEnabled ? <VBToggle /> : null}
|
268
|
+
{vbEnabled && isVBEnabledForUser ? <VBToggle /> : null}
|
267
269
|
</Flex>
|
268
270
|
<Flex align="center" gap="1">
|
269
271
|
{isMobile && <NoiseCancellation iconOnly />}
|
@@ -153,9 +153,9 @@ export const ToastConfig = {
|
|
153
153
|
},
|
154
154
|
},
|
155
155
|
RECONNECTED: {
|
156
|
-
single:
|
156
|
+
single: online => {
|
157
157
|
return {
|
158
|
-
title: `You are now connected`,
|
158
|
+
title: `You are now ${online ? 'online' : 'connected'}`,
|
159
159
|
icon: <ConnectivityIcon />,
|
160
160
|
variant: 'success',
|
161
161
|
duration: 3000,
|
@@ -1,8 +1,7 @@
|
|
1
1
|
import { HMSEffectsPlugin, HMSVBPlugin, HMSVirtualBackgroundTypes } from '@100mslive/hms-virtual-background';
|
2
|
-
|
3
2
|
export class VBPlugin {
|
4
3
|
private hmsPlugin?: HMSVBPlugin;
|
5
|
-
private effectsPlugin?: HMSEffectsPlugin
|
4
|
+
private effectsPlugin?: HMSEffectsPlugin;
|
6
5
|
|
7
6
|
initialisePlugin = (effectsSDKKey?: string, onInit?: () => void) => {
|
8
7
|
if (this.getVBObject()) {
|
@@ -61,7 +61,8 @@ export const VBPicker = ({ backgroundMedia = [] }: { backgroundMedia: VirtualBac
|
|
61
61
|
if (!track?.id) {
|
62
62
|
return;
|
63
63
|
}
|
64
|
-
|
64
|
+
const vbObject = VBHandler.getVBObject();
|
65
|
+
if (!isPluginAdded && !vbObject) {
|
65
66
|
setLoadingEffects(true);
|
66
67
|
let vbObject = VBHandler.getVBObject();
|
67
68
|
if (!vbObject) {
|
@@ -1,5 +1,11 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import {
|
2
|
+
import {
|
3
|
+
selectAppData,
|
4
|
+
selectIsEffectsEnabled,
|
5
|
+
selectIsLocalVideoEnabled,
|
6
|
+
selectIsVBEnabled,
|
7
|
+
useHMSStore,
|
8
|
+
} from '@100mslive/react-sdk';
|
3
9
|
import { VirtualBackgroundIcon } from '@100mslive/react-icons';
|
4
10
|
import { Loading } from '../../../Loading';
|
5
11
|
import { Tooltip } from '../../../Tooltip';
|
@@ -12,10 +18,11 @@ export const VBToggle = () => {
|
|
12
18
|
const toggleVB = useSidepaneToggle(SIDE_PANE_OPTIONS.VB);
|
13
19
|
const isVBOpen = useIsSidepaneTypeOpen(SIDE_PANE_OPTIONS.VB);
|
14
20
|
const isVideoOn = useHMSStore(selectIsLocalVideoEnabled);
|
21
|
+
const isVBEnabled = useHMSStore(selectIsVBEnabled);
|
15
22
|
const isEffectsEnabled = useHMSStore(selectIsEffectsEnabled);
|
16
23
|
const loadingEffects = useHMSStore(selectAppData(APP_DATA.loadingEffects));
|
17
24
|
|
18
|
-
if (!isVideoOn || (!isEffectsEnabled && isSafari)) {
|
25
|
+
if (!isVideoOn || (!isEffectsEnabled && isSafari) || !isVBEnabled) {
|
19
26
|
return null;
|
20
27
|
}
|
21
28
|
|
File without changes
|