@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
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A duration, in seconds. (This may be negative)
|
|
3
|
+
*/
|
|
4
|
+
export type Duration = number;
|
|
5
|
+
/**
|
|
6
|
+
* Parses an ISO 8601 duration into seconds.
|
|
7
|
+
* The accepted format is P(n)Y(n)M(n)DT(n)H(n)M(n)S
|
|
8
|
+
*
|
|
9
|
+
* All units shall have a fixed size.
|
|
10
|
+
*
|
|
11
|
+
* P - Period designator, precedes all durations.
|
|
12
|
+
* 1Y (Year) = 365 * 24 * 60 * 60 Seconds
|
|
13
|
+
* 1M (Month) = 30 * 24 * 60 * 60 Seconds
|
|
14
|
+
* 1D (Day) = 24 * 60 * 60 Seconds
|
|
15
|
+
*
|
|
16
|
+
* T - Time designator, precedes all time components.
|
|
17
|
+
* 1H (Hour) = 60 * 60 Seconds
|
|
18
|
+
* 1M (Minute) = 60 Seconds
|
|
19
|
+
* 1S (Second)
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
* @param value
|
|
23
|
+
* @return Returns the duration in seconds or throws an {@link ValidationError}
|
|
24
|
+
* if not properly formatted.
|
|
25
|
+
* @see https://www.w3.org/TR/xmlschema-2/#duration
|
|
26
|
+
*/
|
|
27
|
+
export declare function parseDuration(value: string): Duration;
|
|
28
|
+
/**
|
|
29
|
+
* Returns the iso 8601 string representation of a duration value.
|
|
30
|
+
*
|
|
31
|
+
* @param value A duration value, in seconds.
|
|
32
|
+
*/
|
|
33
|
+
export declare function stringifyDuration(value: Duration): string;
|
|
34
|
+
//# sourceMappingURL=duration.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** Auto-generated from build scripts */
|
|
2
|
+
export * from './xmlns/mpeg/dash/schema/mpd/2011';
|
|
3
|
+
export * from './xmlns/mpeg/cenc/2013';
|
|
4
|
+
export * from './xmlns/microsoft/playready';
|
|
5
|
+
export * from './media/ratio';
|
|
6
|
+
export * from './media/frameRate';
|
|
7
|
+
export * from './media/byteRange';
|
|
8
|
+
export * from './manifest/dashParser';
|
|
9
|
+
export * from './manifest/dashManifestXmlRules';
|
|
10
|
+
export * from './manifest/ext/drm/playreadyXmlRules';
|
|
11
|
+
export * from './manifest/ext/drm/contentProtection';
|
|
12
|
+
export * from './manifest/ext/drm/cencXmlRules';
|
|
13
|
+
export * from './manifest/ext/drm/ContentProtectionScheme';
|
|
14
|
+
export * from './error/parsingError';
|
|
15
|
+
export * from './duration/duration';
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { XmlRules } from '@amazon/vinyl-xml';
|
|
2
|
+
import type { ConditionalUintType, DashManifest, PresentationType, SwitchingTypeType, VideoScanType } from '../xmlns/mpeg/dash/schema/mpd/2011';
|
|
3
|
+
export declare const dashNamespaceUri = "urn:mpeg:dash:schema:mpd:2011";
|
|
4
|
+
export declare function dashManifestXmlRules(): XmlRules<DashManifest>;
|
|
5
|
+
/**
|
|
6
|
+
* Parses a comma delimited list of profiles.
|
|
7
|
+
* Profile values are not whitespace trimmed.
|
|
8
|
+
*
|
|
9
|
+
* @param str
|
|
10
|
+
*/
|
|
11
|
+
export declare function parseProfiles(str: string): readonly string[];
|
|
12
|
+
/**
|
|
13
|
+
* Returns the string representation of a {@link FrameRate} value.
|
|
14
|
+
*
|
|
15
|
+
* @param value
|
|
16
|
+
*/
|
|
17
|
+
export declare function stringifyProfiles(value: readonly string[]): string;
|
|
18
|
+
/**
|
|
19
|
+
* @private
|
|
20
|
+
*/
|
|
21
|
+
export declare function parseVideoScan(str: string): VideoScanType;
|
|
22
|
+
/**
|
|
23
|
+
* @private
|
|
24
|
+
*/
|
|
25
|
+
export declare function parseSwitchingTypeType(str: string): SwitchingTypeType;
|
|
26
|
+
/**
|
|
27
|
+
* @private
|
|
28
|
+
*/
|
|
29
|
+
export declare function parseSap(str: string): number;
|
|
30
|
+
/**
|
|
31
|
+
* Splits a string by whitespace.
|
|
32
|
+
*
|
|
33
|
+
* @private
|
|
34
|
+
*/
|
|
35
|
+
export declare function parseStringVector(str: string): readonly string[];
|
|
36
|
+
/**
|
|
37
|
+
* Returns the string representation of a string vector value.
|
|
38
|
+
*
|
|
39
|
+
* @param value
|
|
40
|
+
*/
|
|
41
|
+
export declare function stringifyStringVector(value: readonly string[]): string;
|
|
42
|
+
/**
|
|
43
|
+
* Splits a string by whitespace and parses as int.
|
|
44
|
+
*
|
|
45
|
+
* @private
|
|
46
|
+
*/
|
|
47
|
+
export declare function parseIntVector(str: string): readonly number[];
|
|
48
|
+
/**
|
|
49
|
+
* Returns the string representation of an int vector value.
|
|
50
|
+
*
|
|
51
|
+
* @param value
|
|
52
|
+
*/
|
|
53
|
+
export declare function stringifyIntVector(value: readonly number[]): string;
|
|
54
|
+
/**
|
|
55
|
+
* Asserts that the given string is one of the {@link PresentationType} enumerated values.
|
|
56
|
+
* @param str
|
|
57
|
+
*/
|
|
58
|
+
export declare function parsePresentationTypeType(str: string): PresentationType;
|
|
59
|
+
/**
|
|
60
|
+
* Parses a string into true, false, or a number.
|
|
61
|
+
*
|
|
62
|
+
* @private
|
|
63
|
+
*/
|
|
64
|
+
export declare function parseConditionalUint(str: string): ConditionalUintType;
|
|
65
|
+
//# sourceMappingURL=dashManifestXmlRules.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ReservedXmlRuleKeys } from '@amazon/vinyl-xml';
|
|
2
|
+
import type { Merged } from '@amazon/vinyl-xml';
|
|
3
|
+
import type { PlayreadyContentProtection } from '../xmlns/microsoft/playready';
|
|
4
|
+
import type { CencContentProtection } from '../xmlns/mpeg/cenc/2013';
|
|
5
|
+
import type { DashManifest, DescriptorType } from '../xmlns/mpeg/dash/schema/mpd/2011';
|
|
6
|
+
import type { DashProtections } from './ext/drm/contentProtection';
|
|
7
|
+
import type { OptionalDeep } from '@amazon/vinyl-util';
|
|
8
|
+
/**
|
|
9
|
+
* Creates a Dash Manifest parser with supported extensions.
|
|
10
|
+
*
|
|
11
|
+
* @module
|
|
12
|
+
*/
|
|
13
|
+
export type DashDrmManifest = Merged<DashManifest & DashProtections<ContentProtection>>;
|
|
14
|
+
export interface ContentProtection extends DescriptorType, CencContentProtection, PlayreadyContentProtection {
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Parses a Dash Manifest, according to the mpd:2011 schema.
|
|
18
|
+
* @see https://raw.githubusercontent.com/Dash-Industry-Forum/MPEG-Conformance-and-reference-source/master/conformance/MPDValidator/schemas/DASH-MPD.xsd
|
|
19
|
+
* @param manifest
|
|
20
|
+
*/
|
|
21
|
+
export declare function parseDashManifest(manifest: string): DashDrmManifest;
|
|
22
|
+
export declare function stringifyDashManifest(manifest: OptionalDeep<DashDrmManifest, ReservedXmlRuleKeys>): string;
|
|
23
|
+
//# sourceMappingURL=dashParser.d.ts.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export declare const ContentProtectionScheme: {
|
|
2
|
+
/**
|
|
3
|
+
* CENC protection scheme. (Should not be used to create a key session)
|
|
4
|
+
*/
|
|
5
|
+
readonly CENC: "urn:mpeg:dash:mp4protection:2011";
|
|
6
|
+
/**
|
|
7
|
+
* A simple, unencrypted content protection scheme. Not a full DRM solution.
|
|
8
|
+
*/
|
|
9
|
+
readonly CLEAR_KEY: "urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e";
|
|
10
|
+
/**
|
|
11
|
+
* Apple's FairPlay.
|
|
12
|
+
*/
|
|
13
|
+
readonly FAIR_PLAY: "urn:uuid:94ce86fb-07ff-4f43-adb8-93d2fa968ca2";
|
|
14
|
+
/**
|
|
15
|
+
* Open-standards community initiative by Marlin Developer Community.
|
|
16
|
+
*/
|
|
17
|
+
readonly MARLIN: "urn:uuid:5e629af5-38da-4063-8977-97ffbd9902d4";
|
|
18
|
+
/**
|
|
19
|
+
* Microsoft's PlayReady.
|
|
20
|
+
*/
|
|
21
|
+
readonly PLAY_READY: "urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95";
|
|
22
|
+
/**
|
|
23
|
+
* An old, unused PlayReady scheme id.
|
|
24
|
+
*/
|
|
25
|
+
readonly PLAY_READY_DEPRECATED: "urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95";
|
|
26
|
+
/**
|
|
27
|
+
* Google's Widevine.
|
|
28
|
+
*/
|
|
29
|
+
readonly WIDEVINE: "urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed";
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=ContentProtectionScheme.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { XmlRules } from '@amazon/vinyl-xml';
|
|
2
|
+
import type { CencContentProtection } from '../../../xmlns/mpeg/cenc/2013';
|
|
3
|
+
/**
|
|
4
|
+
* A parser for ContentProtection elements using the cenc namespace.
|
|
5
|
+
* @see https://github.com/sannies/rtp2dash/blob/master/src/main/resources/auxxsd/cenc.xsd
|
|
6
|
+
*/
|
|
7
|
+
export declare const cencXmlRules: XmlRules<CencContentProtection>;
|
|
8
|
+
//# sourceMappingURL=cencXmlRules.d.ts.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { XmlRules } from '@amazon/vinyl-xml';
|
|
2
|
+
/**
|
|
3
|
+
* ContentProtection extension point for Dash manifests.
|
|
4
|
+
*
|
|
5
|
+
* @module
|
|
6
|
+
*/
|
|
7
|
+
export interface WithProtections<T> {
|
|
8
|
+
readonly ContentProtection?: readonly T[];
|
|
9
|
+
}
|
|
10
|
+
export interface RepresentationTypeProtections<T> extends WithProtections<T> {
|
|
11
|
+
readonly SubRepresentation?: readonly WithProtections<T>[];
|
|
12
|
+
}
|
|
13
|
+
export interface AdaptationSetProtections<T> extends WithProtections<T> {
|
|
14
|
+
readonly Representation?: readonly RepresentationTypeProtections<T>[];
|
|
15
|
+
}
|
|
16
|
+
export interface PeriodProtections<T> {
|
|
17
|
+
readonly AdaptationSet?: readonly AdaptationSetProtections<T>[];
|
|
18
|
+
}
|
|
19
|
+
export interface MPDProtections<T> {
|
|
20
|
+
readonly Period: readonly PeriodProtections<T>[];
|
|
21
|
+
}
|
|
22
|
+
export interface DashProtections<T> {
|
|
23
|
+
readonly MPD: MPDProtections<T>;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Creates a dash extension for content protection parsing rules.
|
|
27
|
+
*
|
|
28
|
+
* @param contentProtectionRules Rules to be used when processing `ContentProtection` elements.
|
|
29
|
+
* @return Returns a rules map that should be merged with the dash manifest rules.
|
|
30
|
+
*/
|
|
31
|
+
export declare function createDashProtectionXmlRules<T extends object>(contentProtectionRules: XmlRules<T>): XmlRules<DashProtections<T>>;
|
|
32
|
+
//# sourceMappingURL=contentProtection.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A range of bytes, [from, to (optional, inclusive)].
|
|
3
|
+
*/
|
|
4
|
+
export type ByteRange = readonly [
|
|
5
|
+
number,
|
|
6
|
+
number | null
|
|
7
|
+
];
|
|
8
|
+
export declare function parseByteRange(str: string): ByteRange;
|
|
9
|
+
/**
|
|
10
|
+
* Returns the string representation of a {@link ByteRange} value.
|
|
11
|
+
*
|
|
12
|
+
* @param value
|
|
13
|
+
*/
|
|
14
|
+
export declare function stringifyByteRange(value: ByteRange): string;
|
|
15
|
+
//# sourceMappingURL=byteRange.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type FrameRate = readonly [
|
|
2
|
+
number,
|
|
3
|
+
number
|
|
4
|
+
];
|
|
5
|
+
/**
|
|
6
|
+
* Parses a string into a {@link FrameRate}
|
|
7
|
+
*
|
|
8
|
+
* @private
|
|
9
|
+
*/
|
|
10
|
+
export declare function parseFrameRate(str: string): FrameRate;
|
|
11
|
+
/**
|
|
12
|
+
* Returns the string representation of a {@link FrameRate} value.
|
|
13
|
+
*
|
|
14
|
+
* @param value
|
|
15
|
+
*/
|
|
16
|
+
export declare function stringifyFrameRate(value: FrameRate): string;
|
|
17
|
+
//# sourceMappingURL=frameRate.d.ts.map
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A numerator and denominator.
|
|
3
|
+
*/
|
|
4
|
+
export type Ratio = readonly [
|
|
5
|
+
number,
|
|
6
|
+
number
|
|
7
|
+
];
|
|
8
|
+
/**
|
|
9
|
+
* Parses a string representing a ratio into [number, number].
|
|
10
|
+
* The string must satisfy the pattern: `/^([0-9]*):([0-9]*)$/`
|
|
11
|
+
* Examples:
|
|
12
|
+
* ```
|
|
13
|
+
* parseRatio('4:3') // [4, 3]
|
|
14
|
+
* parseRatio('16:9') // [16, 9]
|
|
15
|
+
* parseRatio('2:') // [2, 1]
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* @private
|
|
19
|
+
*/
|
|
20
|
+
export declare function parseRatio(str: string): Ratio;
|
|
21
|
+
/**
|
|
22
|
+
* Returns the string representation of a {@link Ratio} value.
|
|
23
|
+
*
|
|
24
|
+
* @param value
|
|
25
|
+
*/
|
|
26
|
+
export declare function stringifyRatio(value: Ratio): string;
|
|
27
|
+
//# sourceMappingURL=ratio.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Base64BinaryType } from '@amazon/vinyl-xml';
|
|
2
|
+
/**
|
|
3
|
+
* Cenc content protection playready.
|
|
4
|
+
*
|
|
5
|
+
* @see https://learn.microsoft.com/en-us/playready/specifications/mpeg-dash-playready#21-dash-contentprotection-descriptor-elements
|
|
6
|
+
* @module
|
|
7
|
+
*/
|
|
8
|
+
export declare const PLAY_READY_NAMESPACE_URI = "urn:microsoft:playready";
|
|
9
|
+
export interface PlayreadyContentProtection {
|
|
10
|
+
readonly pro?: Base64BinaryType;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=playready.d.ts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Base64BinaryType } from '@amazon/vinyl-xml';
|
|
2
|
+
/**
|
|
3
|
+
* Cenc content protection xml types.
|
|
4
|
+
*
|
|
5
|
+
* @see https://github.com/sannies/rtp2dash/blob/master/src/main/resources/auxxsd/cenc.xsd
|
|
6
|
+
* @module
|
|
7
|
+
*/
|
|
8
|
+
export declare const CENC_NAMESPACE_URI = "urn:mpeg:cenc:2013";
|
|
9
|
+
/**
|
|
10
|
+
* A 128-bit integer written in canonical UUID notation.
|
|
11
|
+
* Must be in the form:
|
|
12
|
+
* `[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}`
|
|
13
|
+
*/
|
|
14
|
+
export type KeyIdType = string;
|
|
15
|
+
export interface CencContentProtection {
|
|
16
|
+
readonly default_KID?: readonly KeyIdType[];
|
|
17
|
+
readonly pssh?: Base64BinaryType;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=2013.d.ts.map
|