@100mslive/roomkit-react 0.3.19-alpha.14 → 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.
- package/dist/{HLSView-NMEMV6IQ.js → HLSView-U7F2BKBY.js} +43 -43
- package/dist/{HLSView-NMEMV6IQ.js.map → HLSView-U7F2BKBY.js.map} +1 -1
- package/dist/{HLSView-CZOXJTV5.css → HLSView-XE3NUHCX.css} +19 -67
- package/dist/{HLSView-CZOXJTV5.css.map → HLSView-XE3NUHCX.css.map} +2 -2
- package/dist/Prebuilt/components/VirtualBackground/VBHandler.d.ts +1 -0
- package/dist/{chunk-ZDEVOXM2.js → chunk-36E6AAIG.js} +305 -290
- package/dist/chunk-36E6AAIG.js.map +7 -0
- package/dist/index.cjs.css +18 -66
- package/dist/index.cjs.css.map +2 -2
- package/dist/index.cjs.js +774 -759
- package/dist/index.cjs.js.map +4 -4
- package/dist/index.css +18 -66
- package/dist/index.css.map +2 -2
- package/dist/index.js +1 -1
- package/dist/meta.cjs.json +128 -147
- package/dist/meta.esbuild.json +147 -166
- package/package.json +7 -7
- package/src/Prebuilt/components/VirtualBackground/VBHandler.tsx +13 -1
- package/src/Prebuilt/components/VirtualBackground/VBPicker.tsx +3 -6
- package/dist/Prebuilt/components/VirtualBackground/util.d.ts +0 -1
- package/dist/chunk-ZDEVOXM2.js.map +0 -7
- package/src/Prebuilt/components/VirtualBackground/util.tsx +0 -13
package/package.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"prebuilt",
|
|
11
11
|
"roomkit"
|
|
12
12
|
],
|
|
13
|
-
"version": "0.3.19-alpha.
|
|
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.
|
|
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.
|
|
81
|
-
"@100mslive/hms-whiteboard": "0.0.9-alpha.
|
|
82
|
-
"@100mslive/react-icons": "0.10.19-alpha.
|
|
83
|
-
"@100mslive/react-sdk": "0.10.19-alpha.
|
|
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": "
|
|
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
|
|
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:
|
|
193
|
+
supported: isEffectsSupported && isEffectsEnabled,
|
|
197
194
|
},
|
|
198
195
|
]}
|
|
199
196
|
activeBackground={background}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const doesBrowserSupportEffectsSDK: () => boolean;
|