Skip to content

@mega-yfue/eufy-sdk / LiveStream

Class: LiveStream

Extends

  • EventEmitter

Constructors

Constructor

ts
new LiveStream(session, opts?): LiveStream;

Parameters

session

P2PSession

opts?

LiveStreamOptions = {}

Returns

LiveStream

Overrides

ts
EventEmitter.constructor

Methods

emit()

Call Signature

ts
emit(event, frame): boolean;
Parameters
event

"video"

frame

LiveVideoFrame

Returns

boolean

Inherited from
ts
EventEmitter.emit

Call Signature

ts
emit(event, frame): boolean;
Parameters
event

"audio"

frame

LiveAudioFrame

Returns

boolean

Inherited from
ts
EventEmitter.emit

Call Signature

ts
emit(event): boolean;
Parameters
event

"start" | "stop" | "unacknowledged"

Returns

boolean

Inherited from
ts
EventEmitter.emit

Call Signature

ts
emit(event, err): boolean;
Parameters
event

"error"

err

Error

Returns

boolean

Inherited from
ts
EventEmitter.emit

nudge()

ts
nudge(force?): void;

Re-issue the start command (idempotent while listening) — the media-start / keepalive nudge. The shared source calls this to retry a start that raced key negotiation, until frames flow. Safe to call repeatedly: startLiveMedia self-selects start vs keepalive per the session state.

Parameters

force?

boolean

Returns

void


on()

Call Signature

ts
on(event, listener): this;
Parameters
event

"video"

listener

(frame) => void

Returns

this

Inherited from
ts
EventEmitter.on

Call Signature

ts
on(event, listener): this;
Parameters
event

"audio"

listener

(frame) => void

Returns

this

Inherited from
ts
EventEmitter.on

Call Signature

ts
on(event, listener): this;
Parameters
event

"start" | "stop"

listener

() => void

Returns

this

Inherited from
ts
EventEmitter.on

Call Signature

ts
on(event, listener): this;
Parameters
event

"error"

listener

(err) => void

Returns

this

Inherited from
ts
EventEmitter.on

Call Signature

ts
on(event, listener): this;
Parameters
event

"budget"

listener

(notice) => void

Returns

this

Inherited from
ts
EventEmitter.on

Call Signature

ts
on(event, listener): this;

This channel's media start was abandoned unacknowledged — see LiveStreamHandle.

Parameters
event

"unacknowledged"

listener

() => void

Returns

this

Inherited from
ts
EventEmitter.on

start()

ts
start(): this;

Begin streaming: attach the frame listener and tell the station to start realtime media.

Returns

this


stop()

ts
stop(): void;

Stop streaming: detach the listener and tell the station to stop. Idempotent.

Returns

void

Independent and unofficial. Not affiliated with, endorsed by, or sponsored by Anker Innovations, Anker eufy, or eufy. "Anker eufy", "eufy" and "Anker" are trademarks of their respective owners. Use responsibly — rapid or failed logins can trigger captcha or temporary cooldowns.