@stream-io/video-filters-web 0.7.2 → 0.7.3

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/index.es.js CHANGED
@@ -1559,7 +1559,7 @@ const createTFLiteSIMDModule = (__Module) => {
1559
1559
  return __Module.ready;
1560
1560
  };
1561
1561
 
1562
- const version = "0.7.2";
1562
+ const version = "0.7.3";
1563
1563
  const packageName = "@stream-io/video-filters-web";
1564
1564
 
1565
1565
  // @ts-expect-error - module is not declared
@@ -2107,9 +2107,9 @@ class WebGLRenderer {
2107
2107
  gl.activeTexture(gl.TEXTURE2);
2108
2108
  gl.bindTexture(gl.TEXTURE_2D, prevStateTexture);
2109
2109
  gl.uniform1i(stateUpdateLocations.prevStateTexture, 2);
2110
- gl.uniform1f(stateUpdateLocations.smoothingFactor, 0.8);
2111
- gl.uniform1f(stateUpdateLocations.smoothstepMin, 0.6);
2112
- gl.uniform1f(stateUpdateLocations.smoothstepMax, 0.9);
2110
+ gl.uniform1f(stateUpdateLocations.smoothingFactor, options.segmentationOptions?.smoothingFactor ?? 0.8);
2111
+ gl.uniform1f(stateUpdateLocations.smoothstepMin, options.segmentationOptions?.smoothstepMin ?? 0.6);
2112
+ gl.uniform1f(stateUpdateLocations.smoothstepMax, options.segmentationOptions?.smoothstepMax ?? 0.9);
2113
2113
  gl.uniform1i(stateUpdateLocations.selfieModel, options.isSelfieMode ? 1 : 0);
2114
2114
  gl.enableVertexAttribArray(stateUpdateLocations.position);
2115
2115
  gl.bindBuffer(gl.ARRAY_BUFFER, this.positionBuffer);
@@ -2630,6 +2630,7 @@ class VirtualBackground extends BaseVideoProcessor {
2630
2630
  bgBlur: 0,
2631
2631
  bgBlurRadius: 0,
2632
2632
  isSelfieMode,
2633
+ segmentationOptions: this.options.segmentationOptions,
2633
2634
  };
2634
2635
  }
2635
2636
  const blurLevel = this.options.backgroundBlurLevel;
@@ -2641,6 +2642,7 @@ class VirtualBackground extends BaseVideoProcessor {
2641
2642
  bgBlur: Math.min(strength * 1.5, 20),
2642
2643
  bgBlurRadius: Math.min(strength, 10),
2643
2644
  isSelfieMode,
2645
+ segmentationOptions: this.options.segmentationOptions,
2644
2646
  };
2645
2647
  }
2646
2648
  async loadBackground(url) {