@mega-yfue/eufy-sdk 0.5.0-beta.60 → 0.5.0-beta.62

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.
@@ -509,11 +509,11 @@ export declare class P2PCommandRouter {
509
509
  */
510
510
  private onLiveStartFailed;
511
511
  /**
512
- * Replace the session under a warming source whose media start nothing acknowledged, and warm again on it.
512
+ * Replace the session under a warming source it is not serving, and warm again on it.
513
513
  *
514
514
  * Only a STANDALONE device's session is replaced, for the reason {@link onLiveStartFailed} gives: an attached
515
515
  * camera shares its HomeBase session with every other camera on it, and closing that to recover one would
516
- * drop the rest. Such a source keeps the re-issue it always had.
516
+ * drop the rest. Such a source keeps the re-issue it always had, which the answer (false) tells it.
517
517
  *
518
518
  * The source is left warming throughout, holding the deadline it started, so this either produces a stream
519
519
  * within that window or fails exactly as it would have. A replacement that cannot be opened leaves the
@@ -83,12 +83,13 @@ export interface SharedLiveSourceOptions {
83
83
  */
84
84
  onStopped?: () => void;
85
85
  /**
86
- * A media start was abandoned unacknowledged before anything was delivered, so this session is not being
87
- * heard. The owner is asked for a replacement and calls {@link SharedLiveSource.rewarm} once it has one.
86
+ * This session is not serving the warm-up: a media start was abandoned unacknowledged, or forced starts went
87
+ * unanswered by any media, before anything was delivered. The owner answers whether it is replacing the
88
+ * session, and calls {@link SharedLiveSource.rewarm} once it has the replacement.
88
89
  *
89
- * Asked at most once per warm-up: further abandonments are the same session saying the same thing.
90
+ * Asked at most once per warm-up: further evidence is the same session saying the same thing.
90
91
  */
91
- onSessionUnreachable?: () => void;
92
+ onSessionUnreachable?: () => boolean;
92
93
  }
93
94
  /**
94
95
  * A single consumer of a {@link SharedLiveSource}. A {@link LiveStreamConsumer} (so `live()` can hand it
@@ -251,18 +252,17 @@ export declare class SharedLiveSource {
251
252
  */
252
253
  private warm;
253
254
  /**
254
- * A start was abandoned unacknowledged. Ask for a replacement session where nothing has been delivered yet.
255
+ * Ask the owner for a replacement session where nothing has been delivered yet, answering whether one is coming.
255
256
  *
256
- * The abandonment is roughly twenty byte-identical sends with no reply, against acknowledgement latencies of
257
- * 4–37 ms awake and 238 ms waking, so it is the session that is not being heard rather than a slow device —
258
- * `P2PSession` says as much: the camera was never told to stream, so this warm-up can only time out. Where
259
- * media has already flowed the abandonment means something else and this does nothing.
257
+ * An unacknowledged start is roughly twenty byte-identical sends with no reply, against acknowledgement latencies
258
+ * of 4–37 ms awake and 238 ms waking, so it is the session that is not being heard rather than a slow device: the
259
+ * camera was never told to stream. Where media has already flowed the abandonment means something else and this
260
+ * does nothing. The DEADLINE is left running: the window belongs to the attempt, not to the session it started on.
260
261
  *
261
- * The retry ticker is stopped while a replacement is awaited, because every tick it issues goes to the same
262
- * unheard session. The DEADLINE is left running: the window belongs to the attempt, not to the session it
263
- * started on.
262
+ * The retry ticker is stopped only once the owner has said it is replacing the session: an owner that cannot
263
+ * (an attached camera shares its HomeBase session) leaves the source re-issuing as it always did.
264
264
  */
265
- private onStartUnacknowledged;
265
+ private askForFreshSession;
266
266
  /**
267
267
  * Warm again on a session the owner has replaced, inside the deadline the first attempt started.
268
268
  *
@@ -290,6 +290,11 @@ export declare class SharedLiveSource {
290
290
  * {@link fruitlessReissues} for why one is not enough and why what the stream delivered earlier is not
291
291
  * evidence. Once media arrives the keepalive is what is wanted, and an attached camera re-sends a full start
292
292
  * either way.
293
+ *
294
+ * A forced start that a whole interval later has still produced nothing is a session that acknowledges and
295
+ * does not serve: a fresh session on the same camera delivers a keyframe within a second, so a warm-up asks
296
+ * for one rather than forcing starts onto this one until its deadline. Wired only: a cold battery camera is
297
+ * slow rather than deaf, measured at about 8 s to first media, and replacing its session would cost a wake.
293
298
  */
294
299
  private reissueStart;
295
300
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mega-yfue/eufy-sdk",
3
- "version": "0.5.0-beta.60",
3
+ "version": "0.5.0-beta.62",
4
4
  "description": "One typed TypeScript client for the Anker eufy v6 cloud — capability-driven devices, realtime events over P2P/MQTT/push, and live media",
5
5
  "license": "Apache-2.0",
6
6
  "author": "mega-yfue",