@100mslive/roomkit-react 0.3.19-alpha.15 → 0.3.19-alpha.16

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.
@@ -2390,13 +2390,23 @@
2390
2390
  "format": "esm"
2391
2391
  },
2392
2392
  "src/Prebuilt/components/VirtualBackground/VBHandler.tsx": {
2393
- "bytes": 3218,
2393
+ "bytes": 3598,
2394
2394
  "imports": [
2395
2395
  {
2396
2396
  "path": "@100mslive/hms-virtual-background/hmsvbplugin",
2397
2397
  "kind": "import-statement",
2398
2398
  "external": true
2399
2399
  },
2400
+ {
2401
+ "path": "@100mslive/react-sdk",
2402
+ "kind": "import-statement",
2403
+ "external": true
2404
+ },
2405
+ {
2406
+ "path": "src/Prebuilt/common/constants.ts",
2407
+ "kind": "import-statement",
2408
+ "original": "../../common/constants"
2409
+ },
2400
2410
  {
2401
2411
  "path": "<define:process.env>",
2402
2412
  "kind": "import-statement",
@@ -9876,27 +9886,6 @@
9876
9886
  ],
9877
9887
  "format": "esm"
9878
9888
  },
9879
- "src/Prebuilt/components/VirtualBackground/util.tsx": {
9880
- "bytes": 384,
9881
- "imports": [
9882
- {
9883
- "path": "@100mslive/react-sdk",
9884
- "kind": "import-statement",
9885
- "external": true
9886
- },
9887
- {
9888
- "path": "src/Prebuilt/common/constants.ts",
9889
- "kind": "import-statement",
9890
- "original": "../../common/constants"
9891
- },
9892
- {
9893
- "path": "<define:process.env>",
9894
- "kind": "import-statement",
9895
- "external": true
9896
- }
9897
- ],
9898
- "format": "esm"
9899
- },
9900
9889
  "src/Prebuilt/components/VirtualBackground/VBOption.tsx": {
9901
9890
  "bytes": 1248,
9902
9891
  "imports": [
@@ -9970,7 +9959,7 @@
9970
9959
  "format": "esm"
9971
9960
  },
9972
9961
  "src/Prebuilt/components/VirtualBackground/VBPicker.tsx": {
9973
- "bytes": 9024,
9962
+ "bytes": 8900,
9974
9963
  "imports": [
9975
9964
  {
9976
9965
  "path": "react",
@@ -10017,11 +10006,6 @@
10017
10006
  "kind": "import-statement",
10018
10007
  "original": "../../../Text"
10019
10008
  },
10020
- {
10021
- "path": "src/Prebuilt/components/VirtualBackground/util.tsx",
10022
- "kind": "import-statement",
10023
- "original": "./util"
10024
- },
10025
10009
  {
10026
10010
  "path": "src/Prebuilt/components/VirtualBackground/VBCollection.tsx",
10027
10011
  "kind": "import-statement",
@@ -11292,7 +11276,7 @@
11292
11276
  ],
11293
11277
  "format": "esm"
11294
11278
  },
11295
- "../../../../../../../tmp/tmp-2788-mQ9LLG08Rdcz/191bdfb053a2/tldraw.css": {
11279
+ "../../../../../../../tmp/tmp-2804-EVwwAh5S4Ct0/191c15c12733/tldraw.css": {
11296
11280
  "bytes": 80111,
11297
11281
  "imports": [
11298
11282
  {
@@ -11342,7 +11326,7 @@
11342
11326
  }
11343
11327
  ]
11344
11328
  },
11345
- "../../../../../../../tmp/tmp-2788-mQ9LLG08Rdcz/191bdfb04b30/index.css": {
11329
+ "../../../../../../../tmp/tmp-2804-EVwwAh5S4Ct0/191c15c125d1/index.css": {
11346
11330
  "bytes": 597,
11347
11331
  "imports": [
11348
11332
  {
@@ -11351,7 +11335,7 @@
11351
11335
  "external": true
11352
11336
  },
11353
11337
  {
11354
- "path": "../../../../../../../tmp/tmp-2788-mQ9LLG08Rdcz/191bdfb053a2/tldraw.css",
11338
+ "path": "../../../../../../../tmp/tmp-2804-EVwwAh5S4Ct0/191c15c12733/tldraw.css",
11355
11339
  "kind": "import-rule",
11356
11340
  "original": "@tldraw/tldraw/tldraw.css"
11357
11341
  }
@@ -11426,7 +11410,7 @@
11426
11410
  "original": "../../common/constants"
11427
11411
  },
11428
11412
  {
11429
- "path": "../../../../../../../tmp/tmp-2788-mQ9LLG08Rdcz/191bdfb04b30/index.css",
11413
+ "path": "../../../../../../../tmp/tmp-2804-EVwwAh5S4Ct0/191c15c125d1/index.css",
11430
11414
  "kind": "import-statement",
11431
11415
  "original": "@100mslive/hms-whiteboard/index.css"
11432
11416
  },
@@ -15414,7 +15398,7 @@
15414
15398
  "dist/index.js": {
15415
15399
  "imports": [
15416
15400
  {
15417
- "path": "dist/chunk-5XRSIFEH.js",
15401
+ "path": "dist/chunk-36E6AAIG.js",
15418
15402
  "kind": "import-statement"
15419
15403
  }
15420
15404
  ],
@@ -15490,16 +15474,16 @@
15490
15474
  "inputs": {},
15491
15475
  "bytes": 1882
15492
15476
  },
15493
- "dist/HLSView-XY7JC5H7.js.map": {
15477
+ "dist/HLSView-U7F2BKBY.js.map": {
15494
15478
  "imports": [],
15495
15479
  "exports": [],
15496
15480
  "inputs": {},
15497
15481
  "bytes": 100275
15498
15482
  },
15499
- "dist/HLSView-XY7JC5H7.js": {
15483
+ "dist/HLSView-U7F2BKBY.js": {
15500
15484
  "imports": [
15501
15485
  {
15502
- "path": "dist/chunk-5XRSIFEH.js",
15486
+ "path": "dist/chunk-36E6AAIG.js",
15503
15487
  "kind": "import-statement"
15504
15488
  },
15505
15489
  {
@@ -15677,7 +15661,7 @@
15677
15661
  "default"
15678
15662
  ],
15679
15663
  "entryPoint": "src/Prebuilt/layouts/HLSView.jsx",
15680
- "cssBundle": "dist/HLSView-C2XG43BN.css",
15664
+ "cssBundle": "dist/HLSView-XE3NUHCX.css",
15681
15665
  "inputs": {
15682
15666
  "src/Prebuilt/layouts/HLSView.jsx": {
15683
15667
  "bytesInOutput": 27671
@@ -15736,13 +15720,13 @@
15736
15720
  },
15737
15721
  "bytes": 61702
15738
15722
  },
15739
- "dist/chunk-5XRSIFEH.js.map": {
15723
+ "dist/chunk-36E6AAIG.js.map": {
15740
15724
  "imports": [],
15741
15725
  "exports": [],
15742
15726
  "inputs": {},
15743
- "bytes": 3518718
15727
+ "bytes": 3518465
15744
15728
  },
15745
- "dist/chunk-5XRSIFEH.js": {
15729
+ "dist/chunk-36E6AAIG.js": {
15746
15730
  "imports": [
15747
15731
  {
15748
15732
  "path": "react",
@@ -16199,6 +16183,11 @@
16199
16183
  "kind": "import-statement",
16200
16184
  "external": true
16201
16185
  },
16186
+ {
16187
+ "path": "@100mslive/react-sdk",
16188
+ "kind": "import-statement",
16189
+ "external": true
16190
+ },
16202
16191
  {
16203
16192
  "path": "@100mslive/hms-virtual-background/hmseffectsplugin",
16204
16193
  "kind": "dynamic-import",
@@ -17924,11 +17913,6 @@
17924
17913
  "kind": "import-statement",
17925
17914
  "external": true
17926
17915
  },
17927
- {
17928
- "path": "@100mslive/react-sdk",
17929
- "kind": "import-statement",
17930
- "external": true
17931
- },
17932
17916
  {
17933
17917
  "path": "react",
17934
17918
  "kind": "import-statement",
@@ -18285,7 +18269,7 @@
18285
18269
  "external": true
18286
18270
  },
18287
18271
  {
18288
- "path": "dist/HLSView-XY7JC5H7.js",
18272
+ "path": "dist/HLSView-U7F2BKBY.js",
18289
18273
  "kind": "dynamic-import"
18290
18274
  },
18291
18275
  {
@@ -18904,7 +18888,7 @@
18904
18888
  ],
18905
18889
  "inputs": {
18906
18890
  "<define:process.env>": {
18907
- "bytesInOutput": 18014
18891
+ "bytesInOutput": 18012
18908
18892
  },
18909
18893
  "../../node_modules/lodash/lodash.js": {
18910
18894
  "bytesInOutput": 224301
@@ -19240,7 +19224,7 @@
19240
19224
  "bytesInOutput": 2781
19241
19225
  },
19242
19226
  "src/Prebuilt/components/VirtualBackground/VBHandler.tsx": {
19243
- "bytesInOutput": 3789
19227
+ "bytesInOutput": 4246
19244
19228
  },
19245
19229
  "src/Prebuilt/components/hooks/useRedirectToLeave.tsx": {
19246
19230
  "bytesInOutput": 489
@@ -19723,10 +19707,7 @@
19723
19707
  "bytesInOutput": 1050
19724
19708
  },
19725
19709
  "src/Prebuilt/components/VirtualBackground/VBPicker.tsx": {
19726
- "bytesInOutput": 8824
19727
- },
19728
- "src/Prebuilt/components/VirtualBackground/util.tsx": {
19729
- "bytesInOutput": 449
19710
+ "bytesInOutput": 8754
19730
19711
  },
19731
19712
  "src/Prebuilt/components/VirtualBackground/VBCollection.tsx": {
19732
19713
  "bytesInOutput": 1252
@@ -19800,7 +19781,7 @@
19800
19781
  "src/Prebuilt/components/VideoLayouts/WhiteboardLayout.tsx": {
19801
19782
  "bytesInOutput": 2830
19802
19783
  },
19803
- "../../../../../../../tmp/tmp-2788-mQ9LLG08Rdcz/191bdfb04b30/index.css": {
19784
+ "../../../../../../../tmp/tmp-2804-EVwwAh5S4Ct0/191c15c125d1/index.css": {
19804
19785
  "bytesInOutput": 0
19805
19786
  },
19806
19787
  "src/Prebuilt/common/PeersSorter.ts": {
@@ -19969,7 +19950,7 @@
19969
19950
  "bytesInOutput": 2628
19970
19951
  }
19971
19952
  },
19972
- "bytes": 1459419
19953
+ "bytes": 1459300
19973
19954
  },
19974
19955
  "dist/index.css.map": {
19975
19956
  "imports": [],
@@ -20031,22 +20012,22 @@
20031
20012
  }
20032
20013
  ],
20033
20014
  "inputs": {
20034
- "../../../../../../../tmp/tmp-2788-mQ9LLG08Rdcz/191bdfb053a2/tldraw.css": {
20015
+ "../../../../../../../tmp/tmp-2804-EVwwAh5S4Ct0/191c15c12733/tldraw.css": {
20035
20016
  "bytesInOutput": 75223
20036
20017
  },
20037
- "../../../../../../../tmp/tmp-2788-mQ9LLG08Rdcz/191bdfb04b30/index.css": {
20018
+ "../../../../../../../tmp/tmp-2804-EVwwAh5S4Ct0/191c15c125d1/index.css": {
20038
20019
  "bytesInOutput": 401
20039
20020
  }
20040
20021
  },
20041
20022
  "bytes": 75901
20042
20023
  },
20043
- "dist/HLSView-C2XG43BN.css.map": {
20024
+ "dist/HLSView-XE3NUHCX.css.map": {
20044
20025
  "imports": [],
20045
20026
  "exports": [],
20046
20027
  "inputs": {},
20047
20028
  "bytes": 122402
20048
20029
  },
20049
- "dist/HLSView-C2XG43BN.css": {
20030
+ "dist/HLSView-XE3NUHCX.css": {
20050
20031
  "imports": [
20051
20032
  {
20052
20033
  "path": "https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap",
@@ -20100,10 +20081,10 @@
20100
20081
  }
20101
20082
  ],
20102
20083
  "inputs": {
20103
- "../../../../../../../tmp/tmp-2788-mQ9LLG08Rdcz/191bdfb053a2/tldraw.css": {
20084
+ "../../../../../../../tmp/tmp-2804-EVwwAh5S4Ct0/191c15c12733/tldraw.css": {
20104
20085
  "bytesInOutput": 75223
20105
20086
  },
20106
- "../../../../../../../tmp/tmp-2788-mQ9LLG08Rdcz/191bdfb04b30/index.css": {
20087
+ "../../../../../../../tmp/tmp-2804-EVwwAh5S4Ct0/191c15c125d1/index.css": {
20107
20088
  "bytesInOutput": 401
20108
20089
  }
20109
20090
  },
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "prebuilt",
11
11
  "roomkit"
12
12
  ],
13
- "version": "0.3.19-alpha.15",
13
+ "version": "0.3.19-alpha.16",
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.19-alpha.15",
78
+ "@100mslive/hls-player": "0.3.19-alpha.16",
79
79
  "@100mslive/hms-noise-cancellation": "0.0.1",
80
- "@100mslive/hms-virtual-background": "1.13.19-alpha.15",
81
- "@100mslive/hms-whiteboard": "0.0.9-alpha.15",
82
- "@100mslive/react-icons": "0.10.19-alpha.15",
83
- "@100mslive/react-sdk": "0.10.19-alpha.15",
80
+ "@100mslive/hms-virtual-background": "1.13.19-alpha.16",
81
+ "@100mslive/hms-whiteboard": "0.0.9-alpha.16",
82
+ "@100mslive/react-icons": "0.10.19-alpha.16",
83
+ "@100mslive/react-sdk": "0.10.19-alpha.16",
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": "f8aada15d72c41c25aa564f6e4fe08063cca12e3"
120
+ "gitHead": "f4e569ef4919bfe1b7b6bc4f82bb9c3f856a50ce"
121
121
  }
@@ -1,7 +1,8 @@
1
1
  // Open issue with eslint-plugin-import https://github.com/import-js/eslint-plugin-import/issues/1810
2
2
  // eslint-disable-next-line
3
3
  import { HMSVBPlugin, HMSVirtualBackgroundTypes } from '@100mslive/hms-virtual-background/hmsvbplugin';
4
-
4
+ import { parsedUserAgent } from '@100mslive/react-sdk';
5
+ import { isSafari } from '../../common/constants';
5
6
  export class VBPlugin {
6
7
  private hmsPlugin?: HMSVBPlugin;
7
8
  private effectsPlugin?: any;
@@ -101,6 +102,17 @@ export class VBPlugin {
101
102
  this.effectsPlugin = undefined;
102
103
  this.hmsPlugin = undefined;
103
104
  };
105
+
106
+ isEffectsSupported = () => {
107
+ if (!isSafari) {
108
+ return true;
109
+ }
110
+ const browserVersion = parsedUserAgent?.getBrowser()?.version || '16';
111
+ if (browserVersion && parseInt(browserVersion.split('.')[0]) < 17) {
112
+ return false;
113
+ }
114
+ return true;
115
+ };
104
116
  }
105
117
 
106
118
  export const VBHandler = new VBPlugin();
@@ -25,7 +25,6 @@ import {
25
25
  import { BlurPersonHighIcon, CrossCircleIcon, CrossIcon } from '@100mslive/react-icons';
26
26
  import { Box, config as cssConfig, Flex, Loading, Slider, Video } from '../../../index';
27
27
  import { Text } from '../../../Text';
28
- import { doesBrowserSupportEffectsSDK } from './util';
29
28
  import { VBCollection } from './VBCollection';
30
29
  import { VBHandler } from './VBHandler';
31
30
  // @ts-ignore
@@ -49,7 +48,7 @@ export const VBPicker = ({ backgroundMedia = [] }: { backgroundMedia: VirtualBac
49
48
  const [blurAmount, setBlurAmount] = useState(VBHandler.getBlurAmount() || 0.5);
50
49
  const roomState = useHMSStore(selectRoomState);
51
50
  const isLargeRoom = useHMSStore(selectIsLargeRoom);
52
- const [isBlurSupported, setIsBlurSupported] = useState(false);
51
+ const isEffectsSupported = VBHandler.isEffectsSupported();
53
52
  const isEffectsEnabled = useHMSStore(selectIsEffectsEnabled);
54
53
  const effectsKey = useHMSStore(selectEffectsKey);
55
54
  const isMobile = useMedia(cssConfig.media.md);
@@ -80,9 +79,6 @@ export const VBPicker = ({ backgroundMedia = [] }: { backgroundMedia: VirtualBac
80
79
  return;
81
80
  }
82
81
 
83
- const isEffectsSupported = doesBrowserSupportEffectsSDK();
84
- setIsBlurSupported(isEffectsSupported);
85
-
86
82
  try {
87
83
  pluginLoadingRef.current = true;
88
84
  if (isEffectsEnabled && isEffectsSupported && effectsKey) {
@@ -125,6 +121,7 @@ export const VBPicker = ({ backgroundMedia = [] }: { backgroundMedia: VirtualBac
125
121
  role,
126
122
  isPluginAdded,
127
123
  isEffectsEnabled,
124
+ isEffectsSupported,
128
125
  effectsKey,
129
126
  track?.id,
130
127
  background,
@@ -193,7 +190,7 @@ export const VBPicker = ({ backgroundMedia = [] }: { backgroundMedia: VirtualBac
193
190
  await VBHandler?.setBlur(blurAmount);
194
191
  hmsActions.setAppData(APP_DATA.background, HMSVirtualBackgroundTypes.BLUR);
195
192
  },
196
- supported: isBlurSupported,
193
+ supported: isEffectsSupported && isEffectsEnabled,
197
194
  },
198
195
  ]}
199
196
  activeBackground={background}
@@ -1 +0,0 @@
1
- export declare const doesBrowserSupportEffectsSDK: () => boolean;
@@ -1,13 +0,0 @@
1
- import { parsedUserAgent } from '@100mslive/react-sdk';
2
- import { isSafari } from '../../common/constants';
3
-
4
- export const doesBrowserSupportEffectsSDK = () => {
5
- if (!isSafari) {
6
- return true;
7
- }
8
- const browserVersion = parsedUserAgent?.getBrowser()?.version || '16';
9
- if (browserVersion && parseInt(browserVersion.split('.')[0]) < 17) {
10
- return false;
11
- }
12
- return true;
13
- };