@stream-io/video-filters-web 0.1.5 → 0.1.7
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 +14 -0
- package/dist/index.cjs.js +7 -14
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +7 -14
- package/dist/index.es.js.map +1 -1
- package/dist/src/webgl2/resizingStage.d.ts +1 -1
- package/dist/src/webgl2/webgl2Pipeline.d.ts +1 -1
- package/package.json +5 -5
- package/src/webgl2/resizingStage.ts +4 -1
- package/src/webgl2/webgl2Pipeline.ts +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [0.1.7](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-filters-web-0.1.6...@stream-io/video-filters-web-0.1.7) (2025-02-17)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* support static token and token provider at the same time ([#1685](https://github.com/GetStream/stream-video-js/issues/1685)) ([4365a3d](https://github.com/GetStream/stream-video-js/commit/4365a3dd0a14c98041982bde8be21258b8cfd571))
|
|
11
|
+
|
|
12
|
+
## [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)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* 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)
|
|
18
|
+
|
|
5
19
|
## [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
20
|
|
|
7
21
|
|
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');
|
|
@@ -697,7 +698,7 @@ function buildWebGL2Pipeline(videoSource, backgroundImage, blurLevel, background
|
|
|
697
698
|
gl.bindVertexArray(vertexArray);
|
|
698
699
|
const positionBuffer = gl.createBuffer();
|
|
699
700
|
gl.bindBuffer(gl.ARRAY_BUFFER, positionBuffer);
|
|
700
|
-
gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([-1
|
|
701
|
+
gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([-1, -1, 1.0, -1, -1, 1.0, 1.0, 1.0]), gl.STATIC_DRAW);
|
|
701
702
|
const texCoordBuffer = gl.createBuffer();
|
|
702
703
|
gl.bindBuffer(gl.ARRAY_BUFFER, texCoordBuffer);
|
|
703
704
|
gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 1.0, 1.0]), gl.STATIC_DRAW);
|
|
@@ -861,7 +862,7 @@ const createTFLiteSIMDModule = (__Module) => {
|
|
|
861
862
|
if (Module['quit']) quit_ = Module['quit'];
|
|
862
863
|
var wasmBinary;
|
|
863
864
|
if (Module['wasmBinary']) wasmBinary = Module['wasmBinary'];
|
|
864
|
-
|
|
865
|
+
Module['noExitRuntime'] || true;
|
|
865
866
|
if (typeof WebAssembly != 'object') {
|
|
866
867
|
abort('no native wasm support detected');
|
|
867
868
|
}
|
|
@@ -926,10 +927,6 @@ const createTFLiteSIMDModule = (__Module) => {
|
|
|
926
927
|
var __ATINIT__ = [];
|
|
927
928
|
var __ATPOSTRUN__ = [];
|
|
928
929
|
|
|
929
|
-
function keepRuntimeAlive() {
|
|
930
|
-
return noExitRuntime;
|
|
931
|
-
}
|
|
932
|
-
|
|
933
930
|
function preRun() {
|
|
934
931
|
if (Module['preRun']) {
|
|
935
932
|
if (typeof Module['preRun'] == 'function')
|
|
@@ -1287,10 +1284,6 @@ const createTFLiteSIMDModule = (__Module) => {
|
|
|
1287
1284
|
}
|
|
1288
1285
|
|
|
1289
1286
|
function _proc_exit(code) {
|
|
1290
|
-
if (!keepRuntimeAlive()) {
|
|
1291
|
-
if (Module['onExit']) Module['onExit'](code);
|
|
1292
|
-
ABORT = true;
|
|
1293
|
-
}
|
|
1294
1287
|
quit_(code, new ExitStatus(code));
|
|
1295
1288
|
}
|
|
1296
1289
|
|
|
@@ -1540,7 +1533,7 @@ const createTFLiteSIMDModule = (__Module) => {
|
|
|
1540
1533
|
return __Module.ready;
|
|
1541
1534
|
};
|
|
1542
1535
|
|
|
1543
|
-
const version = "0.1.
|
|
1536
|
+
const version = "0.1.7";
|
|
1544
1537
|
const packageName = "@stream-io/video-filters-web";
|
|
1545
1538
|
|
|
1546
1539
|
// @ts-expect-error - module is not declared
|