@camstack/addon-decoder-nodeav 1.2.101 → 1.2.102
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.js +173 -8
- package/dist/index.mjs +173 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
let node_crypto = require("node:crypto");
|
|
6
|
-
//#region ../types/dist/event-category-
|
|
6
|
+
//#region ../types/dist/event-category-BVDXG4tB.mjs
|
|
7
7
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
8
8
|
EventCategory["SystemBoot"] = "system.boot";
|
|
9
9
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -620,6 +620,20 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
620
620
|
* pull-reconcile from the provider's `getStatus` on reconnect. */
|
|
621
621
|
EventCategory["MeshNetworkChanged"] = "network.mesh.changed";
|
|
622
622
|
EventCategory["BackupCompleted"] = "backup.completed";
|
|
623
|
+
/**
|
|
624
|
+
* A whole backup RUN finished — every destination attempted, win or lose.
|
|
625
|
+
*
|
|
626
|
+
* `backup.completed` fires once per DESTINATION, which is the right grain for
|
|
627
|
+
* a progress UI and the wrong one for a notification: an operator with three
|
|
628
|
+
* destinations would be told three times. And a run where two of three
|
|
629
|
+
* destinations succeeded is not a clean success — a single "backup
|
|
630
|
+
* completed" that hid the failed one would be a lie, so the count of each is
|
|
631
|
+
* carried here and the message says both.
|
|
632
|
+
*
|
|
633
|
+
* Emitted by the backup orchestrator only after the destination loop, so a
|
|
634
|
+
* run that dies during the BUILD phase produces no completion at all.
|
|
635
|
+
*/
|
|
636
|
+
EventCategory["BackupRunCompleted"] = "backup.run-completed";
|
|
623
637
|
EventCategory["BackupRestored"] = "backup.restored";
|
|
624
638
|
EventCategory["NotificationDispatched"] = "notification.dispatched";
|
|
625
639
|
EventCategory["NotificationFailed"] = "notification.failed";
|
|
@@ -5350,7 +5364,7 @@ var ZodIssueCode = {
|
|
|
5350
5364
|
var ZodFirstPartyTypeKind;
|
|
5351
5365
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5352
5366
|
//#endregion
|
|
5353
|
-
//#region ../types/dist/sleep-
|
|
5367
|
+
//#region ../types/dist/sleep-DEuj7E3j.mjs
|
|
5354
5368
|
/**
|
|
5355
5369
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5356
5370
|
* window to float samples (D455).
|
|
@@ -11527,6 +11541,58 @@ method(ListInputSchema, array(BrokerInfoSchema$1)), method(GetInputSchema, Broke
|
|
|
11527
11541
|
auth: "admin"
|
|
11528
11542
|
}), method(GetStateInputSchema, unknown().nullable()), method(_void(), RegistryStatusSchema);
|
|
11529
11543
|
DeviceType.Camera;
|
|
11544
|
+
/**
|
|
11545
|
+
* The signals a device can emit to WAKE its own stream.
|
|
11546
|
+
*
|
|
11547
|
+
* A camera whose stream is built on demand sleeps until something asks for it,
|
|
11548
|
+
* and "something" cannot be a consumer that is merely attached — a Frigate-style
|
|
11549
|
+
* puller holds a session open for ever, and treating that as demand would keep
|
|
11550
|
+
* a battery camera awake for ever, which is the whole thing the battery is for
|
|
11551
|
+
* (D173). So the wake has to come from the CAMERA: an event it noticed by
|
|
11552
|
+
* itself, with no stream running.
|
|
11553
|
+
*
|
|
11554
|
+
* ## The vocabulary is the PROVIDER'S, not ours
|
|
11555
|
+
*
|
|
11556
|
+
* Like `consumables`, this cap declares no vocabulary of its own. A provider
|
|
11557
|
+
* names each signal with a `code` it chooses and a `label` an operator reads.
|
|
11558
|
+
* Reolink offers motion and camera-native detection; another provider may offer
|
|
11559
|
+
* a tamper, a doorbell press, a PIR, or something no camera in this fleet has
|
|
11560
|
+
* yet. A fixed enum here would mean every new signal is a framework release.
|
|
11561
|
+
*
|
|
11562
|
+
* It is deliberately NOT derived from the caps a device already binds. Whether
|
|
11563
|
+
* a camera CAN push firmware motion is expressed by `motionSources` containing
|
|
11564
|
+
* `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
|
|
11565
|
+
* binding — but both answer "what drives the detection pipeline", which is a
|
|
11566
|
+
* different question from "what may wake a sleeping stream". A camera can do
|
|
11567
|
+
* the first and not be trusted with the second, and the operator picks per
|
|
11568
|
+
* camera. Two questions, two authorities.
|
|
11569
|
+
*
|
|
11570
|
+
* ## Availability is not permission
|
|
11571
|
+
*
|
|
11572
|
+
* `listSignals` says what the device CAN emit. Whether a given signal actually
|
|
11573
|
+
* wakes the stream is the operator's per-camera choice, held by the broker
|
|
11574
|
+
* alongside the cooldown — see the stream-broker cap's wake settings. A
|
|
11575
|
+
* provider declaring a signal is not a provider enabling it.
|
|
11576
|
+
*/
|
|
11577
|
+
/** One signal a device can emit. */
|
|
11578
|
+
var StreamSignalSchema = object({
|
|
11579
|
+
/** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
|
|
11580
|
+
code: string().min(1),
|
|
11581
|
+
/** What an operator reads in the picker. The provider's own wording. */
|
|
11582
|
+
label: string().min(1),
|
|
11583
|
+
/**
|
|
11584
|
+
* Whether the provider recommends this signal ON when a camera is first set
|
|
11585
|
+
* up. A provider knows which of its signals are cheap and reliable; an
|
|
11586
|
+
* operator should not have to discover that by trial. Reolink recommends
|
|
11587
|
+
* both of its own.
|
|
11588
|
+
*/
|
|
11589
|
+
recommended: boolean()
|
|
11590
|
+
});
|
|
11591
|
+
object({
|
|
11592
|
+
signals: array(StreamSignalSchema),
|
|
11593
|
+
lastFetchedAt: number()
|
|
11594
|
+
});
|
|
11595
|
+
Object.values(DeviceType), method(_void(), array(StreamSignalSchema).readonly());
|
|
11530
11596
|
/** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
|
|
11531
11597
|
var StreamFormatSchema = _enum([
|
|
11532
11598
|
"webrtc",
|
|
@@ -11923,6 +11989,22 @@ var EgressTranscodeSchema = object({
|
|
|
11923
11989
|
camStreamId: string().nullable()
|
|
11924
11990
|
});
|
|
11925
11991
|
method(object({
|
|
11992
|
+
deviceId: number().int().nonnegative(),
|
|
11993
|
+
/** The provider's signal code. */
|
|
11994
|
+
code: string().min(1),
|
|
11995
|
+
/** Ms epoch. Absent ⇒ now. */
|
|
11996
|
+
at: number().optional()
|
|
11997
|
+
}), object({
|
|
11998
|
+
/** Whether the broker acted on it, and if not, why. */
|
|
11999
|
+
accepted: boolean(),
|
|
12000
|
+
reason: _enum([
|
|
12001
|
+
"woke",
|
|
12002
|
+
"hold-extended",
|
|
12003
|
+
"not-enabled",
|
|
12004
|
+
"no-consumer",
|
|
12005
|
+
"unknown-code"
|
|
12006
|
+
])
|
|
12007
|
+
}), { kind: "mutation" }), method(object({
|
|
11926
12008
|
deviceId: number().int().nonnegative(),
|
|
11927
12009
|
camStreamId: string().min(1),
|
|
11928
12010
|
kind: CamStreamKindSchema,
|
|
@@ -12177,6 +12259,16 @@ var PickStreamRequirementsSchema = object({
|
|
|
12177
12259
|
acceptCodecs: array(StreamCodecSchema).readonly().optional(),
|
|
12178
12260
|
/** Minimum vertical resolution. Streams shorter than this are dropped. */
|
|
12179
12261
|
minHeight: number().int().positive().optional(),
|
|
12262
|
+
/**
|
|
12263
|
+
* Maximum vertical resolution. Streams TALLER than this are dropped.
|
|
12264
|
+
*
|
|
12265
|
+
* A consumer can have a ceiling as real as its floor: Alexa documents
|
|
12266
|
+
* 480p to 1080p, and a 4K stream is as unusable to an Echo as a 360p one.
|
|
12267
|
+
* Without this the ceiling had to be re-implemented by every caller — and
|
|
12268
|
+
* one caller implementing it privately is how a second scoring authority
|
|
12269
|
+
* gets born.
|
|
12270
|
+
*/
|
|
12271
|
+
maxHeight: number().int().positive().optional(),
|
|
12180
12272
|
/** Minimum horizontal resolution. */
|
|
12181
12273
|
minWidth: number().int().positive().optional(),
|
|
12182
12274
|
/**
|
|
@@ -12193,7 +12285,22 @@ var PickStreamRequirementsSchema = object({
|
|
|
12193
12285
|
* transcoded" guard: if the device is already serving the consumer's
|
|
12194
12286
|
* codec end-to-end, there's nothing to optimise.
|
|
12195
12287
|
*/
|
|
12196
|
-
requireSiblingCodec: array(StreamCodecSchema).readonly().optional()
|
|
12288
|
+
requireSiblingCodec: array(StreamCodecSchema).readonly().optional(),
|
|
12289
|
+
/**
|
|
12290
|
+
* Whether a stream the consumer CANNOT decode may still be picked, on the
|
|
12291
|
+
* understanding that it will be transcoded.
|
|
12292
|
+
*
|
|
12293
|
+
* Default `false` — today's behaviour, and the right one for a bypass
|
|
12294
|
+
* question ("is there a stream I can forward untouched?"). Set `true` to
|
|
12295
|
+
* ask the larger question: "what is the best stream for me, transcoding if
|
|
12296
|
+
* I must?" A stream that satisfies `acceptCodecs` always outranks one that
|
|
12297
|
+
* does not, so a passthrough is never lost to a transcode; the answer says
|
|
12298
|
+
* which it is in {@link PickedCamStreamSchema.transcodes}.
|
|
12299
|
+
*
|
|
12300
|
+
* This is what lets one picker serve both the bypass and the full source
|
|
12301
|
+
* choice, instead of a consumer scoring privately when the bypass misses.
|
|
12302
|
+
*/
|
|
12303
|
+
allowTranscode: boolean().optional()
|
|
12197
12304
|
}).readonly();
|
|
12198
12305
|
var PickStreamPreferencesSchema = object({
|
|
12199
12306
|
/**
|
|
@@ -12207,12 +12314,32 @@ var PickStreamPreferencesSchema = object({
|
|
|
12207
12314
|
* picks the tallest stream; `'lowest'` picks the shortest (used by
|
|
12208
12315
|
* memory-constrained consumers / Apple Home guest sessions).
|
|
12209
12316
|
*/
|
|
12210
|
-
resolutionPreference: _enum(["highest", "lowest"]).optional()
|
|
12317
|
+
resolutionPreference: _enum(["highest", "lowest"]).optional(),
|
|
12318
|
+
/**
|
|
12319
|
+
* The height the consumer actually wants to DELIVER.
|
|
12320
|
+
*
|
|
12321
|
+
* Not a constraint — an ordering. With it set, the SMALLEST stream at or
|
|
12322
|
+
* above the target wins, and only if nothing reaches it does the tallest
|
|
12323
|
+
* take over. Pulling 1296 lines to draw 720 on a 1280x800 Echo panel costs
|
|
12324
|
+
* a decode and buys nothing, and `resolutionPreference: 'highest'` cannot
|
|
12325
|
+
* express that: it says "as big as possible", which is a different wish.
|
|
12326
|
+
*
|
|
12327
|
+
* Ignored when absent, so every existing caller keeps its ordering.
|
|
12328
|
+
*/
|
|
12329
|
+
targetHeight: number().int().positive().optional()
|
|
12211
12330
|
}).readonly();
|
|
12212
12331
|
var PickedCamStreamSchema = object({
|
|
12213
12332
|
camStreamId: string(),
|
|
12214
12333
|
codec: string().optional(),
|
|
12215
12334
|
resolution: CamStreamResolutionSchema.optional(),
|
|
12335
|
+
/**
|
|
12336
|
+
* Whether serving this stream requires a decode + re-encode.
|
|
12337
|
+
*
|
|
12338
|
+
* `false` is a stream the consumer can take as it stands. Only ever `true`
|
|
12339
|
+
* when the caller asked for it with `allowTranscode`, so a caller that did
|
|
12340
|
+
* not ask cannot be handed a cost it never agreed to pay.
|
|
12341
|
+
*/
|
|
12342
|
+
transcodes: boolean(),
|
|
12216
12343
|
/** One-line explanation of why this stream won — for logs / debug UI. */
|
|
12217
12344
|
reason: string()
|
|
12218
12345
|
});
|
|
@@ -16494,6 +16621,8 @@ var NcSystemEventKindSchema = _enum([
|
|
|
16494
16621
|
"device-enabled",
|
|
16495
16622
|
"device-battery-low",
|
|
16496
16623
|
"device-battery-normal",
|
|
16624
|
+
"device-consumable-low",
|
|
16625
|
+
"device-consumable-normal",
|
|
16497
16626
|
"stream-online",
|
|
16498
16627
|
"stream-offline",
|
|
16499
16628
|
"node-online",
|
|
@@ -16512,6 +16641,7 @@ var NcSystemEventKindSchema = _enum([
|
|
|
16512
16641
|
"addon-updated",
|
|
16513
16642
|
"server-updated",
|
|
16514
16643
|
"export-completed",
|
|
16644
|
+
"backup-completed",
|
|
16515
16645
|
"camera-online",
|
|
16516
16646
|
"camera-offline",
|
|
16517
16647
|
"camera-disabled",
|
|
@@ -23753,10 +23883,28 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
|
|
|
23753
23883
|
}), boolean()), method(object({
|
|
23754
23884
|
deviceId: number().int().nonnegative(),
|
|
23755
23885
|
sessionId: string()
|
|
23756
|
-
}), object({
|
|
23757
|
-
|
|
23758
|
-
|
|
23759
|
-
|
|
23886
|
+
}), object({
|
|
23887
|
+
pendingRenegotiation: object({
|
|
23888
|
+
target: WebrtcStreamTargetSchema,
|
|
23889
|
+
epoch: number()
|
|
23890
|
+
}).nullable(),
|
|
23891
|
+
/**
|
|
23892
|
+
* Whether the session still EXISTS.
|
|
23893
|
+
*
|
|
23894
|
+
* A consumer that holds a resource for the life of a session needs to
|
|
23895
|
+
* be able to ask, because a session does not always end the way it
|
|
23896
|
+
* began. Measured on this hub 2026-09-13: an Echo that got stuck never
|
|
23897
|
+
* sent `SessionDisconnected`, so the Alexa exporter's
|
|
23898
|
+
* `releaseEgressTranscode` never ran, and a 2304x1296 HEVC to 720p
|
|
23899
|
+
* H.264 transcode kept running for NOBODY for more than twenty
|
|
23900
|
+
* minutes. The WebRTC session had logged `WebRTC session closed`
|
|
23901
|
+
* minutes earlier — the broker knew; the holder had no way to ask.
|
|
23902
|
+
*
|
|
23903
|
+
* `false` for a session id the provider has never heard of, which is
|
|
23904
|
+
* the same answer as "it ended": either way nothing is holding it up.
|
|
23905
|
+
*/
|
|
23906
|
+
alive: boolean()
|
|
23907
|
+
}));
|
|
23760
23908
|
object({
|
|
23761
23909
|
/** All accessory children of the parent. */
|
|
23762
23910
|
childDeviceIds: array(number()).readonly(),
|
|
@@ -36260,6 +36408,12 @@ Object.freeze({
|
|
|
36260
36408
|
addonId: null,
|
|
36261
36409
|
access: "create"
|
|
36262
36410
|
},
|
|
36411
|
+
"streamBroker.reportStreamSignal": {
|
|
36412
|
+
capName: "stream-broker",
|
|
36413
|
+
capScope: "system",
|
|
36414
|
+
addonId: null,
|
|
36415
|
+
access: "create"
|
|
36416
|
+
},
|
|
36263
36417
|
"streamBroker.restartProfile": {
|
|
36264
36418
|
capName: "stream-broker",
|
|
36265
36419
|
capScope: "system",
|
|
@@ -36344,6 +36498,12 @@ Object.freeze({
|
|
|
36344
36498
|
addonId: null,
|
|
36345
36499
|
access: "create"
|
|
36346
36500
|
},
|
|
36501
|
+
"streamSignals.listSignals": {
|
|
36502
|
+
capName: "stream-signals",
|
|
36503
|
+
capScope: "device",
|
|
36504
|
+
addonId: null,
|
|
36505
|
+
access: "view"
|
|
36506
|
+
},
|
|
36347
36507
|
"switch.setState": {
|
|
36348
36508
|
capName: "switch",
|
|
36349
36509
|
capScope: "device",
|
|
@@ -38716,6 +38876,11 @@ Object.freeze({
|
|
|
38716
38876
|
form: "single",
|
|
38717
38877
|
optional: false
|
|
38718
38878
|
}],
|
|
38879
|
+
"streamBroker.reportStreamSignal": [{
|
|
38880
|
+
name: "deviceId",
|
|
38881
|
+
form: "single",
|
|
38882
|
+
optional: false
|
|
38883
|
+
}],
|
|
38719
38884
|
"streamBroker.restartProfile": [{
|
|
38720
38885
|
name: "deviceId",
|
|
38721
38886
|
form: "single",
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { randomUUID } from "node:crypto";
|
|
2
|
-
//#region ../types/dist/event-category-
|
|
2
|
+
//#region ../types/dist/event-category-BVDXG4tB.mjs
|
|
3
3
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
4
4
|
EventCategory["SystemBoot"] = "system.boot";
|
|
5
5
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -616,6 +616,20 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
616
616
|
* pull-reconcile from the provider's `getStatus` on reconnect. */
|
|
617
617
|
EventCategory["MeshNetworkChanged"] = "network.mesh.changed";
|
|
618
618
|
EventCategory["BackupCompleted"] = "backup.completed";
|
|
619
|
+
/**
|
|
620
|
+
* A whole backup RUN finished — every destination attempted, win or lose.
|
|
621
|
+
*
|
|
622
|
+
* `backup.completed` fires once per DESTINATION, which is the right grain for
|
|
623
|
+
* a progress UI and the wrong one for a notification: an operator with three
|
|
624
|
+
* destinations would be told three times. And a run where two of three
|
|
625
|
+
* destinations succeeded is not a clean success — a single "backup
|
|
626
|
+
* completed" that hid the failed one would be a lie, so the count of each is
|
|
627
|
+
* carried here and the message says both.
|
|
628
|
+
*
|
|
629
|
+
* Emitted by the backup orchestrator only after the destination loop, so a
|
|
630
|
+
* run that dies during the BUILD phase produces no completion at all.
|
|
631
|
+
*/
|
|
632
|
+
EventCategory["BackupRunCompleted"] = "backup.run-completed";
|
|
619
633
|
EventCategory["BackupRestored"] = "backup.restored";
|
|
620
634
|
EventCategory["NotificationDispatched"] = "notification.dispatched";
|
|
621
635
|
EventCategory["NotificationFailed"] = "notification.failed";
|
|
@@ -5346,7 +5360,7 @@ var ZodIssueCode = {
|
|
|
5346
5360
|
var ZodFirstPartyTypeKind;
|
|
5347
5361
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5348
5362
|
//#endregion
|
|
5349
|
-
//#region ../types/dist/sleep-
|
|
5363
|
+
//#region ../types/dist/sleep-DEuj7E3j.mjs
|
|
5350
5364
|
/**
|
|
5351
5365
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5352
5366
|
* window to float samples (D455).
|
|
@@ -11523,6 +11537,58 @@ method(ListInputSchema, array(BrokerInfoSchema$1)), method(GetInputSchema, Broke
|
|
|
11523
11537
|
auth: "admin"
|
|
11524
11538
|
}), method(GetStateInputSchema, unknown().nullable()), method(_void(), RegistryStatusSchema);
|
|
11525
11539
|
DeviceType.Camera;
|
|
11540
|
+
/**
|
|
11541
|
+
* The signals a device can emit to WAKE its own stream.
|
|
11542
|
+
*
|
|
11543
|
+
* A camera whose stream is built on demand sleeps until something asks for it,
|
|
11544
|
+
* and "something" cannot be a consumer that is merely attached — a Frigate-style
|
|
11545
|
+
* puller holds a session open for ever, and treating that as demand would keep
|
|
11546
|
+
* a battery camera awake for ever, which is the whole thing the battery is for
|
|
11547
|
+
* (D173). So the wake has to come from the CAMERA: an event it noticed by
|
|
11548
|
+
* itself, with no stream running.
|
|
11549
|
+
*
|
|
11550
|
+
* ## The vocabulary is the PROVIDER'S, not ours
|
|
11551
|
+
*
|
|
11552
|
+
* Like `consumables`, this cap declares no vocabulary of its own. A provider
|
|
11553
|
+
* names each signal with a `code` it chooses and a `label` an operator reads.
|
|
11554
|
+
* Reolink offers motion and camera-native detection; another provider may offer
|
|
11555
|
+
* a tamper, a doorbell press, a PIR, or something no camera in this fleet has
|
|
11556
|
+
* yet. A fixed enum here would mean every new signal is a framework release.
|
|
11557
|
+
*
|
|
11558
|
+
* It is deliberately NOT derived from the caps a device already binds. Whether
|
|
11559
|
+
* a camera CAN push firmware motion is expressed by `motionSources` containing
|
|
11560
|
+
* `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
|
|
11561
|
+
* binding — but both answer "what drives the detection pipeline", which is a
|
|
11562
|
+
* different question from "what may wake a sleeping stream". A camera can do
|
|
11563
|
+
* the first and not be trusted with the second, and the operator picks per
|
|
11564
|
+
* camera. Two questions, two authorities.
|
|
11565
|
+
*
|
|
11566
|
+
* ## Availability is not permission
|
|
11567
|
+
*
|
|
11568
|
+
* `listSignals` says what the device CAN emit. Whether a given signal actually
|
|
11569
|
+
* wakes the stream is the operator's per-camera choice, held by the broker
|
|
11570
|
+
* alongside the cooldown — see the stream-broker cap's wake settings. A
|
|
11571
|
+
* provider declaring a signal is not a provider enabling it.
|
|
11572
|
+
*/
|
|
11573
|
+
/** One signal a device can emit. */
|
|
11574
|
+
var StreamSignalSchema = object({
|
|
11575
|
+
/** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
|
|
11576
|
+
code: string().min(1),
|
|
11577
|
+
/** What an operator reads in the picker. The provider's own wording. */
|
|
11578
|
+
label: string().min(1),
|
|
11579
|
+
/**
|
|
11580
|
+
* Whether the provider recommends this signal ON when a camera is first set
|
|
11581
|
+
* up. A provider knows which of its signals are cheap and reliable; an
|
|
11582
|
+
* operator should not have to discover that by trial. Reolink recommends
|
|
11583
|
+
* both of its own.
|
|
11584
|
+
*/
|
|
11585
|
+
recommended: boolean()
|
|
11586
|
+
});
|
|
11587
|
+
object({
|
|
11588
|
+
signals: array(StreamSignalSchema),
|
|
11589
|
+
lastFetchedAt: number()
|
|
11590
|
+
});
|
|
11591
|
+
Object.values(DeviceType), method(_void(), array(StreamSignalSchema).readonly());
|
|
11526
11592
|
/** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
|
|
11527
11593
|
var StreamFormatSchema = _enum([
|
|
11528
11594
|
"webrtc",
|
|
@@ -11919,6 +11985,22 @@ var EgressTranscodeSchema = object({
|
|
|
11919
11985
|
camStreamId: string().nullable()
|
|
11920
11986
|
});
|
|
11921
11987
|
method(object({
|
|
11988
|
+
deviceId: number().int().nonnegative(),
|
|
11989
|
+
/** The provider's signal code. */
|
|
11990
|
+
code: string().min(1),
|
|
11991
|
+
/** Ms epoch. Absent ⇒ now. */
|
|
11992
|
+
at: number().optional()
|
|
11993
|
+
}), object({
|
|
11994
|
+
/** Whether the broker acted on it, and if not, why. */
|
|
11995
|
+
accepted: boolean(),
|
|
11996
|
+
reason: _enum([
|
|
11997
|
+
"woke",
|
|
11998
|
+
"hold-extended",
|
|
11999
|
+
"not-enabled",
|
|
12000
|
+
"no-consumer",
|
|
12001
|
+
"unknown-code"
|
|
12002
|
+
])
|
|
12003
|
+
}), { kind: "mutation" }), method(object({
|
|
11922
12004
|
deviceId: number().int().nonnegative(),
|
|
11923
12005
|
camStreamId: string().min(1),
|
|
11924
12006
|
kind: CamStreamKindSchema,
|
|
@@ -12173,6 +12255,16 @@ var PickStreamRequirementsSchema = object({
|
|
|
12173
12255
|
acceptCodecs: array(StreamCodecSchema).readonly().optional(),
|
|
12174
12256
|
/** Minimum vertical resolution. Streams shorter than this are dropped. */
|
|
12175
12257
|
minHeight: number().int().positive().optional(),
|
|
12258
|
+
/**
|
|
12259
|
+
* Maximum vertical resolution. Streams TALLER than this are dropped.
|
|
12260
|
+
*
|
|
12261
|
+
* A consumer can have a ceiling as real as its floor: Alexa documents
|
|
12262
|
+
* 480p to 1080p, and a 4K stream is as unusable to an Echo as a 360p one.
|
|
12263
|
+
* Without this the ceiling had to be re-implemented by every caller — and
|
|
12264
|
+
* one caller implementing it privately is how a second scoring authority
|
|
12265
|
+
* gets born.
|
|
12266
|
+
*/
|
|
12267
|
+
maxHeight: number().int().positive().optional(),
|
|
12176
12268
|
/** Minimum horizontal resolution. */
|
|
12177
12269
|
minWidth: number().int().positive().optional(),
|
|
12178
12270
|
/**
|
|
@@ -12189,7 +12281,22 @@ var PickStreamRequirementsSchema = object({
|
|
|
12189
12281
|
* transcoded" guard: if the device is already serving the consumer's
|
|
12190
12282
|
* codec end-to-end, there's nothing to optimise.
|
|
12191
12283
|
*/
|
|
12192
|
-
requireSiblingCodec: array(StreamCodecSchema).readonly().optional()
|
|
12284
|
+
requireSiblingCodec: array(StreamCodecSchema).readonly().optional(),
|
|
12285
|
+
/**
|
|
12286
|
+
* Whether a stream the consumer CANNOT decode may still be picked, on the
|
|
12287
|
+
* understanding that it will be transcoded.
|
|
12288
|
+
*
|
|
12289
|
+
* Default `false` — today's behaviour, and the right one for a bypass
|
|
12290
|
+
* question ("is there a stream I can forward untouched?"). Set `true` to
|
|
12291
|
+
* ask the larger question: "what is the best stream for me, transcoding if
|
|
12292
|
+
* I must?" A stream that satisfies `acceptCodecs` always outranks one that
|
|
12293
|
+
* does not, so a passthrough is never lost to a transcode; the answer says
|
|
12294
|
+
* which it is in {@link PickedCamStreamSchema.transcodes}.
|
|
12295
|
+
*
|
|
12296
|
+
* This is what lets one picker serve both the bypass and the full source
|
|
12297
|
+
* choice, instead of a consumer scoring privately when the bypass misses.
|
|
12298
|
+
*/
|
|
12299
|
+
allowTranscode: boolean().optional()
|
|
12193
12300
|
}).readonly();
|
|
12194
12301
|
var PickStreamPreferencesSchema = object({
|
|
12195
12302
|
/**
|
|
@@ -12203,12 +12310,32 @@ var PickStreamPreferencesSchema = object({
|
|
|
12203
12310
|
* picks the tallest stream; `'lowest'` picks the shortest (used by
|
|
12204
12311
|
* memory-constrained consumers / Apple Home guest sessions).
|
|
12205
12312
|
*/
|
|
12206
|
-
resolutionPreference: _enum(["highest", "lowest"]).optional()
|
|
12313
|
+
resolutionPreference: _enum(["highest", "lowest"]).optional(),
|
|
12314
|
+
/**
|
|
12315
|
+
* The height the consumer actually wants to DELIVER.
|
|
12316
|
+
*
|
|
12317
|
+
* Not a constraint — an ordering. With it set, the SMALLEST stream at or
|
|
12318
|
+
* above the target wins, and only if nothing reaches it does the tallest
|
|
12319
|
+
* take over. Pulling 1296 lines to draw 720 on a 1280x800 Echo panel costs
|
|
12320
|
+
* a decode and buys nothing, and `resolutionPreference: 'highest'` cannot
|
|
12321
|
+
* express that: it says "as big as possible", which is a different wish.
|
|
12322
|
+
*
|
|
12323
|
+
* Ignored when absent, so every existing caller keeps its ordering.
|
|
12324
|
+
*/
|
|
12325
|
+
targetHeight: number().int().positive().optional()
|
|
12207
12326
|
}).readonly();
|
|
12208
12327
|
var PickedCamStreamSchema = object({
|
|
12209
12328
|
camStreamId: string(),
|
|
12210
12329
|
codec: string().optional(),
|
|
12211
12330
|
resolution: CamStreamResolutionSchema.optional(),
|
|
12331
|
+
/**
|
|
12332
|
+
* Whether serving this stream requires a decode + re-encode.
|
|
12333
|
+
*
|
|
12334
|
+
* `false` is a stream the consumer can take as it stands. Only ever `true`
|
|
12335
|
+
* when the caller asked for it with `allowTranscode`, so a caller that did
|
|
12336
|
+
* not ask cannot be handed a cost it never agreed to pay.
|
|
12337
|
+
*/
|
|
12338
|
+
transcodes: boolean(),
|
|
12212
12339
|
/** One-line explanation of why this stream won — for logs / debug UI. */
|
|
12213
12340
|
reason: string()
|
|
12214
12341
|
});
|
|
@@ -16490,6 +16617,8 @@ var NcSystemEventKindSchema = _enum([
|
|
|
16490
16617
|
"device-enabled",
|
|
16491
16618
|
"device-battery-low",
|
|
16492
16619
|
"device-battery-normal",
|
|
16620
|
+
"device-consumable-low",
|
|
16621
|
+
"device-consumable-normal",
|
|
16493
16622
|
"stream-online",
|
|
16494
16623
|
"stream-offline",
|
|
16495
16624
|
"node-online",
|
|
@@ -16508,6 +16637,7 @@ var NcSystemEventKindSchema = _enum([
|
|
|
16508
16637
|
"addon-updated",
|
|
16509
16638
|
"server-updated",
|
|
16510
16639
|
"export-completed",
|
|
16640
|
+
"backup-completed",
|
|
16511
16641
|
"camera-online",
|
|
16512
16642
|
"camera-offline",
|
|
16513
16643
|
"camera-disabled",
|
|
@@ -23749,10 +23879,28 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
|
|
|
23749
23879
|
}), boolean()), method(object({
|
|
23750
23880
|
deviceId: number().int().nonnegative(),
|
|
23751
23881
|
sessionId: string()
|
|
23752
|
-
}), object({
|
|
23753
|
-
|
|
23754
|
-
|
|
23755
|
-
|
|
23882
|
+
}), object({
|
|
23883
|
+
pendingRenegotiation: object({
|
|
23884
|
+
target: WebrtcStreamTargetSchema,
|
|
23885
|
+
epoch: number()
|
|
23886
|
+
}).nullable(),
|
|
23887
|
+
/**
|
|
23888
|
+
* Whether the session still EXISTS.
|
|
23889
|
+
*
|
|
23890
|
+
* A consumer that holds a resource for the life of a session needs to
|
|
23891
|
+
* be able to ask, because a session does not always end the way it
|
|
23892
|
+
* began. Measured on this hub 2026-09-13: an Echo that got stuck never
|
|
23893
|
+
* sent `SessionDisconnected`, so the Alexa exporter's
|
|
23894
|
+
* `releaseEgressTranscode` never ran, and a 2304x1296 HEVC to 720p
|
|
23895
|
+
* H.264 transcode kept running for NOBODY for more than twenty
|
|
23896
|
+
* minutes. The WebRTC session had logged `WebRTC session closed`
|
|
23897
|
+
* minutes earlier — the broker knew; the holder had no way to ask.
|
|
23898
|
+
*
|
|
23899
|
+
* `false` for a session id the provider has never heard of, which is
|
|
23900
|
+
* the same answer as "it ended": either way nothing is holding it up.
|
|
23901
|
+
*/
|
|
23902
|
+
alive: boolean()
|
|
23903
|
+
}));
|
|
23756
23904
|
object({
|
|
23757
23905
|
/** All accessory children of the parent. */
|
|
23758
23906
|
childDeviceIds: array(number()).readonly(),
|
|
@@ -36256,6 +36404,12 @@ Object.freeze({
|
|
|
36256
36404
|
addonId: null,
|
|
36257
36405
|
access: "create"
|
|
36258
36406
|
},
|
|
36407
|
+
"streamBroker.reportStreamSignal": {
|
|
36408
|
+
capName: "stream-broker",
|
|
36409
|
+
capScope: "system",
|
|
36410
|
+
addonId: null,
|
|
36411
|
+
access: "create"
|
|
36412
|
+
},
|
|
36259
36413
|
"streamBroker.restartProfile": {
|
|
36260
36414
|
capName: "stream-broker",
|
|
36261
36415
|
capScope: "system",
|
|
@@ -36340,6 +36494,12 @@ Object.freeze({
|
|
|
36340
36494
|
addonId: null,
|
|
36341
36495
|
access: "create"
|
|
36342
36496
|
},
|
|
36497
|
+
"streamSignals.listSignals": {
|
|
36498
|
+
capName: "stream-signals",
|
|
36499
|
+
capScope: "device",
|
|
36500
|
+
addonId: null,
|
|
36501
|
+
access: "view"
|
|
36502
|
+
},
|
|
36343
36503
|
"switch.setState": {
|
|
36344
36504
|
capName: "switch",
|
|
36345
36505
|
capScope: "device",
|
|
@@ -38712,6 +38872,11 @@ Object.freeze({
|
|
|
38712
38872
|
form: "single",
|
|
38713
38873
|
optional: false
|
|
38714
38874
|
}],
|
|
38875
|
+
"streamBroker.reportStreamSignal": [{
|
|
38876
|
+
name: "deviceId",
|
|
38877
|
+
form: "single",
|
|
38878
|
+
optional: false
|
|
38879
|
+
}],
|
|
38715
38880
|
"streamBroker.restartProfile": [{
|
|
38716
38881
|
name: "deviceId",
|
|
38717
38882
|
form: "single",
|