@100mslive/roomkit-react 0.3.12-alpha.6 → 0.3.12-alpha.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -26,7 +26,7 @@
26
26
  "format": "esm"
27
27
  },
28
28
  "src/Prebuilt/common/constants.ts": {
29
- "bytes": 4521,
29
+ "bytes": 4563,
30
30
  "imports": [
31
31
  {
32
32
  "path": "@100mslive/react-sdk",
@@ -1997,7 +1997,7 @@
1997
1997
  "format": "esm"
1998
1998
  },
1999
1999
  "src/Prebuilt/components/AppData/useUISettings.js": {
2000
- "bytes": 6214,
2000
+ "bytes": 6649,
2001
2001
  "imports": [
2002
2002
  {
2003
2003
  "path": "react",
@@ -2277,7 +2277,7 @@
2277
2277
  "format": "esm"
2278
2278
  },
2279
2279
  "src/Prebuilt/components/AppData/AppData.tsx": {
2280
- "bytes": 5935,
2280
+ "bytes": 6297,
2281
2281
  "imports": [
2282
2282
  {
2283
2283
  "path": "react",
@@ -2850,7 +2850,7 @@
2850
2850
  "format": "esm"
2851
2851
  },
2852
2852
  "src/Prebuilt/components/AudioVideoToggle.tsx": {
2853
- "bytes": 9981,
2853
+ "bytes": 10776,
2854
2854
  "imports": [
2855
2855
  {
2856
2856
  "path": "react",
@@ -2922,6 +2922,11 @@
2922
2922
  "kind": "import-statement",
2923
2923
  "original": "../provider/roomLayoutProvider/hooks/useRoomLayoutScreen"
2924
2924
  },
2925
+ {
2926
+ "path": "src/Prebuilt/components/AppData/useUISettings.js",
2927
+ "kind": "import-statement",
2928
+ "original": "./AppData/useUISettings"
2929
+ },
2925
2930
  {
2926
2931
  "path": "src/Prebuilt/components/hooks/useAudioOutputTest.tsx",
2927
2932
  "kind": "import-statement",
@@ -4104,7 +4109,7 @@
4104
4109
  "format": "esm"
4105
4110
  },
4106
4111
  "src/Prebuilt/components/MoreSettings/CaptionContent.tsx": {
4107
- "bytes": 5144,
4112
+ "bytes": 5092,
4108
4113
  "imports": [
4109
4114
  {
4110
4115
  "path": "react",
@@ -4890,7 +4895,7 @@
4890
4895
  "format": "cjs"
4891
4896
  },
4892
4897
  "../hms-video-store/dist/index.js": {
4893
- "bytes": 338200,
4898
+ "bytes": 339294,
4894
4899
  "imports": [
4895
4900
  {
4896
4901
  "path": "../../node_modules/reselect/es/index.js",
@@ -6769,7 +6774,7 @@
6769
6774
  "format": "esm"
6770
6775
  },
6771
6776
  "src/Prebuilt/components/Streaming/Common.jsx": {
6772
- "bytes": 3964,
6777
+ "bytes": 4034,
6773
6778
  "imports": [
6774
6779
  {
6775
6780
  "path": "react",
@@ -7672,7 +7677,7 @@
7672
7677
  "format": "esm"
7673
7678
  },
7674
7679
  "src/Prebuilt/components/Polls/Voting/Voting.tsx": {
7675
- "bytes": 4882,
7680
+ "bytes": 4997,
7676
7681
  "imports": [
7677
7682
  {
7678
7683
  "path": "react",
@@ -10944,7 +10949,7 @@
10944
10949
  ],
10945
10950
  "format": "esm"
10946
10951
  },
10947
- "../../../../../../../tmp/tmp-2793-a6gjtBKG4S8Y/18fc8f99d903/tldraw.css": {
10952
+ "../../../../../../../tmp/tmp-2865-72GpbFdCqbPU/190067560cf2/tldraw.css": {
10948
10953
  "bytes": 80111,
10949
10954
  "imports": [
10950
10955
  {
@@ -10994,7 +10999,7 @@
10994
10999
  }
10995
11000
  ]
10996
11001
  },
10997
- "../../../../../../../tmp/tmp-2793-a6gjtBKG4S8Y/18fc8f99d8d2/index.css": {
11002
+ "../../../../../../../tmp/tmp-2865-72GpbFdCqbPU/190067560610/index.css": {
10998
11003
  "bytes": 597,
10999
11004
  "imports": [
11000
11005
  {
@@ -11003,7 +11008,7 @@
11003
11008
  "external": true
11004
11009
  },
11005
11010
  {
11006
- "path": "../../../../../../../tmp/tmp-2793-a6gjtBKG4S8Y/18fc8f99d903/tldraw.css",
11011
+ "path": "../../../../../../../tmp/tmp-2865-72GpbFdCqbPU/190067560cf2/tldraw.css",
11007
11012
  "kind": "import-rule",
11008
11013
  "original": "@tldraw/tldraw/tldraw.css"
11009
11014
  }
@@ -11078,7 +11083,7 @@
11078
11083
  "original": "../../common/constants"
11079
11084
  },
11080
11085
  {
11081
- "path": "../../../../../../../tmp/tmp-2793-a6gjtBKG4S8Y/18fc8f99d8d2/index.css",
11086
+ "path": "../../../../../../../tmp/tmp-2865-72GpbFdCqbPU/190067560610/index.css",
11082
11087
  "kind": "import-statement",
11083
11088
  "original": "@100mslive/hms-whiteboard/index.css"
11084
11089
  },
@@ -11275,13 +11280,18 @@
11275
11280
  "format": "esm"
11276
11281
  },
11277
11282
  "src/Prebuilt/plugins/CaptionsViewer.tsx": {
11278
- "bytes": 7075,
11283
+ "bytes": 7363,
11279
11284
  "imports": [
11280
11285
  {
11281
11286
  "path": "react",
11282
11287
  "kind": "import-statement",
11283
11288
  "external": true
11284
11289
  },
11290
+ {
11291
+ "path": "react-draggable",
11292
+ "kind": "import-statement",
11293
+ "external": true
11294
+ },
11285
11295
  {
11286
11296
  "path": "react-use",
11287
11297
  "kind": "import-statement",
@@ -13356,7 +13366,7 @@
13356
13366
  "format": "esm"
13357
13367
  },
13358
13368
  "src/Prebuilt/components/Notifications/Notifications.tsx": {
13359
- "bytes": 8003,
13369
+ "bytes": 8034,
13360
13370
  "imports": [
13361
13371
  {
13362
13372
  "path": "react",
@@ -14302,7 +14312,7 @@
14302
14312
  "dist/index.js": {
14303
14313
  "imports": [
14304
14314
  {
14305
- "path": "dist/chunk-FQVXDJIG.js",
14315
+ "path": "dist/chunk-E2EX6WG2.js",
14306
14316
  "kind": "import-statement"
14307
14317
  }
14308
14318
  ],
@@ -14376,16 +14386,16 @@
14376
14386
  "inputs": {},
14377
14387
  "bytes": 1822
14378
14388
  },
14379
- "dist/HLSView-K5XFYK3X.js.map": {
14389
+ "dist/HLSView-HM5WEBLW.js.map": {
14380
14390
  "imports": [],
14381
14391
  "exports": [],
14382
14392
  "inputs": {},
14383
14393
  "bytes": 100275
14384
14394
  },
14385
- "dist/HLSView-K5XFYK3X.js": {
14395
+ "dist/HLSView-HM5WEBLW.js": {
14386
14396
  "imports": [
14387
14397
  {
14388
- "path": "dist/chunk-FQVXDJIG.js",
14398
+ "path": "dist/chunk-E2EX6WG2.js",
14389
14399
  "kind": "import-statement"
14390
14400
  },
14391
14401
  {
@@ -14563,7 +14573,7 @@
14563
14573
  "default"
14564
14574
  ],
14565
14575
  "entryPoint": "src/Prebuilt/layouts/HLSView.jsx",
14566
- "cssBundle": "dist/HLSView-KCRIRMQE.css",
14576
+ "cssBundle": "dist/HLSView-YERRDOU3.css",
14567
14577
  "inputs": {
14568
14578
  "src/Prebuilt/layouts/HLSView.jsx": {
14569
14579
  "bytesInOutput": 27671
@@ -14622,13 +14632,13 @@
14622
14632
  },
14623
14633
  "bytes": 61702
14624
14634
  },
14625
- "dist/chunk-FQVXDJIG.js.map": {
14635
+ "dist/chunk-E2EX6WG2.js.map": {
14626
14636
  "imports": [],
14627
14637
  "exports": [],
14628
14638
  "inputs": {},
14629
- "bytes": 3271831
14639
+ "bytes": 3277660
14630
14640
  },
14631
- "dist/chunk-FQVXDJIG.js": {
14641
+ "dist/chunk-E2EX6WG2.js": {
14632
14642
  "imports": [
14633
14643
  {
14634
14644
  "path": "react",
@@ -17080,6 +17090,11 @@
17080
17090
  "kind": "import-statement",
17081
17091
  "external": true
17082
17092
  },
17093
+ {
17094
+ "path": "react-draggable",
17095
+ "kind": "import-statement",
17096
+ "external": true
17097
+ },
17083
17098
  {
17084
17099
  "path": "react-use",
17085
17100
  "kind": "import-statement",
@@ -17101,7 +17116,7 @@
17101
17116
  "external": true
17102
17117
  },
17103
17118
  {
17104
- "path": "dist/HLSView-K5XFYK3X.js",
17119
+ "path": "dist/HLSView-HM5WEBLW.js",
17105
17120
  "kind": "dynamic-import"
17106
17121
  },
17107
17122
  {
@@ -17603,7 +17618,7 @@
17603
17618
  ],
17604
17619
  "inputs": {
17605
17620
  "<define:process.env>": {
17606
- "bytesInOutput": 17998
17621
+ "bytesInOutput": 17883
17607
17622
  },
17608
17623
  "../../node_modules/lodash/lodash.js": {
17609
17624
  "bytesInOutput": 224310
@@ -17651,7 +17666,7 @@
17651
17666
  "bytesInOutput": 5061
17652
17667
  },
17653
17668
  "src/Prebuilt/common/constants.ts": {
17654
- "bytesInOutput": 3571
17669
+ "bytesInOutput": 3613
17655
17670
  },
17656
17671
  "src/Theme/ThemeProvider.tsx": {
17657
17672
  "bytesInOutput": 1926
@@ -17861,7 +17876,7 @@
17861
17876
  "bytesInOutput": 7828
17862
17877
  },
17863
17878
  "src/Prebuilt/components/AppData/AppData.tsx": {
17864
- "bytesInOutput": 5542
17879
+ "bytesInOutput": 6004
17865
17880
  },
17866
17881
  "src/Prebuilt/components/Settings/LayoutSettings.tsx": {
17867
17882
  "bytesInOutput": 2705
@@ -17870,7 +17885,7 @@
17870
17885
  "bytesInOutput": 973
17871
17886
  },
17872
17887
  "src/Prebuilt/components/AppData/useUISettings.js": {
17873
- "bytesInOutput": 5454
17888
+ "bytesInOutput": 5870
17874
17889
  },
17875
17890
  "src/Prebuilt/components/hooks/useUserPreferences.jsx": {
17876
17891
  "bytesInOutput": 748
@@ -17912,7 +17927,7 @@
17912
17927
  "bytesInOutput": 3306
17913
17928
  },
17914
17929
  "src/Prebuilt/components/AudioVideoToggle.tsx": {
17915
- "bytesInOutput": 10280
17930
+ "bytesInOutput": 11007
17916
17931
  },
17917
17932
  "src/Prebuilt/components/IconButtonWithOptions/IconButtonWithOptions.tsx": {
17918
17933
  "bytesInOutput": 3173
@@ -18026,7 +18041,7 @@
18026
18041
  "bytesInOutput": 1015
18027
18042
  },
18028
18043
  "src/Prebuilt/components/MoreSettings/CaptionContent.tsx": {
18029
- "bytesInOutput": 5033
18044
+ "bytesInOutput": 4981
18030
18045
  },
18031
18046
  "src/Prebuilt/components/MoreSettings/FullScreenItem.tsx": {
18032
18047
  "bytesInOutput": 628
@@ -18206,7 +18221,7 @@
18206
18221
  "bytesInOutput": 8166
18207
18222
  },
18208
18223
  "src/Prebuilt/components/Streaming/Common.jsx": {
18209
- "bytesInOutput": 2247
18224
+ "bytesInOutput": 2317
18210
18225
  },
18211
18226
  "src/Prebuilt/components/Polls/common/StatusIndicator.tsx": {
18212
18227
  "bytesInOutput": 795
@@ -18260,7 +18275,7 @@
18260
18275
  "bytesInOutput": 1874
18261
18276
  },
18262
18277
  "src/Prebuilt/components/Polls/Voting/Voting.tsx": {
18263
- "bytesInOutput": 5037
18278
+ "bytesInOutput": 5206
18264
18279
  },
18265
18280
  "src/Prebuilt/components/Polls/Voting/StandardVoting.tsx": {
18266
18281
  "bytesInOutput": 1304
@@ -18290,7 +18305,7 @@
18290
18305
  "bytesInOutput": 5649
18291
18306
  },
18292
18307
  "src/Prebuilt/components/Chat/ChatBody.tsx": {
18293
- "bytesInOutput": 14744
18308
+ "bytesInOutput": 14742
18294
18309
  },
18295
18310
  "src/Prebuilt/components/Chat/ChatActions.tsx": {
18296
18311
  "bytesInOutput": 9785
@@ -18419,7 +18434,7 @@
18419
18434
  "bytesInOutput": 3834
18420
18435
  },
18421
18436
  "src/Prebuilt/components/VideoLayouts/RoleProminence.tsx": {
18422
- "bytesInOutput": 2181
18437
+ "bytesInOutput": 2183
18423
18438
  },
18424
18439
  "src/Prebuilt/components/SecondaryTiles.tsx": {
18425
18440
  "bytesInOutput": 2706
@@ -18445,7 +18460,7 @@
18445
18460
  "src/Prebuilt/components/VideoLayouts/WhiteboardLayout.tsx": {
18446
18461
  "bytesInOutput": 2793
18447
18462
  },
18448
- "../../../../../../../tmp/tmp-2793-a6gjtBKG4S8Y/18fc8f99d8d2/index.css": {
18463
+ "../../../../../../../tmp/tmp-2865-72GpbFdCqbPU/190067560610/index.css": {
18449
18464
  "bytesInOutput": 0
18450
18465
  },
18451
18466
  "src/Prebuilt/common/PeersSorter.ts": {
@@ -18458,7 +18473,7 @@
18458
18473
  "bytesInOutput": 1536
18459
18474
  },
18460
18475
  "src/Prebuilt/plugins/CaptionsViewer.tsx": {
18461
- "bytesInOutput": 6381
18476
+ "bytesInOutput": 6631
18462
18477
  },
18463
18478
  "src/Prebuilt/components/hooks/useCloseScreenshareWhiteboard.tsx": {
18464
18479
  "bytesInOutput": 619
@@ -18506,7 +18521,7 @@
18506
18521
  "bytesInOutput": 27
18507
18522
  },
18508
18523
  "src/Prebuilt/components/Notifications/Notifications.tsx": {
18509
- "bytesInOutput": 8048
18524
+ "bytesInOutput": 8113
18510
18525
  },
18511
18526
  "src/Prebuilt/components/Notifications/AutoplayBlockedModal.tsx": {
18512
18527
  "bytesInOutput": 1053
@@ -18587,7 +18602,7 @@
18587
18602
  "bytesInOutput": 651
18588
18603
  }
18589
18604
  },
18590
- "bytes": 1342649
18605
+ "bytes": 1344683
18591
18606
  },
18592
18607
  "dist/index.css.map": {
18593
18608
  "imports": [],
@@ -18649,22 +18664,22 @@
18649
18664
  }
18650
18665
  ],
18651
18666
  "inputs": {
18652
- "../../../../../../../tmp/tmp-2793-a6gjtBKG4S8Y/18fc8f99d903/tldraw.css": {
18667
+ "../../../../../../../tmp/tmp-2865-72GpbFdCqbPU/190067560cf2/tldraw.css": {
18653
18668
  "bytesInOutput": 75223
18654
18669
  },
18655
- "../../../../../../../tmp/tmp-2793-a6gjtBKG4S8Y/18fc8f99d8d2/index.css": {
18670
+ "../../../../../../../tmp/tmp-2865-72GpbFdCqbPU/190067560610/index.css": {
18656
18671
  "bytesInOutput": 401
18657
18672
  }
18658
18673
  },
18659
18674
  "bytes": 75901
18660
18675
  },
18661
- "dist/HLSView-KCRIRMQE.css.map": {
18676
+ "dist/HLSView-YERRDOU3.css.map": {
18662
18677
  "imports": [],
18663
18678
  "exports": [],
18664
18679
  "inputs": {},
18665
18680
  "bytes": 122402
18666
18681
  },
18667
- "dist/HLSView-KCRIRMQE.css": {
18682
+ "dist/HLSView-YERRDOU3.css": {
18668
18683
  "imports": [
18669
18684
  {
18670
18685
  "path": "https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap",
@@ -18718,10 +18733,10 @@
18718
18733
  }
18719
18734
  ],
18720
18735
  "inputs": {
18721
- "../../../../../../../tmp/tmp-2793-a6gjtBKG4S8Y/18fc8f99d903/tldraw.css": {
18736
+ "../../../../../../../tmp/tmp-2865-72GpbFdCqbPU/190067560cf2/tldraw.css": {
18722
18737
  "bytesInOutput": 75223
18723
18738
  },
18724
- "../../../../../../../tmp/tmp-2793-a6gjtBKG4S8Y/18fc8f99d8d2/index.css": {
18739
+ "../../../../../../../tmp/tmp-2865-72GpbFdCqbPU/190067560610/index.css": {
18725
18740
  "bytesInOutput": 401
18726
18741
  }
18727
18742
  },
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "prebuilt",
11
11
  "roomkit"
12
12
  ],
13
- "version": "0.3.12-alpha.6",
13
+ "version": "0.3.12-alpha.8",
14
14
  "author": "100ms",
15
15
  "license": "MIT",
16
16
  "repository": {
@@ -74,13 +74,13 @@
74
74
  "react": ">=17.0.2 <19.0.0"
75
75
  },
76
76
  "dependencies": {
77
- "@100mslive/hls-player": "0.3.12-alpha.6",
77
+ "@100mslive/hls-player": "0.3.12-alpha.8",
78
78
  "@100mslive/hms-noise-cancellation": "0.0.1",
79
- "@100mslive/hms-virtual-background": "1.13.12-alpha.6",
80
- "@100mslive/hms-whiteboard": "0.0.2-alpha.6",
81
- "@100mslive/react-icons": "0.10.12-alpha.6",
82
- "@100mslive/react-sdk": "0.10.12-alpha.6",
83
- "@100mslive/types-prebuilt": "0.12.8",
79
+ "@100mslive/hms-virtual-background": "1.13.12-alpha.8",
80
+ "@100mslive/hms-whiteboard": "0.0.2-alpha.8",
81
+ "@100mslive/react-icons": "0.10.12-alpha.8",
82
+ "@100mslive/react-sdk": "0.10.12-alpha.8",
83
+ "@100mslive/types-prebuilt": "0.12.9",
84
84
  "@emoji-mart/data": "^1.0.6",
85
85
  "@emoji-mart/react": "^1.0.1",
86
86
  "@radix-ui/react-accordion": "1.0.0",
@@ -115,5 +115,5 @@
115
115
  "uuid": "^8.3.2",
116
116
  "worker-timers": "^7.0.40"
117
117
  },
118
- "gitHead": "b056278ac61c5f0c04ed2c7c72ca84574ceac05c"
118
+ "gitHead": "e7d64aa51c443d954396dde339867efe572c0982"
119
119
  }
@@ -47,6 +47,7 @@ export const APP_DATA = {
47
47
  sheet: 'sheet',
48
48
  caption: 'caption',
49
49
  loadingEffects: 'loadingEffects',
50
+ noiseCancellation: 'noiseCancellation',
50
51
  };
51
52
 
52
53
  export const UI_SETTINGS = {
@@ -17,7 +17,7 @@ import { UserPreferencesKeys, useUserPreferences } from '../hooks/useUserPrefere
17
17
  // @ts-ignore
18
18
  import { useIsSidepaneTypeOpen, useSidepaneToggle } from './useSidepane';
19
19
  // @ts-ignore
20
- import { useSetAppDataByKey } from './useUISettings';
20
+ import { useSetAppDataByKey, useSetNoiseCancellationEnabled } from './useUISettings';
21
21
  import {
22
22
  APP_DATA,
23
23
  CHAT_SELECTOR,
@@ -68,6 +68,7 @@ const initialAppData = {
68
68
  },
69
69
  // by default on because of on demand now, for beam disabled
70
70
  [APP_DATA.caption]: false,
71
+ [APP_DATA.noiseCancellation]: false,
71
72
  };
72
73
 
73
74
  export const AppData = React.memo(() => {
@@ -78,6 +79,13 @@ export const AppData = React.memo(() => {
78
79
  const toggleVB = useSidepaneToggle(SIDE_PANE_OPTIONS.VB);
79
80
  const { isLocalVideoEnabled } = useAVToggle();
80
81
  const sidepaneOpenedRef = useRef(false);
82
+ const [, setNoiseCancellationEnabled] = useSetNoiseCancellationEnabled();
83
+
84
+ useEffect(() => {
85
+ if (elements?.noise_cancellation?.enabled_by_default) {
86
+ setNoiseCancellationEnabled(true);
87
+ }
88
+ }, [elements?.noise_cancellation?.enabled_by_default, setNoiseCancellationEnabled]);
81
89
 
82
90
  const defaultMediaURL = useMemo(() => {
83
91
  const media = elements?.virtual_background?.background_media || [];
@@ -201,3 +201,13 @@ export const usePollViewState = () => {
201
201
  view: pollState?.view,
202
202
  };
203
203
  };
204
+
205
+ export const useIsNoiseCancellationEnabled = () => {
206
+ const IsNoiseCancellationEnabled = useHMSStore(selectAppDataByPath(APP_DATA.noiseCancellation));
207
+ return IsNoiseCancellationEnabled;
208
+ };
209
+
210
+ export const useSetNoiseCancellationEnabled = () => {
211
+ const [isNoiseCancellationEnabled, setNoiseCancellationEnabled] = useSetAppDataByKey(APP_DATA.noiseCancellation);
212
+ return [isNoiseCancellationEnabled, setNoiseCancellationEnabled];
213
+ };
@@ -37,6 +37,8 @@ import { Text } from '../../Text';
37
37
  import { Tooltip } from '../../Tooltip';
38
38
  import IconButton from '../IconButton';
39
39
  import { useRoomLayoutConferencingScreen } from '../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';
40
+ // @ts-ignore: No implicit Any
41
+ import { useIsNoiseCancellationEnabled, useSetNoiseCancellationEnabled } from './AppData/useUISettings';
40
42
  import { useAudioOutputTest } from './hooks/useAudioOutputTest';
41
43
  import { isMacOS, TEST_AUDIO_URL } from '../common/constants';
42
44
 
@@ -97,8 +99,8 @@ const OptionLabel = ({ children, icon }: { children: React.ReactNode; icon: Reac
97
99
  const plugin = new HMSKrispPlugin();
98
100
  const NoiseCancellation = () => {
99
101
  const localPeerAudioTrackID = useHMSStore(selectLocalAudioTrackID);
102
+ const [enabled, setEnabled] = useSetNoiseCancellationEnabled();
100
103
  const isPluginAdded = useHMSStore(selectIsLocalAudioPluginPresent(plugin.getName()));
101
- const [active, setActive] = useState(isPluginAdded);
102
104
  const [inProgress, setInProgress] = useState(false);
103
105
  const actions = useHMSActions();
104
106
  const room = useHMSStore(selectRoom);
@@ -106,15 +108,15 @@ const NoiseCancellation = () => {
106
108
  useEffect(() => {
107
109
  (async () => {
108
110
  setInProgress(true);
109
- if (active && !isPluginAdded) {
111
+ if (enabled && !isPluginAdded) {
110
112
  await actions.addPluginToAudioTrack(plugin);
111
113
  }
112
- if (!active && isPluginAdded) {
114
+ if (!enabled && isPluginAdded) {
113
115
  await actions.removePluginFromAudioTrack(plugin);
114
116
  }
115
117
  setInProgress(false);
116
118
  })();
117
- }, [actions, active, isPluginAdded]);
119
+ }, [actions, enabled, isPluginAdded]);
118
120
 
119
121
  if (!plugin.isSupported() || !room.isNoiseCancellationEnabled || !localPeerAudioTrackID) {
120
122
  return null;
@@ -132,7 +134,7 @@ const NoiseCancellation = () => {
132
134
  }}
133
135
  onClick={e => {
134
136
  e.preventDefault();
135
- setActive(value => !value);
137
+ setEnabled(!enabled);
136
138
  }}
137
139
  >
138
140
  <Text css={{ display: 'flex', alignItems: 'center', gap: '$2', fontSize: '$xs', '& svg': { size: '$8' } }}>
@@ -141,11 +143,11 @@ const NoiseCancellation = () => {
141
143
  </Text>
142
144
  <Switch
143
145
  id="noise_cancellation"
144
- checked={active}
146
+ checked={enabled && isPluginAdded}
145
147
  disabled={inProgress}
146
148
  onClick={e => e.stopPropagation()}
147
149
  onCheckedChange={value => {
148
- setActive(value);
150
+ setEnabled(value);
149
151
  }}
150
152
  />
151
153
  </Dropdown.Item>
@@ -216,11 +218,28 @@ export const AudioVideoToggle = ({ hideOptions = false }) => {
216
218
  const shouldShowAudioOutput = 'setSinkId' in HTMLMediaElement.prototype && Number(audioOutput?.length) > 0;
217
219
  const { screenType } = useRoomLayoutConferencingScreen();
218
220
  const [showSettings, setShowSettings] = useState(false);
221
+ const isPluginAdded = useHMSStore(selectIsLocalAudioPluginPresent(plugin.getName()));
222
+ const isNoiseCancellationEnabled = useIsNoiseCancellationEnabled();
223
+
224
+ useEffect(() => {
225
+ (async () => {
226
+ if (isNoiseCancellationEnabled && !isPluginAdded) {
227
+ await actions.addPluginToAudioTrack(plugin);
228
+ }
229
+ if (isNoiseCancellationEnabled && isPluginAdded) {
230
+ ToastManager.addToast({
231
+ title: `Noise Reduction Enabled`,
232
+ variant: 'standard',
233
+ duration: 2000,
234
+ icon: <AudioLevelIcon />,
235
+ });
236
+ }
237
+ })();
238
+ }, [actions, isNoiseCancellationEnabled, isPluginAdded]);
219
239
 
220
240
  if (!toggleAudio && !toggleVideo) {
221
241
  return null;
222
242
  }
223
-
224
243
  return (
225
244
  <Fragment>
226
245
  {toggleAudio ? (
@@ -27,8 +27,7 @@ export const CaptionContent = ({ isMobile, onExit }: { isMobile: boolean; onExit
27
27
  color: '$on_surface_high',
28
28
  fontWeight: '$semiBold',
29
29
  display: 'flex',
30
- pb: '$4',
31
- '@md': { px: '$8', borderBottom: '1px solid $border_default' },
30
+ '@md': { px: '$8' },
32
31
  }}
33
32
  >
34
33
  {isTranscriptionEnabled ? 'Disable' : 'Enable'} Closed Caption (CC) for this session?
@@ -40,7 +39,7 @@ export const CaptionContent = ({ isMobile, onExit }: { isMobile: boolean; onExit
40
39
  </Box>
41
40
  </Text>
42
41
  {!isMobile ? (
43
- <Text variant="sm" css={{ color: '$on_surface_medium', pb: '$6', mb: '$8', '@md': { px: '$8', mt: '$4' } }}>
42
+ <Text variant="sm" css={{ color: '$on_surface_medium', mt: '$4', '@md': { px: '$8' } }}>
44
43
  This will {isTranscriptionEnabled ? 'disable' : 'enable'} Closed Captions for everyone in this room. You
45
44
  can&nbsp;
46
45
  {isTranscriptionEnabled ? 'enable' : 'disable'} it later.
@@ -68,12 +67,13 @@ export const CaptionContent = ({ isMobile, onExit }: { isMobile: boolean; onExit
68
67
  align="center"
69
68
  css={{
70
69
  width: '100%',
70
+ '@md': { px: '$4' },
71
71
  }}
72
72
  >
73
73
  {isMobile && isTranscriptionEnabled ? (
74
74
  <Button
75
75
  variant="standard"
76
- css={{ w: '100%', mb: '$8' }}
76
+ css={{ w: '100%', mb: '$4' }}
77
77
  outlined
78
78
  onClick={() => {
79
79
  setIsCaptionEnabled(!isCaptionEnabled);
@@ -115,7 +115,7 @@ export const CaptionContent = ({ isMobile, onExit }: { isMobile: boolean; onExit
115
115
  setToastId(id);
116
116
  } catch (err) {
117
117
  const id = ToastManager.replaceToast(toastId, {
118
- title: `Failed to ${isTranscriptionEnabled ? 'disabled' : 'enabled'} closed caption`,
118
+ title: `Failed to ${isTranscriptionEnabled ? 'disable' : 'enable'} closed caption`,
119
119
  variant: 'error',
120
120
  icon: <AlertTriangleIcon style={{ marginRight: '0.5rem' }} />,
121
121
  });
@@ -129,7 +129,7 @@ export const CaptionContent = ({ isMobile, onExit }: { isMobile: boolean; onExit
129
129
  </Flex>
130
130
  </Flex>
131
131
  {isMobile && (
132
- <Text variant="sm" css={{ color: '$on_surface_medium', pb: '$6', mb: '$8', '@md': { px: '$8', mt: '$4' } }}>
132
+ <Text variant="sm" css={{ color: '$on_surface_medium', pb: '$4', mb: '$8', '@md': { px: '$8', mt: '$4' } }}>
133
133
  This will {isTranscriptionEnabled ? 'disable' : 'enable'} Closed Captions for everyone in this room. You
134
134
  can&nbsp;
135
135
  {isTranscriptionEnabled ? 'enable' : 'disable'} it later.
@@ -172,7 +172,7 @@ export function Notifications() {
172
172
  }
173
173
  break;
174
174
  case HMSNotificationTypes.NEW_MESSAGE:
175
- if (amIScreenSharing) {
175
+ if (amIScreenSharing && !notification.data?.ignored) {
176
176
  showNotification(`New message from ${notification.data.senderName}`, {
177
177
  body: notification.data.message,
178
178
  icon: logoURL,
@@ -37,7 +37,7 @@ export const TranscriptionNotifications = () => {
37
37
  title: `Closed Captioning enabled for everyone`,
38
38
  variant: 'standard',
39
39
  duration: 2000,
40
- icon: <OpenCaptionIcon style={{ marginRight: '0.5rem' }} />,
40
+ icon: <ClosedCaptionIcon style={{ marginRight: '0.5rem' }} />,
41
41
  });
42
42
  })
43
43
  .with({ state: HMSTranscriptionState.STOPPED }, () => {
@@ -45,7 +45,7 @@ export const TranscriptionNotifications = () => {
45
45
  title: `Closed Captioning disabled for everyone`,
46
46
  variant: 'standard',
47
47
  duration: 2000,
48
- icon: <ClosedCaptionIcon style={{ marginRight: '0.5rem' }} />,
48
+ icon: <OpenCaptionIcon style={{ marginRight: '0.5rem' }} />,
49
49
  });
50
50
  })
51
51
  .otherwise(() => null);