@svta/cml-drm 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/dist/cenc/findCencContentProtection.d.ts +14 -0
- package/dist/cenc/findCencContentProtection.d.ts.map +1 -0
- package/dist/cenc/findCencContentProtection.js +30 -0
- package/dist/cenc/findCencContentProtection.js.map +1 -0
- package/dist/cenc/getLicenseServerUrlFromContentProtection.d.ts +15 -0
- package/dist/cenc/getLicenseServerUrlFromContentProtection.d.ts.map +1 -0
- package/dist/cenc/getLicenseServerUrlFromContentProtection.js +17 -0
- package/dist/cenc/getLicenseServerUrlFromContentProtection.js.map +1 -0
- package/dist/cenc/getPsshData.d.ts +13 -0
- package/dist/cenc/getPsshData.d.ts.map +1 -0
- package/dist/cenc/getPsshData.js +24 -0
- package/dist/cenc/getPsshData.js.map +1 -0
- package/dist/cenc/getPsshForKeySystem.d.ts +15 -0
- package/dist/cenc/getPsshForKeySystem.d.ts.map +1 -0
- package/dist/cenc/getPsshForKeySystem.js +22 -0
- package/dist/cenc/getPsshForKeySystem.js.map +1 -0
- package/dist/cenc/parseInitDataFromContentProtection.d.ts +18 -0
- package/dist/cenc/parseInitDataFromContentProtection.d.ts.map +1 -0
- package/dist/cenc/parseInitDataFromContentProtection.js +21 -0
- package/dist/cenc/parseInitDataFromContentProtection.js.map +1 -0
- package/dist/cenc/parsePsshList.d.ts +16 -0
- package/dist/cenc/parsePsshList.d.ts.map +1 -0
- package/dist/cenc/parsePsshList.js +87 -0
- package/dist/cenc/parsePsshList.js.map +1 -0
- package/dist/common/CBCS.d.ts +8 -0
- package/dist/common/CBCS.d.ts.map +1 -0
- package/dist/common/CBCS.js +8 -0
- package/dist/common/CBCS.js.map +1 -0
- package/dist/common/CENC.d.ts +8 -0
- package/dist/common/CENC.d.ts.map +1 -0
- package/dist/common/CENC.js +8 -0
- package/dist/common/CENC.js.map +1 -0
- package/dist/common/CHALLENGE.d.ts +8 -0
- package/dist/common/CHALLENGE.d.ts.map +1 -0
- package/dist/common/CHALLENGE.js +8 -0
- package/dist/common/CHALLENGE.js.map +1 -0
- package/dist/common/CLEAR_KEY_SYSTEM.d.ts +8 -0
- package/dist/common/CLEAR_KEY_SYSTEM.d.ts.map +1 -0
- package/dist/common/CLEAR_KEY_SYSTEM.js +8 -0
- package/dist/common/CLEAR_KEY_SYSTEM.js.map +1 -0
- package/dist/common/CLEAR_KEY_UUID.d.ts +8 -0
- package/dist/common/CLEAR_KEY_UUID.d.ts.map +1 -0
- package/dist/common/CLEAR_KEY_UUID.js +8 -0
- package/dist/common/CLEAR_KEY_UUID.js.map +1 -0
- package/dist/common/CONTENT_TYPE.d.ts +8 -0
- package/dist/common/CONTENT_TYPE.d.ts.map +1 -0
- package/dist/common/CONTENT_TYPE.js +8 -0
- package/dist/common/CONTENT_TYPE.js.map +1 -0
- package/dist/common/ContentProtection.d.ts +12 -0
- package/dist/common/ContentProtection.d.ts.map +1 -0
- package/dist/common/ContentProtection.js +2 -0
- package/dist/common/ContentProtection.js.map +1 -0
- package/dist/common/EXPIRED.d.ts +8 -0
- package/dist/common/EXPIRED.d.ts.map +1 -0
- package/dist/common/EXPIRED.js +8 -0
- package/dist/common/EXPIRED.js.map +1 -0
- package/dist/common/EncryptionScheme.d.ts +21 -0
- package/dist/common/EncryptionScheme.d.ts.map +1 -0
- package/dist/common/EncryptionScheme.js +13 -0
- package/dist/common/EncryptionScheme.js.map +1 -0
- package/dist/common/FAIRPLAY_KEY_SYSTEM.d.ts +8 -0
- package/dist/common/FAIRPLAY_KEY_SYSTEM.d.ts.map +1 -0
- package/dist/common/FAIRPLAY_KEY_SYSTEM.js +8 -0
- package/dist/common/FAIRPLAY_KEY_SYSTEM.js.map +1 -0
- package/dist/common/FAIRPLAY_UUID.d.ts +8 -0
- package/dist/common/FAIRPLAY_UUID.d.ts.map +1 -0
- package/dist/common/FAIRPLAY_UUID.js +8 -0
- package/dist/common/FAIRPLAY_UUID.js.map +1 -0
- package/dist/common/HTTP_HEADERS.d.ts +8 -0
- package/dist/common/HTTP_HEADERS.d.ts.map +1 -0
- package/dist/common/HTTP_HEADERS.js +8 -0
- package/dist/common/HTTP_HEADERS.js.map +1 -0
- package/dist/common/HW_SECURE_ALL.d.ts +8 -0
- package/dist/common/HW_SECURE_ALL.d.ts.map +1 -0
- package/dist/common/HW_SECURE_ALL.js +8 -0
- package/dist/common/HW_SECURE_ALL.js.map +1 -0
- package/dist/common/HW_SECURE_CRYPTO.d.ts +8 -0
- package/dist/common/HW_SECURE_CRYPTO.d.ts.map +1 -0
- package/dist/common/HW_SECURE_CRYPTO.js +8 -0
- package/dist/common/HW_SECURE_CRYPTO.js.map +1 -0
- package/dist/common/HW_SECURE_DECODE.d.ts +8 -0
- package/dist/common/HW_SECURE_DECODE.d.ts.map +1 -0
- package/dist/common/HW_SECURE_DECODE.js +8 -0
- package/dist/common/HW_SECURE_DECODE.js.map +1 -0
- package/dist/common/INDIVIDUALIZATION_REQUEST.d.ts +8 -0
- package/dist/common/INDIVIDUALIZATION_REQUEST.d.ts.map +1 -0
- package/dist/common/INDIVIDUALIZATION_REQUEST.js +8 -0
- package/dist/common/INDIVIDUALIZATION_REQUEST.js.map +1 -0
- package/dist/common/INTERNAL_ERROR.d.ts +8 -0
- package/dist/common/INTERNAL_ERROR.d.ts.map +1 -0
- package/dist/common/INTERNAL_ERROR.js +8 -0
- package/dist/common/INTERNAL_ERROR.js.map +1 -0
- package/dist/common/InitializationDataType.d.ts +25 -0
- package/dist/common/InitializationDataType.d.ts.map +1 -0
- package/dist/common/InitializationDataType.js +17 -0
- package/dist/common/InitializationDataType.js.map +1 -0
- package/dist/common/KEYIDS.d.ts +8 -0
- package/dist/common/KEYIDS.d.ts.map +1 -0
- package/dist/common/KEYIDS.js +8 -0
- package/dist/common/KEYIDS.js.map +1 -0
- package/dist/common/LICENSE_ACQUISITION.d.ts +8 -0
- package/dist/common/LICENSE_ACQUISITION.d.ts.map +1 -0
- package/dist/common/LICENSE_ACQUISITION.js +8 -0
- package/dist/common/LICENSE_ACQUISITION.js.map +1 -0
- package/dist/common/LICENSE_RELEASE.d.ts +8 -0
- package/dist/common/LICENSE_RELEASE.d.ts.map +1 -0
- package/dist/common/LICENSE_RELEASE.js +8 -0
- package/dist/common/LICENSE_RELEASE.js.map +1 -0
- package/dist/common/LICENSE_RENEWAL.d.ts +8 -0
- package/dist/common/LICENSE_RENEWAL.d.ts.map +1 -0
- package/dist/common/LICENSE_RENEWAL.js +8 -0
- package/dist/common/LICENSE_RENEWAL.js.map +1 -0
- package/dist/common/LICENSE_REQUEST.d.ts +8 -0
- package/dist/common/LICENSE_REQUEST.d.ts.map +1 -0
- package/dist/common/LICENSE_REQUEST.js +8 -0
- package/dist/common/LICENSE_REQUEST.js.map +1 -0
- package/dist/common/LicenseRequest.d.ts +45 -0
- package/dist/common/LicenseRequest.d.ts.map +1 -0
- package/dist/common/LicenseRequest.js +2 -0
- package/dist/common/LicenseRequest.js.map +1 -0
- package/dist/common/MP4_PROTECTION_SCHEME.d.ts +7 -0
- package/dist/common/MP4_PROTECTION_SCHEME.d.ts.map +1 -0
- package/dist/common/MP4_PROTECTION_SCHEME.js +7 -0
- package/dist/common/MP4_PROTECTION_SCHEME.js.map +1 -0
- package/dist/common/MediaKeyMessageType.d.ts +25 -0
- package/dist/common/MediaKeyMessageType.d.ts.map +1 -0
- package/dist/common/MediaKeyMessageType.js +17 -0
- package/dist/common/MediaKeyMessageType.js.map +1 -0
- package/dist/common/MediaKeyStatus.d.ts +31 -0
- package/dist/common/MediaKeyStatus.d.ts.map +1 -0
- package/dist/common/MediaKeyStatus.js +23 -0
- package/dist/common/MediaKeyStatus.js.map +1 -0
- package/dist/common/MediaKeySystemAccessRequest.d.ts +11 -0
- package/dist/common/MediaKeySystemAccessRequest.d.ts.map +1 -0
- package/dist/common/MediaKeySystemAccessRequest.js +2 -0
- package/dist/common/MediaKeySystemAccessRequest.js.map +1 -0
- package/dist/common/OUTPUT_DOWNSCALED.d.ts +8 -0
- package/dist/common/OUTPUT_DOWNSCALED.d.ts.map +1 -0
- package/dist/common/OUTPUT_DOWNSCALED.js +8 -0
- package/dist/common/OUTPUT_DOWNSCALED.js.map +1 -0
- package/dist/common/OUTPUT_RESTRICTED.d.ts +8 -0
- package/dist/common/OUTPUT_RESTRICTED.d.ts.map +1 -0
- package/dist/common/OUTPUT_RESTRICTED.js +8 -0
- package/dist/common/OUTPUT_RESTRICTED.js.map +1 -0
- package/dist/common/PLAYREADY_KEY_MESSAGE.d.ts +8 -0
- package/dist/common/PLAYREADY_KEY_MESSAGE.d.ts.map +1 -0
- package/dist/common/PLAYREADY_KEY_MESSAGE.js +8 -0
- package/dist/common/PLAYREADY_KEY_MESSAGE.js.map +1 -0
- package/dist/common/PLAYREADY_KEY_SYSTEM.d.ts +8 -0
- package/dist/common/PLAYREADY_KEY_SYSTEM.d.ts.map +1 -0
- package/dist/common/PLAYREADY_KEY_SYSTEM.js +8 -0
- package/dist/common/PLAYREADY_KEY_SYSTEM.js.map +1 -0
- package/dist/common/PLAYREADY_RECOMMENDATION_KEY_SYSTEM.d.ts +8 -0
- package/dist/common/PLAYREADY_RECOMMENDATION_KEY_SYSTEM.d.ts.map +1 -0
- package/dist/common/PLAYREADY_RECOMMENDATION_KEY_SYSTEM.js +8 -0
- package/dist/common/PLAYREADY_RECOMMENDATION_KEY_SYSTEM.js.map +1 -0
- package/dist/common/PLAYREADY_UUID.d.ts +8 -0
- package/dist/common/PLAYREADY_UUID.d.ts.map +1 -0
- package/dist/common/PLAYREADY_UUID.js +8 -0
- package/dist/common/PLAYREADY_UUID.js.map +1 -0
- package/dist/common/RELEASED.d.ts +8 -0
- package/dist/common/RELEASED.d.ts.map +1 -0
- package/dist/common/RELEASED.js +8 -0
- package/dist/common/RELEASED.js.map +1 -0
- package/dist/common/STATUS_PENDING.d.ts +8 -0
- package/dist/common/STATUS_PENDING.d.ts.map +1 -0
- package/dist/common/STATUS_PENDING.js +8 -0
- package/dist/common/STATUS_PENDING.js.map +1 -0
- package/dist/common/SW_SECURE_CRYPTO.d.ts +8 -0
- package/dist/common/SW_SECURE_CRYPTO.d.ts.map +1 -0
- package/dist/common/SW_SECURE_CRYPTO.js +8 -0
- package/dist/common/SW_SECURE_CRYPTO.js.map +1 -0
- package/dist/common/SW_SECURE_DECODE.d.ts +8 -0
- package/dist/common/SW_SECURE_DECODE.d.ts.map +1 -0
- package/dist/common/SW_SECURE_DECODE.js +8 -0
- package/dist/common/SW_SECURE_DECODE.js.map +1 -0
- package/dist/common/TEXT_XML_UTF8.d.ts +8 -0
- package/dist/common/TEXT_XML_UTF8.d.ts.map +1 -0
- package/dist/common/TEXT_XML_UTF8.js +8 -0
- package/dist/common/TEXT_XML_UTF8.js.map +1 -0
- package/dist/common/USABLE.d.ts +8 -0
- package/dist/common/USABLE.d.ts.map +1 -0
- package/dist/common/USABLE.js +8 -0
- package/dist/common/USABLE.js.map +1 -0
- package/dist/common/W3C_CLEAR_KEY_UUID.d.ts +8 -0
- package/dist/common/W3C_CLEAR_KEY_UUID.d.ts.map +1 -0
- package/dist/common/W3C_CLEAR_KEY_UUID.js +8 -0
- package/dist/common/W3C_CLEAR_KEY_UUID.js.map +1 -0
- package/dist/common/WEBM.d.ts +8 -0
- package/dist/common/WEBM.d.ts.map +1 -0
- package/dist/common/WEBM.js +8 -0
- package/dist/common/WEBM.js.map +1 -0
- package/dist/common/WIDEVINE_KEY_SYSTEM.d.ts +8 -0
- package/dist/common/WIDEVINE_KEY_SYSTEM.d.ts.map +1 -0
- package/dist/common/WIDEVINE_KEY_SYSTEM.js +8 -0
- package/dist/common/WIDEVINE_KEY_SYSTEM.js.map +1 -0
- package/dist/common/WIDEVINE_UUID.d.ts +8 -0
- package/dist/common/WIDEVINE_UUID.d.ts.map +1 -0
- package/dist/common/WIDEVINE_UUID.js +8 -0
- package/dist/common/WIDEVINE_UUID.js.map +1 -0
- package/dist/common/WidevineRobustness.d.ts +27 -0
- package/dist/common/WidevineRobustness.d.ts.map +1 -0
- package/dist/common/WidevineRobustness.js +19 -0
- package/dist/common/WidevineRobustness.js.map +1 -0
- package/dist/fairplay/concatInitDataIdAndCertificate.d.ts +15 -0
- package/dist/fairplay/concatInitDataIdAndCertificate.d.ts.map +1 -0
- package/dist/fairplay/concatInitDataIdAndCertificate.js +33 -0
- package/dist/fairplay/concatInitDataIdAndCertificate.js.map +1 -0
- package/dist/fairplay/decodeFairPlayLicense.d.ts +13 -0
- package/dist/fairplay/decodeFairPlayLicense.d.ts.map +1 -0
- package/dist/fairplay/decodeFairPlayLicense.js +18 -0
- package/dist/fairplay/decodeFairPlayLicense.js.map +1 -0
- package/dist/fairplay/extractContentId.d.ts +14 -0
- package/dist/fairplay/extractContentId.d.ts.map +1 -0
- package/dist/fairplay/extractContentId.js +19 -0
- package/dist/fairplay/extractContentId.js.map +1 -0
- package/dist/fairplay/getId.d.ts +15 -0
- package/dist/fairplay/getId.d.ts.map +1 -0
- package/dist/fairplay/getId.js +27 -0
- package/dist/fairplay/getId.js.map +1 -0
- package/dist/fairplay/getLicenseServerUrl.d.ts +13 -0
- package/dist/fairplay/getLicenseServerUrl.d.ts.map +1 -0
- package/dist/fairplay/getLicenseServerUrl.js +22 -0
- package/dist/fairplay/getLicenseServerUrl.js.map +1 -0
- package/dist/index.d.ts +71 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +73 -0
- package/dist/index.js.map +1 -0
- package/dist/keysystem/createMediaKeySystemConfiguration.d.ts +14 -0
- package/dist/keysystem/createMediaKeySystemConfiguration.d.ts.map +1 -0
- package/dist/keysystem/createMediaKeySystemConfiguration.js +27 -0
- package/dist/keysystem/createMediaKeySystemConfiguration.js.map +1 -0
- package/dist/keysystem/getKeySystemAccess.d.ts +11 -0
- package/dist/keysystem/getKeySystemAccess.d.ts.map +1 -0
- package/dist/keysystem/getKeySystemAccess.js +20 -0
- package/dist/keysystem/getKeySystemAccess.js.map +1 -0
- package/dist/keysystem/getLegacyKeySystemAccess.d.ts +11 -0
- package/dist/keysystem/getLegacyKeySystemAccess.d.ts.map +1 -0
- package/dist/keysystem/getLegacyKeySystemAccess.js +24 -0
- package/dist/keysystem/getLegacyKeySystemAccess.js.map +1 -0
- package/dist/keysystem/getSupportedKeySystemConfiguration.d.ts +14 -0
- package/dist/keysystem/getSupportedKeySystemConfiguration.d.ts.map +1 -0
- package/dist/keysystem/getSupportedKeySystemConfiguration.js +28 -0
- package/dist/keysystem/getSupportedKeySystemConfiguration.js.map +1 -0
- package/dist/playready/getLicenseRequestFromMessage.d.ts +15 -0
- package/dist/playready/getLicenseRequestFromMessage.d.ts.map +1 -0
- package/dist/playready/getLicenseRequestFromMessage.js +41 -0
- package/dist/playready/getLicenseRequestFromMessage.js.map +1 -0
- package/dist/playready/getRequestHeadersFromMessage.d.ts +16 -0
- package/dist/playready/getRequestHeadersFromMessage.d.ts.map +1 -0
- package/dist/playready/getRequestHeadersFromMessage.js +52 -0
- package/dist/playready/getRequestHeadersFromMessage.js.map +1 -0
- package/dist/playready/toBigEndianKeyId.d.ts +13 -0
- package/dist/playready/toBigEndianKeyId.d.ts.map +1 -0
- package/dist/playready/toBigEndianKeyId.js +23 -0
- package/dist/playready/toBigEndianKeyId.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/tsdoc-metadata.json +11 -0
- package/package.json +79 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright 2023 Streaming Video Technology Alliance
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ContentProtection } from '../common/ContentProtection.js';
|
|
2
|
+
/**
|
|
3
|
+
* Finds and returns the ContentProtection element for MP4 Common Encryption.
|
|
4
|
+
*
|
|
5
|
+
* @param cpArray - Array of ContentProtection elements.
|
|
6
|
+
* @returns The Common Encryption content protection element, or null if not found.
|
|
7
|
+
*
|
|
8
|
+
* @beta
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* {@includeCode ../../test/cenc/findCencContentProtection.test.ts#example}
|
|
12
|
+
*/
|
|
13
|
+
export declare function findCencContentProtection(cpArray: ContentProtection[]): ContentProtection | null;
|
|
14
|
+
//# sourceMappingURL=findCencContentProtection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"findCencContentProtection.d.ts","sourceRoot":"","sources":["../../src/cenc/findCencContentProtection.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAGxE;;;;;;;;;;GAUG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,iBAAiB,EAAE,GAAG,iBAAiB,GAAG,IAAI,CAiBhG"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { CBCS } from '../common/CBCS.js';
|
|
2
|
+
import { CENC } from '../common/CENC.js';
|
|
3
|
+
import { MP4_PROTECTION_SCHEME } from '../common/MP4_PROTECTION_SCHEME.js';
|
|
4
|
+
/**
|
|
5
|
+
* Finds and returns the ContentProtection element for MP4 Common Encryption.
|
|
6
|
+
*
|
|
7
|
+
* @param cpArray - Array of ContentProtection elements.
|
|
8
|
+
* @returns The Common Encryption content protection element, or null if not found.
|
|
9
|
+
*
|
|
10
|
+
* @beta
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* {@includeCode ../../test/cenc/findCencContentProtection.test.ts#example}
|
|
14
|
+
*/
|
|
15
|
+
export function findCencContentProtection(cpArray) {
|
|
16
|
+
var _a;
|
|
17
|
+
if (!cpArray) {
|
|
18
|
+
return null;
|
|
19
|
+
}
|
|
20
|
+
for (const cp of cpArray) {
|
|
21
|
+
if (((_a = cp.schemeIdUri) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === MP4_PROTECTION_SCHEME &&
|
|
22
|
+
cp.value &&
|
|
23
|
+
(cp.value.toLowerCase() === CENC ||
|
|
24
|
+
cp.value.toLowerCase() === CBCS)) {
|
|
25
|
+
return cp;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=findCencContentProtection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"findCencContentProtection.js","sourceRoot":"","sources":["../../src/cenc/findCencContentProtection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAE3E;;;;;;;;;;GAUG;AACH,MAAM,UAAU,yBAAyB,CAAC,OAA4B;;IACrE,IAAI,CAAC,OAAO,EAAE,CAAC;QACd,OAAO,IAAI,CAAC;IACb,CAAC;IAED,KAAK,MAAM,EAAE,IAAI,OAAO,EAAE,CAAC;QAC1B,IACC,CAAA,MAAA,EAAE,CAAC,WAAW,0CAAE,WAAW,EAAE,MAAK,qBAAqB;YACvD,EAAE,CAAC,KAAK;YACR,CAAC,EAAE,CAAC,KAAK,CAAC,WAAW,EAAE,KAAK,IAAI;gBAC/B,EAAE,CAAC,KAAK,CAAC,WAAW,EAAE,KAAK,IAAI,CAAC,EAChC,CAAC;YACF,OAAO,EAAE,CAAC;QACX,CAAC;IACF,CAAC;IAED,OAAO,IAAI,CAAC;AACb,CAAC","sourcesContent":["import { CBCS } from '../common/CBCS.js';\nimport { CENC } from '../common/CENC.js';\nimport type { ContentProtection } from '../common/ContentProtection.js';\nimport { MP4_PROTECTION_SCHEME } from '../common/MP4_PROTECTION_SCHEME.js';\n\n/**\n * Finds and returns the ContentProtection element for MP4 Common Encryption.\n *\n * @param cpArray - Array of ContentProtection elements.\n * @returns The Common Encryption content protection element, or null if not found.\n *\n * @beta\n *\n * @example\n * {@includeCode ../../test/cenc/findCencContentProtection.test.ts#example}\n */\nexport function findCencContentProtection(cpArray: ContentProtection[]): ContentProtection | null {\n\tif (!cpArray) {\n\t\treturn null;\n\t}\n\n\tfor (const cp of cpArray) {\n\t\tif (\n\t\t\tcp.schemeIdUri?.toLowerCase() === MP4_PROTECTION_SCHEME &&\n\t\t\tcp.value &&\n\t\t\t(cp.value.toLowerCase() === CENC ||\n\t\t\t\tcp.value.toLowerCase() === CBCS)\n\t\t) {\n\t\t\treturn cp;\n\t\t}\n\t}\n\n\treturn null;\n}\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ContentProtection } from '../common/ContentProtection.js';
|
|
2
|
+
/**
|
|
3
|
+
* Extracts a license server URL from an array of ContentProtection elements.
|
|
4
|
+
*
|
|
5
|
+
* @param contentProtectionElements - Array of ContentProtection nodes from the manifest.
|
|
6
|
+
* @param schemeIdUri - schemeIdUri we are searching for.
|
|
7
|
+
* @returns The license server URL, and if not found then null.
|
|
8
|
+
*
|
|
9
|
+
* @beta
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* {@includeCode ../../test/cenc/getLicenseServerUrlFromContentProtection.test.ts#example}
|
|
13
|
+
*/
|
|
14
|
+
export declare function getLicenseServerUrlFromContentProtection(contentProtectionElements: ContentProtection[], schemeIdUri: string): string | null;
|
|
15
|
+
//# sourceMappingURL=getLicenseServerUrlFromContentProtection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getLicenseServerUrlFromContentProtection.d.ts","sourceRoot":"","sources":["../../src/cenc/getLicenseServerUrlFromContentProtection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAExE;;;;;;;;;;;GAWG;AACH,wBAAgB,wCAAwC,CACvD,yBAAyB,EAAE,iBAAiB,EAAE,EAC9C,WAAW,EAAE,MAAM,GACjB,MAAM,GAAG,IAAI,CAEf"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Extracts a license server URL from an array of ContentProtection elements.
|
|
3
|
+
*
|
|
4
|
+
* @param contentProtectionElements - Array of ContentProtection nodes from the manifest.
|
|
5
|
+
* @param schemeIdUri - schemeIdUri we are searching for.
|
|
6
|
+
* @returns The license server URL, and if not found then null.
|
|
7
|
+
*
|
|
8
|
+
* @beta
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* {@includeCode ../../test/cenc/getLicenseServerUrlFromContentProtection.test.ts#example}
|
|
12
|
+
*/
|
|
13
|
+
export function getLicenseServerUrlFromContentProtection(contentProtectionElements, schemeIdUri) {
|
|
14
|
+
var _a;
|
|
15
|
+
return ((_a = contentProtectionElements.find(cp => cp.schemeIdUri === schemeIdUri)) === null || _a === void 0 ? void 0 : _a.laUrl) || null;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=getLicenseServerUrlFromContentProtection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getLicenseServerUrlFromContentProtection.js","sourceRoot":"","sources":["../../src/cenc/getLicenseServerUrlFromContentProtection.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,wCAAwC,CACvD,yBAA8C,EAC9C,WAAmB;;IAEnB,OAAO,CAAA,MAAA,yBAAyB,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,WAAW,KAAK,WAAW,CAAC,0CAAE,KAAK,KAAI,IAAI,CAAC;AAC5F,CAAC","sourcesContent":["import type { ContentProtection } from '../common/ContentProtection.js';\n\n/**\n * Extracts a license server URL from an array of ContentProtection elements.\n *\n * @param contentProtectionElements - Array of ContentProtection nodes from the manifest.\n * @param schemeIdUri - schemeIdUri we are searching for.\n * @returns The license server URL, and if not found then null.\n *\n * @beta\n *\n * @example\n * {@includeCode ../../test/cenc/getLicenseServerUrlFromContentProtection.test.ts#example}\n */\nexport function getLicenseServerUrlFromContentProtection(\n\tcontentProtectionElements: ContentProtection[],\n\tschemeIdUri: string,\n): string | null {\n\treturn contentProtectionElements.find(cp => cp.schemeIdUri === schemeIdUri)?.laUrl || null;\n}\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns the data portion of a single PSSH box.
|
|
3
|
+
*
|
|
4
|
+
* @param pssh - The PSSH ArrayBuffer.
|
|
5
|
+
* @returns The data portion of the PSSH.
|
|
6
|
+
*
|
|
7
|
+
* @beta
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* {@includeCode ../../test/cenc/getPsshData.test.ts#example}
|
|
11
|
+
*/
|
|
12
|
+
export declare function getPsshData(pssh: ArrayBuffer): ArrayBuffer;
|
|
13
|
+
//# sourceMappingURL=getPsshData.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getPsshData.d.ts","sourceRoot":"","sources":["../../src/cenc/getPsshData.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,WAAW,GAAG,WAAW,CAc1D"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns the data portion of a single PSSH box.
|
|
3
|
+
*
|
|
4
|
+
* @param pssh - The PSSH ArrayBuffer.
|
|
5
|
+
* @returns The data portion of the PSSH.
|
|
6
|
+
*
|
|
7
|
+
* @beta
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* {@includeCode ../../test/cenc/getPsshData.test.ts#example}
|
|
11
|
+
*/
|
|
12
|
+
export function getPsshData(pssh) {
|
|
13
|
+
const offset = 8; // Box size and type fields
|
|
14
|
+
const view = new DataView(pssh);
|
|
15
|
+
const version = view.getUint8(offset); // Read version
|
|
16
|
+
let dataOffset = offset + 20;
|
|
17
|
+
if (version > 0) {
|
|
18
|
+
const kidCount = view.getUint32(dataOffset);
|
|
19
|
+
dataOffset += 4 + (16 * kidCount);
|
|
20
|
+
}
|
|
21
|
+
dataOffset += 4; // Data size
|
|
22
|
+
return pssh.slice(dataOffset);
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=getPsshData.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getPsshData.js","sourceRoot":"","sources":["../../src/cenc/getPsshData.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,MAAM,UAAU,WAAW,CAAC,IAAiB;IAC5C,MAAM,MAAM,GAAG,CAAC,CAAC,CAAC,2BAA2B;IAC7C,MAAM,IAAI,GAAG,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC;IAEhC,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,eAAe;IACtD,IAAI,UAAU,GAAG,MAAM,GAAG,EAAE,CAAC;IAE7B,IAAI,OAAO,GAAG,CAAC,EAAE,CAAC;QACjB,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QAC5C,UAAU,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,QAAQ,CAAC,CAAC;IACnC,CAAC;IAED,UAAU,IAAI,CAAC,CAAC,CAAC,YAAY;IAC7B,OAAO,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;AAC/B,CAAC","sourcesContent":["/**\n * Returns the data portion of a single PSSH box.\n *\n * @param pssh - The PSSH ArrayBuffer.\n * @returns The data portion of the PSSH.\n *\n * @beta\n *\n * @example\n * {@includeCode ../../test/cenc/getPsshData.test.ts#example}\n */\nexport function getPsshData(pssh: ArrayBuffer): ArrayBuffer {\n\tconst offset = 8; // Box size and type fields\n\tconst view = new DataView(pssh);\n\n\tconst version = view.getUint8(offset); // Read version\n\tlet dataOffset = offset + 20;\n\n\tif (version > 0) {\n\t\tconst kidCount = view.getUint32(dataOffset);\n\t\tdataOffset += 4 + (16 * kidCount);\n\t}\n\n\tdataOffset += 4; // Data size\n\treturn pssh.slice(dataOffset);\n}\n\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns the PSSH box associated with the given key system from the concatenated
|
|
3
|
+
* list of PSSH boxes in the provided initData.
|
|
4
|
+
*
|
|
5
|
+
* @param uuid - The desired key system UUID
|
|
6
|
+
* @param initData - 'cenc' initialization data. Concatenated list of PSSH boxes.
|
|
7
|
+
* @returns The PSSH box ArrayBuffer corresponding to the given key system, or null if not found.
|
|
8
|
+
*
|
|
9
|
+
* @beta
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* {@includeCode ../../test/cenc/getPsshForKeySystem.test.ts#example}
|
|
13
|
+
*/
|
|
14
|
+
export declare function getPsshForKeySystem(uuid: string, initData: ArrayBuffer): ArrayBuffer | null;
|
|
15
|
+
//# sourceMappingURL=getPsshForKeySystem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getPsshForKeySystem.d.ts","sourceRoot":"","sources":["../../src/cenc/getPsshForKeySystem.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CAClC,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,WAAW,GACnB,WAAW,GAAG,IAAI,CAOpB"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { parsePsshList } from './parsePsshList.js';
|
|
2
|
+
/**
|
|
3
|
+
* Returns the PSSH box associated with the given key system from the concatenated
|
|
4
|
+
* list of PSSH boxes in the provided initData.
|
|
5
|
+
*
|
|
6
|
+
* @param uuid - The desired key system UUID
|
|
7
|
+
* @param initData - 'cenc' initialization data. Concatenated list of PSSH boxes.
|
|
8
|
+
* @returns The PSSH box ArrayBuffer corresponding to the given key system, or null if not found.
|
|
9
|
+
*
|
|
10
|
+
* @beta
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* {@includeCode ../../test/cenc/getPsshForKeySystem.test.ts#example}
|
|
14
|
+
*/
|
|
15
|
+
export function getPsshForKeySystem(uuid, initData) {
|
|
16
|
+
if (!initData || !uuid) {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
const psshList = parsePsshList(initData);
|
|
20
|
+
return psshList[uuid.toLowerCase()] || null;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=getPsshForKeySystem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getPsshForKeySystem.js","sourceRoot":"","sources":["../../src/cenc/getPsshForKeySystem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,mBAAmB,CAClC,IAAY,EACZ,QAAqB;IAErB,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,EAAE,CAAC;QACxB,OAAO,IAAI,CAAC;IACb,CAAC;IAED,MAAM,QAAQ,GAAG,aAAa,CAAC,QAAQ,CAAC,CAAC;IACzC,OAAO,QAAQ,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,IAAI,IAAI,CAAC;AAC7C,CAAC","sourcesContent":["import { parsePsshList } from './parsePsshList.js';\n\n/**\n * Returns the PSSH box associated with the given key system from the concatenated\n * list of PSSH boxes in the provided initData.\n *\n * @param uuid - The desired key system UUID\n * @param initData - 'cenc' initialization data. Concatenated list of PSSH boxes.\n * @returns The PSSH box ArrayBuffer corresponding to the given key system, or null if not found.\n *\n * @beta\n *\n * @example\n * {@includeCode ../../test/cenc/getPsshForKeySystem.test.ts#example}\n */\nexport function getPsshForKeySystem(\n\tuuid: string,\n\tinitData: ArrayBuffer,\n): ArrayBuffer | null {\n\tif (!initData || !uuid) {\n\t\treturn null;\n\t}\n\n\tconst psshList = parsePsshList(initData);\n\treturn psshList[uuid.toLowerCase()] || null;\n}\n"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ContentProtection } from '../common/ContentProtection.js';
|
|
2
|
+
/**
|
|
3
|
+
* Parse a standard common encryption PSSH which contains a simple
|
|
4
|
+
* base64-encoding of the init data
|
|
5
|
+
*
|
|
6
|
+
* @param cpData - The ContentProtection element that may contain PSSH data.
|
|
7
|
+
* @param BASE64 - The BASE64 reference.
|
|
8
|
+
* @returns init data as an ArrayBuffer, or null if not found.
|
|
9
|
+
*
|
|
10
|
+
* @beta
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* {@includeCode ../../test/cenc/parseInitDataFromContentProtection.test.ts#example}
|
|
14
|
+
*/
|
|
15
|
+
export declare function parseInitDataFromContentProtection(cpData: ContentProtection, BASE64: {
|
|
16
|
+
decodeArray: (input: string) => Uint8Array;
|
|
17
|
+
}): ArrayBuffer | null;
|
|
18
|
+
//# sourceMappingURL=parseInitDataFromContentProtection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseInitDataFromContentProtection.d.ts","sourceRoot":"","sources":["../../src/cenc/parseInitDataFromContentProtection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAExE;;;;;;;;;;;;GAYG;AACH,wBAAgB,kCAAkC,CACjD,MAAM,EAAE,iBAAiB,EACzB,MAAM,EAAE;IAAE,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,UAAU,CAAA;CAAE,GACpD,WAAW,GAAG,IAAI,CAOpB"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parse a standard common encryption PSSH which contains a simple
|
|
3
|
+
* base64-encoding of the init data
|
|
4
|
+
*
|
|
5
|
+
* @param cpData - The ContentProtection element that may contain PSSH data.
|
|
6
|
+
* @param BASE64 - The BASE64 reference.
|
|
7
|
+
* @returns init data as an ArrayBuffer, or null if not found.
|
|
8
|
+
*
|
|
9
|
+
* @beta
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* {@includeCode ../../test/cenc/parseInitDataFromContentProtection.test.ts#example}
|
|
13
|
+
*/
|
|
14
|
+
export function parseInitDataFromContentProtection(cpData, BASE64) {
|
|
15
|
+
if ((cpData === null || cpData === void 0 ? void 0 : cpData.pssh) && cpData.pssh) {
|
|
16
|
+
const cleanedText = cpData.pssh.replace(/\r?\n|\r/g, '').replace(/\s+/g, '');
|
|
17
|
+
return BASE64.decodeArray(cleanedText).buffer;
|
|
18
|
+
}
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=parseInitDataFromContentProtection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseInitDataFromContentProtection.js","sourceRoot":"","sources":["../../src/cenc/parseInitDataFromContentProtection.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,kCAAkC,CACjD,MAAyB,EACzB,MAAsD;IAEtD,IAAI,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,KAAI,MAAM,CAAC,IAAI,EAAE,CAAC;QACjC,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QAC7E,OAAO,MAAM,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,MAAqB,CAAC;IAC9D,CAAC;IAED,OAAO,IAAI,CAAC;AACb,CAAC","sourcesContent":["import type { ContentProtection } from '../common/ContentProtection.js';\n\n/**\n * Parse a standard common encryption PSSH which contains a simple\n * base64-encoding of the init data\n *\n * @param cpData - The ContentProtection element that may contain PSSH data.\n * @param BASE64 - The BASE64 reference.\n * @returns init data as an ArrayBuffer, or null if not found.\n *\n * @beta\n *\n * @example\n * {@includeCode ../../test/cenc/parseInitDataFromContentProtection.test.ts#example}\n */\nexport function parseInitDataFromContentProtection(\n\tcpData: ContentProtection,\n\tBASE64: { decodeArray: (input: string) => Uint8Array },\n): ArrayBuffer | null {\n\tif (cpData?.pssh && cpData.pssh) {\n\t\tconst cleanedText = cpData.pssh.replace(/\\r?\\n|\\r/g, '').replace(/\\s+/g, '');\n\t\treturn BASE64.decodeArray(cleanedText).buffer as ArrayBuffer;\n\t}\n\n\treturn null;\n}\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parses a list of PSSH boxes into keysystem-specific PSSH data.
|
|
3
|
+
*
|
|
4
|
+
* @param data - The concatenated list of PSSH boxes as provided by
|
|
5
|
+
* the CDM as initialization data when CommonEncryption content is detected
|
|
6
|
+
* @returns An object that has a property named according to each of
|
|
7
|
+
* the detected key system UUIDs (e.g. 00000000-0000-0000-0000-0000000000)
|
|
8
|
+
* and a ArrayBuffer (the entire PSSH box) as the property value
|
|
9
|
+
*
|
|
10
|
+
* @beta
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* {@includeCode ../../test/cenc/parsePsshList.test.ts#example}
|
|
14
|
+
*/
|
|
15
|
+
export declare function parsePsshList(data: ArrayBuffer): Record<string, ArrayBuffer>;
|
|
16
|
+
//# sourceMappingURL=parsePsshList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parsePsshList.d.ts","sourceRoot":"","sources":["../../src/cenc/parsePsshList.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAyF5E"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parses a list of PSSH boxes into keysystem-specific PSSH data.
|
|
3
|
+
*
|
|
4
|
+
* @param data - The concatenated list of PSSH boxes as provided by
|
|
5
|
+
* the CDM as initialization data when CommonEncryption content is detected
|
|
6
|
+
* @returns An object that has a property named according to each of
|
|
7
|
+
* the detected key system UUIDs (e.g. 00000000-0000-0000-0000-0000000000)
|
|
8
|
+
* and a ArrayBuffer (the entire PSSH box) as the property value
|
|
9
|
+
*
|
|
10
|
+
* @beta
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* {@includeCode ../../test/cenc/parsePsshList.test.ts#example}
|
|
14
|
+
*/
|
|
15
|
+
export function parsePsshList(data) {
|
|
16
|
+
if (!data) {
|
|
17
|
+
return {};
|
|
18
|
+
}
|
|
19
|
+
// data.buffer first for Uint8Array support
|
|
20
|
+
const dv = new DataView(data instanceof ArrayBuffer ? data : data.buffer);
|
|
21
|
+
const pssh = {};
|
|
22
|
+
let byteCursor = 0;
|
|
23
|
+
while (true) {
|
|
24
|
+
if (byteCursor >= dv.byteLength) {
|
|
25
|
+
break;
|
|
26
|
+
}
|
|
27
|
+
const boxStart = byteCursor;
|
|
28
|
+
// Box size
|
|
29
|
+
const size = dv.getUint32(byteCursor);
|
|
30
|
+
const nextBox = byteCursor + size;
|
|
31
|
+
byteCursor += 4;
|
|
32
|
+
// Verify PSSH
|
|
33
|
+
if (dv.getUint32(byteCursor) !== 0x70737368) {
|
|
34
|
+
byteCursor = nextBox;
|
|
35
|
+
continue;
|
|
36
|
+
}
|
|
37
|
+
byteCursor += 4;
|
|
38
|
+
// Version must be 0 or 1
|
|
39
|
+
const version = dv.getUint8(byteCursor);
|
|
40
|
+
if (version !== 0 && version !== 1) {
|
|
41
|
+
byteCursor = nextBox;
|
|
42
|
+
continue;
|
|
43
|
+
}
|
|
44
|
+
byteCursor += 1; // Move past version
|
|
45
|
+
byteCursor += 3; // Skip flags
|
|
46
|
+
// 16-byte UUID/SystemID
|
|
47
|
+
let systemID = '';
|
|
48
|
+
let val;
|
|
49
|
+
for (let i = 0; i < 4; i++) {
|
|
50
|
+
val = dv.getUint8(byteCursor + i).toString(16);
|
|
51
|
+
systemID += val.length === 1 ? '0' + val : val;
|
|
52
|
+
}
|
|
53
|
+
byteCursor += 4;
|
|
54
|
+
systemID += '-';
|
|
55
|
+
for (let i = 0; i < 2; i++) {
|
|
56
|
+
val = dv.getUint8(byteCursor + i).toString(16);
|
|
57
|
+
systemID += val.length === 1 ? '0' + val : val;
|
|
58
|
+
}
|
|
59
|
+
byteCursor += 2;
|
|
60
|
+
systemID += '-';
|
|
61
|
+
for (let i = 0; i < 2; i++) {
|
|
62
|
+
val = dv.getUint8(byteCursor + i).toString(16);
|
|
63
|
+
systemID += val.length === 1 ? '0' + val : val;
|
|
64
|
+
}
|
|
65
|
+
byteCursor += 2;
|
|
66
|
+
systemID += '-';
|
|
67
|
+
for (let i = 0; i < 2; i++) {
|
|
68
|
+
val = dv.getUint8(byteCursor + i).toString(16);
|
|
69
|
+
systemID += val.length === 1 ? '0' + val : val;
|
|
70
|
+
}
|
|
71
|
+
byteCursor += 2;
|
|
72
|
+
systemID += '-';
|
|
73
|
+
for (let i = 0; i < 6; i++) {
|
|
74
|
+
val = dv.getUint8(byteCursor + i).toString(16);
|
|
75
|
+
systemID += val.length === 1 ? '0' + val : val;
|
|
76
|
+
}
|
|
77
|
+
byteCursor += 6;
|
|
78
|
+
systemID = systemID.toLowerCase();
|
|
79
|
+
// PSSH Data Size
|
|
80
|
+
byteCursor += 4;
|
|
81
|
+
// PSSH boxdata
|
|
82
|
+
pssh[systemID] = data.slice(boxStart, nextBox);
|
|
83
|
+
byteCursor = nextBox;
|
|
84
|
+
}
|
|
85
|
+
return pssh;
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=parsePsshList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parsePsshList.js","sourceRoot":"","sources":["../../src/cenc/parsePsshList.ts"],"names":[],"mappings":"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","sourcesContent":["/**\n * Parses a list of PSSH boxes into keysystem-specific PSSH data.\n *\n * @param data - The concatenated list of PSSH boxes as provided by\n * the CDM as initialization data when CommonEncryption content is detected\n * @returns An object that has a property named according to each of\n * the detected key system UUIDs (e.g. 00000000-0000-0000-0000-0000000000)\n * and a ArrayBuffer (the entire PSSH box) as the property value\n *\n * @beta\n *\n * @example\n * {@includeCode ../../test/cenc/parsePsshList.test.ts#example}\n */\nexport function parsePsshList(data: ArrayBuffer): Record<string, ArrayBuffer> {\n\tif (!data) {\n\t\treturn {};\n\t}\n\n\t// data.buffer first for Uint8Array support\n\tconst dv = new DataView(data instanceof ArrayBuffer ? data : (data as Uint8Array).buffer);\n\tconst pssh: Record<string, ArrayBuffer> = {};\n\tlet byteCursor = 0;\n\n\twhile (true) {\n\t\tif (byteCursor >= dv.byteLength) {\n\t\t\tbreak;\n\t\t}\n\n\t\tconst boxStart = byteCursor;\n\n\t\t// Box size\n\t\tconst size = dv.getUint32(byteCursor);\n\t\tconst nextBox = byteCursor + size;\n\t\tbyteCursor += 4;\n\n\t\t// Verify PSSH\n\t\tif (dv.getUint32(byteCursor) !== 0x70737368) {\n\t\t\tbyteCursor = nextBox;\n\t\t\tcontinue;\n\t\t}\n\t\tbyteCursor += 4;\n\n\t\t// Version must be 0 or 1\n\t\tconst version = dv.getUint8(byteCursor);\n\t\tif (version !== 0 && version !== 1) {\n\t\t\tbyteCursor = nextBox;\n\t\t\tcontinue;\n\t\t}\n\n\t\tbyteCursor += 1; // Move past version\n\t\tbyteCursor += 3; // Skip flags\n\n\t\t// 16-byte UUID/SystemID\n\t\tlet systemID = '';\n\t\tlet val: string;\n\n\t\tfor (let i = 0; i < 4; i++) {\n\t\t\tval = dv.getUint8(byteCursor + i).toString(16);\n\t\t\tsystemID += val.length === 1 ? '0' + val : val;\n\t\t}\n\t\tbyteCursor += 4;\n\t\tsystemID += '-';\n\n\t\tfor (let i = 0; i < 2; i++) {\n\t\t\tval = dv.getUint8(byteCursor + i).toString(16);\n\t\t\tsystemID += val.length === 1 ? '0' + val : val;\n\t\t}\n\t\tbyteCursor += 2;\n\t\tsystemID += '-';\n\n\t\tfor (let i = 0; i < 2; i++) {\n\t\t\tval = dv.getUint8(byteCursor + i).toString(16);\n\t\t\tsystemID += val.length === 1 ? '0' + val : val;\n\t\t}\n\t\tbyteCursor += 2;\n\t\tsystemID += '-';\n\n\t\tfor (let i = 0; i < 2; i++) {\n\t\t\tval = dv.getUint8(byteCursor + i).toString(16);\n\t\t\tsystemID += val.length === 1 ? '0' + val : val;\n\t\t}\n\t\tbyteCursor += 2;\n\t\tsystemID += '-';\n\n\t\tfor (let i = 0; i < 6; i++) {\n\t\t\tval = dv.getUint8(byteCursor + i).toString(16);\n\t\t\tsystemID += val.length === 1 ? '0' + val : val;\n\t\t}\n\t\tbyteCursor += 6;\n\n\t\tsystemID = systemID.toLowerCase();\n\n\t\t// PSSH Data Size\n\t\tbyteCursor += 4;\n\n\t\t// PSSH boxdata\n\t\tpssh[systemID] = data.slice(boxStart, nextBox);\n\n\t\tbyteCursor = nextBox;\n\t}\n\n\treturn pssh;\n}\n\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CBCS.d.ts","sourceRoot":"","sources":["../../src/common/CBCS.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,IAAI,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CBCS.js","sourceRoot":"","sources":["../../src/common/CBCS.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,MAAM,CAAC","sourcesContent":["/**\n * Cipher Block Chaining Sample encryption scheme.\n *\n *\n * @beta\n */\nexport const CBCS = 'cbcs';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CENC.d.ts","sourceRoot":"","sources":["../../src/common/CENC.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,IAAI,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CENC.js","sourceRoot":"","sources":["../../src/common/CENC.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,MAAM,CAAC","sourcesContent":["/**\n * Common Encryption scheme.\n *\n *\n * @beta\n */\nexport const CENC = 'cenc';\n"]}
|