@zappar/zappar-cv 3.0.0-beta.1 → 3.0.0-beta.2
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/README.md +2 -2
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/worker-server.js +10 -7
- package/lib/zappar-cv.wasm +0 -0
- package/package.json +1 -1
- package/umd/56.zappar-cv.js +1 -1
- package/umd/{df9ca5fb771b46120818.wasm → 716ba8996a5e0574e40e.wasm} +0 -0
- package/umd/zappar-cv.js +1 -1
- package/umd/zappar-cv.worker.js +1 -1
package/README.md
CHANGED
|
@@ -18,8 +18,8 @@ npm i @zappar/zappar-cv
|
|
|
18
18
|
|
|
19
19
|
You can use our CDN from within your HTML:
|
|
20
20
|
```
|
|
21
|
-
<script src="https://libs.zappar.com/zappar-cv/3.0.0-beta.
|
|
21
|
+
<script src="https://libs.zappar.com/zappar-cv/3.0.0-beta.2/zappar-cv.js"></script>
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
Or you can download and host our standalone JavaScript bundle:
|
|
25
|
-
[https://libs.zappar.com/zappar-cv/3.0.0-beta.
|
|
25
|
+
[https://libs.zappar.com/zappar-cv/3.0.0-beta.2/zappar-cv.zip](https://libs.zappar.com/zappar-cv/3.0.0-beta.2/zappar-cv.zip)
|
package/lib/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "3.0.0-beta.
|
|
1
|
+
export declare const VERSION = "3.0.0-beta.2";
|
package/lib/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "3.0.0-beta.
|
|
1
|
+
export const VERSION = "3.0.0-beta.2";
|
package/lib/worker-server.js
CHANGED
|
@@ -70,10 +70,10 @@ export function launchWorkerServer(wasmUrl) {
|
|
|
70
70
|
let msgt = msg;
|
|
71
71
|
consumeStream(mod, r, msgt.s, msgt.p, msgt.userFacing, server, msgt.source).then(() => {
|
|
72
72
|
let m = { t: "streamEndedS2C", p: msgt.p, source: msgt.source };
|
|
73
|
-
console.log('Stream ended, requesting new stream');
|
|
73
|
+
// console.log('Stream ended, requesting new stream');
|
|
74
74
|
messageManager.postOutgoingMessage(m, []);
|
|
75
75
|
}).catch(err => {
|
|
76
|
-
console.log('Stream ended with error', err);
|
|
76
|
+
// console.log('Stream ended with error', err);
|
|
77
77
|
});
|
|
78
78
|
break;
|
|
79
79
|
}
|
|
@@ -140,7 +140,7 @@ function consumeStream(mod, r, stream, p, userFacing, server, source) {
|
|
|
140
140
|
reader = yield stream.getReader();
|
|
141
141
|
}
|
|
142
142
|
catch (err) {
|
|
143
|
-
console.log("Error getting reader", err);
|
|
143
|
+
// console.log("Error getting reader", err);
|
|
144
144
|
yield delay(1000);
|
|
145
145
|
continue;
|
|
146
146
|
}
|
|
@@ -149,7 +149,7 @@ function consumeStream(mod, r, stream, p, userFacing, server, source) {
|
|
|
149
149
|
return;
|
|
150
150
|
}
|
|
151
151
|
catch (err) {
|
|
152
|
-
console.log("Consuming reader error 2", err);
|
|
152
|
+
// console.log("Consuming reader error 2", err);
|
|
153
153
|
}
|
|
154
154
|
yield delay(1000);
|
|
155
155
|
return;
|
|
@@ -162,7 +162,7 @@ let tokenId = 1;
|
|
|
162
162
|
function getFrameOrTimeout(reader) {
|
|
163
163
|
return new Promise((resolve, reject) => {
|
|
164
164
|
const token = setTimeout(() => {
|
|
165
|
-
console.log('Frame timeout');
|
|
165
|
+
// console.log('Frame timeout');
|
|
166
166
|
reject('Frame timeout');
|
|
167
167
|
}, 2000);
|
|
168
168
|
reader.read().then(result => {
|
|
@@ -179,7 +179,7 @@ function consumeReader(mod, r, reader, p, userFacing, server, source) {
|
|
|
179
179
|
while (true) {
|
|
180
180
|
let result = yield getFrameOrTimeout(reader);
|
|
181
181
|
if (result.done) {
|
|
182
|
-
console.log("Stream done", userFacing);
|
|
182
|
+
// console.log("Stream done", userFacing);
|
|
183
183
|
(_a = result.value) === null || _a === void 0 ? void 0 : _a.close();
|
|
184
184
|
return;
|
|
185
185
|
}
|
|
@@ -247,7 +247,10 @@ function consumeReader(mod, r, reader, p, userFacing, server, source) {
|
|
|
247
247
|
r.pipeline_camera_frame_submit_raw_pointer(pipeline, streamDataBufferPointer, size, framePixelFormatFromFormat(frame.format), width, height, token, cameraToDeviceTransform, latestCameraToScreenRotation, cameraModel, userFacing);
|
|
248
248
|
}
|
|
249
249
|
catch (err) {
|
|
250
|
-
console.log('Exception during camera processing', err);
|
|
250
|
+
// console.log('Exception during camera processing', err);
|
|
251
|
+
// const func = mod.cwrap('what_to_stderr', 'number', ['number']);
|
|
252
|
+
// func(err);
|
|
253
|
+
// (mod as any).ccall('what_to_stderr', 'number', ['number'], [err]);
|
|
251
254
|
}
|
|
252
255
|
r.pipeline_frame_update(pipeline);
|
|
253
256
|
server.exploreState();
|
package/lib/zappar-cv.wasm
CHANGED
|
Binary file
|
package/package.json
CHANGED