npm.io
1.1.1 • Published 2d ago

@svta/cml-cmsd

Licence
Apache-2.0
Version
1.1.1
Deps
0
Size
41 kB
Vulns
0
Weekly
0
Stars
84

@svta/cml-cmsd

Common Media Server Data (CMSD) encoding and decoding.

Installation

npm i @svta/cml-cmsd

Usage

import {
	CmsdObjectType,
	CmsdStreamingFormat,
	CmsdStreamType,
	encodeCmsdStatic,
} from "@svta/cml-cmsd";
import type { CmsdStatic } from "@svta/cml-cmsd";

const input: CmsdStatic = {
	ot: CmsdObjectType.VIDEO,
	sf: CmsdStreamingFormat.HLS,
	st: CmsdStreamType.VOD,
	d: 5000,
	br: 2000,
	n: "OriginProviderA",
};

console.log(encodeCmsdStatic(input));
// ot=v,sf=h,st=v,d=5000,br=2000,n="OriginProviderA"

Keywords