@stream-io/video-react-sdk 1.16.2 → 1.17.1
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/CHANGELOG.md +19 -0
- package/dist/index.cjs.js +29 -22
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +29 -22
- package/dist/index.es.js.map +1 -1
- package/dist/src/components/NoiseCancellation/NoiseCancellationProvider.d.ts +7 -1
- package/package.json +4 -4
- package/src/components/BackgroundFilters/BackgroundFilters.tsx +1 -1
- package/src/components/NoiseCancellation/NoiseCancellationProvider.tsx +37 -28
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,25 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [1.17.1](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-sdk-1.17.0...@stream-io/video-react-sdk-1.17.1) (2025-05-21)
|
|
6
|
+
|
|
7
|
+
### Dependency Updates
|
|
8
|
+
|
|
9
|
+
- `@stream-io/video-client` updated to version `1.23.1`
|
|
10
|
+
- `@stream-io/video-react-bindings` updated to version `1.6.4`
|
|
11
|
+
|
|
12
|
+
## [1.17.0](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-sdk-1.16.2...@stream-io/video-react-sdk-1.17.0) (2025-05-20)
|
|
13
|
+
|
|
14
|
+
### Dependency Updates
|
|
15
|
+
|
|
16
|
+
- `@stream-io/audio-filters-web` updated to version `0.4.0`
|
|
17
|
+
- `@stream-io/video-client` updated to version `1.23.0`
|
|
18
|
+
- `@stream-io/video-react-bindings` updated to version `1.6.3`
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
- **web:** improved noise cancellation ([#1794](https://github.com/GetStream/stream-video-js/issues/1794)) ([d59f19b](https://github.com/GetStream/stream-video-js/commit/d59f19b1ba1ff83fe5f024d783b868f4e98d3380))
|
|
23
|
+
|
|
5
24
|
## [1.16.2](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-sdk-1.16.1...@stream-io/video-react-sdk-1.16.2) (2025-05-15)
|
|
6
25
|
|
|
7
26
|
### Dependency Updates
|
package/dist/index.cjs.js
CHANGED
|
@@ -792,7 +792,7 @@ const BackgroundFilters = (props) => {
|
|
|
792
792
|
return;
|
|
793
793
|
const { unregister } = call.camera.registerFilter((ms) => start(ms, (error) => handleErrorRef.current?.(error)));
|
|
794
794
|
return () => {
|
|
795
|
-
unregister();
|
|
795
|
+
unregister().catch((err) => console.warn(`Can't unregister filter`, err));
|
|
796
796
|
};
|
|
797
797
|
}, [backgroundFilter, call, start]);
|
|
798
798
|
return children;
|
|
@@ -1863,7 +1863,7 @@ const NoiseCancellationProvider = (props) => {
|
|
|
1863
1863
|
settings.audio.noise_cancellation.mode !==
|
|
1864
1864
|
videoClient.NoiseCancellationSettingsModeEnum.DISABLED);
|
|
1865
1865
|
const hasCapability = useHasPermissions(videoClient.OwnCapability.ENABLE_NOISE_CANCELLATION);
|
|
1866
|
-
const [isSupportedByBrowser, setIsSupportedByBrowser] = react.useState(
|
|
1866
|
+
const [isSupportedByBrowser, setIsSupportedByBrowser] = react.useState();
|
|
1867
1867
|
react.useEffect(() => {
|
|
1868
1868
|
const result = noiseCancellation.isSupported();
|
|
1869
1869
|
if (typeof result === 'boolean') {
|
|
@@ -1871,7 +1871,7 @@ const NoiseCancellationProvider = (props) => {
|
|
|
1871
1871
|
}
|
|
1872
1872
|
else {
|
|
1873
1873
|
result
|
|
1874
|
-
.then((
|
|
1874
|
+
.then((s) => setIsSupportedByBrowser(s))
|
|
1875
1875
|
.catch((err) => console.error(`Can't determine if noise cancellation is supported`, err));
|
|
1876
1876
|
}
|
|
1877
1877
|
}, [noiseCancellation]);
|
|
@@ -1881,11 +1881,12 @@ const NoiseCancellationProvider = (props) => {
|
|
|
1881
1881
|
react.useEffect(() => {
|
|
1882
1882
|
if (!call || !isSupported)
|
|
1883
1883
|
return;
|
|
1884
|
+
noiseCancellation.isEnabled().then((e) => setIsEnabled(e));
|
|
1884
1885
|
const unsubscribe = noiseCancellation.on('change', (v) => setIsEnabled(v));
|
|
1885
1886
|
const init = (deinit.current || Promise.resolve())
|
|
1886
1887
|
.then(() => noiseCancellation.init())
|
|
1887
1888
|
.then(() => call.microphone.enableNoiseCancellation(noiseCancellation))
|
|
1888
|
-
.catch((
|
|
1889
|
+
.catch((e) => console.error(`Can't initialize noise cancellation`, e));
|
|
1889
1890
|
return () => {
|
|
1890
1891
|
deinit.current = init
|
|
1891
1892
|
.then(() => call.microphone.disableNoiseCancellation())
|
|
@@ -1893,23 +1894,29 @@ const NoiseCancellationProvider = (props) => {
|
|
|
1893
1894
|
.then(() => unsubscribe());
|
|
1894
1895
|
};
|
|
1895
1896
|
}, [call, isSupported, noiseCancellation]);
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1897
|
+
const contextValue = react.useMemo(() => ({
|
|
1898
|
+
isSupported,
|
|
1899
|
+
isEnabled,
|
|
1900
|
+
setSuppressionLevel: (level) => {
|
|
1901
|
+
if (!noiseCancellation)
|
|
1902
|
+
return;
|
|
1903
|
+
noiseCancellation.setSuppressionLevel(level);
|
|
1904
|
+
},
|
|
1905
|
+
setEnabled: (enabledOrSetter) => {
|
|
1906
|
+
if (!noiseCancellation)
|
|
1907
|
+
return;
|
|
1908
|
+
const enable = typeof enabledOrSetter === 'function'
|
|
1909
|
+
? enabledOrSetter(isEnabled)
|
|
1910
|
+
: enabledOrSetter;
|
|
1911
|
+
if (enable) {
|
|
1912
|
+
noiseCancellation.enable();
|
|
1913
|
+
}
|
|
1914
|
+
else {
|
|
1915
|
+
noiseCancellation.disable();
|
|
1916
|
+
}
|
|
1917
|
+
},
|
|
1918
|
+
}), [isEnabled, isSupported, noiseCancellation]);
|
|
1919
|
+
return (jsxRuntime.jsx(NoiseCancellationContext.Provider, { value: contextValue, children: children }));
|
|
1913
1920
|
};
|
|
1914
1921
|
|
|
1915
1922
|
const RingingCallControls = () => {
|
|
@@ -2726,7 +2733,7 @@ const LivestreamPlayer = (props) => {
|
|
|
2726
2733
|
return (jsxRuntime.jsx(StreamCall, { call: call, children: jsxRuntime.jsx(LivestreamLayout, { ...layoutProps }) }));
|
|
2727
2734
|
};
|
|
2728
2735
|
|
|
2729
|
-
const [major, minor, patch] = ("1.
|
|
2736
|
+
const [major, minor, patch] = ("1.17.1").split('.');
|
|
2730
2737
|
videoClient.setSdkInfo({
|
|
2731
2738
|
type: videoClient.SfuModels.SdkType.REACT,
|
|
2732
2739
|
major,
|