@mega-yfue/eufy-sdk 0.6.0-beta.6 → 0.6.0-beta.7
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
CHANGED
|
@@ -20568,14 +20568,20 @@ var SharedLiveSource = class {
|
|
|
20568
20568
|
}
|
|
20569
20569
|
/**
|
|
20570
20570
|
* Handle a consumer leaving. When the last one detaches (1→0), release the station-session user via
|
|
20571
|
-
* {@link SharedLiveSourceOptions.onIdle} (its own longer idle timer then arms) and
|
|
20572
|
-
* linger teardown.
|
|
20571
|
+
* {@link SharedLiveSourceOptions.onIdle} (its own longer idle timer then arms) and, while a stream is
|
|
20572
|
+
* still running, arm its linger teardown.
|
|
20573
|
+
*
|
|
20574
|
+
* A source that ended its own stream ends its consumers before tearing down, and a Readable consumer
|
|
20575
|
+
* detaches only once it has reached EOF — after that teardown. The source is then already `stopped`,
|
|
20576
|
+
* with its session claim released, and stays so: lingering would make the owner hand it out again
|
|
20577
|
+
* instead of building a source that holds a session.
|
|
20573
20578
|
*/
|
|
20574
20579
|
onDetach(consumer) {
|
|
20575
20580
|
this.consumers.delete(consumer);
|
|
20576
20581
|
if (this.consumers.size === 0 && !this.disposed) {
|
|
20577
20582
|
this.opts.onIdle?.();
|
|
20578
|
-
this.
|
|
20583
|
+
if (this.stream)
|
|
20584
|
+
this.arm();
|
|
20579
20585
|
}
|
|
20580
20586
|
}
|
|
20581
20587
|
/** Refcount hit zero — arm the linger teardown. A new attach in the window cancels it. */
|