@mega-yfue/eufy-sdk / LiveStreamOptions
Interface: LiveStreamOptions
Properties
accountId?
accountId?: string;Admin account id — required for the level-2 (signCode 8) media-start payload selecting a camera.
channel?
channel?: number;Camera channel to START (the device's device_channel) — sent in CMD_START_REALTIME_MEDIA to select which camera on a multi-camera HomeBase streams. Defaults to the station channel.
On a HomeBase-attached camera it is ALSO what inbound media is matched against, so one camera's stream never carries another camera's frames: a station fanning several cameras out over one session tags every media frame with the camera it belongs to. A frame tagged for a channel a sibling started is never taken, however long the station keeps serving that sibling instead of this one.
eccPrivateKey?
eccPrivateKey?: Buffer<ArrayBufferLike>;Camera ECC private key (32B) for E2E/encrypted cameras; omit for plaintext cameras.
homeBaseAttached?
homeBaseAttached?: boolean;Runtime topology fact (from the device record: parent_sn && parent_sn !== sn): true = the camera rides a HomeBase's session (start via the level-2 1003 payload), false = own-session camera (start via the 1700/cmd 1000 path, level-2 or level-1 per the session key). NOT a family trait.
keepAliveMs?
keepAliveMs?: number;Re-send the media start every N ms to hold the stream open. Defaults to DEFAULT_KEEPALIVE_MS; pass 0 to disable.
logger?
logger?: Logger;Diagnostics sink. Omit for silence.
reassertWanted?
reassertWanted?: () => boolean;Whether re-asserting this camera's channel is still wanted, consulted each time the stall window elapses. Absent means always wanted.
A re-assert on an attached camera is a full media start, so it takes the station from whichever camera it was serving. Whether that is wanted depends on who is attached to this pull and to its siblings, which this stream cannot see. Its owner can, so it asks rather than assuming.
The watch keeps re-arming while this answers false, so a pull that gains a consumer re-asserts at the next window rather than staying silent for the rest of its life.
Returns
boolean
stallMs?
stallMs?: number;How long an attached stream tolerates silence on its own channel before re-asserting again, in ms.
The re-assert is settled by the first own-channel frame, because settling it is what stops two attached streams contending over one session, which serves one camera at a time. Silence for this long says the station is no longer serving this camera, which is the only condition the re-assert was for. Defaults to twice the keepalive interval, so a stream whose media flows never reaches it.