variable smtPlayUrl

Codec for <SmtPlayUrl>.

Examples

Read back a request

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

const root = parse(
  '<SmtPlayUrl version="1.1"><channelId>0</channelId>' +
    "<stream_type>0</stream_type></SmtPlayUrl>",
).root;

assertEquals(smtPlayUrl.decode(root), { channelId: 0, stream_type: 0 });

Type

XmlParam<"SmtPlayUrl", SmtPlayUrl>

Usage

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