Codec for <timelapseCfg>.
Build a daily mp4 task
Build a daily mp4 task
import { assertStringIncludes } from "@std/assert"; import { timelapseCfg } from "@hertzg/reolink-api/protocol/params"; const xml = timelapseCfg.encode({ channelId: 0, item: { duration: [{ valid: 1, startTime: { hour: 6, minute: 0, second: 0 }, endTime: { hour: 18, minute: 0, second: 0 }, }], enable: 1, neverEnd: 1, interval: 60, streamType: "mainStream", taskType: "mp4", }, }); assertStringIncludes(xml, "<duration><valid>1</valid><startTime><hour>6</hour>");
XmlParam<"timelapseCfg", TimelapseCfg>