@stream-io/video-react-sdk 1.33.3 → 1.33.4

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,16 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [1.33.4](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-sdk-1.33.3...@stream-io/video-react-sdk-1.33.4) (2026-03-09)
6
+
7
+ ### Dependency Updates
8
+
9
+ - `@stream-io/audio-filters-web` updated to version `0.7.3`
10
+
11
+ ### Bug Fixes
12
+
13
+ - **react:** await initialization before enabling / disabling noise cancellation ([#2153](https://github.com/GetStream/stream-video-js/issues/2153)) ([3455a0e](https://github.com/GetStream/stream-video-js/commit/3455a0e597245af6c34332424b4b7029abf7c675))
14
+
5
15
  ## [1.33.3](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-sdk-1.33.2...@stream-io/video-react-sdk-1.33.3) (2026-03-06)
6
16
 
7
17
  ### Dependency Updates
@@ -1153,7 +1153,7 @@ const SpeakerTest = (props) => {
1153
1153
  const audioElementRef = react.useRef(null);
1154
1154
  const [isPlaying, setIsPlaying] = react.useState(false);
1155
1155
  const { t } = videoReactBindings.useI18n();
1156
- const { audioUrl = `https://unpkg.com/${"@stream-io/video-react-sdk"}@${"1.33.3"}/assets/piano.mp3`, } = props;
1156
+ const { audioUrl = `https://unpkg.com/${"@stream-io/video-react-sdk"}@${"1.33.4"}/assets/piano.mp3`, } = props;
1157
1157
  // Update audio output device when selection changes
1158
1158
  react.useEffect(() => {
1159
1159
  const audio = audioElementRef.current;
@@ -1572,6 +1572,7 @@ const NoiseCancellationProvider = (props) => {
1572
1572
  }, [noiseCancellation]);
1573
1573
  const isSupported = isSupportedByBrowser && hasCapability && noiseCancellationAllowed;
1574
1574
  const [isEnabled, setIsEnabled] = react.useState(false);
1575
+ const [isReady, setIsReady] = react.useState(false);
1575
1576
  const deinit = react.useRef(undefined);
1576
1577
  react.useEffect(() => {
1577
1578
  if (!call || !isSupported)
@@ -1580,17 +1581,23 @@ const NoiseCancellationProvider = (props) => {
1580
1581
  const unsubscribe = noiseCancellation.on('change', (v) => setIsEnabled(v));
1581
1582
  const init = (deinit.current || Promise.resolve())
1582
1583
  .then(() => noiseCancellation.init({ tracer: call.tracer }))
1583
- .then(() => call.microphone.enableNoiseCancellation(noiseCancellation))
1584
+ .then(() => {
1585
+ setIsReady(true);
1586
+ return call.microphone.enableNoiseCancellation(noiseCancellation);
1587
+ })
1584
1588
  .catch((e) => console.error(`Can't initialize noise cancellation`, e));
1585
1589
  return () => {
1586
1590
  deinit.current = init
1587
1591
  .then(() => call.microphone.disableNoiseCancellation())
1588
1592
  .then(() => noiseCancellation.dispose())
1589
- .then(() => unsubscribe());
1593
+ .then(() => unsubscribe())
1594
+ .catch((e) => console.error("Can't clean up noise cancellation", e))
1595
+ .finally(() => setIsReady(false));
1590
1596
  };
1591
1597
  }, [call, isSupported, noiseCancellation]);
1592
1598
  const contextValue = react.useMemo(() => ({
1593
1599
  isSupported,
1600
+ isReady,
1594
1601
  isEnabled,
1595
1602
  setSuppressionLevel: (level) => {
1596
1603
  if (!noiseCancellation)
@@ -1614,7 +1621,7 @@ const NoiseCancellationProvider = (props) => {
1614
1621
  });
1615
1622
  }
1616
1623
  },
1617
- }), [isEnabled, isSupported, noiseCancellation]);
1624
+ }), [isEnabled, isReady, isSupported, noiseCancellation]);
1618
1625
  return (jsxRuntime.jsx(NoiseCancellationContext.Provider, { value: contextValue, children: children }));
1619
1626
  };
1620
1627