@stream-io/video-react-sdk 1.1.5 → 1.2.0

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 CHANGED
@@ -2,6 +2,17 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [1.2.0](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-sdk-1.1.5...@stream-io/video-react-sdk-1.2.0) (2024-06-07)
6
+
7
+ ### Dependency Updates
8
+
9
+ * `@stream-io/video-client` updated to version `1.3.0`
10
+ * `@stream-io/video-react-bindings` updated to version `0.4.42`
11
+
12
+ ### Features
13
+
14
+ * improve `isSupported` method for noise cancellation ([#1388](https://github.com/GetStream/stream-video-js/issues/1388)) ([07031ba](https://github.com/GetStream/stream-video-js/commit/07031ba72443a84cac8856c7481f3d4053b46d4c))
15
+
5
16
  ### [1.1.5](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-sdk-1.1.4...@stream-io/video-react-sdk-1.1.5) (2024-06-07)
6
17
 
7
18
  ### Dependency Updates
package/dist/index.cjs.js CHANGED
@@ -1640,9 +1640,19 @@ const NoiseCancellationProvider = (props) => {
1640
1640
  settings.audio.noise_cancellation.mode !==
1641
1641
  videoClient.NoiseCancellationSettingsModeEnum.DISABLED);
1642
1642
  const hasCapability = useHasPermissions(videoClient.OwnCapability.ENABLE_NOISE_CANCELLATION);
1643
- const isSupported = hasCapability &&
1644
- noiseCancellationAllowed &&
1645
- noiseCancellation.isSupported();
1643
+ const [isSupportedByBrowser, setIsSupportedByBrowser] = react.useState(undefined);
1644
+ react.useEffect(() => {
1645
+ const result = noiseCancellation.isSupported();
1646
+ if (typeof result === 'boolean') {
1647
+ setIsSupportedByBrowser(result);
1648
+ }
1649
+ else {
1650
+ result
1651
+ .then((_isSupportedByBrowser) => setIsSupportedByBrowser(_isSupportedByBrowser))
1652
+ .catch((err) => console.error(`Can't determine if noise cancellation is supported`, err));
1653
+ }
1654
+ }, [noiseCancellation]);
1655
+ const isSupported = isSupportedByBrowser && hasCapability && noiseCancellationAllowed;
1646
1656
  const [isEnabled, setIsEnabled] = react.useState(false);
1647
1657
  const deinit = react.useRef();
1648
1658
  react.useEffect(() => {
@@ -2591,7 +2601,7 @@ const LivestreamPlayer = (props) => {
2591
2601
  return (jsxRuntime.jsx(StreamCall, { call: call, children: jsxRuntime.jsx(LivestreamLayout, { ...layoutProps }) }));
2592
2602
  };
2593
2603
 
2594
- const [major, minor, patch] = ("1.1.5" ).split('.');
2604
+ const [major, minor, patch] = ("1.2.0" ).split('.');
2595
2605
  videoClient.setSdkInfo({
2596
2606
  type: videoClient.SfuModels.SdkType.REACT,
2597
2607
  major,