@mega-yfue/eufy-sdk / LiveTrace
Type Alias: LiveTrace
type LiveTrace =
| {
action: "start" | "keepalive";
level2: boolean;
phase: "media-command";
topology: "attached" | "own";
}
| {
action: "start";
phase: | "media-command-ack"
| "media-command-retry"
| "media-command-unacknowledged";
}
| {
accepted: boolean;
phase: "first-video-command";
signCode: number;
}
| {
keyframe: boolean;
phase: "first-video-unit";
}
| {
phase: "first-keyframe";
}
| {
media: "audio" | "video";
phase: "first-foreign-media-command";
}
| {
phase: "video-decode-empty";
signCode: number;
}
| {
dataType: number;
phase: "datagram-gap";
}
| {
dataType: number;
phase: "sequence-restart";
}
| {
phase: "level2-wait";
waitMs: number;
}
| {
cipherId: number;
phase: "level2-ready";
}
| {
phase: "level2-absent";
waitedMs: number;
}
| {
deadlineMs: number;
phase: "warming";
retryMs: number;
}
| {
phase: "media-command-unsent";
reason: "level2-key" | "address";
}
| {
phase: "path-stale";
silentMs: number;
};One bounded startup observation.
Union Members
Type Literal
{
action: "start" | "keepalive";
level2: boolean;
phase: "media-command";
topology: "attached" | "own";
}A media start or keepalive was sent, with the topology and encryption level it was sent under.
Type Literal
{
action: "start";
phase: | "media-command-ack"
| "media-command-retry"
| "media-command-unacknowledged";
}The device acknowledged a retained start, or that start was repeated / abandoned unacknowledged.
Type Literal
{
accepted: boolean;
phase: "first-video-command";
signCode: number;
}The first inbound video command, and whether this stream's channel filter accepted it.
Type Literal
{
keyframe: boolean;
phase: "first-video-unit";
}The first reassembled video access unit, and whether it was decodable on its own.
Type Literal
{
phase: "first-keyframe";
}The first keyframe reached the consumer.
Type Literal
{
media: "audio" | "video";
phase: "first-foreign-media-command";
}Media tagged for another camera on the same station arrived first.
Type Literal
{
phase: "video-decode-empty";
signCode: number;
}A video payload decoded to nothing, so no access unit could be built from it.
Type Literal
{
dataType: number;
phase: "datagram-gap";
}A datagram was missing on a data channel, discarding the logical frame being reassembled.
Type Literal
{
dataType: number;
phase: "sequence-restart";
}A data channel's numbering restarted mid-connection, so sequencing resynchronized onto it.
Type Literal
{
phase: "level2-wait";
waitMs: number;
}A live start is holding for the station's level-2 key, with the milliseconds it will wait.
The first of three phases that account for the wait before any media command is sent. A start that looks slow is either waiting here, waiting for the station to serve the channel it was asked for, or being re-issued — and only these separate them.
Type Literal
{
cipherId: number;
phase: "level2-ready";
}The station's level-2 key was negotiated, under the cipher it selected.
Type Literal
{
phase: "level2-absent";
waitedMs: number;
}The level-2 key did not arrive in its grace, so the start proceeds at level 1 or not at all.
Type Literal
{
deadlineMs: number;
phase: "warming";
retryMs: number;
}A shared source began warming, with the interval it re-issues on and the deadline it fails at.
Type Literal
{
phase: "media-command-unsent";
reason: "level2-key" | "address";
}A media command was never put on the wire, and what it was missing.
The attached media start has no level-1 form, so without the station's level-2 key there is nothing to send. A command that was never sent is otherwise indistinguishable from one the station ignored, which is the difference between a key that never arrived and a station that is not answering.
Type Literal
{
phase: "path-stale";
silentMs: number;
}This connection's path has stopped answering the heartbeat, with how long it has been silent.
The station answers every PING with a PONG, so silence past several heartbeats is the path being gone. Stated only where a pong arrived: a station that has never answered says nothing by not answering now.