@stream-io/video-filters-web 0.1.5 → 0.1.6

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,13 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [0.1.6](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-filters-web-0.1.5...@stream-io/video-filters-web-0.1.6) (2024-11-12)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * handle async errors in background filters pipeline ([#1571](https://github.com/GetStream/stream-video-js/issues/1571)) ([53a5ac3](https://github.com/GetStream/stream-video-js/commit/53a5ac3691a6fe71a0b7b6695aa6c0ffaa01d3ec)), closes [#1565](https://github.com/GetStream/stream-video-js/issues/1565)
11
+
5
12
  ## [0.1.5](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-filters-web-0.1.4...@stream-io/video-filters-web-0.1.5) (2024-11-08)
6
13
 
7
14
 
package/dist/index.cjs.js CHANGED
@@ -574,7 +574,7 @@ function buildJointBilateralFilterStage(gl, vertexShader, positionBuffer, texCoo
574
574
  return { render, updateSigmaSpace, updateSigmaColor, cleanUp };
575
575
  }
576
576
 
577
- function buildResizingStage(gl, vertexShader, positionBuffer, texCoordBuffer, tflite, segmentationConfig) {
577
+ function buildResizingStage(gl, vertexShader, positionBuffer, texCoordBuffer, tflite, segmentationConfig, onError) {
578
578
  const fragmentShaderSource = glsl `#version 300 es
579
579
 
580
580
  precision highp float;
@@ -608,7 +608,8 @@ function buildResizingStage(gl, vertexShader, positionBuffer, texCoordBuffer, tf
608
608
  // Downloads pixels asynchronously from GPU while rendering the current frame.
609
609
  // The pixels will be available in the next frame render which results
610
610
  // in offsets in the segmentation output but increases the frame rate.
611
- readPixelsAsync(gl, 0, 0, outputWidth, outputHeight, gl.RGBA, gl.UNSIGNED_BYTE, outputPixels);
611
+ readPixelsAsync(gl, 0, 0, outputWidth, outputHeight, gl.RGBA, gl.UNSIGNED_BYTE, outputPixels).catch((error) => {
612
+ });
612
613
  for (let i = 0; i < outputPixelCount; i++) {
613
614
  const tfliteIndex = tfliteInputMemoryOffset + i * 3;
614
615
  const outputIndex = i * 4;
@@ -673,7 +674,7 @@ function buildSoftmaxStage(gl, vertexShader, positionBuffer, texCoordBuffer, tfl
673
674
  return { render, cleanUp };
674
675
  }
675
676
 
676
- function buildWebGL2Pipeline(videoSource, backgroundImage, blurLevel, backgroundFilter, canvas, tflite, segmentationConfig) {
677
+ function buildWebGL2Pipeline(videoSource, backgroundImage, blurLevel, backgroundFilter, canvas, tflite, segmentationConfig, onError) {
677
678
  const gl = canvas.getContext('webgl2');
678
679
  if (!gl)
679
680
  throw new Error('WebGL2 is not supported');
@@ -1540,7 +1541,7 @@ const createTFLiteSIMDModule = (__Module) => {
1540
1541
  return __Module.ready;
1541
1542
  };
1542
1543
 
1543
- const version = "0.1.5";
1544
+ const version = "0.1.6";
1544
1545
  const packageName = "@stream-io/video-filters-web";
1545
1546
 
1546
1547
  // @ts-expect-error - module is not declared