variable requestIframe

Codec for <RequestIframe>.

Examples

Read a <RequestIframe> element

import { assertEquals } from "@std/assert";
import { parse } from "@std/xml";
import { requestIframe } from "@hertzg/reolink-api/protocol/params";

const root = parse(
  '<RequestIframe version="1.1"><streamType>mainStream</streamType></RequestIframe>',
).root;

assertEquals(requestIframe.decode(root), { streamType: "mainStream" });

Type

XmlParam<"RequestIframe", RequestIframe>

Usage

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