@svta/cml-cmsd 0.19.0 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -0
- package/dist/index.d.ts +449 -21
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +168 -15
- package/dist/index.js.map +1 -1
- package/package.json +5 -24
- package/dist/CMSD_DYNAMIC.d.ts +0 -8
- package/dist/CMSD_DYNAMIC.d.ts.map +0 -1
- package/dist/CMSD_DYNAMIC.js +0 -8
- package/dist/CMSD_DYNAMIC.js.map +0 -1
- package/dist/CMSD_STATIC.d.ts +0 -8
- package/dist/CMSD_STATIC.d.ts.map +0 -1
- package/dist/CMSD_STATIC.js +0 -8
- package/dist/CMSD_STATIC.js.map +0 -1
- package/dist/CMSD_V1.d.ts +0 -8
- package/dist/CMSD_V1.d.ts.map +0 -1
- package/dist/CMSD_V1.js +0 -8
- package/dist/CMSD_V1.js.map +0 -1
- package/dist/CmsdCustomKey.d.ts +0 -11
- package/dist/CmsdCustomKey.d.ts.map +0 -1
- package/dist/CmsdCustomKey.js +0 -2
- package/dist/CmsdCustomKey.js.map +0 -1
- package/dist/CmsdDynamic.d.ts +0 -20
- package/dist/CmsdDynamic.d.ts.map +0 -1
- package/dist/CmsdDynamic.js +0 -2
- package/dist/CmsdDynamic.js.map +0 -1
- package/dist/CmsdDynamicParams.d.ts +0 -75
- package/dist/CmsdDynamicParams.d.ts.map +0 -1
- package/dist/CmsdDynamicParams.js +0 -2
- package/dist/CmsdDynamicParams.js.map +0 -1
- package/dist/CmsdEncodeOptions.d.ts +0 -15
- package/dist/CmsdEncodeOptions.d.ts.map +0 -1
- package/dist/CmsdEncodeOptions.js +0 -2
- package/dist/CmsdEncodeOptions.js.map +0 -1
- package/dist/CmsdHeaderField.d.ts +0 -28
- package/dist/CmsdHeaderField.d.ts.map +0 -1
- package/dist/CmsdHeaderField.js +0 -23
- package/dist/CmsdHeaderField.js.map +0 -1
- package/dist/CmsdObjectType.d.ts +0 -15
- package/dist/CmsdObjectType.d.ts.map +0 -1
- package/dist/CmsdObjectType.js +0 -11
- package/dist/CmsdObjectType.js.map +0 -1
- package/dist/CmsdStatic.d.ts +0 -154
- package/dist/CmsdStatic.d.ts.map +0 -1
- package/dist/CmsdStatic.js +0 -2
- package/dist/CmsdStatic.js.map +0 -1
- package/dist/CmsdStreamType.d.ts +0 -15
- package/dist/CmsdStreamType.d.ts.map +0 -1
- package/dist/CmsdStreamType.js +0 -11
- package/dist/CmsdStreamType.js.map +0 -1
- package/dist/CmsdStreamingFormat.d.ts +0 -15
- package/dist/CmsdStreamingFormat.d.ts.map +0 -1
- package/dist/CmsdStreamingFormat.js +0 -11
- package/dist/CmsdStreamingFormat.js.map +0 -1
- package/dist/CmsdValue.d.ts +0 -12
- package/dist/CmsdValue.d.ts.map +0 -1
- package/dist/CmsdValue.js +0 -2
- package/dist/CmsdValue.js.map +0 -1
- package/dist/decodeCmsdDynamic.d.ts +0 -13
- package/dist/decodeCmsdDynamic.d.ts.map +0 -1
- package/dist/decodeCmsdDynamic.js +0 -19
- package/dist/decodeCmsdDynamic.js.map +0 -1
- package/dist/decodeCmsdStatic.d.ts +0 -13
- package/dist/decodeCmsdStatic.d.ts.map +0 -1
- package/dist/decodeCmsdStatic.js +0 -25
- package/dist/decodeCmsdStatic.js.map +0 -1
- package/dist/encodeCmsdDynamic.d.ts +0 -26
- package/dist/encodeCmsdDynamic.d.ts.map +0 -1
- package/dist/encodeCmsdDynamic.js +0 -15
- package/dist/encodeCmsdDynamic.js.map +0 -1
- package/dist/encodeCmsdStatic.d.ts +0 -15
- package/dist/encodeCmsdStatic.d.ts.map +0 -1
- package/dist/encodeCmsdStatic.js +0 -20
- package/dist/encodeCmsdStatic.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/dist/utils/processCmsd.d.ts +0 -4
- package/dist/utils/processCmsd.d.ts.map +0 -1
- package/dist/utils/processCmsd.js +0 -28
- package/dist/utils/processCmsd.js.map +0 -1
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","
|
|
1
|
+
{"version":3,"file":"index.js","names":["results: CmsdStatic"],"sources":["../src/CMSD_DYNAMIC.ts","../src/CMSD_STATIC.ts","../src/CMSD_V1.ts","../src/CmsdHeaderField.ts","../src/CmsdObjectType.ts","../src/CmsdStreamingFormat.ts","../src/CmsdStreamType.ts","../src/decodeCmsdDynamic.ts","../src/decodeCmsdStatic.ts","../src/encodeCmsdDynamic.ts","../src/utils/processCmsd.ts","../src/encodeCmsdStatic.ts"],"sourcesContent":["/**\n * CMSD dynamic header name.\n *\n *\n * @beta\n */\nexport const CMSD_DYNAMIC = 'CMSD-Dynamic'\n","/**\n * CMSD static header name.\n *\n *\n * @beta\n */\nexport const CMSD_STATIC = 'CMSD-Static'\n","/**\n * CMSD Version 1\n *\n *\n * @beta\n */\nexport const CMSD_V1 = 1\n","import type { ValueOf } from '@svta/cml-utils'\nimport { CMSD_DYNAMIC } from './CMSD_DYNAMIC.ts'\nimport { CMSD_STATIC } from './CMSD_STATIC.ts'\n\n/**\n * CMSD header fields.\n *\n *\n * @enum\n *\n * @beta\n */\nexport const CmsdHeaderField = {\n\t/**\n\t * Keys whose values persist over multiple requests for the object.\n\t */\n\tSTATIC: CMSD_STATIC as typeof CMSD_STATIC,\n\n\t/**\n\t * Keys whose values apply only to the next transmission hop. Typically a\n\t * new CMSD-Dynamic header instance will be added by each intermediary\n\t * participating in the delivery.\n\t */\n\tDYNAMIC: CMSD_DYNAMIC as typeof CMSD_DYNAMIC,\n} as const\n\n/**\n * @beta\n */\nexport type CmsdHeaderField = ValueOf<typeof CmsdHeaderField>;\n","import { CmObjectType } from '@svta/cml-cta'\n\n/**\n * Common Media Server Data Object Type\n *\n *\n * @enum\n *\n * @beta\n */\nexport const CmsdObjectType = CmObjectType as typeof CmObjectType\n\n/**\n * @beta\n */\nexport type CmsdObjectType = CmObjectType;\n","import { CmStreamingFormat } from '@svta/cml-cta'\n\n/**\n * Common Media Server Data Streaming Format\n *\n *\n * @enum\n *\n * @beta\n */\nexport const CmsdStreamingFormat = CmStreamingFormat as typeof CmStreamingFormat\n\n/**\n * @beta\n */\nexport type CmsdStreamingFormat = CmStreamingFormat;\n","import { CmStreamType } from '@svta/cml-cta'\n\n/**\n * Common Media Server Data Stream Type\n *\n *\n * @enum\n *\n * @beta\n */\nexport const CmsdStreamType = CmStreamType as typeof CmStreamType\n\n/**\n * @beta\n */\nexport type CmsdStreamType = CmStreamType;\n","import { decodeSfList } from '@svta/cml-structured-field-values'\nimport type { CmsdDynamic } from './CmsdDynamic.ts'\n\n/**\n * Decode a CMSD dynamic string to an object.\n *\n * @param cmsd - The CMSD string to decode.\n *\n * @returns The decoded CMSD object.\n *\n *\n * @beta\n */\nexport function decodeCmsdDynamic(cmsd: string): CmsdDynamic[] {\n\tif (!cmsd) {\n\t\treturn []\n\t}\n\n\tconst sfDict = decodeSfList(cmsd)\n\n\treturn sfDict as CmsdDynamic[]\n}\n","import { decodeSfDict, symbolToStr } from '@svta/cml-structured-field-values'\nimport type { CmsdStatic } from './CmsdStatic.ts'\n\n/**\n * Decode a CMSD Static dict string to an object.\n *\n * @param cmsd - The CMSD string to decode.\n *\n * @returns The decoded CMSD object.\n *\n *\n * @beta\n */\nexport function decodeCmsdStatic(cmsd: string): CmsdStatic {\n\tif (!cmsd) {\n\t\treturn {}\n\t}\n\n\treturn Object\n\t\t.entries(decodeSfDict(cmsd))\n\t\t.reduce((acc, [key, item]) => {\n\t\t\tconst { value }: any = item\n\t\t\tacc[key as any] = (typeof value === 'symbol' ? symbolToStr(value) : value) as any\n\t\t\treturn acc\n\t\t}, {} as CmsdStatic)\n}\n","import { encodeSfList, SfItem } from '@svta/cml-structured-field-values'\nimport type { CmsdDynamic } from './CmsdDynamic.ts'\n\n/**\n * Encode a list of CMSD Dynamic objects.\n *\n * @param value - The list of `SfItems` to encode.\n *\n * @returns The encoded CMSD string.\n *\n *\n * @beta\n */\nexport function encodeCmsdDynamic(value: SfItem[]): string;\n\n/**\n * Encode a single CMSD Dynamic object.\n *\n * @param value - The server name\n * @param cmsd - The CMSD object to encode.\n *\n * @returns The encoded CMSD string.\n *\n *\n * @beta\n */\nexport function encodeCmsdDynamic(value: string, cmsd: CmsdDynamic): string;\n\nexport function encodeCmsdDynamic(value: string | SfItem[], cmsd?: CmsdDynamic): string {\n\tif (!value) {\n\t\treturn ''\n\t}\n\n\tif (typeof value === 'string') {\n\t\tif (!cmsd) {\n\t\t\treturn ''\n\t\t}\n\n\t\tvalue = [new SfItem(value, cmsd as any)]\n\t}\n\n\treturn encodeSfList(value, { whitespace: false })\n}\n","import type { CmValue } from '@svta/cml-cta'\nimport { isTokenField, isValid } from '@svta/cml-cta'\nimport { SfToken } from '@svta/cml-structured-field-values'\nimport type { CmsdEncodeOptions } from '../CmsdEncodeOptions.ts'\nimport type { CmsdStatic } from '../CmsdStatic.ts'\n\nexport function processCmsd(obj: CmsdStatic, options?: CmsdEncodeOptions): CmsdStatic {\n\tconst results: CmsdStatic = {}\n\n\tif (obj == null || typeof obj !== 'object') {\n\t\treturn results\n\t}\n\n\tconst keys = Object.keys(obj) as (keyof CmsdStatic)[]\n\tconst useSymbol = options?.useSymbol !== false\n\n\tkeys.forEach(key => {\n\t\tlet value = obj[key] as CmValue\n\n\t\t// Version should only be reported if not equal to 1.\n\t\tif (key === 'v' && value === 1) {\n\t\t\treturn\n\t\t}\n\n\t\t// ignore invalid values\n\t\tif (!isValid(value)) {\n\t\t\treturn\n\t\t}\n\n\t\tif (isTokenField(key) && typeof value === 'string') {\n\t\t\tvalue = useSymbol ? Symbol.for(value) : new SfToken(value)\n\t\t}\n\n\t\tresults[key as any] = value as any\n\t})\n\n\treturn results\n}\n","import { encodeSfDict } from '@svta/cml-structured-field-values'\nimport type { CmsdEncodeOptions } from './CmsdEncodeOptions.ts'\nimport type { CmsdStatic } from './CmsdStatic.ts'\nimport { processCmsd } from './utils/processCmsd.ts'\n\n/**\n * Encode a CMSD Static object.\n *\n * @param cmsd - The CMSD object to encode.\n * @param options - Encoding options\n *\n * @returns The encoded CMSD string.\n *\n *\n * @beta\n */\nexport function encodeCmsdStatic(cmsd: CmsdStatic, options?: CmsdEncodeOptions): string {\n\tif (!cmsd) {\n\t\treturn ''\n\t}\n\n\treturn encodeSfDict(processCmsd(cmsd, options), { whitespace: false })\n}\n"],"mappings":";;;;;;;;;;AAMA,MAAa,eAAe;;;;;;;;;;ACA5B,MAAa,cAAc;;;;;;;;;;ACA3B,MAAa,UAAU;;;;;;;;;;;;ACMvB,MAAa,kBAAkB;CAI9B,QAAQ;CAOR,SAAS;CACT;;;;;;;;;;;;ACdD,MAAa,iBAAiB;;;;;;;;;;;;ACA9B,MAAa,sBAAsB;;;;;;;;;;;;ACAnC,MAAa,iBAAiB;;;;;;;;;;;;;;ACG9B,SAAgB,kBAAkB,MAA6B;AAC9D,KAAI,CAAC,KACJ,QAAO,EAAE;AAKV,QAFe,aAAa,KAAK;;;;;;;;;;;;;;;ACLlC,SAAgB,iBAAiB,MAA0B;AAC1D,KAAI,CAAC,KACJ,QAAO,EAAE;AAGV,QAAO,OACL,QAAQ,aAAa,KAAK,CAAC,CAC3B,QAAQ,KAAK,CAAC,KAAK,UAAU;EAC7B,MAAM,EAAE,UAAe;AACvB,MAAI,OAAe,OAAO,UAAU,WAAW,YAAY,MAAM,GAAG;AACpE,SAAO;IACL,EAAE,CAAe;;;;;ACItB,SAAgB,kBAAkB,OAA0B,MAA4B;AACvF,KAAI,CAAC,MACJ,QAAO;AAGR,KAAI,OAAO,UAAU,UAAU;AAC9B,MAAI,CAAC,KACJ,QAAO;AAGR,UAAQ,CAAC,IAAI,OAAO,OAAO,KAAY,CAAC;;AAGzC,QAAO,aAAa,OAAO,EAAE,YAAY,OAAO,CAAC;;;;;ACnClD,SAAgB,YAAY,KAAiB,SAAyC;CACrF,MAAMA,UAAsB,EAAE;AAE9B,KAAI,OAAO,QAAQ,OAAO,QAAQ,SACjC,QAAO;CAGR,MAAM,OAAO,OAAO,KAAK,IAAI;CAC7B,MAAM,YAAY,SAAS,cAAc;AAEzC,MAAK,SAAQ,QAAO;EACnB,IAAI,QAAQ,IAAI;AAGhB,MAAI,QAAQ,OAAO,UAAU,EAC5B;AAID,MAAI,CAAC,QAAQ,MAAM,CAClB;AAGD,MAAI,aAAa,IAAI,IAAI,OAAO,UAAU,SACzC,SAAQ,YAAY,OAAO,IAAI,MAAM,GAAG,IAAI,QAAQ,MAAM;AAG3D,UAAQ,OAAc;GACrB;AAEF,QAAO;;;;;;;;;;;;;;;;ACpBR,SAAgB,iBAAiB,MAAkB,SAAqC;AACvF,KAAI,CAAC,KACJ,QAAO;AAGR,QAAO,aAAa,YAAY,MAAM,QAAQ,EAAE,EAAE,YAAY,OAAO,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@svta/cml-cmsd",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.21.0",
|
|
4
4
|
"description": "Common Media Server Data (CMSD) encoding and decoding",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
|
-
"homepage": "https://github.com/streaming-video-technology-alliance/common-media-library",
|
|
7
|
+
"homepage": "https://github.com/streaming-video-technology-alliance/common-media-library/tree/main/libs/cmsd",
|
|
8
8
|
"authors": "Casey Occhialini <1508707+littlespex@users.noreply.github.com>",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
@@ -28,23 +28,6 @@
|
|
|
28
28
|
"types": "./dist/index.d.ts",
|
|
29
29
|
"import": "./dist/index.js",
|
|
30
30
|
"default": "./dist/index.js"
|
|
31
|
-
},
|
|
32
|
-
"./*.js": {
|
|
33
|
-
"import": "./dist/*.js",
|
|
34
|
-
"default": "./dist/*.js"
|
|
35
|
-
},
|
|
36
|
-
"./*": {
|
|
37
|
-
"types": "./dist/*.d.ts",
|
|
38
|
-
"import": "./dist/*.js",
|
|
39
|
-
"default": "./dist/*.js"
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
"typesVersions": {
|
|
43
|
-
"*": {
|
|
44
|
-
"*": [
|
|
45
|
-
"dist/*",
|
|
46
|
-
"dist/cjs/*"
|
|
47
|
-
]
|
|
48
31
|
}
|
|
49
32
|
},
|
|
50
33
|
"keywords": [
|
|
@@ -55,10 +38,8 @@
|
|
|
55
38
|
"Common Media Server Data"
|
|
56
39
|
],
|
|
57
40
|
"scripts": {
|
|
58
|
-
"build": "
|
|
59
|
-
"
|
|
60
|
-
"test": "node --no-warnings --test **/*.test.ts",
|
|
61
|
-
"prepublishOnly": "npm run build"
|
|
41
|
+
"build": "node ../../scripts/build.ts",
|
|
42
|
+
"test": "node ../../scripts/test.ts"
|
|
62
43
|
},
|
|
63
44
|
"engines": {
|
|
64
45
|
"node": ">=20"
|
|
@@ -72,7 +53,7 @@
|
|
|
72
53
|
},
|
|
73
54
|
"peerDependencies": {
|
|
74
55
|
"@svta/cml-cta": "*",
|
|
75
|
-
"@svta/cml-
|
|
56
|
+
"@svta/cml-structured-field-values": "*",
|
|
76
57
|
"@svta/cml-utils": "*"
|
|
77
58
|
}
|
|
78
59
|
}
|
package/dist/CMSD_DYNAMIC.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CMSD_DYNAMIC.d.ts","sourceRoot":"","sources":["../src/CMSD_DYNAMIC.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,YAAY,iBAAiB,CAAC"}
|
package/dist/CMSD_DYNAMIC.js
DELETED
package/dist/CMSD_DYNAMIC.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CMSD_DYNAMIC.js","sourceRoot":"","sources":["../src/CMSD_DYNAMIC.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,cAAc,CAAC","sourcesContent":["/**\n * CMSD dynamic header name.\n *\n *\n * @beta\n */\nexport const CMSD_DYNAMIC = 'CMSD-Dynamic';\n"]}
|
package/dist/CMSD_STATIC.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CMSD_STATIC.d.ts","sourceRoot":"","sources":["../src/CMSD_STATIC.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,WAAW,gBAAgB,CAAC"}
|
package/dist/CMSD_STATIC.js
DELETED
package/dist/CMSD_STATIC.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CMSD_STATIC.js","sourceRoot":"","sources":["../src/CMSD_STATIC.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,aAAa,CAAC","sourcesContent":["/**\n * CMSD static header name.\n *\n *\n * @beta\n */\nexport const CMSD_STATIC = 'CMSD-Static';\n"]}
|
package/dist/CMSD_V1.d.ts
DELETED
package/dist/CMSD_V1.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CMSD_V1.d.ts","sourceRoot":"","sources":["../src/CMSD_V1.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,OAAO,IAAI,CAAC"}
|
package/dist/CMSD_V1.js
DELETED
package/dist/CMSD_V1.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CMSD_V1.js","sourceRoot":"","sources":["../src/CMSD_V1.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,CAAC","sourcesContent":["/**\n * CMSD Version 1\n *\n *\n * @beta\n */\nexport const CMSD_V1 = 1;\n"]}
|
package/dist/CmsdCustomKey.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A custom key for CMSD. Custom keys MUST carry a hyphenated prefix
|
|
3
|
-
* to ensure that there will not be a namespace collision with future
|
|
4
|
-
* revisions to this specification. Clients SHOULD use a reverse-DNS
|
|
5
|
-
* syntax when defining their own prefix.
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* @beta
|
|
9
|
-
*/
|
|
10
|
-
export type CmsdCustomKey = `${string}-${string}`;
|
|
11
|
-
//# sourceMappingURL=CmsdCustomKey.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CmsdCustomKey.d.ts","sourceRoot":"","sources":["../src/CmsdCustomKey.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,MAAM,aAAa,GAAG,GAAG,MAAM,IAAI,MAAM,EAAE,CAAC"}
|
package/dist/CmsdCustomKey.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CmsdCustomKey.js","sourceRoot":"","sources":["../src/CmsdCustomKey.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * A custom key for CMSD. Custom keys MUST carry a hyphenated prefix\n * to ensure that there will not be a namespace collision with future\n * revisions to this specification. Clients SHOULD use a reverse-DNS\n * syntax when defining their own prefix.\n *\n *\n * @beta\n */\nexport type CmsdCustomKey = `${string}-${string}`;\n"]}
|
package/dist/CmsdDynamic.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { CmsdDynamicParams } from './CmsdDynamicParams.js';
|
|
2
|
-
/**
|
|
3
|
-
* Common Media Server Data (CMSD) dynamic response header fields.
|
|
4
|
-
*
|
|
5
|
-
* @see {@link https://cdn.cta.tech/cta/media/media/resources/standards/pdfs/cta-5006-final.pdf|CMSD Spec}
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* @beta
|
|
9
|
-
*/
|
|
10
|
-
export type CmsdDynamic = {
|
|
11
|
-
/**
|
|
12
|
-
* The server name.
|
|
13
|
-
*/
|
|
14
|
-
value: string;
|
|
15
|
-
/**
|
|
16
|
-
* The CMSD dynamic parameters.
|
|
17
|
-
*/
|
|
18
|
-
params: CmsdDynamicParams;
|
|
19
|
-
};
|
|
20
|
-
//# sourceMappingURL=CmsdDynamic.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CmsdDynamic.d.ts","sourceRoot":"","sources":["../src/CmsdDynamic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhE;;;;;;;GAOG;AACH,MAAM,MAAM,WAAW,GAAG;IACzB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,MAAM,EAAE,iBAAiB,CAAA;CACzB,CAAC"}
|
package/dist/CmsdDynamic.js
DELETED
package/dist/CmsdDynamic.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CmsdDynamic.js","sourceRoot":"","sources":["../src/CmsdDynamic.ts"],"names":[],"mappings":"","sourcesContent":["import type { CmsdDynamicParams } from './CmsdDynamicParams.js';\n\n/**\n * Common Media Server Data (CMSD) dynamic response header fields.\n *\n * @see {@link https://cdn.cta.tech/cta/media/media/resources/standards/pdfs/cta-5006-final.pdf|CMSD Spec}\n *\n *\n * @beta\n */\nexport type CmsdDynamic = {\n\t/**\n\t * The server name.\n\t */\n\tvalue: string;\n\n\t/**\n\t * The CMSD dynamic parameters.\n\t */\n\tparams: CmsdDynamicParams\n};\n"]}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import type { CmsdCustomKey } from './CmsdCustomKey.js';
|
|
2
|
-
import type { CmsdValue } from './CmsdValue.js';
|
|
3
|
-
/**
|
|
4
|
-
* Common Media Server Data (CMSD) dynamic response header field parameters.
|
|
5
|
-
*
|
|
6
|
-
* @see {@link https://cdn.cta.tech/cta/media/media/resources/standards/pdfs/cta-5006-final.pdf|CMSD Spec}
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* @beta
|
|
10
|
-
*/
|
|
11
|
-
export type CmsdDynamicParams = {
|
|
12
|
-
/**
|
|
13
|
-
* Custom key names may be used, but they MUST carry a hyphenated prefix to ensure that there will not be a namespace collision
|
|
14
|
-
* with future revisions to this specification. Clients SHOULD use a reverse-DNS syntax when defining their own prefix.
|
|
15
|
-
*/
|
|
16
|
-
[index: CmsdCustomKey]: CmsdValue;
|
|
17
|
-
/**
|
|
18
|
-
* Duress
|
|
19
|
-
*
|
|
20
|
-
* Key is included without a value if the server is under duress, due to cpu, memory, disk IO, network IO or other reasons. The
|
|
21
|
-
* thresholds for signaling duress are left to the discretion of the server operator. The intent is that the client will use this
|
|
22
|
-
* signal to move away to an alternate server if possible. This key MUST NOT be sent if it is false.
|
|
23
|
-
*
|
|
24
|
-
* Boolean
|
|
25
|
-
*/
|
|
26
|
-
du?: boolean;
|
|
27
|
-
/**
|
|
28
|
-
* Estimated Throughput
|
|
29
|
-
*
|
|
30
|
-
* The throughput between the server and the client over the currently negotiated transport as estimated by the server at the start
|
|
31
|
-
* of the response. The value is expressed in units of kilobits per second and rounded to the nearest integer. The time window for
|
|
32
|
-
* this estimate is expected to be the duration of the current response at most. The throughput may vary during the response and the
|
|
33
|
-
* client SHOULD use this data as an adjunct to its own throughput estimates. As an informative example, this estimate could be
|
|
34
|
-
* derived in this way:
|
|
35
|
-
*
|
|
36
|
-
* etp = 8 * send_window / (rtt)
|
|
37
|
-
*
|
|
38
|
-
* where send_window = min (cwnd * mss, rwnd) with Congestion Window (cwnd) measured in packets, Maximum Segment Size (mss) in bytes,
|
|
39
|
-
* Receiver Window (rwnd) in bytes and rtt in milliseconds. Note that multiple client processes adjacent to the media player may pool
|
|
40
|
-
* their requests into the same connection to the server. In this case the server estimate of throughput will be against the entirety
|
|
41
|
-
* of the connection, not all of which will be accessible to the media player.
|
|
42
|
-
*
|
|
43
|
-
* Integer Kbps
|
|
44
|
-
*/
|
|
45
|
-
etp?: number;
|
|
46
|
-
/**
|
|
47
|
-
* Max suggested bitrate
|
|
48
|
-
*
|
|
49
|
-
* The maximum bitrate value that the player SHOULD play in its Adaptive Bit Rate (ABR) ladder. If the player is playing a bitrate higher
|
|
50
|
-
* than this value, it SHOULD immediately switch to a bitrate lower than or equal to this value.
|
|
51
|
-
*
|
|
52
|
-
* Integer Kbps
|
|
53
|
-
*/
|
|
54
|
-
mb?: number;
|
|
55
|
-
/**
|
|
56
|
-
* Response delay
|
|
57
|
-
*
|
|
58
|
-
* The time elapsed between the receipt of the request and when the first byte of the body becomes available to send to the client. The
|
|
59
|
-
* intention is for receivers to use this value to more accurately calculate the throughput of the connection [MHV22].
|
|
60
|
-
*
|
|
61
|
-
* Integer milliseconds
|
|
62
|
-
*/
|
|
63
|
-
rd?: number;
|
|
64
|
-
/**
|
|
65
|
-
* Round Trip Time
|
|
66
|
-
*
|
|
67
|
-
* Estimated round trip time between client and server. This estimate may be derived from the transport handshake. For subsequent requests
|
|
68
|
-
* over the same connection, the value can be refined to be an exponentially weighted moving average of prior instantaneous values. An
|
|
69
|
-
* informative example algorithm for this averaging is provided by [18].
|
|
70
|
-
*
|
|
71
|
-
* Integer Kbps
|
|
72
|
-
*/
|
|
73
|
-
rtt?: number;
|
|
74
|
-
};
|
|
75
|
-
//# sourceMappingURL=CmsdDynamicParams.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CmsdDynamicParams.d.ts","sourceRoot":"","sources":["../src/CmsdDynamicParams.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD;;;;;;;GAOG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC/B;;;OAGG;IACH,CAAC,KAAK,EAAE,aAAa,GAAG,SAAS,CAAC;IAElC;;;;;;;;OAQG;IACH,EAAE,CAAC,EAAE,OAAO,CAAC;IAEb;;;;;;;;;;;;;;;;;OAiBG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;;;;;;OAOG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;;;;;;OAOG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;;;;;;;OAQG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACb,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CmsdDynamicParams.js","sourceRoot":"","sources":["../src/CmsdDynamicParams.ts"],"names":[],"mappings":"","sourcesContent":["import type { CmsdCustomKey } from './CmsdCustomKey.js';\nimport type { CmsdValue } from './CmsdValue.js';\n\n/**\n * Common Media Server Data (CMSD) dynamic response header field parameters.\n *\n * @see {@link https://cdn.cta.tech/cta/media/media/resources/standards/pdfs/cta-5006-final.pdf|CMSD Spec}\n *\n *\n * @beta\n */\nexport type CmsdDynamicParams = {\n\t/**\n\t * Custom key names may be used, but they MUST carry a hyphenated prefix to ensure that there will not be a namespace collision\n\t * with future revisions to this specification. Clients SHOULD use a reverse-DNS syntax when defining their own prefix.\n\t */\n\t[index: CmsdCustomKey]: CmsdValue;\n\n\t/**\n\t * Duress\n\t *\n\t * Key is included without a value if the server is under duress, due to cpu, memory, disk IO, network IO or other reasons. The\n\t * thresholds for signaling duress are left to the discretion of the server operator. The intent is that the client will use this\n\t * signal to move away to an alternate server if possible. This key MUST NOT be sent if it is false.\n\t *\n\t * Boolean\n\t */\n\tdu?: boolean;\n\n\t/**\n\t * Estimated Throughput\n\t *\n\t * The throughput between the server and the client over the currently negotiated transport as estimated by the server at the start\n\t * of the response. The value is expressed in units of kilobits per second and rounded to the nearest integer. The time window for\n\t * this estimate is expected to be the duration of the current response at most. The throughput may vary during the response and the\n\t * client SHOULD use this data as an adjunct to its own throughput estimates. As an informative example, this estimate could be\n\t * derived in this way:\n\t *\n\t * etp = 8 * send_window / (rtt)\n\t *\n\t * where send_window = min (cwnd * mss, rwnd) with Congestion Window (cwnd) measured in packets, Maximum Segment Size (mss) in bytes,\n\t * Receiver Window (rwnd) in bytes and rtt in milliseconds. Note that multiple client processes adjacent to the media player may pool\n\t * their requests into the same connection to the server. In this case the server estimate of throughput will be against the entirety\n\t * of the connection, not all of which will be accessible to the media player.\n\t *\n\t * Integer Kbps\n\t */\n\tetp?: number;\n\n\t/**\n\t * Max suggested bitrate\n\t *\n\t * The maximum bitrate value that the player SHOULD play in its Adaptive Bit Rate (ABR) ladder. If the player is playing a bitrate higher\n\t * than this value, it SHOULD immediately switch to a bitrate lower than or equal to this value.\n\t *\n\t * Integer Kbps\n\t */\n\tmb?: number;\n\n\t/**\n\t * Response delay\n\t *\n\t * The time elapsed between the receipt of the request and when the first byte of the body becomes available to send to the client. The\n\t * intention is for receivers to use this value to more accurately calculate the throughput of the connection [MHV22].\n\t *\n\t * Integer milliseconds\n\t */\n\trd?: number;\n\n\t/**\n\t * Round Trip Time\n\t *\n\t * Estimated round trip time between client and server. This estimate may be derived from the transport handshake. For subsequent requests\n\t * over the same connection, the value can be refined to be an exponentially weighted moving average of prior instantaneous values. An\n\t * informative example algorithm for this averaging is provided by [18].\n\t *\n\t * Integer Kbps\n\t */\n\trtt?: number;\n};\n"]}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Options for encoding CMCD values.
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* @beta
|
|
6
|
-
*/
|
|
7
|
-
export type CmsdEncodeOptions = {
|
|
8
|
-
/**
|
|
9
|
-
* Use Symbol to represent token values
|
|
10
|
-
*
|
|
11
|
-
* @defaultValue `true`
|
|
12
|
-
*/
|
|
13
|
-
useSymbol?: boolean;
|
|
14
|
-
};
|
|
15
|
-
//# sourceMappingURL=CmsdEncodeOptions.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CmsdEncodeOptions.d.ts","sourceRoot":"","sources":["../src/CmsdEncodeOptions.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC/B;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CmsdEncodeOptions.js","sourceRoot":"","sources":["../src/CmsdEncodeOptions.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Options for encoding CMCD values.\n *\n *\n * @beta\n */\nexport type CmsdEncodeOptions = {\n\t/**\n\t * Use Symbol to represent token values\n\t *\n\t * @defaultValue `true`\n\t */\n\tuseSymbol?: boolean;\n};\n"]}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { ValueOf } from '@svta/cml-utils/ValueOf.js';
|
|
2
|
-
import { CMSD_DYNAMIC } from './CMSD_DYNAMIC.js';
|
|
3
|
-
import { CMSD_STATIC } from './CMSD_STATIC.js';
|
|
4
|
-
/**
|
|
5
|
-
* CMSD header fields.
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* @enum
|
|
9
|
-
*
|
|
10
|
-
* @beta
|
|
11
|
-
*/
|
|
12
|
-
export declare const CmsdHeaderField: {
|
|
13
|
-
/**
|
|
14
|
-
* Keys whose values persist over multiple requests for the object.
|
|
15
|
-
*/
|
|
16
|
-
readonly STATIC: typeof CMSD_STATIC;
|
|
17
|
-
/**
|
|
18
|
-
* Keys whose values apply only to the next transmission hop. Typically a
|
|
19
|
-
* new CMSD-Dynamic header instance will be added by each intermediary
|
|
20
|
-
* participating in the delivery.
|
|
21
|
-
*/
|
|
22
|
-
readonly DYNAMIC: typeof CMSD_DYNAMIC;
|
|
23
|
-
};
|
|
24
|
-
/**
|
|
25
|
-
* @beta
|
|
26
|
-
*/
|
|
27
|
-
export type CmsdHeaderField = ValueOf<typeof CmsdHeaderField>;
|
|
28
|
-
//# sourceMappingURL=CmsdHeaderField.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CmsdHeaderField.d.ts","sourceRoot":"","sources":["../src/CmsdHeaderField.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe;IAC3B;;OAEG;qBACoB,OAAO,WAAW;IAEzC;;;;OAIG;sBACsB,OAAO,YAAY;CACnC,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,CAAC,OAAO,eAAe,CAAC,CAAC"}
|
package/dist/CmsdHeaderField.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { CMSD_DYNAMIC } from './CMSD_DYNAMIC.js';
|
|
2
|
-
import { CMSD_STATIC } from './CMSD_STATIC.js';
|
|
3
|
-
/**
|
|
4
|
-
* CMSD header fields.
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* @enum
|
|
8
|
-
*
|
|
9
|
-
* @beta
|
|
10
|
-
*/
|
|
11
|
-
export const CmsdHeaderField = {
|
|
12
|
-
/**
|
|
13
|
-
* Keys whose values persist over multiple requests for the object.
|
|
14
|
-
*/
|
|
15
|
-
STATIC: CMSD_STATIC,
|
|
16
|
-
/**
|
|
17
|
-
* Keys whose values apply only to the next transmission hop. Typically a
|
|
18
|
-
* new CMSD-Dynamic header instance will be added by each intermediary
|
|
19
|
-
* participating in the delivery.
|
|
20
|
-
*/
|
|
21
|
-
DYNAMIC: CMSD_DYNAMIC,
|
|
22
|
-
};
|
|
23
|
-
//# sourceMappingURL=CmsdHeaderField.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CmsdHeaderField.js","sourceRoot":"","sources":["../src/CmsdHeaderField.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC9B;;OAEG;IACH,MAAM,EAAE,WAAiC;IAEzC;;;;OAIG;IACH,OAAO,EAAE,YAAmC;CACnC,CAAC","sourcesContent":["import type { ValueOf } from '@svta/cml-utils/ValueOf.js';\nimport { CMSD_DYNAMIC } from './CMSD_DYNAMIC.js';\nimport { CMSD_STATIC } from './CMSD_STATIC.js';\n\n/**\n * CMSD header fields.\n *\n *\n * @enum\n *\n * @beta\n */\nexport const CmsdHeaderField = {\n\t/**\n\t * Keys whose values persist over multiple requests for the object.\n\t */\n\tSTATIC: CMSD_STATIC as typeof CMSD_STATIC,\n\n\t/**\n\t * Keys whose values apply only to the next transmission hop. Typically a\n\t * new CMSD-Dynamic header instance will be added by each intermediary\n\t * participating in the delivery.\n\t */\n\tDYNAMIC: CMSD_DYNAMIC as typeof CMSD_DYNAMIC,\n} as const;\n\n/**\n * @beta\n */\nexport type CmsdHeaderField = ValueOf<typeof CmsdHeaderField>;\n"]}
|
package/dist/CmsdObjectType.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { CmObjectType } from '@svta/cml-cta/CmObjectType.js';
|
|
2
|
-
/**
|
|
3
|
-
* Common Media Server Data Object Type
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* @enum
|
|
7
|
-
*
|
|
8
|
-
* @beta
|
|
9
|
-
*/
|
|
10
|
-
export declare const CmsdObjectType: typeof CmObjectType;
|
|
11
|
-
/**
|
|
12
|
-
* @beta
|
|
13
|
-
*/
|
|
14
|
-
export type CmsdObjectType = CmObjectType;
|
|
15
|
-
//# sourceMappingURL=CmsdObjectType.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CmsdObjectType.d.ts","sourceRoot":"","sources":["../src/CmsdObjectType.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAE7D;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,EAAmB,OAAO,YAAY,CAAC;AAElE;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,YAAY,CAAC"}
|
package/dist/CmsdObjectType.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CmsdObjectType.js","sourceRoot":"","sources":["../src/CmsdObjectType.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAE7D;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,YAAmC,CAAC","sourcesContent":["import { CmObjectType } from '@svta/cml-cta/CmObjectType.js';\n\n/**\n * Common Media Server Data Object Type\n *\n *\n * @enum\n *\n * @beta\n */\nexport const CmsdObjectType = CmObjectType as typeof CmObjectType;\n\n/**\n * @beta\n */\nexport type CmsdObjectType = CmObjectType;\n"]}
|
package/dist/CmsdStatic.d.ts
DELETED
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
import type { CmsdCustomKey } from './CmsdCustomKey.js';
|
|
2
|
-
import type { CmsdObjectType } from './CmsdObjectType.js';
|
|
3
|
-
import type { CmsdStreamType } from './CmsdStreamType.js';
|
|
4
|
-
import type { CmsdStreamingFormat } from './CmsdStreamingFormat.js';
|
|
5
|
-
import type { CmsdValue } from './CmsdValue.js';
|
|
6
|
-
/**
|
|
7
|
-
* Common Media Server Data (CMSD) static response header fields.
|
|
8
|
-
*
|
|
9
|
-
* @see {@link https://cdn.cta.tech/cta/media/media/resources/standards/pdfs/cta-5006-final.pdf|CMSD Spec}
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* @beta
|
|
13
|
-
*/
|
|
14
|
-
export type CmsdStatic = {
|
|
15
|
-
/**
|
|
16
|
-
* Custom key names may be used, but they MUST carry a hyphenated prefix to ensure that there will not be a namespace collision
|
|
17
|
-
* with future revisions to this specification. Clients SHOULD use a reverse-DNS syntax when defining their own prefix.
|
|
18
|
-
*/
|
|
19
|
-
[index: CmsdCustomKey]: CmsdValue;
|
|
20
|
-
/**
|
|
21
|
-
* Availability time
|
|
22
|
-
*
|
|
23
|
-
* The wallclock time at which the first byte of this object became available at the origin for successful request. The time is
|
|
24
|
-
* expressed as integer milliseconds since the Unix Epoch, i.e., the number of milliseconds that have elapsed since January 1,
|
|
25
|
-
* 1970 (midnight UTC/GMT), not counting leap seconds (in ISO 8601: 1970- 01-01T00:00:000Z).
|
|
26
|
-
*
|
|
27
|
-
* Integer Milliseconds
|
|
28
|
-
*/
|
|
29
|
-
at?: number;
|
|
30
|
-
/**
|
|
31
|
-
* Encoded bitrate
|
|
32
|
-
*
|
|
33
|
-
* The encoded bitrate of the audio or video object being requested. If the instantaneous bitrate varies over the duration of the
|
|
34
|
-
* object, the average value over the duration of the object SHOULD be communicated. This key should only accompany objects that
|
|
35
|
-
* have an implicit bitrate.
|
|
36
|
-
*
|
|
37
|
-
* Integer kbps
|
|
38
|
-
*/
|
|
39
|
-
br?: number;
|
|
40
|
-
/**
|
|
41
|
-
* Object duration
|
|
42
|
-
*
|
|
43
|
-
* The playback duration in milliseconds of the object being requested. If a partial segment is being requested, then this value
|
|
44
|
-
* MUST indicate the playback duration of that part and not that of its parent segment. This value can be an approximation of the
|
|
45
|
-
* estimated duration if the explicit value is not known.
|
|
46
|
-
*
|
|
47
|
-
* Integer milliseconds
|
|
48
|
-
*/
|
|
49
|
-
d?: number;
|
|
50
|
-
/**
|
|
51
|
-
* Held time
|
|
52
|
-
*
|
|
53
|
-
* The number of milliseconds that this response was held back by an origin before returning. This is applicable to blocking responses
|
|
54
|
-
* under LL-HLS [HLSbis].
|
|
55
|
-
*
|
|
56
|
-
* Integer Milliseconds
|
|
57
|
-
*/
|
|
58
|
-
ht?: number;
|
|
59
|
-
/**
|
|
60
|
-
* Intermediary identifier
|
|
61
|
-
*
|
|
62
|
-
* An identifier for the processing server. The value SHOULD identify both the organization and the intermediary that is writing the key.
|
|
63
|
-
* Identifiers SHOULD be as concise as possible to reduce log file and transferred size, while still remaining unique.
|
|
64
|
-
*
|
|
65
|
-
* String
|
|
66
|
-
*/
|
|
67
|
-
n?: string;
|
|
68
|
-
/**
|
|
69
|
-
* Next object request
|
|
70
|
-
*
|
|
71
|
-
* Relative path of the next object to be requested. This can be used to trigger pre-fetching by the CDN. This MUST be a path relative to the current
|
|
72
|
-
* request. This string MUST be URLEncoded. The client SHOULD NOT depend upon any pre-fetch action being taken - it is merely a request for such a
|
|
73
|
-
* pre-fetch to take place.
|
|
74
|
-
*
|
|
75
|
-
* String
|
|
76
|
-
*/
|
|
77
|
-
nor?: string;
|
|
78
|
-
/**
|
|
79
|
-
* Next range request
|
|
80
|
-
*
|
|
81
|
-
* If the next request will be a partial object request, then this string denotes the byte range to be requested. If the ‘nor’ field is not set, then the
|
|
82
|
-
* object is assumed to match the object currently being requested. The client SHOULD NOT depend upon any pre-fetch action being taken – it is merely a
|
|
83
|
-
* request for such a pre-fetch to take place. Formatting is similar to the HTTP Range header, except that the unit MUST be ‘byte’, the ‘Range:’ prefix is
|
|
84
|
-
* NOT required and specifying multiple ranges is NOT allowed. Valid combinations are:
|
|
85
|
-
*
|
|
86
|
-
* - `"\<range-start\>-"`
|
|
87
|
-
* - `"\<range-start\>-\<range-end\>"`
|
|
88
|
-
* - `"-\<suffix-length\>"`
|
|
89
|
-
*
|
|
90
|
-
* String
|
|
91
|
-
*/
|
|
92
|
-
nrr?: string;
|
|
93
|
-
/**
|
|
94
|
-
* Object type
|
|
95
|
-
*
|
|
96
|
-
* The media type of the current object being requested:
|
|
97
|
-
* - `m` = text file, such as a manifest or playlist
|
|
98
|
-
* - `a` = audio only
|
|
99
|
-
* - `v` = video only
|
|
100
|
-
* - `av` = muxed audio and video
|
|
101
|
-
* - `i` = init segment
|
|
102
|
-
* - `c` = caption or subtitle
|
|
103
|
-
* - `tt` = ISOBMFF timed text track
|
|
104
|
-
* - `k` = cryptographic key, license or certificate.
|
|
105
|
-
* - `o` = other
|
|
106
|
-
*
|
|
107
|
-
* If the object type being requested is unknown, then this key MUST NOT be used.
|
|
108
|
-
*
|
|
109
|
-
* Token
|
|
110
|
-
*/
|
|
111
|
-
ot?: CmsdObjectType;
|
|
112
|
-
/**
|
|
113
|
-
* Streaming format
|
|
114
|
-
*
|
|
115
|
-
* The streaming format that defines the current request.
|
|
116
|
-
*
|
|
117
|
-
* - `d` = MPEG DASH
|
|
118
|
-
* - `h` = HTTP Live Streaming (HLS)
|
|
119
|
-
* - `s` = Smooth Streaming
|
|
120
|
-
* - `o` = other
|
|
121
|
-
*
|
|
122
|
-
* If the streaming format being requested is unknown, then this key MUST NOT be used.
|
|
123
|
-
*
|
|
124
|
-
* Token
|
|
125
|
-
*/
|
|
126
|
-
sf?: CmsdStreamingFormat;
|
|
127
|
-
/**
|
|
128
|
-
* Stream type
|
|
129
|
-
* - `v` = all segments are available – e.g., VOD
|
|
130
|
-
* - `l` = segments become available over time – e.g., LIVE
|
|
131
|
-
*
|
|
132
|
-
* Token
|
|
133
|
-
*/
|
|
134
|
-
st?: CmsdStreamType;
|
|
135
|
-
/**
|
|
136
|
-
* Startup
|
|
137
|
-
*
|
|
138
|
-
* Key is included without a value if the object is needed urgently due to startup, seeking or recovery after a buffer-empty event. The media SHOULD not be
|
|
139
|
-
* rendering when this request is made. This key MUST not be sent if it is FALSE.
|
|
140
|
-
*
|
|
141
|
-
* Boolean
|
|
142
|
-
*/
|
|
143
|
-
su?: boolean;
|
|
144
|
-
/**
|
|
145
|
-
* CMSD version
|
|
146
|
-
*
|
|
147
|
-
* The version of this specification used for interpreting the defined key names and values. If this key is omitted, the client and server MUST
|
|
148
|
-
* interpret the values as being defined by version 1. Client SHOULD omit this field if the version is 1.
|
|
149
|
-
*
|
|
150
|
-
* Integer
|
|
151
|
-
*/
|
|
152
|
-
v?: number;
|
|
153
|
-
};
|
|
154
|
-
//# sourceMappingURL=CmsdStatic.d.ts.map
|
package/dist/CmsdStatic.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CmsdStatic.d.ts","sourceRoot":"","sources":["../src/CmsdStatic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD;;;;;;;GAOG;AACH,MAAM,MAAM,UAAU,GAAG;IAExB;;;OAGG;IACH,CAAC,KAAK,EAAE,aAAa,GAAG,SAAS,CAAC;IAElC;;;;;;;;OAQG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;;;;;;;OAQG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;;;;;;;OAQG;IACH,CAAC,CAAC,EAAE,MAAM,CAAC;IAEX;;;;;;;OAOG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;;;;;;OAOG;IACH,CAAC,CAAC,EAAE,MAAM,CAAC;IAEX;;;;;;;;OAQG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;;;;;;;;;;;;OAaG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;;;;;;;;;;;;;;;;OAiBG;IACH,EAAE,CAAC,EAAE,cAAc,CAAC;IAEpB;;;;;;;;;;;;;OAaG;IACH,EAAE,CAAC,EAAE,mBAAmB,CAAC;IAEzB;;;;;;OAMG;IACH,EAAE,CAAC,EAAE,cAAc,CAAC;IAEpB;;;;;;;OAOG;IACH,EAAE,CAAC,EAAE,OAAO,CAAC;IAEb;;;;;;;OAOG;IACH,CAAC,CAAC,EAAE,MAAM,CAAC;CACX,CAAC"}
|
package/dist/CmsdStatic.js
DELETED
package/dist/CmsdStatic.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CmsdStatic.js","sourceRoot":"","sources":["../src/CmsdStatic.ts"],"names":[],"mappings":"","sourcesContent":["import type { CmsdCustomKey } from './CmsdCustomKey.js';\nimport type { CmsdObjectType } from './CmsdObjectType.js';\nimport type { CmsdStreamType } from './CmsdStreamType.js';\nimport type { CmsdStreamingFormat } from './CmsdStreamingFormat.js';\nimport type { CmsdValue } from './CmsdValue.js';\n\n/**\n * Common Media Server Data (CMSD) static response header fields.\n *\n * @see {@link https://cdn.cta.tech/cta/media/media/resources/standards/pdfs/cta-5006-final.pdf|CMSD Spec}\n *\n *\n * @beta\n */\nexport type CmsdStatic = {\n\n\t/**\n\t * Custom key names may be used, but they MUST carry a hyphenated prefix to ensure that there will not be a namespace collision\n\t * with future revisions to this specification. Clients SHOULD use a reverse-DNS syntax when defining their own prefix.\n\t */\n\t[index: CmsdCustomKey]: CmsdValue;\n\n\t/**\n\t * Availability time\n\t *\n\t * The wallclock time at which the first byte of this object became available at the origin for successful request. The time is\n\t * expressed as integer milliseconds since the Unix Epoch, i.e., the number of milliseconds that have elapsed since January 1,\n\t * 1970 (midnight UTC/GMT), not counting leap seconds (in ISO 8601: 1970- 01-01T00:00:000Z).\n\t *\n\t * Integer Milliseconds\n\t */\n\tat?: number;\n\n\t/**\n\t * Encoded bitrate\n\t *\n\t * The encoded bitrate of the audio or video object being requested. If the instantaneous bitrate varies over the duration of the\n\t * object, the average value over the duration of the object SHOULD be communicated. This key should only accompany objects that\n\t * have an implicit bitrate.\n\t *\n\t * Integer kbps\n\t */\n\tbr?: number;\n\n\t/**\n\t * Object duration\n\t *\n\t * The playback duration in milliseconds of the object being requested. If a partial segment is being requested, then this value\n\t * MUST indicate the playback duration of that part and not that of its parent segment. This value can be an approximation of the\n\t * estimated duration if the explicit value is not known.\n\t *\n\t * Integer milliseconds\n\t */\n\td?: number;\n\n\t/**\n\t * Held time\n\t *\n\t * The number of milliseconds that this response was held back by an origin before returning. This is applicable to blocking responses\n\t * under LL-HLS [HLSbis].\n\t *\n\t * Integer Milliseconds\n\t */\n\tht?: number;\n\n\t/**\n\t * Intermediary identifier\n\t *\n\t * An identifier for the processing server. The value SHOULD identify both the organization and the intermediary that is writing the key.\n\t * Identifiers SHOULD be as concise as possible to reduce log file and transferred size, while still remaining unique.\n\t *\n\t * String\n\t */\n\tn?: string;\n\n\t/**\n\t * Next object request\n\t *\n\t * Relative path of the next object to be requested. This can be used to trigger pre-fetching by the CDN. This MUST be a path relative to the current\n\t * request. This string MUST be URLEncoded. The client SHOULD NOT depend upon any pre-fetch action being taken - it is merely a request for such a\n\t * pre-fetch to take place.\n\t *\n\t * String\n\t */\n\tnor?: string;\n\n\t/**\n\t * Next range request\n\t *\n\t * If the next request will be a partial object request, then this string denotes the byte range to be requested. If the ‘nor’ field is not set, then the\n\t * object is assumed to match the object currently being requested. The client SHOULD NOT depend upon any pre-fetch action being taken – it is merely a\n\t * request for such a pre-fetch to take place. Formatting is similar to the HTTP Range header, except that the unit MUST be ‘byte’, the ‘Range:’ prefix is\n\t * NOT required and specifying multiple ranges is NOT allowed. Valid combinations are:\n\t *\n\t * - `\"\\<range-start\\>-\"`\n\t * - `\"\\<range-start\\>-\\<range-end\\>\"`\n\t * - `\"-\\<suffix-length\\>\"`\n\t *\n\t * String\n\t */\n\tnrr?: string;\n\n\t/**\n\t * Object type\n\t *\n\t * The media type of the current object being requested:\n\t * - `m` = text file, such as a manifest or playlist\n\t * - `a` = audio only\n\t * - `v` = video only\n\t * - `av` = muxed audio and video\n\t * - `i` = init segment\n\t * - `c` = caption or subtitle\n\t * - `tt` = ISOBMFF timed text track\n\t * - `k` = cryptographic key, license or certificate.\n\t * - `o` = other\n\t *\n\t * If the object type being requested is unknown, then this key MUST NOT be used.\n\t *\n\t * Token\n\t */\n\tot?: CmsdObjectType;\n\n\t/**\n\t * Streaming format\n\t *\n\t * The streaming format that defines the current request.\n\t *\n\t * - `d` = MPEG DASH\n\t * - `h` = HTTP Live Streaming (HLS)\n\t * - `s` = Smooth Streaming\n\t * - `o` = other\n\t *\n\t * If the streaming format being requested is unknown, then this key MUST NOT be used.\n\t *\n\t * Token\n\t */\n\tsf?: CmsdStreamingFormat;\n\n\t/**\n\t * Stream type\n\t * - `v` = all segments are available – e.g., VOD\n\t * - `l` = segments become available over time – e.g., LIVE\n\t *\n\t * Token\n\t */\n\tst?: CmsdStreamType;\n\n\t/**\n\t * Startup\n\t *\n\t * Key is included without a value if the object is needed urgently due to startup, seeking or recovery after a buffer-empty event. The media SHOULD not be\n\t * rendering when this request is made. This key MUST not be sent if it is FALSE.\n\t *\n\t * Boolean\n\t */\n\tsu?: boolean;\n\n\t/**\n\t * CMSD version\n\t *\n\t * The version of this specification used for interpreting the defined key names and values. If this key is omitted, the client and server MUST\n\t * interpret the values as being defined by version 1. Client SHOULD omit this field if the version is 1.\n\t *\n\t * Integer\n\t */\n\tv?: number;\n};\n"]}
|