@tradalab/mediakit 2.9.0 → 2.9.1

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 CHANGED
@@ -38,7 +38,8 @@ gives no usable size (no `Content-Length`, or a compressed response, whose `Cont
38
38
  not the size the browser hands over); show `done`/`files` then. `loaded` never passes a known
39
39
  `total`. It is called at the start, at most every 100 ms while bytes arrive, and once per finished
40
40
  file, the last call with `done === files`. A file that fails, or answers with an error status,
41
- counts as done and adds no bytes. A callback that throws is not called again. The MediaPipe
41
+ counts as done and adds no bytes; one that breaks off partway takes back the bytes it had sent, so
42
+ `loaded` can drop. A callback that throws is not called again. The MediaPipe
42
43
  runtime and onnxruntime load in workers that report nothing, so this is the only progress there
43
44
  is: an app that wants a progress line calls `preloadDetectors` when the camera screen opens and
44
45
  shows it, and the detectors then load from the HTTP cache.
@@ -7834,7 +7834,7 @@
7834
7834
  },
7835
7835
  (err) => {
7836
7836
  console.warn("mediakit: the face cover model did not load, occluders has no effect:", message(err));
7837
- post({ t: "cover", ok: false, message: `the face cover model did not load: ${message(err)}` });
7837
+ post({ t: "cover", ok: false, message: err instanceof LoadTimeout ? err.message : `mediakit: the face cover model did not load: ${message(err)}` });
7838
7838
  }
7839
7839
  );
7840
7840
  }
@@ -7848,7 +7848,7 @@
7848
7848
  seen = await cover.read(frame, lm, n2);
7849
7849
  } catch (err) {
7850
7850
  console.warn("mediakit: the face cover failed, occluders is off from here:", message(err));
7851
- post({ t: "cover", ok: false, message: `the face cover failed: ${message(err)}` });
7851
+ post({ t: "cover", ok: false, message: `mediakit: the face cover failed: ${message(err)}` });
7852
7852
  cover.close();
7853
7853
  cover = null;
7854
7854
  }