@kubohiroya/turbowarp-teachable-machine 3.2.1 → 3.4.0

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
@@ -69,7 +69,7 @@ That download, and the artifact a composite runtime fetches, is the version-pinn
69
69
  jsDelivr:
70
70
 
71
71
  ```text
72
- https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-teachable-machine@3.2.1/dist/tm.js
72
+ https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-teachable-machine@3.4.0/dist/tm.js
73
73
  ```
74
74
 
75
75
  The standalone extension loads one reviewed browser runtime that contains one TensorFlow.js 4.22.0
@@ -81,13 +81,13 @@ Composite runtimes can load or embed the same artifact without rewriting a minif
81
81
  bundle:
82
82
 
83
83
  ```text
84
- https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-teachable-machine@3.2.1/dist/runtime.js
84
+ https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-teachable-machine@3.4.0/dist/runtime.js
85
85
  ```
86
86
 
87
87
  To add the published package to another project:
88
88
 
89
89
  ```sh
90
- pnpm add --save-exact @kubohiroya/turbowarp-teachable-machine@3.2.1
90
+ pnpm add --save-exact @kubohiroya/turbowarp-teachable-machine@3.4.0
91
91
  ```
92
92
 
93
93
  ### Offline PoseNet bundle API
@@ -441,7 +441,22 @@ setting does not change the frames used for recognition. The `camera preview mir
441
441
  returns the current setting.
442
442
 
443
443
  - `stop recognition` clears current results, stops audio listening, but leaves the camera available;
444
- - `stop camera` also stops recognition, releases the camera tracks, and removes the preview and SVG.
444
+ - `stop camera` also stops recognition, releases the camera, and removes the preview and SVG.
445
+
446
+ ### Sharing one camera with other extensions
447
+
448
+ When [TurboWarp-Camera-Source](https://github.com/kubohiroya/turbowarp-camera-source) is loaded, this
449
+ extension takes a lease on the camera it shares under the `pose` role instead of opening a device of
450
+ its own. One physical camera then serves recognition and anything else reading frames — a QR reader,
451
+ a preview, another classifier — rather than each extension competing for the device.
452
+
453
+ Camera Source owns the stream: it stops the camera when the last lease is released, and `stop
454
+ camera` here releases this extension's lease without stopping tracks that other consumers may still
455
+ be reading. The frames recognition sees are unchanged either way.
456
+
457
+ Camera Source is not required. It is a separate extension, and this one is also loaded directly by
458
+ URL, so when it is absent the extension opens and stops its own camera exactly as before. Nothing
459
+ in a project needs to change for either configuration.
445
460
 
446
461
  The extension performs pose, image, or audio classification in the browser and does not upload
447
462
  camera frames or microphone audio. It does fetch its runtime libraries and the published model. Stop