@mega-yfue/eufy-sdk 0.2.0-beta.3 → 0.2.0-beta.4
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 +18 -8
- package/dist/index.js.map +2 -2
- package/dist/transport/p2p/live-trace.d.ts +16 -0
- package/dist/transport/p2p/media.d.ts +11 -0
- package/package.json +1 -1
|
@@ -188,6 +188,22 @@ export type LiveTrace =
|
|
|
188
188
|
| {
|
|
189
189
|
phase: "path-stale";
|
|
190
190
|
silentMs: number;
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* A stream received nothing on its own channel for the stall window, and what was done about it.
|
|
194
|
+
*
|
|
195
|
+
* A station that switches to a sibling leaves the stream it was serving with no frames, no error and no
|
|
196
|
+
* stop, so this silence is the only statement that it happened. `reasserted` re-issued the media start,
|
|
197
|
+
* which is the repair; `declined` left the channel alone because nothing is attached to this pull and
|
|
198
|
+
* taking the station back would take it from a camera someone is watching.
|
|
199
|
+
*
|
|
200
|
+
* Media still arriving means this never fires, so a picture that stopped advancing while this is silent
|
|
201
|
+
* stopped for a reason upstream of the station's attention.
|
|
202
|
+
*/
|
|
203
|
+
| {
|
|
204
|
+
phase: "channel-silent";
|
|
205
|
+
silentMs: number;
|
|
206
|
+
outcome: "reasserted" | "declined";
|
|
191
207
|
};
|
|
192
208
|
/**
|
|
193
209
|
* Record one startup observation at debug level.
|
|
@@ -34,11 +34,22 @@ export declare function openLiveStream(session: P2PSession, opts?: LiveStreamOpt
|
|
|
34
34
|
* The header states the stream's geometry when the capture started, and a stream that reconfigures
|
|
35
35
|
* mid-burst leaves it describing something the returned bytes contradict; the return value describes an
|
|
36
36
|
* image, so the image is its source of truth.
|
|
37
|
+
*
|
|
38
|
+
* The consumer is detached the moment the collected run is complete, and the decode that follows holds no
|
|
39
|
+
* station: it works on bytes already in memory. A station serves one camera at a time and the SDK refuses a
|
|
40
|
+
* second channel on one that is busy, so a still that kept its pull attached across its own decode would deny
|
|
41
|
+
* that station to every live request for the length of an FFmpeg run — measured on a real base as a live
|
|
42
|
+
* request refused 370ms after the still it was waiting on had already collected everything it needed.
|
|
43
|
+
*
|
|
44
|
+
* `signal` ends the collection itself, not only the wait for it, and rejects with the signal's own reason
|
|
45
|
+
* because the abandonment is the caller's fact and not a failure of the source. It reaches only the
|
|
46
|
+
* collection: past that the station is already free, so there is nothing left for it to release.
|
|
37
47
|
*/
|
|
38
48
|
export declare function captureSnapshotFromShared(source: SharedLiveSource, opts?: {
|
|
39
49
|
timeoutMs?: number;
|
|
40
50
|
collectMs?: number;
|
|
41
51
|
skipKeyframes?: number;
|
|
52
|
+
signal?: AbortSignal;
|
|
42
53
|
logger?: Logger;
|
|
43
54
|
ffmpegLevel?: FfmpegLevel;
|
|
44
55
|
ffmpegPath?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mega-yfue/eufy-sdk",
|
|
3
|
-
"version": "0.2.0-beta.
|
|
3
|
+
"version": "0.2.0-beta.4",
|
|
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",
|