variable streamInfoList

Codec for <StreamInfoList>.

Examples

Build a <StreamInfoList> element

import { assertStringIncludes } from "@std/assert";
import { streamInfoList } from "@hertzg/reolink-api/protocol/params";

const xml = streamInfoList.encode({
  StreamInfo: [{
    channelBits: 1,
    encodeTable: [{
      type: "subStream",
      resolution: { width: 640, height: 360 },
      defaultFramerate: 15,
      defaultBitrate: 256,
      framerateTable: "15,10,7,4",
      bitrateTable: "64,128,160,192,256",
    }],
  }],
});

assertStringIncludes(xml, "<resolution><width>640</width><height>360</height></resolution>");

Type

XmlParam<"StreamInfoList", StreamInfoList>

Usage

import { streamInfoList } from "protocol/params/mod.ts";