@camstack/addon-provider-unifi 0.2.107 → 0.2.109

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/addon.js CHANGED
@@ -12292,7 +12292,23 @@ var PickStreamRequirementsSchema = object({
12292
12292
  * This is what lets one picker serve both the bypass and the full source
12293
12293
  * choice, instead of a consumer scoring privately when the bypass misses.
12294
12294
  */
12295
- allowTranscode: boolean().optional()
12295
+ allowTranscode: boolean().optional(),
12296
+ /**
12297
+ * Consider ONLY streams the broker has bound to a profile slot.
12298
+ *
12299
+ * A consumer that dials the broker — which is every exporter, since none
12300
+ * of them may open the camera's own URL — can do nothing with a source
12301
+ * that has no slot: there is no restream to dial. Without this the picker
12302
+ * can name such a stream, and each consumer discovers the dead end for
12303
+ * itself: Alexa's `profileForCamStream` returns `null` and it quietly
12304
+ * falls back, and HomeKit would have had to grow the same function again.
12305
+ *
12306
+ * Default `false`, and deliberately so: the BROKER itself picks through
12307
+ * here when it decides which source to BIND to a slot
12308
+ * (`computeInitialAssignment`), and it must see the unbound ones or it
12309
+ * could never bind them.
12310
+ */
12311
+ requireProfileBound: boolean().optional()
12296
12312
  }).readonly();
12297
12313
  var PickStreamPreferencesSchema = object({
12298
12314
  /**
@@ -12333,7 +12349,43 @@ var PickedCamStreamSchema = object({
12333
12349
  */
12334
12350
  transcodes: boolean(),
12335
12351
  /** One-line explanation of why this stream won — for logs / debug UI. */
12336
- reason: string()
12352
+ reason: string(),
12353
+ /**
12354
+ * The broker profile slot this source is bound to, when it is bound.
12355
+ *
12356
+ * Answered HERE because every consumer needs it and none of them can get it
12357
+ * from the `camStreamId` alone. Alexa wrote `profileForCamStream` for it —
12358
+ * a second cap read plus a `null` branch — and HomeKit was about to write
12359
+ * the same function a second time.
12360
+ *
12361
+ * Absent when the source has no slot, which a caller passing
12362
+ * `requireProfileBound` can never see.
12363
+ */
12364
+ profile: CamProfileSchema.optional(),
12365
+ /** The broker id of that slot, for logs that must name what was dialled. */
12366
+ brokerId: string().optional(),
12367
+ /**
12368
+ * The broker restream URL to dial for this stream.
12369
+ *
12370
+ * An exporter must never open the camera's own URL — the broker is the one
12371
+ * that dials the camera, and every consumer goes through its restream. So
12372
+ * the picker answers with the thing a consumer may actually use, instead of
12373
+ * naming a source and leaving each caller to look the URL up.
12374
+ */
12375
+ url: string().optional(),
12376
+ /**
12377
+ * Frames per second this stream really delivers, and where the number came
12378
+ * from.
12379
+ *
12380
+ * It is here because getting it wrong is expensive and silent: a HomeKit
12381
+ * accessory advertised 720p at 24 fps while the slot serving it ran at 9,
12382
+ * and the controller rendered nothing at all. The source is carried with the
12383
+ * value for the same reason the bitrate evidence is: `published` is what the
12384
+ * publisher declares and `measured` is what the broker observed, and they
12385
+ * are not interchangeable.
12386
+ */
12387
+ fps: number().positive().optional(),
12388
+ fpsSource: _enum(["published", "measured"]).optional()
12337
12389
  });
12338
12390
  /**
12339
12391
  * Camera streams — device-scoped facade over the system `stream-broker`.
package/dist/addon.mjs CHANGED
@@ -12291,7 +12291,23 @@ var PickStreamRequirementsSchema = object({
12291
12291
  * This is what lets one picker serve both the bypass and the full source
12292
12292
  * choice, instead of a consumer scoring privately when the bypass misses.
12293
12293
  */
12294
- allowTranscode: boolean().optional()
12294
+ allowTranscode: boolean().optional(),
12295
+ /**
12296
+ * Consider ONLY streams the broker has bound to a profile slot.
12297
+ *
12298
+ * A consumer that dials the broker — which is every exporter, since none
12299
+ * of them may open the camera's own URL — can do nothing with a source
12300
+ * that has no slot: there is no restream to dial. Without this the picker
12301
+ * can name such a stream, and each consumer discovers the dead end for
12302
+ * itself: Alexa's `profileForCamStream` returns `null` and it quietly
12303
+ * falls back, and HomeKit would have had to grow the same function again.
12304
+ *
12305
+ * Default `false`, and deliberately so: the BROKER itself picks through
12306
+ * here when it decides which source to BIND to a slot
12307
+ * (`computeInitialAssignment`), and it must see the unbound ones or it
12308
+ * could never bind them.
12309
+ */
12310
+ requireProfileBound: boolean().optional()
12295
12311
  }).readonly();
12296
12312
  var PickStreamPreferencesSchema = object({
12297
12313
  /**
@@ -12332,7 +12348,43 @@ var PickedCamStreamSchema = object({
12332
12348
  */
12333
12349
  transcodes: boolean(),
12334
12350
  /** One-line explanation of why this stream won — for logs / debug UI. */
12335
- reason: string()
12351
+ reason: string(),
12352
+ /**
12353
+ * The broker profile slot this source is bound to, when it is bound.
12354
+ *
12355
+ * Answered HERE because every consumer needs it and none of them can get it
12356
+ * from the `camStreamId` alone. Alexa wrote `profileForCamStream` for it —
12357
+ * a second cap read plus a `null` branch — and HomeKit was about to write
12358
+ * the same function a second time.
12359
+ *
12360
+ * Absent when the source has no slot, which a caller passing
12361
+ * `requireProfileBound` can never see.
12362
+ */
12363
+ profile: CamProfileSchema.optional(),
12364
+ /** The broker id of that slot, for logs that must name what was dialled. */
12365
+ brokerId: string().optional(),
12366
+ /**
12367
+ * The broker restream URL to dial for this stream.
12368
+ *
12369
+ * An exporter must never open the camera's own URL — the broker is the one
12370
+ * that dials the camera, and every consumer goes through its restream. So
12371
+ * the picker answers with the thing a consumer may actually use, instead of
12372
+ * naming a source and leaving each caller to look the URL up.
12373
+ */
12374
+ url: string().optional(),
12375
+ /**
12376
+ * Frames per second this stream really delivers, and where the number came
12377
+ * from.
12378
+ *
12379
+ * It is here because getting it wrong is expensive and silent: a HomeKit
12380
+ * accessory advertised 720p at 24 fps while the slot serving it ran at 9,
12381
+ * and the controller rendered nothing at all. The source is carried with the
12382
+ * value for the same reason the bitrate evidence is: `published` is what the
12383
+ * publisher declares and `measured` is what the broker observed, and they
12384
+ * are not interchangeable.
12385
+ */
12386
+ fps: number().positive().optional(),
12387
+ fpsSource: _enum(["published", "measured"]).optional()
12336
12388
  });
12337
12389
  /**
12338
12390
  * Camera streams — device-scoped facade over the system `stream-broker`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-unifi",
3
- "version": "0.2.107",
3
+ "version": "0.2.109",
4
4
  "description": "UniFi Network controller device-provider addon for CamStack — local-controller infra switches/APs (as containers) + network-client presence. NO cameras/Protect.",
5
5
  "keywords": [
6
6
  "camstack",