@amazon/vinyl-mpd-parser 1.2.0 → 2.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 +1341 -1341
- package/dist/dashTestAssets/index.js.map +3 -3
- package/dist/dashTestAssets/types/current/index.d.ts +4 -4
- package/dist/dashTestAssets/types/current/index.d.ts.map +1 -1
- package/dist/dashTestAssets/types/current/index.js +4 -4
- package/dist/dashTestAssets/types/current/tsconfig.tsbuildinfo +1 -1
- package/dist/dashTestAssets/types/ts3.7/index.d.ts +4 -4
- package/dist/dashTestAssets/types/ts4.1/index.d.ts +4 -4
- package/dist/dashTestAssets/types/ts4.7/index.d.ts +4 -4
- package/dist/index.cjs +67 -63
- package/dist/index.cjs.map +4 -4
- package/dist/index.js +84 -80
- package/dist/index.js.map +4 -4
- package/dist/test/benchmark.es5.js +212 -196
- package/dist/test/benchmark.js +2688 -2576
- package/dist/test/benchmark.js.map +4 -4
- package/dist/types/current/index.d.ts +11 -11
- package/dist/types/current/index.d.ts.map +1 -1
- package/dist/types/current/index.js +11 -11
- package/dist/types/current/tsconfig.tsbuildinfo +1 -1
- package/dist/types/ts3.7/index.d.ts +11 -11
- package/dist/types/ts4.1/index.d.ts +11 -11
- package/dist/types/ts4.7/index.d.ts +11 -11
- package/dist/unit/types/current/tsconfig.tsbuildinfo +1 -1
- package/package.json +13 -13
package/dist/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../src/
|
|
4
|
-
"sourcesContent": ["/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { Base64BinaryType } from '@amazon/vinyl-xml'\n\n/**\n * Cenc content protection xml types.\n *\n * @see https://github.com/sannies/rtp2dash/blob/master/src/main/resources/auxxsd/cenc.xsd\n * @module\n */\n\nexport const CENC_NAMESPACE_URI = 'urn:mpeg:cenc:2013'\n\n/**\n * A 128-bit integer written in canonical UUID notation.\n * Must be in the form:\n * `[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}`\n */\nexport type KeyIdType = string\n\nexport interface CencContentProtection {\n readonly default_KID?: readonly KeyIdType[]\n readonly pssh?: Base64BinaryType\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { Base64BinaryType } from '@amazon/vinyl-xml'\n\n/**\n * Cenc content protection playready.\n *\n * @see https://learn.microsoft.com/en-us/playready/specifications/mpeg-dash-playready#21-dash-contentprotection-descriptor-elements\n * @module\n */\n\nexport const PLAY_READY_NAMESPACE_URI = 'urn:microsoft:playready'\n\nexport interface PlayreadyContentProtection {\n readonly pro?: Base64BinaryType\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { ErrorOrigin, ValidationError } from '@amazon/vinyl-util'\n\nexport function throwParsingError(message: string): never {\n throw new ValidationError(message, ErrorOrigin.PARSING)\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { throwParsingError } from '../error/parsingError'\n\n/**\n * A numerator and denominator.\n */\nexport type Ratio = readonly [number, number]\n\n/**\n * The XSD specifies `[0-9]*`, and not `[0-9]+`, which would match `'23:'`\n * For missing dimensions, default to 1.\n */\nconst ratioRegExp = /^([0-9]*):([0-9]*)$/\n\n/**\n * Parses a string representing a ratio into [number, number].\n * The string must satisfy the pattern: `/^([0-9]*):([0-9]*)$/`\n * Examples:\n * ```\n * parseRatio('4:3') // [4, 3]\n * parseRatio('16:9') // [16, 9]\n * parseRatio('2:') // [2, 1]\n * ```\n *\n * @private\n */\nexport function parseRatio(str: string): Ratio {\n const match = str ? ratioRegExp.exec(str) : null\n if (!match) throwParsingError(`invalid ratio format: ${str}`)\n return [parseInt(match[1] || '1'), parseInt(match[2] || '1')]\n}\n\n/**\n * Returns the string representation of a {@link Ratio} value.\n *\n * @param value\n */\nexport function stringifyRatio(value: Ratio): string {\n return `${value[0]}:${value[1]}`\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { throwParsingError } from '../error/parsingError'\n\nexport type FrameRate = readonly [number, number]\n\nconst framerateRegexp = /^(\\d+)(?:\\/(\\d+))?$/\n\n/**\n * Parses a string into a {@link FrameRate}\n *\n * @private\n */\nexport function parseFrameRate(str: string): FrameRate {\n const match = str ? framerateRegexp.exec(str) : null\n if (!match) throwParsingError(`invalid frame rate: '${str}'`)\n return [parseInt(match[1]), parseInt(match[2] || '1')]\n}\n\n/**\n * Returns the string representation of a {@link FrameRate} value.\n *\n * @param value\n */\nexport function stringifyFrameRate(value: FrameRate): string {\n return value[1] === 1 ? value[0].toString() : `${value[0]}/${value[1]}`\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { parseIntSafe } from '@amazon/vinyl-util'\nimport { throwParsingError } from '../error/parsingError'\n\n/**\n * A range of bytes, [from, to (optional, inclusive)].\n */\nexport type ByteRange = readonly [number, number | null]\n\nconst byteRangeExp = /^(-?[0-9]+)-(-?[0-9]*)$/\n\nexport function parseByteRange(str: string): ByteRange {\n const match = str ? byteRangeExp.exec(str) : null\n if (!match) throwParsingError(`invalid byte range: '${str}'`)\n let start = parseInt(match[1])\n // Convert possibly-negative Int32 overflow value to its Uint32 equivalent\n // (reinterpret 32-bit signed integer bits as unsigned)\n if (start < 0) start >>>= 0\n let end = parseIntSafe(match[2])\n if (end != null && end < 0) end = end >>> 0\n return [start, end]\n}\n\n/**\n * Returns the string representation of a {@link ByteRange} value.\n *\n * @param value\n */\nexport function stringifyByteRange(value: ByteRange): string {\n const end = value[1]\n return `${value[0]}-${end == null ? '' : end}`\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { ReservedXmlRuleKeys } from '@amazon/vinyl-xml'\nimport {\n mapXmlRules,\n type Merged,\n mergeXmlRules,\n parseXml,\n ParseXmlHandlerImpl,\n stringifyXml,\n} from '@amazon/vinyl-xml'\nimport type { PlayreadyContentProtection } from '../xmlns/microsoft/playready'\nimport type { CencContentProtection } from '../xmlns/mpeg/cenc/2013'\nimport type {\n DashManifest,\n DescriptorType,\n} from '../xmlns/mpeg/dash/schema/mpd/2011'\nimport { dashManifestXmlRules } from './dashManifestXmlRules'\nimport { cencXmlRules } from './ext/drm/cencXmlRules'\nimport type { DashProtections } from './ext/drm/contentProtection'\nimport { createDashProtectionXmlRules } from './ext/drm/contentProtection'\nimport { playreadyXmlRules } from './ext/drm/playreadyXmlRules'\nimport type { OptionalDeep } from '@amazon/vinyl-util'\n\n/**\n * Creates a Dash Manifest parser with supported extensions.\n *\n * @module\n */\n\nexport type DashDrmManifest = Merged<\n DashManifest & DashProtections<ContentProtection>\n>\n\nexport interface ContentProtection\n extends DescriptorType, CencContentProtection, PlayreadyContentProtection {}\n\nconst dashDrmRules = /* @__PURE__ */ mergeXmlRules(\n /* @__PURE__ */ dashManifestXmlRules(),\n /* @__PURE__ */ createDashProtectionXmlRules(cencXmlRules),\n /* @__PURE__ */ createDashProtectionXmlRules(playreadyXmlRules)\n)\n\nconst dashDrmRulesMapped = /* @__PURE__ */ mapXmlRules(dashDrmRules)\n\n/**\n * A Content handler for a dash manifest.\n */\nfunction dashManifestHandler() {\n return new ParseXmlHandlerImpl(dashDrmRulesMapped)\n}\n\n/**\n * Parses a Dash Manifest, according to the mpd:2011 schema.\n * @see https://raw.githubusercontent.com/Dash-Industry-Forum/MPEG-Conformance-and-reference-source/master/conformance/MPDValidator/schemas/DASH-MPD.xsd\n * @param manifest\n */\nexport function parseDashManifest(manifest: string): DashDrmManifest {\n return parseXml(manifest, dashManifestHandler())\n}\n\nexport function stringifyDashManifest(\n manifest: OptionalDeep<DashDrmManifest, ReservedXmlRuleKeys>\n): string {\n return stringifyXml(manifest, dashDrmRulesMapped)\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * Parser definitions for a dash manifest.\n * Attribute order does not matter, element order matters for writing.\n *\n * @module\n */\n\nimport type { actuateType, UriType } from '@amazon/vinyl-xml'\nimport {\n assertActuateEnum,\n attr,\n attrBoolean,\n attrDateTime,\n attrFloat,\n attrInt,\n attrString,\n charactersString,\n element,\n elements,\n type XmlRules,\n} from '@amazon/vinyl-xml'\nimport { ErrorOrigin, stringify } from '@amazon/vinyl-util'\nimport { isOneOf, number, type Validator } from '@amazon/vinyl-validation'\nimport { parseDuration, stringifyDuration } from '../duration/duration'\nimport { parseByteRange, stringifyByteRange } from '../media/byteRange'\nimport { parseRatio, stringifyRatio } from '../media/ratio'\nimport { parseFrameRate, stringifyFrameRate } from '../media/frameRate'\nimport type {\n AdaptationSetType,\n BaseURLType,\n ConditionalUintType,\n ContentComponentType,\n DashManifest,\n DescriptorType,\n EventStreamType,\n EventType,\n MetricsType,\n MPDtype,\n MultipleSegmentBaseType,\n PeriodType,\n PresentationType,\n ProgramInformationType,\n RangeType,\n RepresentationBaseType,\n RepresentationType,\n SegmentBaseType,\n SegmentListType,\n SegmentTemplateType,\n SegmentTimelineType,\n SegmentTimelineTypeSType,\n SegmentURLType,\n SubRepresentationType,\n SubsetType,\n SwitchingType,\n SwitchingTypeType,\n URLType,\n VideoScanType,\n} from '../xmlns/mpeg/dash/schema/mpd/2011'\n\nexport const dashNamespaceUri = 'urn:mpeg:dash:schema:mpd:2011'\n\nexport function dashManifestXmlRules(): XmlRules<DashManifest> {\n const attrActuateType = attr<actuateType>(assertActuateEnum, stringify, {\n default: 'onRequest',\n } as const)\n\n const descriptorType: XmlRules<DescriptorType> = {\n id: attrString,\n schemeIdUri: attrString({ required: true }),\n value: attrString,\n } as const\n\n const baseURLType: XmlRules<BaseURLType> = {\n availabilityTimeComplete: attrBoolean,\n availabilityTimeOffset: attrFloat,\n byteRange: attrString,\n serviceLocation: attrString,\n _content: charactersString,\n } as const\n\n const contentComponentType: XmlRules<ContentComponentType> = {\n contentType: attrString,\n id: attrInt,\n lang: attrString,\n par: attr(parseRatio, stringifyRatio),\n Accessibility: elements(descriptorType),\n Rating: elements(descriptorType),\n Role: elements(descriptorType),\n Viewpoint: elements(descriptorType),\n } as const\n\n const urlType: XmlRules<URLType> = {\n range: attr(parseByteRange, stringifyByteRange),\n sourceURL: attrString,\n } as const\n\n const uriType: XmlRules<UriType> = { _content: charactersString } as const\n\n const segmentBaseType: XmlRules<SegmentBaseType> = {\n Initialization: element(urlType),\n RepresentationIndex: element(urlType),\n availabilityTimeComplete: attrBoolean,\n availabilityTimeOffset: attrInt,\n indexRange: attr(parseByteRange, stringifyByteRange),\n indexRangeExact: attrBoolean({ default: false }),\n presentationTimeOffset: attrFloat,\n timescale: attrInt,\n } as const\n\n const segmentTimelineTypeSType: XmlRules<SegmentTimelineTypeSType> = {\n d: attrInt({ required: true }),\n n: attrInt,\n r: attrInt({ default: 0 }),\n t: attrInt,\n } as const\n\n const segmentTimelineType: XmlRules<SegmentTimelineType> = {\n S: elements(segmentTimelineTypeSType),\n } as const\n\n const multipleSegmentBaseType: XmlRules<MultipleSegmentBaseType> = {\n ...segmentBaseType,\n SegmentTimeline: element(segmentTimelineType),\n BitstreamSwitching: element(urlType),\n duration: attrInt,\n startNumber: attrInt,\n } as const\n\n const segmentURLType: XmlRules<SegmentURLType> = {\n index: attrString,\n indexRange: attr(parseByteRange, stringifyByteRange),\n media: attrString,\n mediaRange: attr(parseByteRange, stringifyByteRange),\n } as const\n\n const segmentListType: XmlRules<SegmentListType> = {\n ...multipleSegmentBaseType,\n actuate: attrActuateType,\n href: attrString,\n SegmentURL: elements(segmentURLType),\n } as const\n\n const segmentTemplateType: XmlRules<SegmentTemplateType> = {\n ...multipleSegmentBaseType,\n bitstreamSwitching: attrString,\n index: attrString,\n initialization: attrString,\n media: attrString,\n } as const\n\n const subsetType: XmlRules<SubsetType> = {\n contains: attr(parseIntVector, stringifyIntVector, { required: true }),\n id: attrString,\n } as const\n\n const eventType: XmlRules<EventType> = {\n duration: attrInt,\n id: attrInt,\n messageData: attrString,\n presentationTime: attrInt({ default: 0 }),\n } as const\n\n const eventStreamType: XmlRules<EventStreamType> = {\n Event: elements(eventType),\n actuate: attrActuateType,\n href: attrString,\n messageData: attrString,\n schemeIdUri: attrString({ required: true }),\n timescale: attrInt,\n value: attrString,\n } as const\n\n const switchingType: XmlRules<SwitchingType> = {\n interval: attrInt({ required: true }),\n type: attr(parseSwitchingTypeType, stringify),\n } as const\n\n const representationBaseType: XmlRules<RepresentationBaseType> = {\n FramePacking: elements(descriptorType),\n AudioChannelConfiguration: elements(descriptorType),\n ContentProtection: elements(descriptorType),\n EssentialProperty: elements(descriptorType),\n SupplementalProperty: elements(descriptorType),\n InbandEventStream: elements(eventStreamType),\n Switching: elements(switchingType),\n audioSamplingRate: attr(parseIntVector, stringifyIntVector),\n codecs: attrString,\n codingDependency: attrBoolean,\n frameRate: attr(parseFrameRate, stringifyFrameRate),\n height: attrInt,\n maximumSAPPeriod: attrInt,\n maxPlayoutRate: attrInt,\n mimeType: attrString,\n profiles: attr(parseProfiles, stringifyProfiles),\n sar: attr(parseRatio, stringifyRatio),\n scanType: attr(parseVideoScan, stringify),\n segmentProfiles: attrString,\n startWithSAP: attr(parseSap, stringify),\n width: attrInt,\n } as const\n\n const subRepresentationType: XmlRules<SubRepresentationType> = {\n ...representationBaseType,\n bandwidth: attrInt,\n contentComponent: attr(parseStringVector, stringifyStringVector),\n dependencyLevel: attr(parseIntVector, stringifyIntVector),\n level: attrInt,\n } as const\n\n const representationType: XmlRules<RepresentationType> = {\n ...representationBaseType,\n bandwidth: attrInt({ required: true }),\n bitrate: attrInt,\n dependencyId: attr(parseStringVector, stringifyStringVector),\n id: attrString({ required: true }),\n mediaStreamStructureId: attr(parseStringVector, stringifyStringVector),\n qualityRanking: attrInt,\n BaseURL: elements(baseURLType),\n SegmentBase: element(segmentBaseType),\n SegmentList: element(segmentListType),\n SegmentTemplate: element(segmentTemplateType),\n SubRepresentation: elements(subRepresentationType),\n } as const\n\n const adaptationSetType: XmlRules<AdaptationSetType> = {\n ...representationBaseType,\n Accessibility: elements(descriptorType),\n Role: elements(descriptorType),\n Rating: elements(descriptorType),\n Viewpoint: elements(descriptorType),\n ContentComponent: elements(contentComponentType),\n BaseURL: elements(baseURLType),\n SegmentBase: element(segmentBaseType),\n SegmentList: element(segmentListType),\n SegmentTemplate: element(segmentTemplateType),\n Representation: elements(representationType),\n actuate: attrActuateType,\n bitstreamSwitching: attrBoolean,\n contentType: attrString,\n group: attrInt,\n href: attrString,\n id: attrInt,\n lang: attrString,\n maxBandwidth: attrInt,\n maxFrameRate: attr(parseFrameRate, stringifyFrameRate),\n maxHeight: attrInt,\n maxWidth: attrInt,\n minBandwidth: attrInt,\n minFrameRate: attr(parseFrameRate, stringifyFrameRate),\n minHeight: attrInt,\n minWidth: attrInt,\n par: attr(parseRatio, stringifyRatio),\n segmentAlignment: attr(parseConditionalUint, stringify, {\n default: false,\n }),\n selectionPriority: attrInt({\n default: 1,\n }),\n subsegmentAlignment: attr(parseConditionalUint, stringify, {\n default: false,\n }),\n subsegmentStartsWithSAP: attr(parseSap, stringify, { default: 0 }),\n } as const\n\n const rangeType: XmlRules<RangeType> = {\n duration: attr(parseDuration, stringifyDuration),\n starttime: attr(parseDuration, stringifyDuration),\n } as const\n\n const metricsType: XmlRules<MetricsType> = {\n metrics: attrString({ required: true }),\n Range: elements(rangeType),\n Reporting: elements(descriptorType, { minOccurs: 1 }),\n } as const\n\n const periodType: XmlRules<PeriodType> = {\n BaseURL: elements(baseURLType),\n SegmentBase: element(segmentBaseType),\n SegmentList: element(segmentListType),\n SegmentTemplate: element(segmentTemplateType),\n AssetIdentifier: element(descriptorType),\n EventStream: elements(eventStreamType),\n AdaptationSet: elements(adaptationSetType),\n Subset: elements(subsetType),\n SupplementalProperty: elements(descriptorType),\n actuate: attrActuateType,\n bitstreamSwitching: attrBoolean({ default: false }),\n duration: attr(parseDuration, stringifyDuration),\n href: attrString,\n id: attrString,\n start: attr(parseDuration, stringifyDuration),\n } as const\n\n const programInformationType: XmlRules<ProgramInformationType> = {\n lang: attrString,\n moreInformationURL: attrString,\n Copyright: attrString,\n Source: attrString,\n Title: attrString,\n } as const\n\n const mpdType: XmlRules<MPDtype> = {\n ProgramInformation: elements(programInformationType),\n BaseURL: elements(baseURLType),\n Location: elements(uriType),\n Period: elements(periodType, { minOccurs: 1 }),\n Metrics: elements(metricsType),\n EssentialProperty: elements(descriptorType),\n SupplementalProperty: elements(descriptorType),\n UTCTiming: elements(descriptorType),\n availabilityEndTime: attrDateTime,\n availabilityStartTime: attrDateTime,\n id: attrString,\n maxSegmentDuration: attr(parseDuration, stringifyDuration),\n maxSubsegmentDuration: attr(parseDuration, stringifyDuration),\n mediaPresentationDuration: attr(parseDuration, stringifyDuration),\n minBufferTime: attr(parseDuration, stringifyDuration, {\n required: true,\n }),\n minimumUpdatePeriod: attr(parseDuration, stringifyDuration),\n profiles: attr(parseProfiles, stringifyProfiles, { required: true }),\n publishTime: attrDateTime,\n suggestedPresentationDelay: attr(parseDuration, stringifyDuration),\n timeShiftBufferDepth: attr(parseDuration, stringifyDuration),\n type: attr(parsePresentationTypeType, stringify, {\n default: 'static',\n } as const),\n } as const\n\n return {\n MPD: element(mpdType, {\n required: true,\n namespaceUri: dashNamespaceUri,\n }),\n } as const\n}\n\n/**\n * Parses a comma delimited list of profiles.\n * Profile values are not whitespace trimmed.\n *\n * @param str\n */\nexport function parseProfiles(str: string): readonly string[] {\n return str.split(',')\n}\n\n/**\n * Returns the string representation of a {@link FrameRate} value.\n *\n * @param value\n */\nexport function stringifyProfiles(value: readonly string[]): string {\n return value.join(',')\n}\n\nconst videoScanTypeValidator: Validator<VideoScanType> = /* @__PURE__ */ isOneOf(\n 'progressive',\n 'interlaced',\n 'unknown'\n)\n\n/**\n * @private\n */\nexport function parseVideoScan(str: string): VideoScanType {\n videoScanTypeValidator.assert(str, ErrorOrigin.PARSING)\n return str\n}\n\nconst switchingTypeTypeValidator: Validator<SwitchingTypeType> = /* @__PURE__ */ isOneOf(\n 'media',\n 'bitstream'\n)\n\n/**\n * @private\n */\nexport function parseSwitchingTypeType(str: string): SwitchingTypeType {\n switchingTypeTypeValidator.assert(str, ErrorOrigin.PARSING)\n return str\n}\n\nconst validateSap: Validator<number> = /* @__PURE__ */ /* @__PURE__ */ number().within(0, 6)\n\n/**\n * @private\n */\nexport function parseSap(str: string): number {\n const number = parseInt(str)\n validateSap.assert(number, ErrorOrigin.PARSING)\n return number\n}\n\n/**\n * Splits a string by whitespace.\n *\n * @private\n */\nexport function parseStringVector(str: string): readonly string[] {\n return str.split(/\\s+/)\n}\n\n/**\n * Returns the string representation of a string vector value.\n *\n * @param value\n */\nexport function stringifyStringVector(value: readonly string[]): string {\n return value.join(' ')\n}\n\n/**\n * Splits a string by whitespace and parses as int.\n *\n * @private\n */\nexport function parseIntVector(str: string): readonly number[] {\n return str.split(/\\s+/).map((subStr) => parseInt(subStr))\n}\n\n/**\n * Returns the string representation of an int vector value.\n *\n * @param value\n */\nexport function stringifyIntVector(value: readonly number[]): string {\n return value.join(' ')\n}\n\nconst presentationTypeValidator: Validator<PresentationType> = /* @__PURE__ */ isOneOf(\n 'static',\n 'dynamic'\n)\n\n/**\n * Asserts that the given string is one of the {@link PresentationType} enumerated values.\n * @param str\n */\nexport function parsePresentationTypeType(str: string): PresentationType {\n presentationTypeValidator.assert(str, ErrorOrigin.PARSING)\n return str\n}\n\n/**\n * Parses a string into true, false, or a number.\n *\n * @private\n */\nexport function parseConditionalUint(str: string): ConditionalUintType {\n const lower = str.toLowerCase()\n switch (lower) {\n case 'true':\n return true\n case 'false':\n return false\n default:\n return parseInt(str)\n }\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {\n ErrorOrigin,\n roundToNearest,\n ValidationError,\n} from '@amazon/vinyl-util'\n\n// ESBuild (https://github.com/evanw/esbuild/issues/3988) considers multiplication and division\n// to have a side effect and will inhibit tree shaking.\n// E.g. H = 60 * 60 will not be removed when not referenced.\nconst I = 60\nconst H = 3600\nconst D = 86400\nconst M = 2592000\nconst Y = 31536000\n\n/**\n * A duration, in seconds. (This may be negative)\n */\nexport type Duration = number\n\n/**\n * https://www.w3.org/TR/xmlschema-2/#duration\n */\nconst iso8601Duration =\n /^(-?)P?(\\d+(?:\\.\\d*)?Y)?(\\d+(?:\\.\\d*)?M)?(\\d+(?:\\.\\d*)?D)?T?(\\d+(?:\\.\\d*)?H)?(\\d+(?:\\.\\d*)?M)?(\\d+(?:\\.\\d*)?S?)?$/i\n\n/**\n * Parses an ISO 8601 duration into seconds.\n * The accepted format is P(n)Y(n)M(n)DT(n)H(n)M(n)S\n *\n * All units shall have a fixed size.\n *\n * P - Period designator, precedes all durations.\n * 1Y (Year) = 365 * 24 * 60 * 60 Seconds\n * 1M (Month) = 30 * 24 * 60 * 60 Seconds\n * 1D (Day) = 24 * 60 * 60 Seconds\n *\n * T - Time designator, precedes all time components.\n * 1H (Hour) = 60 * 60 Seconds\n * 1M (Minute) = 60 Seconds\n * 1S (Second)\n *\n *\n * @param value\n * @return Returns the duration in seconds or throws an {@link ValidationError}\n * if not properly formatted.\n * @see https://www.w3.org/TR/xmlschema-2/#duration\n */\nexport function parseDuration(value: string): Duration {\n const match = iso8601Duration.exec(value)\n if (match == null)\n throw new ValidationError(\n `Unexpected duration: '${value}', should be in iso 8601 format`,\n ErrorOrigin.PARSING\n )\n\n const sign = match[1] === '-' ? -1 : 1\n return (\n sign *\n (parseFloat(match[2] || '0') * Y +\n parseFloat(match[3] || '0') * M +\n parseFloat(match[4] || '0') * D +\n parseFloat(match[5] || '0') * H +\n parseFloat(match[6] || '0') * I +\n parseFloat(match[7] || '0'))\n )\n}\n\n/**\n * Returns the iso 8601 string representation of a duration value.\n *\n * @param value A duration value, in seconds.\n */\nexport function stringifyDuration(value: Duration): string {\n const sign = value < 0 ? '-' : ''\n let abs = Math.abs(value)\n\n const years = Math.floor(abs / Y)\n abs -= years * Y\n const months = Math.floor((abs % Y) / M)\n const days = Math.floor((abs % M) / D)\n const hours = Math.floor((abs % D) / H)\n const minutes = Math.floor((abs % H) / I)\n const seconds = abs % I\n let isoString = `${sign}P`\n if (years > 0) isoString += `${years}Y`\n if (months > 0) isoString += `${months}M`\n if (days > 0) isoString += `${days}D`\n isoString += 'T'\n if (hours > 0) isoString += `${hours}H`\n if (minutes > 0) isoString += `${minutes}M`\n if (seconds > 0 || !value) isoString += `${roundToNearest(seconds, 0.001)}S`\n return isoString\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {\n parseStringVector,\n stringifyStringVector,\n} from '../../dashManifestXmlRules'\nimport type { XmlRules } from '@amazon/vinyl-xml'\nimport { attr, charactersString, element } from '@amazon/vinyl-xml'\nimport type { CencContentProtection } from '../../../xmlns/mpeg/cenc/2013'\nimport { CENC_NAMESPACE_URI } from '../../../xmlns/mpeg/cenc/2013'\n\n/**\n * A parser for ContentProtection elements using the cenc namespace.\n * @see https://github.com/sannies/rtp2dash/blob/master/src/main/resources/auxxsd/cenc.xsd\n */\nexport const cencXmlRules: XmlRules<CencContentProtection> = {\n default_KID: /* @__PURE__ */ attr(parseStringVector, stringifyStringVector, {\n namespaceUri: CENC_NAMESPACE_URI,\n }),\n pssh: /* @__PURE__ */ element(\n {\n _content: charactersString,\n },\n {\n namespaceUri: CENC_NAMESPACE_URI,\n }\n ),\n} as const\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { element, elements, type XmlRules } from '@amazon/vinyl-xml'\nimport { dashNamespaceUri } from '../../dashManifestXmlRules'\n\n/**\n * ContentProtection extension point for Dash manifests.\n *\n * @module\n */\n\nexport interface WithProtections<T> {\n readonly ContentProtection?: readonly T[]\n}\n\nexport interface RepresentationTypeProtections<T> extends WithProtections<T> {\n readonly SubRepresentation?: readonly WithProtections<T>[]\n}\n\nexport interface AdaptationSetProtections<T> extends WithProtections<T> {\n readonly Representation?: readonly RepresentationTypeProtections<T>[]\n}\n\nexport interface PeriodProtections<T> {\n readonly AdaptationSet?: readonly AdaptationSetProtections<T>[]\n}\n\nexport interface MPDProtections<T> {\n readonly Period: readonly PeriodProtections<T>[]\n}\n\nexport interface DashProtections<T> {\n readonly MPD: MPDProtections<T>\n}\n\n/**\n * Creates a dash extension for content protection parsing rules.\n *\n * @param contentProtectionRules Rules to be used when processing `ContentProtection` elements.\n * @return Returns a rules map that should be merged with the dash manifest rules.\n */\nexport function createDashProtectionXmlRules<T extends object>(\n contentProtectionRules: XmlRules<T>\n): XmlRules<DashProtections<T>> {\n const withProtections: XmlRules<WithProtections<T>> = {\n ContentProtection: elements(contentProtectionRules),\n } as const\n\n return {\n MPD: element<MPDProtections<T>>(\n {\n Period: elements<PeriodProtections<T>>(\n {\n AdaptationSet: elements<AdaptationSetProtections<T>>({\n ...withProtections,\n Representation: elements<\n RepresentationTypeProtections<T>\n >({\n ...withProtections,\n SubRepresentation:\n elements<WithProtections<T>>(\n withProtections\n ),\n }),\n }),\n },\n {\n minOccurs: 1,\n }\n ),\n },\n { required: true, namespaceUri: dashNamespaceUri } as const\n ),\n } as const\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { charactersString, element, type XmlRules } from '@amazon/vinyl-xml'\nimport type { PlayreadyContentProtection } from '../../../xmlns/microsoft/playready'\nimport { PLAY_READY_NAMESPACE_URI } from '../../../xmlns/microsoft/playready'\n\nexport const playreadyXmlRules: XmlRules<PlayreadyContentProtection> = {\n pro: /* @__PURE__ */ element(\n {\n _content: charactersString,\n },\n {\n namespaceUri: PLAY_READY_NAMESPACE_URI,\n }\n ),\n} as const\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport const ContentProtectionScheme = {\n /**\n * CENC protection scheme. (Should not be used to create a key session)\n */\n CENC: 'urn:mpeg:dash:mp4protection:2011',\n\n /**\n * A simple, unencrypted content protection scheme. Not a full DRM solution.\n */\n CLEAR_KEY: 'urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e',\n\n /**\n * Apple's FairPlay.\n */\n FAIR_PLAY: 'urn:uuid:94ce86fb-07ff-4f43-adb8-93d2fa968ca2',\n\n /**\n * Open-standards community initiative by Marlin Developer Community.\n */\n MARLIN: 'urn:uuid:5e629af5-38da-4063-8977-97ffbd9902d4',\n\n /**\n * Microsoft's PlayReady.\n */\n PLAY_READY: 'urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95',\n\n /**\n * An old, unused PlayReady scheme id.\n */\n PLAY_READY_DEPRECATED: 'urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95',\n\n /**\n * Google's Widevine.\n */\n WIDEVINE: 'urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed',\n} as const\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAcO,IAAM,qBAAqB;;;ACA3B,IAAM,2BAA2B;;;ACTxC,SAAS,aAAa,uBAAuB;AAEtC,SAAS,kBAAkB,SAAwB;AACtD,QAAM,IAAI,gBAAgB,SAAS,YAAY,OAAO;AAC1D;;;ACOA,IAAM,cAAc;AAcb,SAAS,WAAW,KAAoB;AAC3C,QAAM,QAAQ,MAAM,YAAY,KAAK,GAAG,IAAI;AAC5C,MAAI,CAAC,MAAO,mB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AC;AAAA,UACL;AAAA,UACA;AAAA,YACI,WAAW;AAAA,UACf;AAAA,QACJ;AAAA,MACJ;AAAA,MACA,EAAE,UAAU,MAAM,cAAc,iBAAiB;AAAA,IACrD;AAAA,EACJ;AACJ;;;ACxEA,SAAS,oBAAAE,mBAAkB,WAAAC,gBAA8B;AAIlD,IAAM,oBAA0D;AAAA,EACnE,KAAqB,gBAAAC;AAAA,IACjB;AAAA,MACI,UAAUC;AAAA,IACd;AAAA,IACA;AAAA,MACI,cAAc;AAAA,IAClB;AAAA,EACJ;AACJ;;;ALsBA,IAAM,eAA+B;AAAA,EACjB,qCAAqB;AAAA,EACrB,6CAA6B,YAAY;AAAA,EACzC,6CAA6B,iBAAiB;AAClE;AAEA,IAAM,qBAAqC,4BAAY,YAAY;AAKnE,SAAS,sBAAsB;AAC3B,SAAO,IAAI,oBAAoB,kBAAkB;AACrD;AAOO,SAAS,kBAAkB,UAAmC;AACjE,SAAO,SAAS,UAAU,oBAAoB,CAAC;AACnD;AAEO,SAAS,sBACZ,UACM;AACN,SAAO,aAAa,UAAU,kBAAkB;AACpD;;;AM/DO,IAAM,0BAA0B;AAAA;AAAA;AAAA;AAAA,EAInC,MAAM;AAAA;AAAA;AAAA;AAAA,EAKN,WAAW;AAAA;AAAA;AAAA;AAAA,EAKX,WAAW;AAAA;AAAA;AAAA;AAAA,EAKX,QAAQ;AAAA;AAAA;AAAA;AAAA,EAKR,YAAY;AAAA;AAAA;AAAA;AAAA,EAKZ,uBAAuB;AAAA;AAAA;AAAA;AAAA,EAKvB,UAAU;AACd;",
|
|
6
|
-
"names": ["ErrorOrigin", "
|
|
3
|
+
"sources": ["../src/duration/duration.ts", "../src/error/parsingError.ts", "../src/manifest/dashManifestXmlRules.ts", "../src/media/byteRange.ts", "../src/media/ratio.ts", "../src/media/frameRate.ts", "../src/manifest/dashParser.ts", "../src/manifest/ext/drm/cencXmlRules.ts", "../src/xmlns/mpeg/cenc/2013.ts", "../src/manifest/ext/drm/contentProtection.ts", "../src/manifest/ext/drm/playreadyXmlRules.ts", "../src/xmlns/microsoft/playready.ts", "../src/manifest/ext/drm/ContentProtectionScheme.ts"],
|
|
4
|
+
"sourcesContent": ["/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {\n ErrorOrigin,\n roundToNearest,\n ValidationError,\n} from '@amazon/vinyl-util'\n\n// ESBuild (https://github.com/evanw/esbuild/issues/3988) considers multiplication and division\n// to have a side effect and will inhibit tree shaking.\n// E.g. H = 60 * 60 will not be removed when not referenced.\nconst I = 60\nconst H = 3600\nconst D = 86400\nconst M = 2592000\nconst Y = 31536000\n\n/**\n * A duration, in seconds. (This may be negative)\n */\nexport type Duration = number\n\n/**\n * https://www.w3.org/TR/xmlschema-2/#duration\n */\nconst iso8601Duration =\n /^(-?)P?(\\d+(?:\\.\\d*)?Y)?(\\d+(?:\\.\\d*)?M)?(\\d+(?:\\.\\d*)?D)?T?(\\d+(?:\\.\\d*)?H)?(\\d+(?:\\.\\d*)?M)?(\\d+(?:\\.\\d*)?S?)?$/i\n\n/**\n * Parses an ISO 8601 duration into seconds.\n * The accepted format is P(n)Y(n)M(n)DT(n)H(n)M(n)S\n *\n * All units shall have a fixed size.\n *\n * P - Period designator, precedes all durations.\n * 1Y (Year) = 365 * 24 * 60 * 60 Seconds\n * 1M (Month) = 30 * 24 * 60 * 60 Seconds\n * 1D (Day) = 24 * 60 * 60 Seconds\n *\n * T - Time designator, precedes all time components.\n * 1H (Hour) = 60 * 60 Seconds\n * 1M (Minute) = 60 Seconds\n * 1S (Second)\n *\n *\n * @param value\n * @return Returns the duration in seconds or throws an {@link ValidationError}\n * if not properly formatted.\n * @see https://www.w3.org/TR/xmlschema-2/#duration\n */\nexport function parseDuration(value: string): Duration {\n const match = iso8601Duration.exec(value)\n if (match == null)\n throw new ValidationError(\n `Unexpected duration: '${value}', should be in iso 8601 format`,\n ErrorOrigin.PARSING\n )\n\n const sign = match[1] === '-' ? -1 : 1\n return (\n sign *\n (parseFloat(match[2] || '0') * Y +\n parseFloat(match[3] || '0') * M +\n parseFloat(match[4] || '0') * D +\n parseFloat(match[5] || '0') * H +\n parseFloat(match[6] || '0') * I +\n parseFloat(match[7] || '0'))\n )\n}\n\n/**\n * Returns the iso 8601 string representation of a duration value.\n *\n * @param value A duration value, in seconds.\n */\nexport function stringifyDuration(value: Duration): string {\n const sign = value < 0 ? '-' : ''\n let abs = Math.abs(value)\n\n const years = Math.floor(abs / Y)\n abs -= years * Y\n const months = Math.floor((abs % Y) / M)\n const days = Math.floor((abs % M) / D)\n const hours = Math.floor((abs % D) / H)\n const minutes = Math.floor((abs % H) / I)\n const seconds = abs % I\n let isoString = `${sign}P`\n if (years > 0) isoString += `${years}Y`\n if (months > 0) isoString += `${months}M`\n if (days > 0) isoString += `${days}D`\n isoString += 'T'\n if (hours > 0) isoString += `${hours}H`\n if (minutes > 0) isoString += `${minutes}M`\n if (seconds > 0 || !value) isoString += `${roundToNearest(seconds, 0.001)}S`\n return isoString\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { ErrorOrigin, ValidationError } from '@amazon/vinyl-util'\n\nexport function throwParsingError(message: string): never {\n throw new ValidationError(message, ErrorOrigin.PARSING)\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * Parser definitions for a dash manifest.\n * Attribute order does not matter, element order matters for writing.\n *\n * @module\n */\n\nimport type { actuateType, UriType } from '@amazon/vinyl-xml'\nimport {\n assertActuateEnum,\n attr,\n attrBoolean,\n attrDateTime,\n attrFloat,\n attrInt,\n attrString,\n charactersString,\n element,\n elements,\n type XmlRules,\n} from '@amazon/vinyl-xml'\nimport { ErrorOrigin, stringify } from '@amazon/vinyl-util'\nimport { isOneOf, number, type Validator } from '@amazon/vinyl-validation'\nimport { parseDuration, stringifyDuration } from '../duration/duration'\nimport { parseByteRange, stringifyByteRange } from '../media/byteRange'\nimport { parseRatio, stringifyRatio } from '../media/ratio'\nimport { parseFrameRate, stringifyFrameRate } from '../media/frameRate'\nimport type {\n AdaptationSetType,\n BaseURLType,\n ConditionalUintType,\n ContentComponentType,\n DashManifest,\n DescriptorType,\n EventStreamType,\n EventType,\n MetricsType,\n MPDtype,\n MultipleSegmentBaseType,\n PeriodType,\n PresentationType,\n ProgramInformationType,\n RangeType,\n RepresentationBaseType,\n RepresentationType,\n SegmentBaseType,\n SegmentListType,\n SegmentTemplateType,\n SegmentTimelineType,\n SegmentTimelineTypeSType,\n SegmentURLType,\n SubRepresentationType,\n SubsetType,\n SwitchingType,\n SwitchingTypeType,\n URLType,\n VideoScanType,\n} from '../xmlns/mpeg/dash/schema/mpd/2011'\n\nexport const dashNamespaceUri = 'urn:mpeg:dash:schema:mpd:2011'\n\nexport function dashManifestXmlRules(): XmlRules<DashManifest> {\n const attrActuateType = attr<actuateType>(assertActuateEnum, stringify, {\n default: 'onRequest',\n } as const)\n\n const descriptorType: XmlRules<DescriptorType> = {\n id: attrString,\n schemeIdUri: attrString({ required: true }),\n value: attrString,\n } as const\n\n const baseURLType: XmlRules<BaseURLType> = {\n availabilityTimeComplete: attrBoolean,\n availabilityTimeOffset: attrFloat,\n byteRange: attrString,\n serviceLocation: attrString,\n _content: charactersString,\n } as const\n\n const contentComponentType: XmlRules<ContentComponentType> = {\n contentType: attrString,\n id: attrInt,\n lang: attrString,\n par: attr(parseRatio, stringifyRatio),\n Accessibility: elements(descriptorType),\n Rating: elements(descriptorType),\n Role: elements(descriptorType),\n Viewpoint: elements(descriptorType),\n } as const\n\n const urlType: XmlRules<URLType> = {\n range: attr(parseByteRange, stringifyByteRange),\n sourceURL: attrString,\n } as const\n\n const uriType: XmlRules<UriType> = { _content: charactersString } as const\n\n const segmentBaseType: XmlRules<SegmentBaseType> = {\n Initialization: element(urlType),\n RepresentationIndex: element(urlType),\n availabilityTimeComplete: attrBoolean,\n availabilityTimeOffset: attrInt,\n indexRange: attr(parseByteRange, stringifyByteRange),\n indexRangeExact: attrBoolean({ default: false }),\n presentationTimeOffset: attrFloat,\n timescale: attrInt,\n } as const\n\n const segmentTimelineTypeSType: XmlRules<SegmentTimelineTypeSType> = {\n d: attrInt({ required: true }),\n n: attrInt,\n r: attrInt({ default: 0 }),\n t: attrInt,\n } as const\n\n const segmentTimelineType: XmlRules<SegmentTimelineType> = {\n S: elements(segmentTimelineTypeSType),\n } as const\n\n const multipleSegmentBaseType: XmlRules<MultipleSegmentBaseType> = {\n ...segmentBaseType,\n SegmentTimeline: element(segmentTimelineType),\n BitstreamSwitching: element(urlType),\n duration: attrInt,\n startNumber: attrInt,\n } as const\n\n const segmentURLType: XmlRules<SegmentURLType> = {\n index: attrString,\n indexRange: attr(parseByteRange, stringifyByteRange),\n media: attrString,\n mediaRange: attr(parseByteRange, stringifyByteRange),\n } as const\n\n const segmentListType: XmlRules<SegmentListType> = {\n ...multipleSegmentBaseType,\n actuate: attrActuateType,\n href: attrString,\n SegmentURL: elements(segmentURLType),\n } as const\n\n const segmentTemplateType: XmlRules<SegmentTemplateType> = {\n ...multipleSegmentBaseType,\n bitstreamSwitching: attrString,\n index: attrString,\n initialization: attrString,\n media: attrString,\n } as const\n\n const subsetType: XmlRules<SubsetType> = {\n contains: attr(parseIntVector, stringifyIntVector, { required: true }),\n id: attrString,\n } as const\n\n const eventType: XmlRules<EventType> = {\n duration: attrInt,\n id: attrInt,\n messageData: attrString,\n presentationTime: attrInt({ default: 0 }),\n } as const\n\n const eventStreamType: XmlRules<EventStreamType> = {\n Event: elements(eventType),\n actuate: attrActuateType,\n href: attrString,\n messageData: attrString,\n schemeIdUri: attrString({ required: true }),\n timescale: attrInt,\n value: attrString,\n } as const\n\n const switchingType: XmlRules<SwitchingType> = {\n interval: attrInt({ required: true }),\n type: attr(parseSwitchingTypeType, stringify),\n } as const\n\n const representationBaseType: XmlRules<RepresentationBaseType> = {\n FramePacking: elements(descriptorType),\n AudioChannelConfiguration: elements(descriptorType),\n ContentProtection: elements(descriptorType),\n EssentialProperty: elements(descriptorType),\n SupplementalProperty: elements(descriptorType),\n InbandEventStream: elements(eventStreamType),\n Switching: elements(switchingType),\n audioSamplingRate: attr(parseIntVector, stringifyIntVector),\n codecs: attrString,\n codingDependency: attrBoolean,\n frameRate: attr(parseFrameRate, stringifyFrameRate),\n height: attrInt,\n maximumSAPPeriod: attrInt,\n maxPlayoutRate: attrInt,\n mimeType: attrString,\n profiles: attr(parseProfiles, stringifyProfiles),\n sar: attr(parseRatio, stringifyRatio),\n scanType: attr(parseVideoScan, stringify),\n segmentProfiles: attrString,\n startWithSAP: attr(parseSap, stringify),\n width: attrInt,\n } as const\n\n const subRepresentationType: XmlRules<SubRepresentationType> = {\n ...representationBaseType,\n bandwidth: attrInt,\n contentComponent: attr(parseStringVector, stringifyStringVector),\n dependencyLevel: attr(parseIntVector, stringifyIntVector),\n level: attrInt,\n } as const\n\n const representationType: XmlRules<RepresentationType> = {\n ...representationBaseType,\n bandwidth: attrInt({ required: true }),\n bitrate: attrInt,\n dependencyId: attr(parseStringVector, stringifyStringVector),\n id: attrString({ required: true }),\n mediaStreamStructureId: attr(parseStringVector, stringifyStringVector),\n qualityRanking: attrInt,\n BaseURL: elements(baseURLType),\n SegmentBase: element(segmentBaseType),\n SegmentList: element(segmentListType),\n SegmentTemplate: element(segmentTemplateType),\n SubRepresentation: elements(subRepresentationType),\n } as const\n\n const adaptationSetType: XmlRules<AdaptationSetType> = {\n ...representationBaseType,\n Accessibility: elements(descriptorType),\n Role: elements(descriptorType),\n Rating: elements(descriptorType),\n Viewpoint: elements(descriptorType),\n ContentComponent: elements(contentComponentType),\n BaseURL: elements(baseURLType),\n SegmentBase: element(segmentBaseType),\n SegmentList: element(segmentListType),\n SegmentTemplate: element(segmentTemplateType),\n Representation: elements(representationType),\n actuate: attrActuateType,\n bitstreamSwitching: attrBoolean,\n contentType: attrString,\n group: attrInt,\n href: attrString,\n id: attrInt,\n lang: attrString,\n maxBandwidth: attrInt,\n maxFrameRate: attr(parseFrameRate, stringifyFrameRate),\n maxHeight: attrInt,\n maxWidth: attrInt,\n minBandwidth: attrInt,\n minFrameRate: attr(parseFrameRate, stringifyFrameRate),\n minHeight: attrInt,\n minWidth: attrInt,\n par: attr(parseRatio, stringifyRatio),\n segmentAlignment: attr(parseConditionalUint, stringify, {\n default: false,\n }),\n selectionPriority: attrInt({\n default: 1,\n }),\n subsegmentAlignment: attr(parseConditionalUint, stringify, {\n default: false,\n }),\n subsegmentStartsWithSAP: attr(parseSap, stringify, { default: 0 }),\n } as const\n\n const rangeType: XmlRules<RangeType> = {\n duration: attr(parseDuration, stringifyDuration),\n starttime: attr(parseDuration, stringifyDuration),\n } as const\n\n const metricsType: XmlRules<MetricsType> = {\n metrics: attrString({ required: true }),\n Range: elements(rangeType),\n Reporting: elements(descriptorType, { minOccurs: 1 }),\n } as const\n\n const periodType: XmlRules<PeriodType> = {\n BaseURL: elements(baseURLType),\n SegmentBase: element(segmentBaseType),\n SegmentList: element(segmentListType),\n SegmentTemplate: element(segmentTemplateType),\n AssetIdentifier: element(descriptorType),\n EventStream: elements(eventStreamType),\n AdaptationSet: elements(adaptationSetType),\n Subset: elements(subsetType),\n SupplementalProperty: elements(descriptorType),\n actuate: attrActuateType,\n bitstreamSwitching: attrBoolean({ default: false }),\n duration: attr(parseDuration, stringifyDuration),\n href: attrString,\n id: attrString,\n start: attr(parseDuration, stringifyDuration),\n } as const\n\n const programInformationType: XmlRules<ProgramInformationType> = {\n lang: attrString,\n moreInformationURL: attrString,\n Copyright: attrString,\n Source: attrString,\n Title: attrString,\n } as const\n\n const mpdType: XmlRules<MPDtype> = {\n ProgramInformation: elements(programInformationType),\n BaseURL: elements(baseURLType),\n Location: elements(uriType),\n Period: elements(periodType, { minOccurs: 1 }),\n Metrics: elements(metricsType),\n EssentialProperty: elements(descriptorType),\n SupplementalProperty: elements(descriptorType),\n UTCTiming: elements(descriptorType),\n availabilityEndTime: attrDateTime,\n availabilityStartTime: attrDateTime,\n id: attrString,\n maxSegmentDuration: attr(parseDuration, stringifyDuration),\n maxSubsegmentDuration: attr(parseDuration, stringifyDuration),\n mediaPresentationDuration: attr(parseDuration, stringifyDuration),\n minBufferTime: attr(parseDuration, stringifyDuration, {\n required: true,\n }),\n minimumUpdatePeriod: attr(parseDuration, stringifyDuration),\n profiles: attr(parseProfiles, stringifyProfiles, { required: true }),\n publishTime: attrDateTime,\n suggestedPresentationDelay: attr(parseDuration, stringifyDuration),\n timeShiftBufferDepth: attr(parseDuration, stringifyDuration),\n type: attr(parsePresentationTypeType, stringify, {\n default: 'static',\n } as const),\n } as const\n\n return {\n MPD: element(mpdType, {\n required: true,\n namespaceUri: dashNamespaceUri,\n }),\n } as const\n}\n\n/**\n * Parses a comma delimited list of profiles.\n * Profile values are not whitespace trimmed.\n *\n * @param str\n */\nexport function parseProfiles(str: string): readonly string[] {\n return str.split(',')\n}\n\n/**\n * Returns the string representation of a {@link FrameRate} value.\n *\n * @param value\n */\nexport function stringifyProfiles(value: readonly string[]): string {\n return value.join(',')\n}\n\nconst videoScanTypeValidator: Validator<VideoScanType> = /* @__PURE__ */ isOneOf(\n 'progressive',\n 'interlaced',\n 'unknown'\n)\n\n/**\n * @private\n */\nexport function parseVideoScan(str: string): VideoScanType {\n videoScanTypeValidator.assert(str, ErrorOrigin.PARSING)\n return str\n}\n\nconst switchingTypeTypeValidator: Validator<SwitchingTypeType> = /* @__PURE__ */ isOneOf(\n 'media',\n 'bitstream'\n)\n\n/**\n * @private\n */\nexport function parseSwitchingTypeType(str: string): SwitchingTypeType {\n switchingTypeTypeValidator.assert(str, ErrorOrigin.PARSING)\n return str\n}\n\nconst validateSap: Validator<number> = /* @__PURE__ */ /* @__PURE__ */ number().within(0, 6)\n\n/**\n * @private\n */\nexport function parseSap(str: string): number {\n const number = parseInt(str)\n validateSap.assert(number, ErrorOrigin.PARSING)\n return number\n}\n\n/**\n * Splits a string by whitespace.\n *\n * @private\n */\nexport function parseStringVector(str: string): readonly string[] {\n return str.split(/\\s+/)\n}\n\n/**\n * Returns the string representation of a string vector value.\n *\n * @param value\n */\nexport function stringifyStringVector(value: readonly string[]): string {\n return value.join(' ')\n}\n\n/**\n * Splits a string by whitespace and parses as int.\n *\n * @private\n */\nexport function parseIntVector(str: string): readonly number[] {\n return str.split(/\\s+/).map((subStr) => parseInt(subStr))\n}\n\n/**\n * Returns the string representation of an int vector value.\n *\n * @param value\n */\nexport function stringifyIntVector(value: readonly number[]): string {\n return value.join(' ')\n}\n\nconst presentationTypeValidator: Validator<PresentationType> = /* @__PURE__ */ isOneOf(\n 'static',\n 'dynamic'\n)\n\n/**\n * Asserts that the given string is one of the {@link PresentationType} enumerated values.\n * @param str\n */\nexport function parsePresentationTypeType(str: string): PresentationType {\n presentationTypeValidator.assert(str, ErrorOrigin.PARSING)\n return str\n}\n\n/**\n * Parses a string into true, false, or a number.\n *\n * @private\n */\nexport function parseConditionalUint(str: string): ConditionalUintType {\n const lower = str.toLowerCase()\n switch (lower) {\n case 'true':\n return true\n case 'false':\n return false\n default:\n return parseInt(str)\n }\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { parseIntSafe } from '@amazon/vinyl-util'\nimport { throwParsingError } from '../error/parsingError'\n\n/**\n * A range of bytes, [from, to (optional, inclusive)].\n */\nexport type ByteRange = readonly [number, number | null]\n\nconst byteRangeExp = /^(-?[0-9]+)-(-?[0-9]*)$/\n\nexport function parseByteRange(str: string): ByteRange {\n const match = str ? byteRangeExp.exec(str) : null\n if (!match) throwParsingError(`invalid byte range: '${str}'`)\n let start = parseInt(match[1])\n // Convert possibly-negative Int32 overflow value to its Uint32 equivalent\n // (reinterpret 32-bit signed integer bits as unsigned)\n if (start < 0) start >>>= 0\n let end = parseIntSafe(match[2])\n if (end != null && end < 0) end = end >>> 0\n return [start, end]\n}\n\n/**\n * Returns the string representation of a {@link ByteRange} value.\n *\n * @param value\n */\nexport function stringifyByteRange(value: ByteRange): string {\n const end = value[1]\n return `${value[0]}-${end == null ? '' : end}`\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { throwParsingError } from '../error/parsingError'\n\n/**\n * A numerator and denominator.\n */\nexport type Ratio = readonly [number, number]\n\n/**\n * The XSD specifies `[0-9]*`, and not `[0-9]+`, which would match `'23:'`\n * For missing dimensions, default to 1.\n */\nconst ratioRegExp = /^([0-9]*):([0-9]*)$/\n\n/**\n * Parses a string representing a ratio into [number, number].\n * The string must satisfy the pattern: `/^([0-9]*):([0-9]*)$/`\n * Examples:\n * ```\n * parseRatio('4:3') // [4, 3]\n * parseRatio('16:9') // [16, 9]\n * parseRatio('2:') // [2, 1]\n * ```\n *\n * @private\n */\nexport function parseRatio(str: string): Ratio {\n const match = str ? ratioRegExp.exec(str) : null\n if (!match) throwParsingError(`invalid ratio format: ${str}`)\n return [parseInt(match[1] || '1'), parseInt(match[2] || '1')]\n}\n\n/**\n * Returns the string representation of a {@link Ratio} value.\n *\n * @param value\n */\nexport function stringifyRatio(value: Ratio): string {\n return `${value[0]}:${value[1]}`\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { throwParsingError } from '../error/parsingError'\n\nexport type FrameRate = readonly [number, number]\n\nconst framerateRegexp = /^(\\d+)(?:\\/(\\d+))?$/\n\n/**\n * Parses a string into a {@link FrameRate}\n *\n * @private\n */\nexport function parseFrameRate(str: string): FrameRate {\n const match = str ? framerateRegexp.exec(str) : null\n if (!match) throwParsingError(`invalid frame rate: '${str}'`)\n return [parseInt(match[1]), parseInt(match[2] || '1')]\n}\n\n/**\n * Returns the string representation of a {@link FrameRate} value.\n *\n * @param value\n */\nexport function stringifyFrameRate(value: FrameRate): string {\n return value[1] === 1 ? value[0].toString() : `${value[0]}/${value[1]}`\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { ReservedXmlRuleKeys } from '@amazon/vinyl-xml'\nimport {\n mapXmlRules,\n type Merged,\n mergeXmlRules,\n parseXml,\n ParseXmlHandlerImpl,\n stringifyXml,\n} from '@amazon/vinyl-xml'\nimport type { PlayreadyContentProtection } from '../xmlns/microsoft/playready'\nimport type { CencContentProtection } from '../xmlns/mpeg/cenc/2013'\nimport type {\n DashManifest,\n DescriptorType,\n} from '../xmlns/mpeg/dash/schema/mpd/2011'\nimport { dashManifestXmlRules } from './dashManifestXmlRules'\nimport { cencXmlRules } from './ext/drm/cencXmlRules'\nimport type { DashProtections } from './ext/drm/contentProtection'\nimport { createDashProtectionXmlRules } from './ext/drm/contentProtection'\nimport { playreadyXmlRules } from './ext/drm/playreadyXmlRules'\nimport type { OptionalDeep } from '@amazon/vinyl-util'\n\n/**\n * Creates a Dash Manifest parser with supported extensions.\n *\n * @module\n */\n\nexport type DashDrmManifest = Merged<\n DashManifest & DashProtections<ContentProtection>\n>\n\nexport interface ContentProtection\n extends DescriptorType, CencContentProtection, PlayreadyContentProtection {}\n\nconst dashDrmRules = /* @__PURE__ */ mergeXmlRules(\n /* @__PURE__ */ dashManifestXmlRules(),\n /* @__PURE__ */ createDashProtectionXmlRules(cencXmlRules),\n /* @__PURE__ */ createDashProtectionXmlRules(playreadyXmlRules)\n)\n\nconst dashDrmRulesMapped = /* @__PURE__ */ mapXmlRules(dashDrmRules)\n\n/**\n * A Content handler for a dash manifest.\n */\nfunction dashManifestHandler() {\n return new ParseXmlHandlerImpl(dashDrmRulesMapped)\n}\n\n/**\n * Parses a Dash Manifest, according to the mpd:2011 schema.\n * @see https://raw.githubusercontent.com/Dash-Industry-Forum/MPEG-Conformance-and-reference-source/master/conformance/MPDValidator/schemas/DASH-MPD.xsd\n * @param manifest\n */\nexport function parseDashManifest(manifest: string): DashDrmManifest {\n return parseXml(manifest, dashManifestHandler())\n}\n\nexport function stringifyDashManifest(\n manifest: OptionalDeep<DashDrmManifest, ReservedXmlRuleKeys>\n): string {\n return stringifyXml(manifest, dashDrmRulesMapped)\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {\n parseStringVector,\n stringifyStringVector,\n} from '../../dashManifestXmlRules'\nimport type { XmlRules } from '@amazon/vinyl-xml'\nimport { attr, charactersString, element } from '@amazon/vinyl-xml'\nimport type { CencContentProtection } from '../../../xmlns/mpeg/cenc/2013'\nimport { CENC_NAMESPACE_URI } from '../../../xmlns/mpeg/cenc/2013'\n\n/**\n * A parser for ContentProtection elements using the cenc namespace.\n * @see https://github.com/sannies/rtp2dash/blob/master/src/main/resources/auxxsd/cenc.xsd\n */\nexport const cencXmlRules: XmlRules<CencContentProtection> = {\n default_KID: /* @__PURE__ */ attr(parseStringVector, stringifyStringVector, {\n namespaceUri: CENC_NAMESPACE_URI,\n }),\n pssh: /* @__PURE__ */ element(\n {\n _content: charactersString,\n },\n {\n namespaceUri: CENC_NAMESPACE_URI,\n }\n ),\n} as const\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { Base64BinaryType } from '@amazon/vinyl-xml'\n\n/**\n * Cenc content protection xml types.\n *\n * @see https://github.com/sannies/rtp2dash/blob/master/src/main/resources/auxxsd/cenc.xsd\n * @module\n */\n\nexport const CENC_NAMESPACE_URI = 'urn:mpeg:cenc:2013'\n\n/**\n * A 128-bit integer written in canonical UUID notation.\n * Must be in the form:\n * `[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}`\n */\nexport type KeyIdType = string\n\nexport interface CencContentProtection {\n readonly default_KID?: readonly KeyIdType[]\n readonly pssh?: Base64BinaryType\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { element, elements, type XmlRules } from '@amazon/vinyl-xml'\nimport { dashNamespaceUri } from '../../dashManifestXmlRules'\n\n/**\n * ContentProtection extension point for Dash manifests.\n *\n * @module\n */\n\nexport interface WithProtections<T> {\n readonly ContentProtection?: readonly T[]\n}\n\nexport interface RepresentationTypeProtections<T> extends WithProtections<T> {\n readonly SubRepresentation?: readonly WithProtections<T>[]\n}\n\nexport interface AdaptationSetProtections<T> extends WithProtections<T> {\n readonly Representation?: readonly RepresentationTypeProtections<T>[]\n}\n\nexport interface PeriodProtections<T> {\n readonly AdaptationSet?: readonly AdaptationSetProtections<T>[]\n}\n\nexport interface MPDProtections<T> {\n readonly Period: readonly PeriodProtections<T>[]\n}\n\nexport interface DashProtections<T> {\n readonly MPD: MPDProtections<T>\n}\n\n/**\n * Creates a dash extension for content protection parsing rules.\n *\n * @param contentProtectionRules Rules to be used when processing `ContentProtection` elements.\n * @return Returns a rules map that should be merged with the dash manifest rules.\n */\nexport function createDashProtectionXmlRules<T extends object>(\n contentProtectionRules: XmlRules<T>\n): XmlRules<DashProtections<T>> {\n const withProtections: XmlRules<WithProtections<T>> = {\n ContentProtection: elements(contentProtectionRules),\n } as const\n\n return {\n MPD: element<MPDProtections<T>>(\n {\n Period: elements<PeriodProtections<T>>(\n {\n AdaptationSet: elements<AdaptationSetProtections<T>>({\n ...withProtections,\n Representation: elements<\n RepresentationTypeProtections<T>\n >({\n ...withProtections,\n SubRepresentation:\n elements<WithProtections<T>>(\n withProtections\n ),\n }),\n }),\n },\n {\n minOccurs: 1,\n }\n ),\n },\n { required: true, namespaceUri: dashNamespaceUri } as const\n ),\n } as const\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { charactersString, element, type XmlRules } from '@amazon/vinyl-xml'\nimport type { PlayreadyContentProtection } from '../../../xmlns/microsoft/playready'\nimport { PLAY_READY_NAMESPACE_URI } from '../../../xmlns/microsoft/playready'\n\nexport const playreadyXmlRules: XmlRules<PlayreadyContentProtection> = {\n pro: /* @__PURE__ */ element(\n {\n _content: charactersString,\n },\n {\n namespaceUri: PLAY_READY_NAMESPACE_URI,\n }\n ),\n} as const\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { Base64BinaryType } from '@amazon/vinyl-xml'\n\n/**\n * Cenc content protection playready.\n *\n * @see https://learn.microsoft.com/en-us/playready/specifications/mpeg-dash-playready#21-dash-contentprotection-descriptor-elements\n * @module\n */\n\nexport const PLAY_READY_NAMESPACE_URI = 'urn:microsoft:playready'\n\nexport interface PlayreadyContentProtection {\n readonly pro?: Base64BinaryType\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport const ContentProtectionScheme = {\n /**\n * CENC protection scheme. (Should not be used to create a key session)\n */\n CENC: 'urn:mpeg:dash:mp4protection:2011',\n\n /**\n * A simple, unencrypted content protection scheme. Not a full DRM solution.\n */\n CLEAR_KEY: 'urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e',\n\n /**\n * Apple's FairPlay.\n */\n FAIR_PLAY: 'urn:uuid:94ce86fb-07ff-4f43-adb8-93d2fa968ca2',\n\n /**\n * Open-standards community initiative by Marlin Developer Community.\n */\n MARLIN: 'urn:uuid:5e629af5-38da-4063-8977-97ffbd9902d4',\n\n /**\n * Microsoft's PlayReady.\n */\n PLAY_READY: 'urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95',\n\n /**\n * An old, unused PlayReady scheme id.\n */\n PLAY_READY_DEPRECATED: 'urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95',\n\n /**\n * Google's Widevine.\n */\n WIDEVINE: 'urn:uuid:edef8ba9-79d6-4ace-a3c8-27dc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AY;AAAA;AAAA;AAAA;AAAA,EAKZ,uBAAuB;AAAA;AAAA;AAAA;AAAA,EAKvB,UAAU;AACd;",
|
|
6
|
+
"names": ["ErrorOrigin", "ValidationError", "ErrorOrigin", "ErrorOrigin", "number", "attr", "charactersString", "element", "attr", "element", "charactersString", "element", "elements", "elements", "element", "charactersString", "element", "element", "charactersString"]
|
|
7
7
|
}
|