@svta/cml-cmcd 0.19.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/LICENSE +201 -0
- package/dist/CMCD_COMMON_KEYS.d.ts +8 -0
- package/dist/CMCD_COMMON_KEYS.d.ts.map +1 -0
- package/dist/CMCD_COMMON_KEYS.js +39 -0
- package/dist/CMCD_COMMON_KEYS.js.map +1 -0
- package/dist/CMCD_DEFAULT_TIME_INTERVAL.d.ts +8 -0
- package/dist/CMCD_DEFAULT_TIME_INTERVAL.d.ts.map +1 -0
- package/dist/CMCD_DEFAULT_TIME_INTERVAL.js +8 -0
- package/dist/CMCD_DEFAULT_TIME_INTERVAL.js.map +1 -0
- package/dist/CMCD_EVENT_KEYS.d.ts +8 -0
- package/dist/CMCD_EVENT_KEYS.d.ts.map +1 -0
- package/dist/CMCD_EVENT_KEYS.js +10 -0
- package/dist/CMCD_EVENT_KEYS.js.map +1 -0
- package/dist/CMCD_EVENT_MODE.d.ts +8 -0
- package/dist/CMCD_EVENT_MODE.d.ts.map +1 -0
- package/dist/CMCD_EVENT_MODE.js +8 -0
- package/dist/CMCD_EVENT_MODE.js.map +1 -0
- package/dist/CMCD_FORMATTER_MAP.d.ts +9 -0
- package/dist/CMCD_FORMATTER_MAP.d.ts.map +1 -0
- package/dist/CMCD_FORMATTER_MAP.js +71 -0
- package/dist/CMCD_FORMATTER_MAP.js.map +1 -0
- package/dist/CMCD_HEADERS.d.ts +8 -0
- package/dist/CMCD_HEADERS.d.ts.map +1 -0
- package/dist/CMCD_HEADERS.js +8 -0
- package/dist/CMCD_HEADERS.js.map +1 -0
- package/dist/CMCD_HEADER_MAP.d.ts +10 -0
- package/dist/CMCD_HEADER_MAP.d.ts.map +1 -0
- package/dist/CMCD_HEADER_MAP.js +64 -0
- package/dist/CMCD_HEADER_MAP.js.map +1 -0
- package/dist/CMCD_JSON.d.ts +10 -0
- package/dist/CMCD_JSON.d.ts.map +1 -0
- package/dist/CMCD_JSON.js +10 -0
- package/dist/CMCD_JSON.js.map +1 -0
- package/dist/CMCD_KEYS.d.ts +9 -0
- package/dist/CMCD_KEYS.d.ts.map +1 -0
- package/dist/CMCD_KEYS.js +14 -0
- package/dist/CMCD_KEYS.js.map +1 -0
- package/dist/CMCD_OBJECT.d.ts +8 -0
- package/dist/CMCD_OBJECT.d.ts.map +1 -0
- package/dist/CMCD_OBJECT.js +8 -0
- package/dist/CMCD_OBJECT.js.map +1 -0
- package/dist/CMCD_PARAM.d.ts +8 -0
- package/dist/CMCD_PARAM.d.ts.map +1 -0
- package/dist/CMCD_PARAM.js +8 -0
- package/dist/CMCD_PARAM.js.map +1 -0
- package/dist/CMCD_QUERY.d.ts +8 -0
- package/dist/CMCD_QUERY.d.ts.map +1 -0
- package/dist/CMCD_QUERY.js +8 -0
- package/dist/CMCD_QUERY.js.map +1 -0
- package/dist/CMCD_REQUEST.d.ts +8 -0
- package/dist/CMCD_REQUEST.d.ts.map +1 -0
- package/dist/CMCD_REQUEST.js +8 -0
- package/dist/CMCD_REQUEST.js.map +1 -0
- package/dist/CMCD_REQUEST_KEYS.d.ts +8 -0
- package/dist/CMCD_REQUEST_KEYS.d.ts.map +1 -0
- package/dist/CMCD_REQUEST_KEYS.js +15 -0
- package/dist/CMCD_REQUEST_KEYS.js.map +1 -0
- package/dist/CMCD_REQUEST_MODE.d.ts +8 -0
- package/dist/CMCD_REQUEST_MODE.d.ts.map +1 -0
- package/dist/CMCD_REQUEST_MODE.js +8 -0
- package/dist/CMCD_REQUEST_MODE.js.map +1 -0
- package/dist/CMCD_RESPONSE_KEYS.d.ts +8 -0
- package/dist/CMCD_RESPONSE_KEYS.d.ts.map +1 -0
- package/dist/CMCD_RESPONSE_KEYS.js +17 -0
- package/dist/CMCD_RESPONSE_KEYS.js.map +1 -0
- package/dist/CMCD_RESPONSE_MODE.d.ts +8 -0
- package/dist/CMCD_RESPONSE_MODE.d.ts.map +1 -0
- package/dist/CMCD_RESPONSE_MODE.js +8 -0
- package/dist/CMCD_RESPONSE_MODE.js.map +1 -0
- package/dist/CMCD_SESSION.d.ts +8 -0
- package/dist/CMCD_SESSION.d.ts.map +1 -0
- package/dist/CMCD_SESSION.js +8 -0
- package/dist/CMCD_SESSION.js.map +1 -0
- package/dist/CMCD_STATUS.d.ts +8 -0
- package/dist/CMCD_STATUS.d.ts.map +1 -0
- package/dist/CMCD_STATUS.js +8 -0
- package/dist/CMCD_STATUS.js.map +1 -0
- package/dist/CMCD_V1.d.ts +8 -0
- package/dist/CMCD_V1.d.ts.map +1 -0
- package/dist/CMCD_V1.js +8 -0
- package/dist/CMCD_V1.js.map +1 -0
- package/dist/CMCD_V1_KEYS.d.ts +8 -0
- package/dist/CMCD_V1_KEYS.d.ts.map +1 -0
- package/dist/CMCD_V1_KEYS.js +27 -0
- package/dist/CMCD_V1_KEYS.js.map +1 -0
- package/dist/CMCD_V2.d.ts +8 -0
- package/dist/CMCD_V2.d.ts.map +1 -0
- package/dist/CMCD_V2.js +8 -0
- package/dist/CMCD_V2.js.map +1 -0
- package/dist/Cmcd.d.ts +214 -0
- package/dist/Cmcd.d.ts.map +1 -0
- package/dist/Cmcd.js +2 -0
- package/dist/Cmcd.js.map +1 -0
- package/dist/CmcdCustomKey.d.ts +11 -0
- package/dist/CmcdCustomKey.d.ts.map +1 -0
- package/dist/CmcdCustomKey.js +2 -0
- package/dist/CmcdCustomKey.js.map +1 -0
- package/dist/CmcdData.d.ts +12 -0
- package/dist/CmcdData.d.ts.map +1 -0
- package/dist/CmcdData.js +2 -0
- package/dist/CmcdData.js.map +1 -0
- package/dist/CmcdEncodeOptions.d.ts +45 -0
- package/dist/CmcdEncodeOptions.d.ts.map +1 -0
- package/dist/CmcdEncodeOptions.js +2 -0
- package/dist/CmcdEncodeOptions.js.map +1 -0
- package/dist/CmcdEncoding.d.ts +20 -0
- package/dist/CmcdEncoding.d.ts.map +1 -0
- package/dist/CmcdEncoding.js +15 -0
- package/dist/CmcdEncoding.js.map +1 -0
- package/dist/CmcdEvent.d.ts +49 -0
- package/dist/CmcdEvent.d.ts.map +1 -0
- package/dist/CmcdEvent.js +2 -0
- package/dist/CmcdEvent.js.map +1 -0
- package/dist/CmcdEventExcludedKeys.d.ts +8 -0
- package/dist/CmcdEventExcludedKeys.d.ts.map +1 -0
- package/dist/CmcdEventExcludedKeys.js +2 -0
- package/dist/CmcdEventExcludedKeys.js.map +1 -0
- package/dist/CmcdEventType.d.ts +52 -0
- package/dist/CmcdEventType.d.ts.map +1 -0
- package/dist/CmcdEventType.js +47 -0
- package/dist/CmcdEventType.js.map +1 -0
- package/dist/CmcdFormatter.d.ts +16 -0
- package/dist/CmcdFormatter.d.ts.map +1 -0
- package/dist/CmcdFormatter.js +2 -0
- package/dist/CmcdFormatter.js.map +1 -0
- package/dist/CmcdFormatterMap.d.ts +10 -0
- package/dist/CmcdFormatterMap.d.ts.map +1 -0
- package/dist/CmcdFormatterMap.js +2 -0
- package/dist/CmcdFormatterMap.js.map +1 -0
- package/dist/CmcdFormatterOptions.d.ts +22 -0
- package/dist/CmcdFormatterOptions.d.ts.map +1 -0
- package/dist/CmcdFormatterOptions.js +2 -0
- package/dist/CmcdFormatterOptions.js.map +1 -0
- package/dist/CmcdFormatters.d.ts +11 -0
- package/dist/CmcdFormatters.d.ts.map +1 -0
- package/dist/CmcdFormatters.js +11 -0
- package/dist/CmcdFormatters.js.map +1 -0
- package/dist/CmcdHeaderField.d.ts +36 -0
- package/dist/CmcdHeaderField.d.ts.map +1 -0
- package/dist/CmcdHeaderField.js +31 -0
- package/dist/CmcdHeaderField.js.map +1 -0
- package/dist/CmcdHeaderMap.d.ts +10 -0
- package/dist/CmcdHeaderMap.d.ts.map +1 -0
- package/dist/CmcdHeaderMap.js +2 -0
- package/dist/CmcdHeaderMap.js.map +1 -0
- package/dist/CmcdHeadersMap.d.ts +12 -0
- package/dist/CmcdHeadersMap.d.ts.map +1 -0
- package/dist/CmcdHeadersMap.js +2 -0
- package/dist/CmcdHeadersMap.js.map +1 -0
- package/dist/CmcdKey.d.ts +9 -0
- package/dist/CmcdKey.d.ts.map +1 -0
- package/dist/CmcdKey.js +2 -0
- package/dist/CmcdKey.js.map +1 -0
- package/dist/CmcdObjectType.d.ts +15 -0
- package/dist/CmcdObjectType.d.ts.map +1 -0
- package/dist/CmcdObjectType.js +11 -0
- package/dist/CmcdObjectType.js.map +1 -0
- package/dist/CmcdPlayerState.d.ts +56 -0
- package/dist/CmcdPlayerState.d.ts.map +1 -0
- package/dist/CmcdPlayerState.js +51 -0
- package/dist/CmcdPlayerState.js.map +1 -0
- package/dist/CmcdReportTarget.d.ts +44 -0
- package/dist/CmcdReportTarget.d.ts.map +1 -0
- package/dist/CmcdReportTarget.js +2 -0
- package/dist/CmcdReportTarget.js.map +1 -0
- package/dist/CmcdReportingMode.d.ts +31 -0
- package/dist/CmcdReportingMode.d.ts.map +1 -0
- package/dist/CmcdReportingMode.js +26 -0
- package/dist/CmcdReportingMode.js.map +1 -0
- package/dist/CmcdRequest.d.ts +222 -0
- package/dist/CmcdRequest.d.ts.map +1 -0
- package/dist/CmcdRequest.js +2 -0
- package/dist/CmcdRequest.js.map +1 -0
- package/dist/CmcdResponse.d.ts +84 -0
- package/dist/CmcdResponse.d.ts.map +1 -0
- package/dist/CmcdResponse.js +2 -0
- package/dist/CmcdResponse.js.map +1 -0
- package/dist/CmcdStreamType.d.ts +15 -0
- package/dist/CmcdStreamType.d.ts.map +1 -0
- package/dist/CmcdStreamType.js +11 -0
- package/dist/CmcdStreamType.js.map +1 -0
- package/dist/CmcdStreamingFormat.d.ts +15 -0
- package/dist/CmcdStreamingFormat.d.ts.map +1 -0
- package/dist/CmcdStreamingFormat.js +11 -0
- package/dist/CmcdStreamingFormat.js.map +1 -0
- package/dist/CmcdTransmissionMode.d.ts +33 -0
- package/dist/CmcdTransmissionMode.d.ts.map +1 -0
- package/dist/CmcdTransmissionMode.js +28 -0
- package/dist/CmcdTransmissionMode.js.map +1 -0
- package/dist/CmcdValue.d.ts +13 -0
- package/dist/CmcdValue.d.ts.map +1 -0
- package/dist/CmcdValue.js +2 -0
- package/dist/CmcdValue.js.map +1 -0
- package/dist/appendCmcdHeaders.d.ts +19 -0
- package/dist/appendCmcdHeaders.d.ts.map +1 -0
- package/dist/appendCmcdHeaders.js +20 -0
- package/dist/appendCmcdHeaders.js.map +1 -0
- package/dist/appendCmcdQuery.d.ts +19 -0
- package/dist/appendCmcdQuery.d.ts.map +1 -0
- package/dist/appendCmcdQuery.js +31 -0
- package/dist/appendCmcdQuery.js.map +1 -0
- package/dist/decodeCmcd.d.ts +16 -0
- package/dist/decodeCmcd.d.ts.map +1 -0
- package/dist/decodeCmcd.js +45 -0
- package/dist/decodeCmcd.js.map +1 -0
- package/dist/encodeCmcd.d.ts +18 -0
- package/dist/encodeCmcd.d.ts.map +1 -0
- package/dist/encodeCmcd.js +23 -0
- package/dist/encodeCmcd.js.map +1 -0
- package/dist/fromCmcdHeaders.d.ts +16 -0
- package/dist/fromCmcdHeaders.d.ts.map +1 -0
- package/dist/fromCmcdHeaders.js +29 -0
- package/dist/fromCmcdHeaders.js.map +1 -0
- package/dist/fromCmcdQuery.d.ts +16 -0
- package/dist/fromCmcdQuery.d.ts.map +1 -0
- package/dist/fromCmcdQuery.js +23 -0
- package/dist/fromCmcdQuery.js.map +1 -0
- package/dist/fromCmcdUrl.d.ts +16 -0
- package/dist/fromCmcdUrl.d.ts.map +1 -0
- package/dist/fromCmcdUrl.js +18 -0
- package/dist/fromCmcdUrl.js.map +1 -0
- package/dist/groupCmcdHeaders.d.ts +16 -0
- package/dist/groupCmcdHeaders.d.ts.map +1 -0
- package/dist/groupCmcdHeaders.js +37 -0
- package/dist/groupCmcdHeaders.js.map +1 -0
- package/dist/index.d.ts +74 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +58 -0
- package/dist/index.js.map +1 -0
- package/dist/isCmcdCustomKey.d.ts +13 -0
- package/dist/isCmcdCustomKey.d.ts.map +1 -0
- package/dist/isCmcdCustomKey.js +15 -0
- package/dist/isCmcdCustomKey.js.map +1 -0
- package/dist/isCmcdEventKey.d.ts +16 -0
- package/dist/isCmcdEventKey.d.ts.map +1 -0
- package/dist/isCmcdEventKey.js +22 -0
- package/dist/isCmcdEventKey.js.map +1 -0
- package/dist/isCmcdRequestKey.d.ts +16 -0
- package/dist/isCmcdRequestKey.d.ts.map +1 -0
- package/dist/isCmcdRequestKey.js +22 -0
- package/dist/isCmcdRequestKey.js.map +1 -0
- package/dist/isCmcdResponseKey.d.ts +16 -0
- package/dist/isCmcdResponseKey.d.ts.map +1 -0
- package/dist/isCmcdResponseKey.js +24 -0
- package/dist/isCmcdResponseKey.js.map +1 -0
- package/dist/isCmcdV1Key.d.ts +16 -0
- package/dist/isCmcdV1Key.d.ts.map +1 -0
- package/dist/isCmcdV1Key.js +19 -0
- package/dist/isCmcdV1Key.js.map +1 -0
- package/dist/prepareCmcdData.d.ts +13 -0
- package/dist/prepareCmcdData.d.ts.map +1 -0
- package/dist/prepareCmcdData.js +88 -0
- package/dist/prepareCmcdData.js.map +1 -0
- package/dist/toCmcdHeaders.d.ts +19 -0
- package/dist/toCmcdHeaders.d.ts.map +1 -0
- package/dist/toCmcdHeaders.js +34 -0
- package/dist/toCmcdHeaders.js.map +1 -0
- package/dist/toCmcdJson.d.ts +17 -0
- package/dist/toCmcdJson.d.ts.map +1 -0
- package/dist/toCmcdJson.js +21 -0
- package/dist/toCmcdJson.js.map +1 -0
- package/dist/toCmcdQuery.d.ts +18 -0
- package/dist/toCmcdQuery.d.ts.map +1 -0
- package/dist/toCmcdQuery.js +24 -0
- package/dist/toCmcdQuery.js.map +1 -0
- package/dist/toCmcdReport.d.ts +22 -0
- package/dist/toCmcdReport.d.ts.map +1 -0
- package/dist/toCmcdReport.js +52 -0
- package/dist/toCmcdReport.js.map +1 -0
- package/dist/toCmcdUrl.d.ts +15 -0
- package/dist/toCmcdUrl.d.ts.map +1 -0
- package/dist/toCmcdUrl.js +20 -0
- package/dist/toCmcdUrl.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/tsdoc-metadata.json +11 -0
- package/package.json +78 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CMCD_OBJECT.js","sourceRoot":"","sources":["../src/CMCD_OBJECT.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,aAAa,CAAC","sourcesContent":["/**\n * CMCD object header name.\n *\n *\n * @beta\n */\nexport const CMCD_OBJECT = 'CMCD-Object';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CMCD_PARAM.d.ts","sourceRoot":"","sources":["../src/CMCD_PARAM.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,UAAU,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CMCD_PARAM.js","sourceRoot":"","sources":["../src/CMCD_PARAM.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC","sourcesContent":["/**\n * CMCD parameter name.\n *\n *\n * @beta\n */\nexport const CMCD_PARAM = 'CMCD';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CMCD_QUERY.d.ts","sourceRoot":"","sources":["../src/CMCD_QUERY.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,UAAU,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CMCD_QUERY.js","sourceRoot":"","sources":["../src/CMCD_QUERY.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,OAAO,CAAC","sourcesContent":["/**\n * CMCD `query` transmission mode.\n *\n *\n * @beta\n */\nexport const CMCD_QUERY = 'query';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CMCD_REQUEST.d.ts","sourceRoot":"","sources":["../src/CMCD_REQUEST.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,YAAY,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CMCD_REQUEST.js","sourceRoot":"","sources":["../src/CMCD_REQUEST.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,cAAc,CAAC","sourcesContent":["/**\n * CMCD request header name.\n *\n *\n * @beta\n */\nexport const CMCD_REQUEST = 'CMCD-Request';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CMCD_REQUEST_KEYS.d.ts","sourceRoot":"","sources":["../src/CMCD_REQUEST_KEYS.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,gDAOpB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Defines the request-specific keys for CMCD (Common Media Client Data) version 2.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
* @beta
|
|
6
|
+
*/
|
|
7
|
+
export const CMCD_REQUEST_KEYS = [
|
|
8
|
+
'd',
|
|
9
|
+
'dl',
|
|
10
|
+
'nor',
|
|
11
|
+
'ot',
|
|
12
|
+
'rtp',
|
|
13
|
+
'su',
|
|
14
|
+
];
|
|
15
|
+
//# sourceMappingURL=CMCD_REQUEST_KEYS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CMCD_REQUEST_KEYS.js","sourceRoot":"","sources":["../src/CMCD_REQUEST_KEYS.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAChC,GAAG;IACH,IAAI;IACJ,KAAK;IACL,IAAI;IACJ,KAAK;IACL,IAAI;CACK,CAAC","sourcesContent":["/**\n * Defines the request-specific keys for CMCD (Common Media Client Data) version 2.\n *\n *\n * @beta\n */\nexport const CMCD_REQUEST_KEYS = [\n\t'd',\n\t'dl',\n\t'nor',\n\t'ot',\n\t'rtp',\n\t'su',\n] as const;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CMCD_REQUEST_MODE.d.ts","sourceRoot":"","sources":["../src/CMCD_REQUEST_MODE.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CMCD_REQUEST_MODE.js","sourceRoot":"","sources":["../src/CMCD_REQUEST_MODE.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,SAAS,CAAC","sourcesContent":["/**\n * CMCD request mode variable name.\n *\n *\n * @beta\n */\nexport const CMCD_REQUEST_MODE = 'request';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CMCD_RESPONSE_KEYS.d.ts","sourceRoot":"","sources":["../src/CMCD_RESPONSE_KEYS.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,2EASrB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CMCD v2 - Response-only and timing keys.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
* @beta
|
|
6
|
+
*/
|
|
7
|
+
export const CMCD_RESPONSE_KEYS = [
|
|
8
|
+
'cmsdd',
|
|
9
|
+
'cmsds',
|
|
10
|
+
'rc',
|
|
11
|
+
'smrt',
|
|
12
|
+
'ttfb',
|
|
13
|
+
'ttfbb',
|
|
14
|
+
'ttlb',
|
|
15
|
+
'url',
|
|
16
|
+
];
|
|
17
|
+
//# sourceMappingURL=CMCD_RESPONSE_KEYS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CMCD_RESPONSE_KEYS.js","sourceRoot":"","sources":["../src/CMCD_RESPONSE_KEYS.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IACjC,OAAO;IACP,OAAO;IACP,IAAI;IACJ,MAAM;IACN,MAAM;IACN,OAAO;IACP,MAAM;IACN,KAAK;CACI,CAAC","sourcesContent":["/**\n * CMCD v2 - Response-only and timing keys.\n *\n *\n * @beta\n */\nexport const CMCD_RESPONSE_KEYS = [\n\t'cmsdd',\n\t'cmsds',\n\t'rc',\n\t'smrt',\n\t'ttfb',\n\t'ttfbb',\n\t'ttlb',\n\t'url',\n] as const;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CMCD_RESPONSE_MODE.d.ts","sourceRoot":"","sources":["../src/CMCD_RESPONSE_MODE.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CMCD_RESPONSE_MODE.js","sourceRoot":"","sources":["../src/CMCD_RESPONSE_MODE.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,UAAU,CAAC","sourcesContent":["/**\n * CMCD response mode variable name.\n *\n *\n * @beta\n */\nexport const CMCD_RESPONSE_MODE = 'response';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CMCD_SESSION.d.ts","sourceRoot":"","sources":["../src/CMCD_SESSION.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,YAAY,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CMCD_SESSION.js","sourceRoot":"","sources":["../src/CMCD_SESSION.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,cAAc,CAAC","sourcesContent":["/**\n * CMCD session header name.\n *\n *\n * @beta\n */\nexport const CMCD_SESSION = 'CMCD-Session';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CMCD_STATUS.d.ts","sourceRoot":"","sources":["../src/CMCD_STATUS.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,WAAW,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CMCD_STATUS.js","sourceRoot":"","sources":["../src/CMCD_STATUS.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,aAAa,CAAC","sourcesContent":["/**\n * CMCD status header name.\n *\n *\n * @beta\n */\nexport const CMCD_STATUS = 'CMCD-Status';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CMCD_V1.d.ts","sourceRoot":"","sources":["../src/CMCD_V1.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,OAAO,IAAI,CAAC"}
|
package/dist/CMCD_V1.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CMCD_V1.js","sourceRoot":"","sources":["../src/CMCD_V1.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,CAAC","sourcesContent":["/**\n * CMCD Version 1\n *\n *\n * @beta\n */\nexport const CMCD_V1 = 1;\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Defines the keys for CMCD (Common Media Client Data) version 1.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
* @beta
|
|
6
|
+
*/
|
|
7
|
+
export declare const CMCD_V1_KEYS: readonly ["bl", "br", "bs", "cid", "d", "dl", "mtp", "nor", "nrr", "ot", "pr", "rtp", "sf", "sid", "st", "su", "tb", "v"];
|
|
8
|
+
//# sourceMappingURL=CMCD_V1_KEYS.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CMCD_V1_KEYS.d.ts","sourceRoot":"","sources":["../src/CMCD_V1_KEYS.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,YAAY,2HAmBf,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Defines the keys for CMCD (Common Media Client Data) version 1.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
* @beta
|
|
6
|
+
*/
|
|
7
|
+
export const CMCD_V1_KEYS = [
|
|
8
|
+
'bl',
|
|
9
|
+
'br',
|
|
10
|
+
'bs',
|
|
11
|
+
'cid',
|
|
12
|
+
'd',
|
|
13
|
+
'dl',
|
|
14
|
+
'mtp',
|
|
15
|
+
'nor',
|
|
16
|
+
'nrr',
|
|
17
|
+
'ot',
|
|
18
|
+
'pr',
|
|
19
|
+
'rtp',
|
|
20
|
+
'sf',
|
|
21
|
+
'sid',
|
|
22
|
+
'st',
|
|
23
|
+
'su',
|
|
24
|
+
'tb',
|
|
25
|
+
'v',
|
|
26
|
+
];
|
|
27
|
+
//# sourceMappingURL=CMCD_V1_KEYS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CMCD_V1_KEYS.js","sourceRoot":"","sources":["../src/CMCD_V1_KEYS.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IAC3B,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,KAAK;IACL,GAAG;IACH,IAAI;IACJ,KAAK;IACL,KAAK;IACL,KAAK;IACL,IAAI;IACJ,IAAI;IACJ,KAAK;IACL,IAAI;IACJ,KAAK;IACL,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,GAAG;CACM,CAAC","sourcesContent":["/**\n * Defines the keys for CMCD (Common Media Client Data) version 1.\n *\n *\n * @beta\n */\nexport const CMCD_V1_KEYS = [\n\t'bl',\n\t'br',\n\t'bs',\n\t'cid',\n\t'd',\n\t'dl',\n\t'mtp',\n\t'nor',\n\t'nrr',\n\t'ot',\n\t'pr',\n\t'rtp',\n\t'sf',\n\t'sid',\n\t'st',\n\t'su',\n\t'tb',\n\t'v',\n] as const;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CMCD_V2.d.ts","sourceRoot":"","sources":["../src/CMCD_V2.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,OAAO,IAAI,CAAC"}
|
package/dist/CMCD_V2.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CMCD_V2.js","sourceRoot":"","sources":["../src/CMCD_V2.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,CAAC","sourcesContent":["/**\n * CMCD Version 2\n *\n *\n * @beta\n */\nexport const CMCD_V2 = 2;\n"]}
|
package/dist/Cmcd.d.ts
ADDED
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
import type { SfItem } from '@svta/cml-structured-field-values/SfItem.js';
|
|
2
|
+
import type { ValueOrArray } from '@svta/cml-utils/ValueOrArray.js';
|
|
3
|
+
import type { CmcdCustomKey } from './CmcdCustomKey.js';
|
|
4
|
+
import type { CmcdObjectType } from './CmcdObjectType.js';
|
|
5
|
+
import type { CmcdStreamType } from './CmcdStreamType.js';
|
|
6
|
+
import type { CmcdStreamingFormat } from './CmcdStreamingFormat.js';
|
|
7
|
+
import type { CmcdValue } from './CmcdValue.js';
|
|
8
|
+
/**
|
|
9
|
+
* Common Media Client Data (CMCD) is a standardized set of HTTP request header fields and query string parameters.
|
|
10
|
+
*
|
|
11
|
+
* @see {@link https://cdn.cta.tech/cta/media/media/resources/standards/pdfs/cta-5004-final.pdf|CMCD Spec}
|
|
12
|
+
*
|
|
13
|
+
*
|
|
14
|
+
* @beta
|
|
15
|
+
*/
|
|
16
|
+
export type Cmcd = {
|
|
17
|
+
/**
|
|
18
|
+
* Custom key names may be used, but they MUST carry a hyphenated prefix to ensure that there will not be a namespace collision
|
|
19
|
+
* with future revisions to this specification. Clients SHOULD use a reverse-DNS syntax when defining their own prefix.
|
|
20
|
+
*/
|
|
21
|
+
[index: CmcdCustomKey]: CmcdValue;
|
|
22
|
+
/**
|
|
23
|
+
* Encoded bitrate
|
|
24
|
+
*
|
|
25
|
+
* The encoded bitrate of the audio or video object being requested. This may not be known precisely by the player; however,
|
|
26
|
+
* it MAY be estimated based upon playlist/manifest declarations. If the playlist declares both peak and average bitrate values,
|
|
27
|
+
* the peak value should be transmitted.
|
|
28
|
+
*
|
|
29
|
+
* Integer kbps
|
|
30
|
+
*/
|
|
31
|
+
br?: number;
|
|
32
|
+
/**
|
|
33
|
+
* Object duration
|
|
34
|
+
*
|
|
35
|
+
* The playback duration in milliseconds of the object being requested. If a partial segment is being requested, then this value
|
|
36
|
+
* MUST indicate the playback duration of that part and not that of its parent segment. This value can be an approximation of the
|
|
37
|
+
* estimated duration if the explicit value is not known.
|
|
38
|
+
*
|
|
39
|
+
* Integer milliseconds
|
|
40
|
+
*/
|
|
41
|
+
d?: number;
|
|
42
|
+
/**
|
|
43
|
+
* Object type
|
|
44
|
+
*
|
|
45
|
+
* The media type of the current object being requested:
|
|
46
|
+
* - `m` = text file, such as a manifest or playlist
|
|
47
|
+
* - `a` = audio only
|
|
48
|
+
* - `v` = video only
|
|
49
|
+
* - `av` = muxed audio and video
|
|
50
|
+
* - `i` = init segment
|
|
51
|
+
* - `c` = caption or subtitle
|
|
52
|
+
* - `tt` = ISOBMFF timed text track
|
|
53
|
+
* - `k` = cryptographic key, license or certificate.
|
|
54
|
+
* - `o` = other
|
|
55
|
+
*
|
|
56
|
+
* If the object type being requested is unknown, then this key MUST NOT be used.
|
|
57
|
+
*/
|
|
58
|
+
ot?: CmcdObjectType;
|
|
59
|
+
/**
|
|
60
|
+
* Top bitrate
|
|
61
|
+
*
|
|
62
|
+
* The highest bitrate rendition in the manifest or playlist that the client is allowed to play, given current codec, licensing and
|
|
63
|
+
* sizing constraints.
|
|
64
|
+
*
|
|
65
|
+
* Integer Kbps
|
|
66
|
+
*/
|
|
67
|
+
tb?: number;
|
|
68
|
+
/**
|
|
69
|
+
* Buffer length
|
|
70
|
+
*
|
|
71
|
+
* The buffer length associated with the media object being requested. This value MUST be rounded to the nearest 100 ms. This key SHOULD only be
|
|
72
|
+
* sent with an object type of ‘a’, ‘v’ or ‘av’.
|
|
73
|
+
*
|
|
74
|
+
* Integer milliseconds
|
|
75
|
+
*/
|
|
76
|
+
bl?: number;
|
|
77
|
+
/**
|
|
78
|
+
* Deadline
|
|
79
|
+
*
|
|
80
|
+
* Deadline from the request time until the first sample of this Segment/Object needs to be available in order to not create a buffer underrun or
|
|
81
|
+
* any other playback problems. This value MUST be rounded to the nearest 100ms. For a playback rate of 1, this may be equivalent to the player’s
|
|
82
|
+
* remaining buffer length.
|
|
83
|
+
*
|
|
84
|
+
* Integer milliseconds
|
|
85
|
+
*/
|
|
86
|
+
dl?: number;
|
|
87
|
+
/**
|
|
88
|
+
* Measured mtp CMCD throughput
|
|
89
|
+
*
|
|
90
|
+
* The throughput between client and server, as measured by the client and MUST be rounded to the nearest 100 kbps. This value, however derived,
|
|
91
|
+
* SHOULD be the value that the client is using to make its next Adaptive Bitrate switching decision. If the client is connected to multiple
|
|
92
|
+
* servers concurrently, it must take care to report only the throughput measured against the receiving server. If the client has multiple concurrent
|
|
93
|
+
* connections to the server, then the intent is that this value communicates the aggregate throughput the client sees across all those connections.
|
|
94
|
+
*
|
|
95
|
+
* Integer kbps
|
|
96
|
+
*/
|
|
97
|
+
mtp?: number;
|
|
98
|
+
/**
|
|
99
|
+
* Next object request
|
|
100
|
+
*
|
|
101
|
+
* 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
|
|
102
|
+
* 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
|
|
103
|
+
* pre-fetch to take place.
|
|
104
|
+
*
|
|
105
|
+
* String
|
|
106
|
+
*/
|
|
107
|
+
nor?: ValueOrArray<string | SfItem>;
|
|
108
|
+
/**
|
|
109
|
+
* Next range request
|
|
110
|
+
*
|
|
111
|
+
* 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
|
|
112
|
+
* 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
|
|
113
|
+
* 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
|
|
114
|
+
* NOT required and specifying multiple ranges is NOT allowed. Valid combinations are:
|
|
115
|
+
*
|
|
116
|
+
* - `"\<range-start\>-"`
|
|
117
|
+
* - `"\<range-start\>-\<range-end\>"`
|
|
118
|
+
* - `"-\<suffix-length\>"`
|
|
119
|
+
*
|
|
120
|
+
* String
|
|
121
|
+
*/
|
|
122
|
+
nrr?: string;
|
|
123
|
+
/**
|
|
124
|
+
* Startup
|
|
125
|
+
*
|
|
126
|
+
* 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
|
|
127
|
+
* rendering when this request is made. This key MUST not be sent if it is FALSE.
|
|
128
|
+
*
|
|
129
|
+
* Boolean
|
|
130
|
+
*/
|
|
131
|
+
su?: boolean;
|
|
132
|
+
/**
|
|
133
|
+
* Content ID
|
|
134
|
+
*
|
|
135
|
+
* A unique string identifying the current content. Maximum length is 64 characters. This value is consistent across multiple different
|
|
136
|
+
* sessions and devices and is defined and updated at the discretion of the service provider.
|
|
137
|
+
*
|
|
138
|
+
* String
|
|
139
|
+
*/
|
|
140
|
+
cid?: string;
|
|
141
|
+
/**
|
|
142
|
+
* Playback rate
|
|
143
|
+
*
|
|
144
|
+
* `1` if real-time, `2` if double speed, `0` if not playing. SHOULD only be sent if not equal to `1`.
|
|
145
|
+
*
|
|
146
|
+
* Decimal
|
|
147
|
+
*/
|
|
148
|
+
pr?: number;
|
|
149
|
+
/**
|
|
150
|
+
* Streaming format
|
|
151
|
+
*
|
|
152
|
+
* The streaming format that defines the current request.
|
|
153
|
+
*
|
|
154
|
+
* - `d` = MPEG DASH
|
|
155
|
+
* - `h` = HTTP Live Streaming (HLS)
|
|
156
|
+
* - `s` = Smooth Streaming
|
|
157
|
+
* - `o` = other
|
|
158
|
+
*
|
|
159
|
+
* If the streaming format being requested is unknown, then this key MUST NOT be used.
|
|
160
|
+
*/
|
|
161
|
+
sf?: CmcdStreamingFormat;
|
|
162
|
+
/**
|
|
163
|
+
* Session ID
|
|
164
|
+
*
|
|
165
|
+
* A GUID identifying the current playback session. A playback session typically ties together segments belonging to a single media asset.
|
|
166
|
+
* Maximum length is 64 characters. It is RECOMMENDED to conform to the UUID specification.
|
|
167
|
+
*
|
|
168
|
+
* String
|
|
169
|
+
*/
|
|
170
|
+
sid?: string;
|
|
171
|
+
/**
|
|
172
|
+
* Stream type
|
|
173
|
+
* - `v` = all segments are available – e.g., VOD
|
|
174
|
+
* - `l` = segments become available over time – e.g., LIVE
|
|
175
|
+
*/
|
|
176
|
+
st?: CmcdStreamType;
|
|
177
|
+
/**
|
|
178
|
+
* CMCD version
|
|
179
|
+
*
|
|
180
|
+
* The version of this specification used for interpreting the defined key names and values. If this key is omitted, the client and server MUST
|
|
181
|
+
* interpret the values as being defined by version 1. Client SHOULD omit this field if the version is 1.
|
|
182
|
+
*
|
|
183
|
+
* Integer
|
|
184
|
+
*/
|
|
185
|
+
v?: number;
|
|
186
|
+
/**
|
|
187
|
+
* Buffer starvation
|
|
188
|
+
*
|
|
189
|
+
* Key is included without a value if the buffer was starved at some point between the prior request and this object request,
|
|
190
|
+
* resulting in the player being in a rebuffering state and the video or audio playback being stalled. This key MUST NOT be
|
|
191
|
+
* sent if the buffer was not starved since the prior request.
|
|
192
|
+
*
|
|
193
|
+
* If the object type `ot` key is sent along with this key, then the `bs` key refers to the buffer associated with the particular
|
|
194
|
+
* object type. If no object type is communicated, then the buffer state applies to the current session.
|
|
195
|
+
*
|
|
196
|
+
* Boolean
|
|
197
|
+
*/
|
|
198
|
+
bs?: boolean;
|
|
199
|
+
/**
|
|
200
|
+
* Requested maximum throughput
|
|
201
|
+
*
|
|
202
|
+
* The requested maximum throughput that the client considers sufficient for delivery of the asset. Values MUST be rounded to the
|
|
203
|
+
* nearest 100kbps. For example, a client would indicate that the current segment, encoded at 2Mbps, is to be delivered at no more
|
|
204
|
+
* than 10Mbps, by using rtp=10000.
|
|
205
|
+
*
|
|
206
|
+
* Note: This can benefit clients by preventing buffer saturation through over-delivery and can also deliver a community benefit
|
|
207
|
+
* through fair-share delivery. The concept is that each client receives the throughput necessary for great performance, but no more.
|
|
208
|
+
* The CDN may not support the rtp feature.
|
|
209
|
+
*
|
|
210
|
+
* Integer kbps
|
|
211
|
+
*/
|
|
212
|
+
rtp?: number;
|
|
213
|
+
};
|
|
214
|
+
//# sourceMappingURL=Cmcd.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Cmcd.d.ts","sourceRoot":"","sources":["../src/Cmcd.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,6CAA6C,CAAC;AAC1E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AACpE,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,IAAI,GAAG;IAElB;;;OAGG;IACH,CAAC,KAAK,EAAE,aAAa,GAAG,SAAS,CAAC;IAMlC;;;;;;;;OAQG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;;;;;;;OAQG;IACH,CAAC,CAAC,EAAE,MAAM,CAAC;IAEX;;;;;;;;;;;;;;;OAeG;IACH,EAAE,CAAC,EAAE,cAAc,CAAC;IAEpB;;;;;;;OAOG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAKZ;;;;;;;OAOG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;;;;;;;OAQG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;;;;;;;;OASG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;;;;;;;OAQG;IACH,GAAG,CAAC,EAAE,YAAY,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;IAEpC;;;;;;;;;;;;;OAaG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;;;;;;OAOG;IACH,EAAE,CAAC,EAAE,OAAO,CAAC;IAMb;;;;;;;OAOG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;;;;;OAMG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;;;;;;;;;;OAWG;IACH,EAAE,CAAC,EAAE,mBAAmB,CAAC;IAEzB;;;;;;;OAOG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;;;OAIG;IACH,EAAE,CAAC,EAAE,cAAc,CAAC;IAEpB;;;;;;;OAOG;IACH,CAAC,CAAC,EAAE,MAAM,CAAC;IAMX;;;;;;;;;;;OAWG;IACH,EAAE,CAAC,EAAE,OAAO,CAAC;IAEb;;;;;;;;;;;;OAYG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACb,CAAC"}
|
package/dist/Cmcd.js
ADDED
package/dist/Cmcd.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Cmcd.js","sourceRoot":"","sources":["../src/Cmcd.ts"],"names":[],"mappings":"","sourcesContent":["import type { SfItem } from '@svta/cml-structured-field-values/SfItem.js';\nimport type { ValueOrArray } from '@svta/cml-utils/ValueOrArray.js';\nimport type { CmcdCustomKey } from './CmcdCustomKey.js';\nimport type { CmcdObjectType } from './CmcdObjectType.js';\nimport type { CmcdStreamType } from './CmcdStreamType.js';\nimport type { CmcdStreamingFormat } from './CmcdStreamingFormat.js';\nimport type { CmcdValue } from './CmcdValue.js';\n\n/**\n * Common Media Client Data (CMCD) is a standardized set of HTTP request header fields and query string parameters.\n *\n * @see {@link https://cdn.cta.tech/cta/media/media/resources/standards/pdfs/cta-5004-final.pdf|CMCD Spec}\n *\n *\n * @beta\n */\nexport type Cmcd = {\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: CmcdCustomKey]: CmcdValue;\n\n\t/////////////////\n\t// CMCD Object //\n\t/////////////////\n\n\t/**\n\t * Encoded bitrate\n\t *\n\t * The encoded bitrate of the audio or video object being requested. This may not be known precisely by the player; however,\n\t * it MAY be estimated based upon playlist/manifest declarations. If the playlist declares both peak and average bitrate values,\n\t * the peak value should be transmitted.\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 * 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\tot?: CmcdObjectType;\n\n\t/**\n\t * Top bitrate\n\t *\n\t * The highest bitrate rendition in the manifest or playlist that the client is allowed to play, given current codec, licensing and\n\t * sizing constraints.\n\t *\n\t * Integer Kbps\n\t */\n\ttb?: number;\n\n\t//////////////////\n\t// CMCD Request //\n\t//////////////////\n\t/**\n\t * Buffer length\n\t *\n\t * The buffer length associated with the media object being requested. This value MUST be rounded to the nearest 100 ms. This key SHOULD only be\n\t * sent with an object type of ‘a’, ‘v’ or ‘av’.\n\t *\n\t * Integer milliseconds\n\t */\n\tbl?: number;\n\n\t/**\n\t * Deadline\n\t *\n\t * Deadline from the request time until the first sample of this Segment/Object needs to be available in order to not create a buffer underrun or\n\t * any other playback problems. This value MUST be rounded to the nearest 100ms. For a playback rate of 1, this may be equivalent to the player’s\n\t * remaining buffer length.\n\t *\n\t * Integer milliseconds\n\t */\n\tdl?: number;\n\n\t/**\n\t * Measured mtp CMCD throughput\n\t *\n\t * The throughput between client and server, as measured by the client and MUST be rounded to the nearest 100 kbps. This value, however derived,\n\t * SHOULD be the value that the client is using to make its next Adaptive Bitrate switching decision. If the client is connected to multiple\n\t * servers concurrently, it must take care to report only the throughput measured against the receiving server. If the client has multiple concurrent\n\t * connections to the server, then the intent is that this value communicates the aggregate throughput the client sees across all those connections.\n\t *\n\t * Integer kbps\n\t */\n\tmtp?: number;\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?: ValueOrArray<string | SfItem>;\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 * 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// CMCD Session //\n\t//////////////////\n\n\t/**\n\t * Content ID\n\t *\n\t * A unique string identifying the current content. Maximum length is 64 characters. This value is consistent across multiple different\n\t * sessions and devices and is defined and updated at the discretion of the service provider.\n\t *\n\t * String\n\t */\n\tcid?: string;\n\n\t/**\n\t * Playback rate\n\t *\n\t * `1` if real-time, `2` if double speed, `0` if not playing. SHOULD only be sent if not equal to `1`.\n\t *\n\t * Decimal\n\t */\n\tpr?: number;\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\tsf?: CmcdStreamingFormat;\n\n\t/**\n\t * Session ID\n\t *\n\t * A GUID identifying the current playback session. A playback session typically ties together segments belonging to a single media asset.\n\t * Maximum length is 64 characters. It is RECOMMENDED to conform to the UUID specification.\n\t *\n\t * String\n\t */\n\tsid?: string;\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\tst?: CmcdStreamType;\n\n\t/**\n\t * CMCD 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\t/////////////////\n\t// CMCD Status //\n\t/////////////////\n\n\t/**\n\t * Buffer starvation\n\t *\n\t * Key is included without a value if the buffer was starved at some point between the prior request and this object request,\n\t * resulting in the player being in a rebuffering state and the video or audio playback being stalled. This key MUST NOT be\n\t * sent if the buffer was not starved since the prior request.\n\t *\n\t * If the object type `ot` key is sent along with this key, then the `bs` key refers to the buffer associated with the particular\n\t * object type. If no object type is communicated, then the buffer state applies to the current session.\n\t *\n\t * Boolean\n\t */\n\tbs?: boolean;\n\n\t/**\n\t * Requested maximum throughput\n\t *\n\t * The requested maximum throughput that the client considers sufficient for delivery of the asset. Values MUST be rounded to the\n\t * nearest 100kbps. For example, a client would indicate that the current segment, encoded at 2Mbps, is to be delivered at no more\n\t * than 10Mbps, by using rtp=10000.\n\t *\n\t * Note: This can benefit clients by preventing buffer saturation through over-delivery and can also deliver a community benefit\n\t * through fair-share delivery. The concept is that each client receives the throughput necessary for great performance, but no more.\n\t * The CDN may not support the rtp feature.\n\t *\n\t * Integer kbps\n\t */\n\trtp?: number;\n};\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A custom key for CMCD. 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 CmcdCustomKey = `${string}-${string}`;
|
|
11
|
+
//# sourceMappingURL=CmcdCustomKey.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CmcdCustomKey.d.ts","sourceRoot":"","sources":["../src/CmcdCustomKey.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,MAAM,aAAa,GAAG,GAAG,MAAM,IAAI,MAAM,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CmcdCustomKey.js","sourceRoot":"","sources":["../src/CmcdCustomKey.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * A custom key for CMCD. 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 CmcdCustomKey = `${string}-${string}`;\n"]}
|