@stream-io/video-filters-web 0.7.2 → 0.7.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,18 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [0.7.4](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-filters-web-0.7.3...@stream-io/video-filters-web-0.7.4) (2026-04-09)
6
+
7
+ ### Bug Fixes
8
+
9
+ - **video-filters-web:** propagate background image load errors to prevent black frames ([#2188](https://github.com/GetStream/stream-video-js/issues/2188)) ([5dd6a4b](https://github.com/GetStream/stream-video-js/commit/5dd6a4b5768f39df411999dd64968c86c33c4967))
10
+
11
+ ## [0.7.3](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-filters-web-0.7.2...@stream-io/video-filters-web-0.7.3) (2026-03-27)
12
+
13
+ ### Bug Fixes
14
+
15
+ - **react:** expose segmentation smoothing options and add model picker in video effects settings ([#2176](https://github.com/GetStream/stream-video-js/issues/2176)) ([edee6bf](https://github.com/GetStream/stream-video-js/commit/edee6bf8d9aacdfb2ae49fb202ba7f7d1140063f))
16
+
5
17
  ## [0.7.2](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-filters-web-0.7.1...@stream-io/video-filters-web-0.7.2) (2026-01-30)
6
18
 
7
19
  ### Bug Fixes
package/dist/index.cjs.js CHANGED
@@ -1561,7 +1561,7 @@ const createTFLiteSIMDModule = (__Module) => {
1561
1561
  return __Module.ready;
1562
1562
  };
1563
1563
 
1564
- const version = "0.7.2";
1564
+ const version = "0.7.4";
1565
1565
  const packageName = "@stream-io/video-filters-web";
1566
1566
 
1567
1567
  // @ts-expect-error - module is not declared
@@ -2109,9 +2109,9 @@ class WebGLRenderer {
2109
2109
  gl.activeTexture(gl.TEXTURE2);
2110
2110
  gl.bindTexture(gl.TEXTURE_2D, prevStateTexture);
2111
2111
  gl.uniform1i(stateUpdateLocations.prevStateTexture, 2);
2112
- gl.uniform1f(stateUpdateLocations.smoothingFactor, 0.8);
2113
- gl.uniform1f(stateUpdateLocations.smoothstepMin, 0.6);
2114
- gl.uniform1f(stateUpdateLocations.smoothstepMax, 0.9);
2112
+ gl.uniform1f(stateUpdateLocations.smoothingFactor, options.segmentationOptions?.smoothingFactor ?? 0.8);
2113
+ gl.uniform1f(stateUpdateLocations.smoothstepMin, options.segmentationOptions?.smoothstepMin ?? 0.6);
2114
+ gl.uniform1f(stateUpdateLocations.smoothstepMax, options.segmentationOptions?.smoothstepMax ?? 0.9);
2115
2115
  gl.uniform1i(stateUpdateLocations.selfieModel, options.isSelfieMode ? 1 : 0);
2116
2116
  gl.enableVertexAttribArray(stateUpdateLocations.position);
2117
2117
  gl.bindBuffer(gl.ARRAY_BUFFER, this.positionBuffer);
@@ -2583,8 +2583,9 @@ class VirtualBackground extends BaseVideoProcessor {
2583
2583
  this.isSegmenterReady = true;
2584
2584
  }
2585
2585
  catch (error) {
2586
- console.error('[virtual-background] Segmenter init failed:', error);
2587
2586
  this.isSegmenterReady = false;
2587
+ this.hooks.onError?.(error);
2588
+ throw error;
2588
2589
  }
2589
2590
  }
2590
2591
  async transform(frame) {
@@ -2632,6 +2633,7 @@ class VirtualBackground extends BaseVideoProcessor {
2632
2633
  bgBlur: 0,
2633
2634
  bgBlurRadius: 0,
2634
2635
  isSelfieMode,
2636
+ segmentationOptions: this.options.segmentationOptions,
2635
2637
  };
2636
2638
  }
2637
2639
  const blurLevel = this.options.backgroundBlurLevel;
@@ -2643,14 +2645,16 @@ class VirtualBackground extends BaseVideoProcessor {
2643
2645
  bgBlur: Math.min(strength * 1.5, 20),
2644
2646
  bgBlurRadius: Math.min(strength, 10),
2645
2647
  isSelfieMode,
2648
+ segmentationOptions: this.options.segmentationOptions,
2646
2649
  };
2647
2650
  }
2648
2651
  async loadBackground(url) {
2649
2652
  if (!url)
2650
2653
  return null;
2651
- const result = await fetch(url);
2652
- if (!result.ok)
2653
- return null;
2654
+ const result = await fetch(url, { signal: this.abortController.signal });
2655
+ if (!result.ok) {
2656
+ throw new Error(`[virtual-background] Failed to load background image: ${result.status} ${result.statusText}`);
2657
+ }
2654
2658
  return {
2655
2659
  type: 'image',
2656
2660
  media: await createImageBitmap(await result.blob()),