@amazon/vinyl-mpd-parser 1.0.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/dist/dashTestAssets/index.js +1559 -0
- package/dist/dashTestAssets/index.js.map +7 -0
- package/dist/dashTestAssets/types/current/dash_personalizedResponse.d.ts +6 -0
- package/dist/dashTestAssets/types/current/dash_personalizedResponse.d.ts.map +1 -0
- package/dist/dashTestAssets/types/current/dash_personalizedResponse.js +831 -0
- package/dist/dashTestAssets/types/current/dash_segmentBase.d.ts +5 -0
- package/dist/dashTestAssets/types/current/dash_segmentBase.d.ts.map +1 -0
- package/dist/dashTestAssets/types/current/dash_segmentBase.js +144 -0
- package/dist/dashTestAssets/types/current/dash_segmentList.d.ts +6 -0
- package/dist/dashTestAssets/types/current/dash_segmentList.d.ts.map +1 -0
- package/dist/dashTestAssets/types/current/dash_segmentList.js +107 -0
- package/dist/dashTestAssets/types/current/dash_segmentListMediaRange.d.ts +8 -0
- package/dist/dashTestAssets/types/current/dash_segmentListMediaRange.d.ts.map +1 -0
- package/dist/dashTestAssets/types/current/dash_segmentListMediaRange.js +472 -0
- package/dist/dashTestAssets/types/current/dash_segmentTemplate.d.ts +5 -0
- package/dist/dashTestAssets/types/current/dash_segmentTemplate.d.ts.map +1 -0
- package/dist/dashTestAssets/types/current/dash_segmentTemplate.js +34 -0
- package/dist/dashTestAssets/types/current/index.d.ts +7 -0
- package/dist/dashTestAssets/types/current/index.d.ts.map +1 -0
- package/dist/dashTestAssets/types/current/index.js +6 -0
- package/dist/dashTestAssets/types/current/tsconfig.tsbuildinfo +1 -0
- package/dist/dashTestAssets/types/ts3.7/dash_personalizedResponse.d.ts +6 -0
- package/dist/dashTestAssets/types/ts3.7/dash_segmentBase.d.ts +5 -0
- package/dist/dashTestAssets/types/ts3.7/dash_segmentList.d.ts +6 -0
- package/dist/dashTestAssets/types/ts3.7/dash_segmentListMediaRange.d.ts +8 -0
- package/dist/dashTestAssets/types/ts3.7/dash_segmentTemplate.d.ts +5 -0
- package/dist/dashTestAssets/types/ts3.7/index.d.ts +7 -0
- package/dist/dashTestAssets/types/ts4.1/dash_personalizedResponse.d.ts +6 -0
- package/dist/dashTestAssets/types/ts4.1/dash_segmentBase.d.ts +5 -0
- package/dist/dashTestAssets/types/ts4.1/dash_segmentList.d.ts +6 -0
- package/dist/dashTestAssets/types/ts4.1/dash_segmentListMediaRange.d.ts +8 -0
- package/dist/dashTestAssets/types/ts4.1/dash_segmentTemplate.d.ts +5 -0
- package/dist/dashTestAssets/types/ts4.1/index.d.ts +7 -0
- package/dist/dashTestAssets/types/ts4.7/dash_personalizedResponse.d.ts +6 -0
- package/dist/dashTestAssets/types/ts4.7/dash_segmentBase.d.ts +5 -0
- package/dist/dashTestAssets/types/ts4.7/dash_segmentList.d.ts +6 -0
- package/dist/dashTestAssets/types/ts4.7/dash_segmentListMediaRange.d.ts +8 -0
- package/dist/dashTestAssets/types/ts4.7/dash_segmentTemplate.d.ts +5 -0
- package/dist/dashTestAssets/types/ts4.7/index.d.ts +7 -0
- package/dist/index.cjs +583 -0
- package/dist/index.cjs.map +7 -0
- package/dist/index.js +584 -0
- package/dist/index.js.map +7 -0
- package/dist/test/benchmark.es5.js +566 -0
- package/dist/test/benchmark.js +4497 -0
- package/dist/test/benchmark.js.map +7 -0
- package/dist/types/current/duration/duration.d.ts +34 -0
- package/dist/types/current/duration/duration.d.ts.map +1 -0
- package/dist/types/current/duration/duration.js +83 -0
- package/dist/types/current/error/parsingError.d.ts +2 -0
- package/dist/types/current/error/parsingError.d.ts.map +1 -0
- package/dist/types/current/error/parsingError.js +8 -0
- package/dist/types/current/index.d.ts +16 -0
- package/dist/types/current/index.d.ts.map +1 -0
- package/dist/types/current/index.js +15 -0
- package/dist/types/current/manifest/dashManifestXmlRules.d.ts +65 -0
- package/dist/types/current/manifest/dashManifestXmlRules.d.ts.map +1 -0
- package/dist/types/current/manifest/dashManifestXmlRules.js +360 -0
- package/dist/types/current/manifest/dashParser.d.ts +23 -0
- package/dist/types/current/manifest/dashParser.d.ts.map +1 -0
- package/dist/types/current/manifest/dashParser.js +28 -0
- package/dist/types/current/manifest/ext/drm/ContentProtectionScheme.d.ts +31 -0
- package/dist/types/current/manifest/ext/drm/ContentProtectionScheme.d.ts.map +1 -0
- package/dist/types/current/manifest/ext/drm/ContentProtectionScheme.js +34 -0
- package/dist/types/current/manifest/ext/drm/cencXmlRules.d.ts +8 -0
- package/dist/types/current/manifest/ext/drm/cencXmlRules.d.ts.map +1 -0
- package/dist/types/current/manifest/ext/drm/cencXmlRules.js +21 -0
- package/dist/types/current/manifest/ext/drm/contentProtection.d.ts +32 -0
- package/dist/types/current/manifest/ext/drm/contentProtection.d.ts.map +1 -0
- package/dist/types/current/manifest/ext/drm/contentProtection.js +32 -0
- package/dist/types/current/manifest/ext/drm/playreadyXmlRules.d.ts +4 -0
- package/dist/types/current/manifest/ext/drm/playreadyXmlRules.d.ts.map +1 -0
- package/dist/types/current/manifest/ext/drm/playreadyXmlRules.js +13 -0
- package/dist/types/current/media/byteRange.d.ts +12 -0
- package/dist/types/current/media/byteRange.d.ts.map +1 -0
- package/dist/types/current/media/byteRange.js +30 -0
- package/dist/types/current/media/frameRate.d.ts +14 -0
- package/dist/types/current/media/frameRate.d.ts.map +1 -0
- package/dist/types/current/media/frameRate.js +25 -0
- package/dist/types/current/media/ratio.d.ts +24 -0
- package/dist/types/current/media/ratio.d.ts.map +1 -0
- package/dist/types/current/media/ratio.js +36 -0
- package/dist/types/current/tsconfig.tsbuildinfo +1 -0
- package/dist/types/current/xmlns/microsoft/playready.d.ts +12 -0
- package/dist/types/current/xmlns/microsoft/playready.d.ts.map +1 -0
- package/dist/types/current/xmlns/microsoft/playready.js +11 -0
- package/dist/types/current/xmlns/mpeg/cenc/2013.d.ts +19 -0
- package/dist/types/current/xmlns/mpeg/cenc/2013.d.ts.map +1 -0
- package/dist/types/current/xmlns/mpeg/cenc/2013.js +11 -0
- package/dist/types/current/xmlns/mpeg/dash/schema/mpd/2011.d.ts +918 -0
- package/dist/types/current/xmlns/mpeg/dash/schema/mpd/2011.d.ts.map +1 -0
- package/dist/types/current/xmlns/mpeg/dash/schema/mpd/2011.js +5 -0
- package/dist/types/ts3.7/duration/duration.d.ts +34 -0
- package/dist/types/ts3.7/error/parsingError.d.ts +2 -0
- package/dist/types/ts3.7/index.d.ts +16 -0
- package/dist/types/ts3.7/manifest/dashManifestXmlRules.d.ts +65 -0
- package/dist/types/ts3.7/manifest/dashParser.d.ts +23 -0
- package/dist/types/ts3.7/manifest/ext/drm/ContentProtectionScheme.d.ts +31 -0
- package/dist/types/ts3.7/manifest/ext/drm/cencXmlRules.d.ts +8 -0
- package/dist/types/ts3.7/manifest/ext/drm/contentProtection.d.ts +32 -0
- package/dist/types/ts3.7/manifest/ext/drm/playreadyXmlRules.d.ts +4 -0
- package/dist/types/ts3.7/media/byteRange.d.ts +15 -0
- package/dist/types/ts3.7/media/frameRate.d.ts +17 -0
- package/dist/types/ts3.7/media/ratio.d.ts +27 -0
- package/dist/types/ts3.7/xmlns/microsoft/playready.d.ts +12 -0
- package/dist/types/ts3.7/xmlns/mpeg/cenc/2013.d.ts +19 -0
- package/dist/types/ts3.7/xmlns/mpeg/dash/schema/mpd/2011.d.ts +918 -0
- package/dist/types/ts4.1/duration/duration.d.ts +34 -0
- package/dist/types/ts4.1/error/parsingError.d.ts +2 -0
- package/dist/types/ts4.1/index.d.ts +16 -0
- package/dist/types/ts4.1/manifest/dashManifestXmlRules.d.ts +65 -0
- package/dist/types/ts4.1/manifest/dashParser.d.ts +23 -0
- package/dist/types/ts4.1/manifest/ext/drm/ContentProtectionScheme.d.ts +31 -0
- package/dist/types/ts4.1/manifest/ext/drm/cencXmlRules.d.ts +8 -0
- package/dist/types/ts4.1/manifest/ext/drm/contentProtection.d.ts +32 -0
- package/dist/types/ts4.1/manifest/ext/drm/playreadyXmlRules.d.ts +4 -0
- package/dist/types/ts4.1/media/byteRange.d.ts +15 -0
- package/dist/types/ts4.1/media/frameRate.d.ts +17 -0
- package/dist/types/ts4.1/media/ratio.d.ts +27 -0
- package/dist/types/ts4.1/xmlns/microsoft/playready.d.ts +12 -0
- package/dist/types/ts4.1/xmlns/mpeg/cenc/2013.d.ts +19 -0
- package/dist/types/ts4.1/xmlns/mpeg/dash/schema/mpd/2011.d.ts +918 -0
- package/dist/types/ts4.7/duration/duration.d.ts +34 -0
- package/dist/types/ts4.7/error/parsingError.d.ts +2 -0
- package/dist/types/ts4.7/index.d.ts +16 -0
- package/dist/types/ts4.7/manifest/dashManifestXmlRules.d.ts +65 -0
- package/dist/types/ts4.7/manifest/dashParser.d.ts +23 -0
- package/dist/types/ts4.7/manifest/ext/drm/ContentProtectionScheme.d.ts +31 -0
- package/dist/types/ts4.7/manifest/ext/drm/cencXmlRules.d.ts +8 -0
- package/dist/types/ts4.7/manifest/ext/drm/contentProtection.d.ts +32 -0
- package/dist/types/ts4.7/manifest/ext/drm/playreadyXmlRules.d.ts +4 -0
- package/dist/types/ts4.7/media/byteRange.d.ts +15 -0
- package/dist/types/ts4.7/media/frameRate.d.ts +17 -0
- package/dist/types/ts4.7/media/ratio.d.ts +27 -0
- package/dist/types/ts4.7/xmlns/microsoft/playready.d.ts +12 -0
- package/dist/types/ts4.7/xmlns/mpeg/cenc/2013.d.ts +19 -0
- package/dist/types/ts4.7/xmlns/mpeg/dash/schema/mpd/2011.d.ts +918 -0
- package/package.json +101 -0
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,583 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defProps = Object.defineProperties;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
10
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
11
|
+
var __spreadValues = (a, b) => {
|
|
12
|
+
for (var prop in b || (b = {}))
|
|
13
|
+
if (__hasOwnProp.call(b, prop))
|
|
14
|
+
__defNormalProp(a, prop, b[prop]);
|
|
15
|
+
if (__getOwnPropSymbols)
|
|
16
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
17
|
+
if (__propIsEnum.call(b, prop))
|
|
18
|
+
__defNormalProp(a, prop, b[prop]);
|
|
19
|
+
}
|
|
20
|
+
return a;
|
|
21
|
+
};
|
|
22
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
23
|
+
var __export = (target, all) => {
|
|
24
|
+
for (var name in all)
|
|
25
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
26
|
+
};
|
|
27
|
+
var __copyProps = (to, from, except, desc) => {
|
|
28
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
29
|
+
for (let key of __getOwnPropNames(from))
|
|
30
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
31
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
32
|
+
}
|
|
33
|
+
return to;
|
|
34
|
+
};
|
|
35
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
36
|
+
|
|
37
|
+
// src/index.ts
|
|
38
|
+
var index_exports = {};
|
|
39
|
+
__export(index_exports, {
|
|
40
|
+
CENC_NAMESPACE_URI: () => CENC_NAMESPACE_URI,
|
|
41
|
+
ContentProtectionScheme: () => ContentProtectionScheme,
|
|
42
|
+
PLAY_READY_NAMESPACE_URI: () => PLAY_READY_NAMESPACE_URI,
|
|
43
|
+
cencXmlRules: () => cencXmlRules,
|
|
44
|
+
createDashProtectionXmlRules: () => createDashProtectionXmlRules,
|
|
45
|
+
dashManifestXmlRules: () => dashManifestXmlRules,
|
|
46
|
+
dashNamespaceUri: () => dashNamespaceUri,
|
|
47
|
+
parseByteRange: () => parseByteRange,
|
|
48
|
+
parseConditionalUint: () => parseConditionalUint,
|
|
49
|
+
parseDashManifest: () => parseDashManifest,
|
|
50
|
+
parseDuration: () => parseDuration,
|
|
51
|
+
parseFrameRate: () => parseFrameRate,
|
|
52
|
+
parseIntVector: () => parseIntVector,
|
|
53
|
+
parsePresentationTypeType: () => parsePresentationTypeType,
|
|
54
|
+
parseProfiles: () => parseProfiles,
|
|
55
|
+
parseRatio: () => parseRatio,
|
|
56
|
+
parseSap: () => parseSap,
|
|
57
|
+
parseStringVector: () => parseStringVector,
|
|
58
|
+
parseSwitchingTypeType: () => parseSwitchingTypeType,
|
|
59
|
+
parseVideoScan: () => parseVideoScan,
|
|
60
|
+
playreadyXmlRules: () => playreadyXmlRules,
|
|
61
|
+
stringifyByteRange: () => stringifyByteRange,
|
|
62
|
+
stringifyDashManifest: () => stringifyDashManifest,
|
|
63
|
+
stringifyDuration: () => stringifyDuration,
|
|
64
|
+
stringifyFrameRate: () => stringifyFrameRate,
|
|
65
|
+
stringifyIntVector: () => stringifyIntVector,
|
|
66
|
+
stringifyProfiles: () => stringifyProfiles,
|
|
67
|
+
stringifyRatio: () => stringifyRatio,
|
|
68
|
+
stringifyStringVector: () => stringifyStringVector,
|
|
69
|
+
throwParsingError: () => throwParsingError
|
|
70
|
+
});
|
|
71
|
+
module.exports = __toCommonJS(index_exports);
|
|
72
|
+
|
|
73
|
+
// src/xmlns/mpeg/cenc/2013.ts
|
|
74
|
+
var CENC_NAMESPACE_URI = "urn:mpeg:cenc:2013";
|
|
75
|
+
|
|
76
|
+
// src/xmlns/microsoft/playready.ts
|
|
77
|
+
var PLAY_READY_NAMESPACE_URI = "urn:microsoft:playready";
|
|
78
|
+
|
|
79
|
+
// src/error/parsingError.ts
|
|
80
|
+
var import_vinyl_util = require("@amazon/vinyl-util");
|
|
81
|
+
function throwParsingError(message) {
|
|
82
|
+
throw new import_vinyl_util.ValidationError(message, import_vinyl_util.ErrorOrigin.PARSING);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// src/media/ratio.ts
|
|
86
|
+
var ratioRegExp = /^([0-9]*):([0-9]*)$/;
|
|
87
|
+
function parseRatio(str) {
|
|
88
|
+
const match = str ? ratioRegExp.exec(str) : null;
|
|
89
|
+
if (!match) throwParsingError(`invalid ratio format: ${str}`);
|
|
90
|
+
return [parseInt(match[1] || "1"), parseInt(match[2] || "1")];
|
|
91
|
+
}
|
|
92
|
+
function stringifyRatio(value) {
|
|
93
|
+
return `${value[0]}:${value[1]}`;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// src/media/frameRate.ts
|
|
97
|
+
var framerateRegexp = /^(\d+)(?:\/(\d+))?$/;
|
|
98
|
+
function parseFrameRate(str) {
|
|
99
|
+
const match = str ? framerateRegexp.exec(str) : null;
|
|
100
|
+
if (!match) throwParsingError(`invalid frame rate: '${str}'`);
|
|
101
|
+
return [parseInt(match[1]), parseInt(match[2] || "1")];
|
|
102
|
+
}
|
|
103
|
+
function stringifyFrameRate(value) {
|
|
104
|
+
return value[1] === 1 ? value[0].toString() : `${value[0]}/${value[1]}`;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// src/media/byteRange.ts
|
|
108
|
+
var import_vinyl_util2 = require("@amazon/vinyl-util");
|
|
109
|
+
var byteRangeExp = /^(-?[0-9]+)-(-?[0-9]*)$/;
|
|
110
|
+
function parseByteRange(str) {
|
|
111
|
+
const match = str ? byteRangeExp.exec(str) : null;
|
|
112
|
+
if (!match) throwParsingError(`invalid byte range: '${str}'`);
|
|
113
|
+
let start = parseInt(match[1]);
|
|
114
|
+
if (start < 0) start >>>= 0;
|
|
115
|
+
let end = (0, import_vinyl_util2.parseIntSafe)(match[2]);
|
|
116
|
+
if (end != null && end < 0) end = end >>> 0;
|
|
117
|
+
return [start, end];
|
|
118
|
+
}
|
|
119
|
+
function stringifyByteRange(value) {
|
|
120
|
+
const end = value[1];
|
|
121
|
+
return `${value[0]}-${end == null ? "" : end}`;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
// src/manifest/dashParser.ts
|
|
125
|
+
var import_vinyl_xml5 = require("@amazon/vinyl-xml");
|
|
126
|
+
|
|
127
|
+
// src/manifest/dashManifestXmlRules.ts
|
|
128
|
+
var import_vinyl_xml = require("@amazon/vinyl-xml");
|
|
129
|
+
var import_vinyl_util4 = require("@amazon/vinyl-util");
|
|
130
|
+
var import_vinyl_validation = require("@amazon/vinyl-validation");
|
|
131
|
+
|
|
132
|
+
// src/duration/duration.ts
|
|
133
|
+
var import_vinyl_util3 = require("@amazon/vinyl-util");
|
|
134
|
+
var I = 60;
|
|
135
|
+
var H = 3600;
|
|
136
|
+
var D = 86400;
|
|
137
|
+
var M = 2592e3;
|
|
138
|
+
var Y = 31536e3;
|
|
139
|
+
var iso8601Duration = /^(-?)P?(\d+(?:\.\d*)?Y)?(\d+(?:\.\d*)?M)?(\d+(?:\.\d*)?D)?T?(\d+(?:\.\d*)?H)?(\d+(?:\.\d*)?M)?(\d+(?:\.\d*)?S?)?$/i;
|
|
140
|
+
function parseDuration(value) {
|
|
141
|
+
const match = iso8601Duration.exec(value);
|
|
142
|
+
if (match == null)
|
|
143
|
+
throw new import_vinyl_util3.ValidationError(
|
|
144
|
+
`Unexpected duration: '${value}', should be in iso 8601 format`,
|
|
145
|
+
import_vinyl_util3.ErrorOrigin.PARSING
|
|
146
|
+
);
|
|
147
|
+
const sign = match[1] === "-" ? -1 : 1;
|
|
148
|
+
return sign * (parseFloat(match[2] || "0") * Y + parseFloat(match[3] || "0") * M + parseFloat(match[4] || "0") * D + parseFloat(match[5] || "0") * H + parseFloat(match[6] || "0") * I + parseFloat(match[7] || "0"));
|
|
149
|
+
}
|
|
150
|
+
function stringifyDuration(value) {
|
|
151
|
+
const sign = value < 0 ? "-" : "";
|
|
152
|
+
let abs = Math.abs(value);
|
|
153
|
+
const years = Math.floor(abs / Y);
|
|
154
|
+
abs -= years * Y;
|
|
155
|
+
const months = Math.floor(abs % Y / M);
|
|
156
|
+
const days = Math.floor(abs % M / D);
|
|
157
|
+
const hours = Math.floor(abs % D / H);
|
|
158
|
+
const minutes = Math.floor(abs % H / I);
|
|
159
|
+
const seconds = abs % I;
|
|
160
|
+
let isoString = `${sign}P`;
|
|
161
|
+
if (years > 0) isoString += `${years}Y`;
|
|
162
|
+
if (months > 0) isoString += `${months}M`;
|
|
163
|
+
if (days > 0) isoString += `${days}D`;
|
|
164
|
+
isoString += "T";
|
|
165
|
+
if (hours > 0) isoString += `${hours}H`;
|
|
166
|
+
if (minutes > 0) isoString += `${minutes}M`;
|
|
167
|
+
if (seconds > 0 || !value) isoString += `${(0, import_vinyl_util3.roundToNearest)(seconds, 1e-3)}S`;
|
|
168
|
+
return isoString;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
// src/manifest/dashManifestXmlRules.ts
|
|
172
|
+
var dashNamespaceUri = "urn:mpeg:dash:schema:mpd:2011";
|
|
173
|
+
function dashManifestXmlRules() {
|
|
174
|
+
const attrActuateType = (0, import_vinyl_xml.attr)(import_vinyl_xml.assertActuateEnum, import_vinyl_util4.stringify, {
|
|
175
|
+
default: "onRequest"
|
|
176
|
+
});
|
|
177
|
+
const descriptorType = {
|
|
178
|
+
id: import_vinyl_xml.attrString,
|
|
179
|
+
schemeIdUri: (0, import_vinyl_xml.attrString)({ required: true }),
|
|
180
|
+
value: import_vinyl_xml.attrString
|
|
181
|
+
};
|
|
182
|
+
const baseURLType = {
|
|
183
|
+
availabilityTimeComplete: import_vinyl_xml.attrBoolean,
|
|
184
|
+
availabilityTimeOffset: import_vinyl_xml.attrFloat,
|
|
185
|
+
byteRange: import_vinyl_xml.attrString,
|
|
186
|
+
serviceLocation: import_vinyl_xml.attrString,
|
|
187
|
+
_content: import_vinyl_xml.charactersString
|
|
188
|
+
};
|
|
189
|
+
const contentComponentType = {
|
|
190
|
+
contentType: import_vinyl_xml.attrString,
|
|
191
|
+
id: import_vinyl_xml.attrInt,
|
|
192
|
+
lang: import_vinyl_xml.attrString,
|
|
193
|
+
par: (0, import_vinyl_xml.attr)(parseRatio, stringifyRatio),
|
|
194
|
+
Accessibility: (0, import_vinyl_xml.elements)(descriptorType),
|
|
195
|
+
Rating: (0, import_vinyl_xml.elements)(descriptorType),
|
|
196
|
+
Role: (0, import_vinyl_xml.elements)(descriptorType),
|
|
197
|
+
Viewpoint: (0, import_vinyl_xml.elements)(descriptorType)
|
|
198
|
+
};
|
|
199
|
+
const urlType = {
|
|
200
|
+
range: (0, import_vinyl_xml.attr)(parseByteRange, stringifyByteRange),
|
|
201
|
+
sourceURL: import_vinyl_xml.attrString
|
|
202
|
+
};
|
|
203
|
+
const uriType = { _content: import_vinyl_xml.charactersString };
|
|
204
|
+
const segmentBaseType = {
|
|
205
|
+
Initialization: (0, import_vinyl_xml.element)(urlType),
|
|
206
|
+
RepresentationIndex: (0, import_vinyl_xml.element)(urlType),
|
|
207
|
+
availabilityTimeComplete: import_vinyl_xml.attrBoolean,
|
|
208
|
+
availabilityTimeOffset: import_vinyl_xml.attrInt,
|
|
209
|
+
indexRange: (0, import_vinyl_xml.attr)(parseByteRange, stringifyByteRange),
|
|
210
|
+
indexRangeExact: (0, import_vinyl_xml.attrBoolean)({ default: false }),
|
|
211
|
+
presentationTimeOffset: import_vinyl_xml.attrFloat,
|
|
212
|
+
timescale: import_vinyl_xml.attrInt
|
|
213
|
+
};
|
|
214
|
+
const segmentTimelineTypeSType = {
|
|
215
|
+
d: (0, import_vinyl_xml.attrInt)({ required: true }),
|
|
216
|
+
n: import_vinyl_xml.attrInt,
|
|
217
|
+
r: (0, import_vinyl_xml.attrInt)({ default: 0 }),
|
|
218
|
+
t: import_vinyl_xml.attrInt
|
|
219
|
+
};
|
|
220
|
+
const segmentTimelineType = {
|
|
221
|
+
S: (0, import_vinyl_xml.elements)(segmentTimelineTypeSType)
|
|
222
|
+
};
|
|
223
|
+
const multipleSegmentBaseType = __spreadProps(__spreadValues({}, segmentBaseType), {
|
|
224
|
+
SegmentTimeline: (0, import_vinyl_xml.element)(segmentTimelineType),
|
|
225
|
+
BitstreamSwitching: (0, import_vinyl_xml.element)(urlType),
|
|
226
|
+
duration: import_vinyl_xml.attrInt,
|
|
227
|
+
startNumber: import_vinyl_xml.attrInt
|
|
228
|
+
});
|
|
229
|
+
const segmentURLType = {
|
|
230
|
+
index: import_vinyl_xml.attrString,
|
|
231
|
+
indexRange: (0, import_vinyl_xml.attr)(parseByteRange, stringifyByteRange),
|
|
232
|
+
media: import_vinyl_xml.attrString,
|
|
233
|
+
mediaRange: (0, import_vinyl_xml.attr)(parseByteRange, stringifyByteRange)
|
|
234
|
+
};
|
|
235
|
+
const segmentListType = __spreadProps(__spreadValues({}, multipleSegmentBaseType), {
|
|
236
|
+
actuate: attrActuateType,
|
|
237
|
+
href: import_vinyl_xml.attrString,
|
|
238
|
+
SegmentURL: (0, import_vinyl_xml.elements)(segmentURLType)
|
|
239
|
+
});
|
|
240
|
+
const segmentTemplateType = __spreadProps(__spreadValues({}, multipleSegmentBaseType), {
|
|
241
|
+
bitstreamSwitching: import_vinyl_xml.attrString,
|
|
242
|
+
index: import_vinyl_xml.attrString,
|
|
243
|
+
initialization: import_vinyl_xml.attrString,
|
|
244
|
+
media: import_vinyl_xml.attrString
|
|
245
|
+
});
|
|
246
|
+
const subsetType = {
|
|
247
|
+
contains: (0, import_vinyl_xml.attr)(parseIntVector, stringifyIntVector, { required: true }),
|
|
248
|
+
id: import_vinyl_xml.attrString
|
|
249
|
+
};
|
|
250
|
+
const eventType = {
|
|
251
|
+
duration: import_vinyl_xml.attrInt,
|
|
252
|
+
id: import_vinyl_xml.attrInt,
|
|
253
|
+
messageData: import_vinyl_xml.attrString,
|
|
254
|
+
presentationTime: (0, import_vinyl_xml.attrInt)({ default: 0 })
|
|
255
|
+
};
|
|
256
|
+
const eventStreamType = {
|
|
257
|
+
Event: (0, import_vinyl_xml.elements)(eventType),
|
|
258
|
+
actuate: attrActuateType,
|
|
259
|
+
href: import_vinyl_xml.attrString,
|
|
260
|
+
messageData: import_vinyl_xml.attrString,
|
|
261
|
+
schemeIdUri: (0, import_vinyl_xml.attrString)({ required: true }),
|
|
262
|
+
timescale: import_vinyl_xml.attrInt,
|
|
263
|
+
value: import_vinyl_xml.attrString
|
|
264
|
+
};
|
|
265
|
+
const switchingType = {
|
|
266
|
+
interval: (0, import_vinyl_xml.attrInt)({ required: true }),
|
|
267
|
+
type: (0, import_vinyl_xml.attr)(parseSwitchingTypeType, import_vinyl_util4.stringify)
|
|
268
|
+
};
|
|
269
|
+
const representationBaseType = {
|
|
270
|
+
FramePacking: (0, import_vinyl_xml.elements)(descriptorType),
|
|
271
|
+
AudioChannelConfiguration: (0, import_vinyl_xml.elements)(descriptorType),
|
|
272
|
+
ContentProtection: (0, import_vinyl_xml.elements)(descriptorType),
|
|
273
|
+
EssentialProperty: (0, import_vinyl_xml.elements)(descriptorType),
|
|
274
|
+
SupplementalProperty: (0, import_vinyl_xml.elements)(descriptorType),
|
|
275
|
+
InbandEventStream: (0, import_vinyl_xml.elements)(eventStreamType),
|
|
276
|
+
Switching: (0, import_vinyl_xml.elements)(switchingType),
|
|
277
|
+
audioSamplingRate: (0, import_vinyl_xml.attr)(parseIntVector, stringifyIntVector),
|
|
278
|
+
codecs: import_vinyl_xml.attrString,
|
|
279
|
+
codingDependency: import_vinyl_xml.attrBoolean,
|
|
280
|
+
frameRate: (0, import_vinyl_xml.attr)(parseFrameRate, stringifyFrameRate),
|
|
281
|
+
height: import_vinyl_xml.attrInt,
|
|
282
|
+
maximumSAPPeriod: import_vinyl_xml.attrInt,
|
|
283
|
+
maxPlayoutRate: import_vinyl_xml.attrInt,
|
|
284
|
+
mimeType: import_vinyl_xml.attrString,
|
|
285
|
+
profiles: (0, import_vinyl_xml.attr)(parseProfiles, stringifyProfiles),
|
|
286
|
+
sar: (0, import_vinyl_xml.attr)(parseRatio, stringifyRatio),
|
|
287
|
+
scanType: (0, import_vinyl_xml.attr)(parseVideoScan, import_vinyl_util4.stringify),
|
|
288
|
+
segmentProfiles: import_vinyl_xml.attrString,
|
|
289
|
+
startWithSAP: (0, import_vinyl_xml.attr)(parseSap, import_vinyl_util4.stringify),
|
|
290
|
+
width: import_vinyl_xml.attrInt
|
|
291
|
+
};
|
|
292
|
+
const subRepresentationType = __spreadProps(__spreadValues({}, representationBaseType), {
|
|
293
|
+
bandwidth: import_vinyl_xml.attrInt,
|
|
294
|
+
contentComponent: (0, import_vinyl_xml.attr)(parseStringVector, stringifyStringVector),
|
|
295
|
+
dependencyLevel: (0, import_vinyl_xml.attr)(parseIntVector, stringifyIntVector),
|
|
296
|
+
level: import_vinyl_xml.attrInt
|
|
297
|
+
});
|
|
298
|
+
const representationType = __spreadProps(__spreadValues({}, representationBaseType), {
|
|
299
|
+
bandwidth: (0, import_vinyl_xml.attrInt)({ required: true }),
|
|
300
|
+
bitrate: import_vinyl_xml.attrInt,
|
|
301
|
+
dependencyId: (0, import_vinyl_xml.attr)(parseStringVector, stringifyStringVector),
|
|
302
|
+
id: (0, import_vinyl_xml.attrString)({ required: true }),
|
|
303
|
+
mediaStreamStructureId: (0, import_vinyl_xml.attr)(parseStringVector, stringifyStringVector),
|
|
304
|
+
qualityRanking: import_vinyl_xml.attrInt,
|
|
305
|
+
BaseURL: (0, import_vinyl_xml.elements)(baseURLType),
|
|
306
|
+
SegmentBase: (0, import_vinyl_xml.element)(segmentBaseType),
|
|
307
|
+
SegmentList: (0, import_vinyl_xml.element)(segmentListType),
|
|
308
|
+
SegmentTemplate: (0, import_vinyl_xml.element)(segmentTemplateType),
|
|
309
|
+
SubRepresentation: (0, import_vinyl_xml.elements)(subRepresentationType)
|
|
310
|
+
});
|
|
311
|
+
const adaptationSetType = __spreadProps(__spreadValues({}, representationBaseType), {
|
|
312
|
+
Accessibility: (0, import_vinyl_xml.elements)(descriptorType),
|
|
313
|
+
Role: (0, import_vinyl_xml.elements)(descriptorType),
|
|
314
|
+
Rating: (0, import_vinyl_xml.elements)(descriptorType),
|
|
315
|
+
Viewpoint: (0, import_vinyl_xml.elements)(descriptorType),
|
|
316
|
+
ContentComponent: (0, import_vinyl_xml.elements)(contentComponentType),
|
|
317
|
+
BaseURL: (0, import_vinyl_xml.elements)(baseURLType),
|
|
318
|
+
SegmentBase: (0, import_vinyl_xml.element)(segmentBaseType),
|
|
319
|
+
SegmentList: (0, import_vinyl_xml.element)(segmentListType),
|
|
320
|
+
SegmentTemplate: (0, import_vinyl_xml.element)(segmentTemplateType),
|
|
321
|
+
Representation: (0, import_vinyl_xml.elements)(representationType),
|
|
322
|
+
actuate: attrActuateType,
|
|
323
|
+
bitstreamSwitching: import_vinyl_xml.attrBoolean,
|
|
324
|
+
contentType: import_vinyl_xml.attrString,
|
|
325
|
+
group: import_vinyl_xml.attrInt,
|
|
326
|
+
href: import_vinyl_xml.attrString,
|
|
327
|
+
id: import_vinyl_xml.attrInt,
|
|
328
|
+
lang: import_vinyl_xml.attrString,
|
|
329
|
+
maxBandwidth: import_vinyl_xml.attrInt,
|
|
330
|
+
maxFrameRate: (0, import_vinyl_xml.attr)(parseFrameRate, stringifyFrameRate),
|
|
331
|
+
maxHeight: import_vinyl_xml.attrInt,
|
|
332
|
+
maxWidth: import_vinyl_xml.attrInt,
|
|
333
|
+
minBandwidth: import_vinyl_xml.attrInt,
|
|
334
|
+
minFrameRate: (0, import_vinyl_xml.attr)(parseFrameRate, stringifyFrameRate),
|
|
335
|
+
minHeight: import_vinyl_xml.attrInt,
|
|
336
|
+
minWidth: import_vinyl_xml.attrInt,
|
|
337
|
+
par: (0, import_vinyl_xml.attr)(parseRatio, stringifyRatio),
|
|
338
|
+
segmentAlignment: (0, import_vinyl_xml.attr)(parseConditionalUint, import_vinyl_util4.stringify, {
|
|
339
|
+
default: false
|
|
340
|
+
}),
|
|
341
|
+
selectionPriority: (0, import_vinyl_xml.attrInt)({
|
|
342
|
+
default: 1
|
|
343
|
+
}),
|
|
344
|
+
subsegmentAlignment: (0, import_vinyl_xml.attr)(parseConditionalUint, import_vinyl_util4.stringify, {
|
|
345
|
+
default: false
|
|
346
|
+
}),
|
|
347
|
+
subsegmentStartsWithSAP: (0, import_vinyl_xml.attr)(parseSap, import_vinyl_util4.stringify, { default: 0 })
|
|
348
|
+
});
|
|
349
|
+
const rangeType = {
|
|
350
|
+
duration: (0, import_vinyl_xml.attr)(parseDuration, stringifyDuration),
|
|
351
|
+
starttime: (0, import_vinyl_xml.attr)(parseDuration, stringifyDuration)
|
|
352
|
+
};
|
|
353
|
+
const metricsType = {
|
|
354
|
+
metrics: (0, import_vinyl_xml.attrString)({ required: true }),
|
|
355
|
+
Range: (0, import_vinyl_xml.elements)(rangeType),
|
|
356
|
+
Reporting: (0, import_vinyl_xml.elements)(descriptorType, { minOccurs: 1 })
|
|
357
|
+
};
|
|
358
|
+
const periodType = {
|
|
359
|
+
BaseURL: (0, import_vinyl_xml.elements)(baseURLType),
|
|
360
|
+
SegmentBase: (0, import_vinyl_xml.element)(segmentBaseType),
|
|
361
|
+
SegmentList: (0, import_vinyl_xml.element)(segmentListType),
|
|
362
|
+
SegmentTemplate: (0, import_vinyl_xml.element)(segmentTemplateType),
|
|
363
|
+
AssetIdentifier: (0, import_vinyl_xml.element)(descriptorType),
|
|
364
|
+
EventStream: (0, import_vinyl_xml.elements)(eventStreamType),
|
|
365
|
+
AdaptationSet: (0, import_vinyl_xml.elements)(adaptationSetType),
|
|
366
|
+
Subset: (0, import_vinyl_xml.elements)(subsetType),
|
|
367
|
+
SupplementalProperty: (0, import_vinyl_xml.elements)(descriptorType),
|
|
368
|
+
actuate: attrActuateType,
|
|
369
|
+
bitstreamSwitching: (0, import_vinyl_xml.attrBoolean)({ default: false }),
|
|
370
|
+
duration: (0, import_vinyl_xml.attr)(parseDuration, stringifyDuration),
|
|
371
|
+
href: import_vinyl_xml.attrString,
|
|
372
|
+
id: import_vinyl_xml.attrString,
|
|
373
|
+
start: (0, import_vinyl_xml.attr)(parseDuration, stringifyDuration)
|
|
374
|
+
};
|
|
375
|
+
const programInformationType = {
|
|
376
|
+
lang: import_vinyl_xml.attrString,
|
|
377
|
+
moreInformationURL: import_vinyl_xml.attrString,
|
|
378
|
+
Copyright: import_vinyl_xml.attrString,
|
|
379
|
+
Source: import_vinyl_xml.attrString,
|
|
380
|
+
Title: import_vinyl_xml.attrString
|
|
381
|
+
};
|
|
382
|
+
const mpdType = {
|
|
383
|
+
ProgramInformation: (0, import_vinyl_xml.elements)(programInformationType),
|
|
384
|
+
BaseURL: (0, import_vinyl_xml.elements)(baseURLType),
|
|
385
|
+
Location: (0, import_vinyl_xml.elements)(uriType),
|
|
386
|
+
Period: (0, import_vinyl_xml.elements)(periodType, { minOccurs: 1 }),
|
|
387
|
+
Metrics: (0, import_vinyl_xml.elements)(metricsType),
|
|
388
|
+
EssentialProperty: (0, import_vinyl_xml.elements)(descriptorType),
|
|
389
|
+
SupplementalProperty: (0, import_vinyl_xml.elements)(descriptorType),
|
|
390
|
+
UTCTiming: (0, import_vinyl_xml.elements)(descriptorType),
|
|
391
|
+
availabilityEndTime: import_vinyl_xml.attrDateTime,
|
|
392
|
+
availabilityStartTime: import_vinyl_xml.attrDateTime,
|
|
393
|
+
id: import_vinyl_xml.attrString,
|
|
394
|
+
maxSegmentDuration: (0, import_vinyl_xml.attr)(parseDuration, stringifyDuration),
|
|
395
|
+
maxSubsegmentDuration: (0, import_vinyl_xml.attr)(parseDuration, stringifyDuration),
|
|
396
|
+
mediaPresentationDuration: (0, import_vinyl_xml.attr)(parseDuration, stringifyDuration),
|
|
397
|
+
minBufferTime: (0, import_vinyl_xml.attr)(parseDuration, stringifyDuration, {
|
|
398
|
+
required: true
|
|
399
|
+
}),
|
|
400
|
+
minimumUpdatePeriod: (0, import_vinyl_xml.attr)(parseDuration, stringifyDuration),
|
|
401
|
+
profiles: (0, import_vinyl_xml.attr)(parseProfiles, stringifyProfiles, { required: true }),
|
|
402
|
+
publishTime: import_vinyl_xml.attrDateTime,
|
|
403
|
+
suggestedPresentationDelay: (0, import_vinyl_xml.attr)(parseDuration, stringifyDuration),
|
|
404
|
+
timeShiftBufferDepth: (0, import_vinyl_xml.attr)(parseDuration, stringifyDuration),
|
|
405
|
+
type: (0, import_vinyl_xml.attr)(parsePresentationTypeType, import_vinyl_util4.stringify, {
|
|
406
|
+
default: "static"
|
|
407
|
+
})
|
|
408
|
+
};
|
|
409
|
+
return {
|
|
410
|
+
MPD: (0, import_vinyl_xml.element)(mpdType, {
|
|
411
|
+
required: true,
|
|
412
|
+
namespaceUri: dashNamespaceUri
|
|
413
|
+
})
|
|
414
|
+
};
|
|
415
|
+
}
|
|
416
|
+
function parseProfiles(str) {
|
|
417
|
+
return str.split(",");
|
|
418
|
+
}
|
|
419
|
+
function stringifyProfiles(value) {
|
|
420
|
+
return value.join(",");
|
|
421
|
+
}
|
|
422
|
+
var videoScanTypeValidator = /* @__PURE__ */ (0, import_vinyl_validation.isOneOf)(
|
|
423
|
+
"progressive",
|
|
424
|
+
"interlaced",
|
|
425
|
+
"unknown"
|
|
426
|
+
);
|
|
427
|
+
function parseVideoScan(str) {
|
|
428
|
+
videoScanTypeValidator.assert(str, import_vinyl_util4.ErrorOrigin.PARSING);
|
|
429
|
+
return str;
|
|
430
|
+
}
|
|
431
|
+
var switchingTypeTypeValidator = /* @__PURE__ */ (0, import_vinyl_validation.isOneOf)(
|
|
432
|
+
"media",
|
|
433
|
+
"bitstream"
|
|
434
|
+
);
|
|
435
|
+
function parseSwitchingTypeType(str) {
|
|
436
|
+
switchingTypeTypeValidator.assert(str, import_vinyl_util4.ErrorOrigin.PARSING);
|
|
437
|
+
return str;
|
|
438
|
+
}
|
|
439
|
+
var validateSap = /* @__PURE__ */ (0, import_vinyl_validation.number)().within(0, 6);
|
|
440
|
+
function parseSap(str) {
|
|
441
|
+
const number2 = parseInt(str);
|
|
442
|
+
validateSap.assert(number2, import_vinyl_util4.ErrorOrigin.PARSING);
|
|
443
|
+
return number2;
|
|
444
|
+
}
|
|
445
|
+
function parseStringVector(str) {
|
|
446
|
+
return str.split(/\s+/);
|
|
447
|
+
}
|
|
448
|
+
function stringifyStringVector(value) {
|
|
449
|
+
return value.join(" ");
|
|
450
|
+
}
|
|
451
|
+
function parseIntVector(str) {
|
|
452
|
+
return str.split(/\s+/).map((subStr) => parseInt(subStr));
|
|
453
|
+
}
|
|
454
|
+
function stringifyIntVector(value) {
|
|
455
|
+
return value.join(" ");
|
|
456
|
+
}
|
|
457
|
+
var presentationTypeValidator = /* @__PURE__ */ (0, import_vinyl_validation.isOneOf)(
|
|
458
|
+
"static",
|
|
459
|
+
"dynamic"
|
|
460
|
+
);
|
|
461
|
+
function parsePresentationTypeType(str) {
|
|
462
|
+
presentationTypeValidator.assert(str, import_vinyl_util4.ErrorOrigin.PARSING);
|
|
463
|
+
return str;
|
|
464
|
+
}
|
|
465
|
+
function parseConditionalUint(str) {
|
|
466
|
+
const lower = str.toLowerCase();
|
|
467
|
+
switch (lower) {
|
|
468
|
+
case "true":
|
|
469
|
+
return true;
|
|
470
|
+
case "false":
|
|
471
|
+
return false;
|
|
472
|
+
default:
|
|
473
|
+
return parseInt(str);
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
// src/manifest/ext/drm/cencXmlRules.ts
|
|
478
|
+
var import_vinyl_xml2 = require("@amazon/vinyl-xml");
|
|
479
|
+
var cencXmlRules = {
|
|
480
|
+
default_KID: /* @__PURE__ */ (0, import_vinyl_xml2.attr)(parseStringVector, stringifyStringVector, {
|
|
481
|
+
namespaceUri: CENC_NAMESPACE_URI
|
|
482
|
+
}),
|
|
483
|
+
pssh: /* @__PURE__ */ (0, import_vinyl_xml2.element)(
|
|
484
|
+
{
|
|
485
|
+
_content: import_vinyl_xml2.charactersString
|
|
486
|
+
},
|
|
487
|
+
{
|
|
488
|
+
namespaceUri: CENC_NAMESPACE_URI
|
|
489
|
+
}
|
|
490
|
+
)
|
|
491
|
+
};
|
|
492
|
+
|
|
493
|
+
// src/manifest/ext/drm/contentProtection.ts
|
|
494
|
+
var import_vinyl_xml3 = require("@amazon/vinyl-xml");
|
|
495
|
+
function createDashProtectionXmlRules(contentProtectionRules) {
|
|
496
|
+
const withProtections = {
|
|
497
|
+
ContentProtection: (0, import_vinyl_xml3.elements)(contentProtectionRules)
|
|
498
|
+
};
|
|
499
|
+
return {
|
|
500
|
+
MPD: (0, import_vinyl_xml3.element)(
|
|
501
|
+
{
|
|
502
|
+
Period: (0, import_vinyl_xml3.elements)(
|
|
503
|
+
{
|
|
504
|
+
AdaptationSet: (0, import_vinyl_xml3.elements)(__spreadProps(__spreadValues({}, withProtections), {
|
|
505
|
+
Representation: (0, import_vinyl_xml3.elements)(__spreadProps(__spreadValues({}, withProtections), {
|
|
506
|
+
SubRepresentation: (0, import_vinyl_xml3.elements)(
|
|
507
|
+
withProtections
|
|
508
|
+
)
|
|
509
|
+
}))
|
|
510
|
+
}))
|
|
511
|
+
},
|
|
512
|
+
{
|
|
513
|
+
minOccurs: 1
|
|
514
|
+
}
|
|
515
|
+
)
|
|
516
|
+
},
|
|
517
|
+
{ required: true, namespaceUri: dashNamespaceUri }
|
|
518
|
+
)
|
|
519
|
+
};
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
// src/manifest/ext/drm/playreadyXmlRules.ts
|
|
523
|
+
var import_vinyl_xml4 = require("@amazon/vinyl-xml");
|
|
524
|
+
var playreadyXmlRules = {
|
|
525
|
+
pro: /* @__PURE__ */ (0, import_vinyl_xml4.element)(
|
|
526
|
+
{
|
|
527
|
+
_content: import_vinyl_xml4.charactersString
|
|
528
|
+
},
|
|
529
|
+
{
|
|
530
|
+
namespaceUri: PLAY_READY_NAMESPACE_URI
|
|
531
|
+
}
|
|
532
|
+
)
|
|
533
|
+
};
|
|
534
|
+
|
|
535
|
+
// src/manifest/dashParser.ts
|
|
536
|
+
var dashDrmRules = /* @__PURE__ */ (0, import_vinyl_xml5.mergeXmlRules)(
|
|
537
|
+
/* @__PURE__ */ dashManifestXmlRules(),
|
|
538
|
+
/* @__PURE__ */ createDashProtectionXmlRules(cencXmlRules),
|
|
539
|
+
/* @__PURE__ */ createDashProtectionXmlRules(playreadyXmlRules)
|
|
540
|
+
);
|
|
541
|
+
var dashDrmRulesMapped = /* @__PURE__ */ (0, import_vinyl_xml5.mapXmlRules)(dashDrmRules);
|
|
542
|
+
function dashManifestHandler() {
|
|
543
|
+
return new import_vinyl_xml5.ParseXmlHandlerImpl(dashDrmRulesMapped);
|
|
544
|
+
}
|
|
545
|
+
function parseDashManifest(manifest) {
|
|
546
|
+
return (0, import_vinyl_xml5.parseXml)(manifest, dashManifestHandler());
|
|
547
|
+
}
|
|
548
|
+
function stringifyDashManifest(manifest) {
|
|
549
|
+
return (0, import_vinyl_xml5.stringifyXml)(manifest, dashDrmRulesMapped);
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
// src/manifest/ext/drm/ContentProtectionScheme.ts
|
|
553
|
+
var ContentProtectionScheme = {
|
|
554
|
+
/**
|
|
555
|
+
* CENC protection scheme. (Should not be used to create a key session)
|
|
556
|
+
*/
|
|
557
|
+
CENC: "urn:mpeg:dash:mp4protection:2011",
|
|
558
|
+
/**
|
|
559
|
+
* A simple, unencrypted content protection scheme. Not a full DRM solution.
|
|
560
|
+
*/
|
|
561
|
+
CLEAR_KEY: "urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e",
|
|
562
|
+
/**
|
|
563
|
+
* Apple's FairPlay.
|
|
564
|
+
*/
|
|
565
|
+
FAIR_PLAY: "urn:uuid:94ce86fb-07ff-4f43-adb8-93d2fa968ca2",
|
|
566
|
+
/**
|
|
567
|
+
* Open-standards community initiative by Marlin Developer Community.
|
|
568
|
+
*/
|
|
569
|
+
MARLIN: "urn:uuid:5e629af5-38da-4063-8977-97ffbd9902d4",
|
|
570
|
+
/**
|
|
571
|
+
* Microsoft's PlayReady.
|
|
572
|
+
*/
|
|
573
|
+
PLAY_READY: "urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95",
|
|
574
|
+
/**
|
|
575
|
+
* An old, unused PlayReady scheme id.
|
|
576
|
+
*/
|
|
577
|
+
PLAY_READY_DEPRECATED: "urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95",
|
|
578
|
+
/**
|
|
579
|
+
* Google's Widevine.
|
|
580
|
+
*/
|
|
581
|
+
WIDEVINE: "urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"
|
|
582
|
+
};
|
|
583
|
+
//# sourceMappingURL=index.cjs.map
|