@camera.ui/sdk 0.0.17 → 0.0.19
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/dist/index.d.ts +5 -1
- package/dist/internal/index.d.ts +2 -0
- package/dist/sensor/base.js +7 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -110,6 +110,8 @@ interface CameraInputSettings {
|
|
|
110
110
|
hotMode: boolean;
|
|
111
111
|
/** Preload stream on startup */
|
|
112
112
|
preload: boolean;
|
|
113
|
+
/** Strip the audio track from this source (defaults to false) */
|
|
114
|
+
muted?: boolean;
|
|
113
115
|
/** User-provided stream URLs */
|
|
114
116
|
urls: string[];
|
|
115
117
|
/** Child source ID (for snapshot fallback) */
|
|
@@ -3133,7 +3135,7 @@ declare abstract class Sensor<TProperties extends object, TStorage extends objec
|
|
|
3133
3135
|
* Helper for `reportDetections(detected, detections?)` flows.
|
|
3134
3136
|
*
|
|
3135
3137
|
* - If `detected === false` → returns `[]` (clear).
|
|
3136
|
-
* - If `detected === true` and `detections` has items → returns them
|
|
3138
|
+
* - If `detected === true` and `detections` has items → returns them, substituting a full-frame box where missing.
|
|
3137
3139
|
* - If `detected === true` and `detections` is missing/empty → returns a single
|
|
3138
3140
|
* synthesized full-frame detection with the given `fallbackLabel` and any
|
|
3139
3141
|
* `fallbackExtra` fields (used for type-specific properties like `attribute`,
|
|
@@ -3878,6 +3880,8 @@ interface CameraInput {
|
|
|
3878
3880
|
hotMode: boolean;
|
|
3879
3881
|
/** Preload stream on startup */
|
|
3880
3882
|
preload: boolean;
|
|
3883
|
+
/** Strip the audio track from this source (defaults to false) */
|
|
3884
|
+
muted?: boolean;
|
|
3881
3885
|
/** Generated streaming URLs */
|
|
3882
3886
|
urls: StreamUrls;
|
|
3883
3887
|
/** Child source ID (for snapshot fallback) */
|
package/dist/internal/index.d.ts
CHANGED
|
@@ -608,6 +608,8 @@ interface CameraInputSettings {
|
|
|
608
608
|
hotMode: boolean;
|
|
609
609
|
/** Preload stream on startup */
|
|
610
610
|
preload: boolean;
|
|
611
|
+
/** Strip the audio track from this source (defaults to false) */
|
|
612
|
+
muted?: boolean;
|
|
611
613
|
/** User-provided stream URLs */
|
|
612
614
|
urls: string[];
|
|
613
615
|
/** Child source ID (for snapshot fallback) */
|
package/dist/sensor/base.js
CHANGED
|
@@ -233,7 +233,7 @@ export class Sensor {
|
|
|
233
233
|
* Helper for `reportDetections(detected, detections?)` flows.
|
|
234
234
|
*
|
|
235
235
|
* - If `detected === false` → returns `[]` (clear).
|
|
236
|
-
* - If `detected === true` and `detections` has items → returns them
|
|
236
|
+
* - If `detected === true` and `detections` has items → returns them, substituting a full-frame box where missing.
|
|
237
237
|
* - If `detected === true` and `detections` is missing/empty → returns a single
|
|
238
238
|
* synthesized full-frame detection with the given `fallbackLabel` and any
|
|
239
239
|
* `fallbackExtra` fields (used for type-specific properties like `attribute`,
|
|
@@ -257,8 +257,12 @@ export class Sensor {
|
|
|
257
257
|
_normalizeReportedDetections(detected, detections, fallbackLabel, fallbackExtra) {
|
|
258
258
|
if (!detected)
|
|
259
259
|
return [];
|
|
260
|
-
if (detections && detections.length > 0)
|
|
261
|
-
|
|
260
|
+
if (detections && detections.length > 0) {
|
|
261
|
+
// Smart-camera plugins (Ring, Reolink, ...) report labels without
|
|
262
|
+
// coordinates, while downstream consumers (detection coordinator, zone
|
|
263
|
+
// matching) require a box on every detection — substitute full-frame.
|
|
264
|
+
return detections.map((detection) => (detection.box ? detection : { ...detection, box: { x: 0, y: 0, width: 1, height: 1 } }));
|
|
265
|
+
}
|
|
262
266
|
return [
|
|
263
267
|
{
|
|
264
268
|
label: fallbackLabel,
|