eufy-mega / model/capabilities / CameraActions
Type Alias: CameraActions
type CameraActions = object;Bound camera controls — the object returned by dev.camera(). Control methods are always present; the media methods (snapshot/snapshotLive/live/record) are present only when the device is bound to a live client with a MediaProvider — hence optional. Their signatures mirror MediaProvider exactly (indexed access keeps them in lockstep).
Properties
enabled?
readonly optional enabled?: boolean;Whether the camera is powered on (property enabled).
imageFlipped?
readonly optional imageFlipped?: boolean;Whether the image is rotated 180° (property imageFlipped).
live?
optional live?: MediaProvider["live"];Open a managed live stream (present only when bound to a media provider).
nightVision?
readonly optional nightVision?: number;Night-vision mode (NightVision value; property nightVision).
openReadable?
optional openReadable?: MediaProvider["openReadable"];Open a node:stream Readable of the live feed (present only when bound to a media provider).
record?
optional record?: MediaProvider["record"];Record N seconds → mp4/h264 buffer (present only when bound to a media provider).
recordFragments?
optional recordFragments?: MediaProvider["recordFragments"];Continuous fragmented-MP4 (CMAF) recording (present only when bound to a media provider).
snapshot?
optional snapshot?: MediaProvider["snapshot"];Latest stored still (present only when bound to a media provider).
snapshotLive?
optional snapshotLive?: MediaProvider["snapshotLive"];Fresh still from a short live burst (present only when bound to a media provider).
videoQuality?
readonly optional videoQuality?: number;Video record-quality tier (VideoQuality value; property videoQuality).
watermark?
readonly optional watermark?: number;On-screen watermark/OSD mode (Watermark value; property watermark).
Methods
off()
off(): Promise<void>;Power the camera off.
Returns
Promise<void>
on()
on(): Promise<void>;Power the camera on.
Returns
Promise<void>
setEnabled()
setEnabled(v): Promise<void>;Set camera power on/off.
Parameters
v
boolean
Returns
Promise<void>
setImageFlipped()
setImageFlipped(v): Promise<void>;Rotate the image 180° (true = flipped).
Parameters
v
boolean
Returns
Promise<void>
setNightVision()
setNightVision(mode): Promise<void>;Set night-vision mode (NightVision: Off / Infrared / FullColor).
Parameters
mode
number
Returns
Promise<void>
setPrivacy()
setPrivacy(v): Promise<void>;Enable/disable privacy mode (multi-frame burst).
Parameters
v
boolean
Returns
Promise<void>
setStatusLed()
setStatusLed(v): Promise<void>;Toggle the status LED.
Parameters
v
boolean
Returns
Promise<void>
setVideoQuality()
setVideoQuality(quality): Promise<void>;Set video record quality — a resolution NAME (VideoQuality) or a raw tier 1/2/3.
Parameters
quality
number | VideoQualityName
Returns
Promise<void>
setWatermark()
setWatermark(mode): Promise<void>;Set the on-screen watermark/OSD overlay (Watermark: Off / Timestamp / TimestampAndLogo).
Parameters
mode
number
Returns
Promise<void>