@camstack/addon-provider-onvif 1.2.106 → 1.2.107

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
@@ -12262,7 +12262,23 @@ var PickStreamRequirementsSchema = object({
12262
12262
  * This is what lets one picker serve both the bypass and the full source
12263
12263
  * choice, instead of a consumer scoring privately when the bypass misses.
12264
12264
  */
12265
- allowTranscode: boolean().optional()
12265
+ allowTranscode: boolean().optional(),
12266
+ /**
12267
+ * Consider ONLY streams the broker has bound to a profile slot.
12268
+ *
12269
+ * A consumer that dials the broker — which is every exporter, since none
12270
+ * of them may open the camera's own URL — can do nothing with a source
12271
+ * that has no slot: there is no restream to dial. Without this the picker
12272
+ * can name such a stream, and each consumer discovers the dead end for
12273
+ * itself: Alexa's `profileForCamStream` returns `null` and it quietly
12274
+ * falls back, and HomeKit would have had to grow the same function again.
12275
+ *
12276
+ * Default `false`, and deliberately so: the BROKER itself picks through
12277
+ * here when it decides which source to BIND to a slot
12278
+ * (`computeInitialAssignment`), and it must see the unbound ones or it
12279
+ * could never bind them.
12280
+ */
12281
+ requireProfileBound: boolean().optional()
12266
12282
  }).readonly();
12267
12283
  var PickStreamPreferencesSchema = object({
12268
12284
  /**
@@ -12303,7 +12319,43 @@ var PickedCamStreamSchema = object({
12303
12319
  */
12304
12320
  transcodes: boolean(),
12305
12321
  /** One-line explanation of why this stream won — for logs / debug UI. */
12306
- reason: string()
12322
+ reason: string(),
12323
+ /**
12324
+ * The broker profile slot this source is bound to, when it is bound.
12325
+ *
12326
+ * Answered HERE because every consumer needs it and none of them can get it
12327
+ * from the `camStreamId` alone. Alexa wrote `profileForCamStream` for it —
12328
+ * a second cap read plus a `null` branch — and HomeKit was about to write
12329
+ * the same function a second time.
12330
+ *
12331
+ * Absent when the source has no slot, which a caller passing
12332
+ * `requireProfileBound` can never see.
12333
+ */
12334
+ profile: CamProfileSchema.optional(),
12335
+ /** The broker id of that slot, for logs that must name what was dialled. */
12336
+ brokerId: string().optional(),
12337
+ /**
12338
+ * The broker restream URL to dial for this stream.
12339
+ *
12340
+ * An exporter must never open the camera's own URL — the broker is the one
12341
+ * that dials the camera, and every consumer goes through its restream. So
12342
+ * the picker answers with the thing a consumer may actually use, instead of
12343
+ * naming a source and leaving each caller to look the URL up.
12344
+ */
12345
+ url: string().optional(),
12346
+ /**
12347
+ * Frames per second this stream really delivers, and where the number came
12348
+ * from.
12349
+ *
12350
+ * It is here because getting it wrong is expensive and silent: a HomeKit
12351
+ * accessory advertised 720p at 24 fps while the slot serving it ran at 9,
12352
+ * and the controller rendered nothing at all. The source is carried with the
12353
+ * value for the same reason the bitrate evidence is: `published` is what the
12354
+ * publisher declares and `measured` is what the broker observed, and they
12355
+ * are not interchangeable.
12356
+ */
12357
+ fps: number().positive().optional(),
12358
+ fpsSource: _enum(["published", "measured"]).optional()
12307
12359
  });
12308
12360
  DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), array(CameraStreamSchema).readonly()), method(object({ deviceId: number().int().nonnegative() }), array(ProfileSlotSchema).readonly()), method(object({
12309
12361
  deviceId: number().int().nonnegative(),
package/dist/addon.mjs CHANGED
@@ -12263,7 +12263,23 @@ var PickStreamRequirementsSchema = object({
12263
12263
  * This is what lets one picker serve both the bypass and the full source
12264
12264
  * choice, instead of a consumer scoring privately when the bypass misses.
12265
12265
  */
12266
- allowTranscode: boolean().optional()
12266
+ allowTranscode: boolean().optional(),
12267
+ /**
12268
+ * Consider ONLY streams the broker has bound to a profile slot.
12269
+ *
12270
+ * A consumer that dials the broker — which is every exporter, since none
12271
+ * of them may open the camera's own URL — can do nothing with a source
12272
+ * that has no slot: there is no restream to dial. Without this the picker
12273
+ * can name such a stream, and each consumer discovers the dead end for
12274
+ * itself: Alexa's `profileForCamStream` returns `null` and it quietly
12275
+ * falls back, and HomeKit would have had to grow the same function again.
12276
+ *
12277
+ * Default `false`, and deliberately so: the BROKER itself picks through
12278
+ * here when it decides which source to BIND to a slot
12279
+ * (`computeInitialAssignment`), and it must see the unbound ones or it
12280
+ * could never bind them.
12281
+ */
12282
+ requireProfileBound: boolean().optional()
12267
12283
  }).readonly();
12268
12284
  var PickStreamPreferencesSchema = object({
12269
12285
  /**
@@ -12304,7 +12320,43 @@ var PickedCamStreamSchema = object({
12304
12320
  */
12305
12321
  transcodes: boolean(),
12306
12322
  /** One-line explanation of why this stream won — for logs / debug UI. */
12307
- reason: string()
12323
+ reason: string(),
12324
+ /**
12325
+ * The broker profile slot this source is bound to, when it is bound.
12326
+ *
12327
+ * Answered HERE because every consumer needs it and none of them can get it
12328
+ * from the `camStreamId` alone. Alexa wrote `profileForCamStream` for it —
12329
+ * a second cap read plus a `null` branch — and HomeKit was about to write
12330
+ * the same function a second time.
12331
+ *
12332
+ * Absent when the source has no slot, which a caller passing
12333
+ * `requireProfileBound` can never see.
12334
+ */
12335
+ profile: CamProfileSchema.optional(),
12336
+ /** The broker id of that slot, for logs that must name what was dialled. */
12337
+ brokerId: string().optional(),
12338
+ /**
12339
+ * The broker restream URL to dial for this stream.
12340
+ *
12341
+ * An exporter must never open the camera's own URL — the broker is the one
12342
+ * that dials the camera, and every consumer goes through its restream. So
12343
+ * the picker answers with the thing a consumer may actually use, instead of
12344
+ * naming a source and leaving each caller to look the URL up.
12345
+ */
12346
+ url: string().optional(),
12347
+ /**
12348
+ * Frames per second this stream really delivers, and where the number came
12349
+ * from.
12350
+ *
12351
+ * It is here because getting it wrong is expensive and silent: a HomeKit
12352
+ * accessory advertised 720p at 24 fps while the slot serving it ran at 9,
12353
+ * and the controller rendered nothing at all. The source is carried with the
12354
+ * value for the same reason the bitrate evidence is: `published` is what the
12355
+ * publisher declares and `measured` is what the broker observed, and they
12356
+ * are not interchangeable.
12357
+ */
12358
+ fps: number().positive().optional(),
12359
+ fpsSource: _enum(["published", "measured"]).optional()
12308
12360
  });
12309
12361
  DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), array(CameraStreamSchema).readonly()), method(object({ deviceId: number().int().nonnegative() }), array(ProfileSlotSchema).readonly()), method(object({
12310
12362
  deviceId: number().int().nonnegative(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-onvif",
3
- "version": "1.2.106",
3
+ "version": "1.2.107",
4
4
  "description": "ONVIF camera device provider addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",