@svta/cml-drm 1.1.11 → 1.1.12

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/index.d.ts CHANGED
@@ -1,12 +1,10 @@
1
1
  import { Encoding, UTF_16, UTF_8, ValueOf } from "@svta/cml-utils";
2
-
3
2
  //#region src/common/ContentProtection.d.ts
4
-
5
3
  /**
6
- * Represents a ContentProtection element in DASH manifest.
7
- *
8
- * @public
9
- */
4
+ * Represents a ContentProtection element in DASH manifest.
5
+ *
6
+ * @public
7
+ */
10
8
  type ContentProtection = {
11
9
  schemeIdUri?: string;
12
10
  value?: string;
@@ -16,121 +14,131 @@ type ContentProtection = {
16
14
  //#endregion
17
15
  //#region src/cenc/findCencContentProtection.d.ts
18
16
  /**
19
- * Finds and returns the ContentProtection element for MP4 Common Encryption.
20
- *
21
- * @param cpArray - Array of ContentProtection elements.
22
- * @returns The Common Encryption content protection element, or null if not found.
23
- *
24
- * @public
25
- *
26
- * @example
27
- * {@includeCode ../../test/cenc/findCencContentProtection.test.ts#example}
28
- */
29
- declare function findCencContentProtection(cpArray: ContentProtection[]): ContentProtection | null;
17
+ * Finds and returns the ContentProtection element for MP4 Common Encryption.
18
+ *
19
+ * @param cpArray - Array of ContentProtection elements.
20
+ * @returns The Common Encryption content protection element, or null if not found.
21
+ *
22
+ * @public
23
+ *
24
+ * @example
25
+ * {@includeCode ../../test/cenc/findCencContentProtection.test.ts#example}
26
+ */
27
+ export declare function findCencContentProtection(cpArray: ContentProtection[]): ContentProtection | null;
30
28
  //#endregion
31
29
  //#region src/cenc/getLicenseServerUrlFromContentProtection.d.ts
32
30
  /**
33
- * Extracts a license server URL from an array of ContentProtection elements.
34
- *
35
- * @param contentProtectionElements - Array of ContentProtection nodes from the manifest.
36
- * @param schemeIdUri - schemeIdUri we are searching for.
37
- * @returns The license server URL, and if not found then null.
38
- *
39
- * @public
40
- *
41
- * @example
42
- * {@includeCode ../../test/cenc/getLicenseServerUrlFromContentProtection.test.ts#example}
43
- */
44
- declare function getLicenseServerUrlFromContentProtection(contentProtectionElements: ContentProtection[], schemeIdUri: string): string | null;
31
+ * Extracts a license server URL from an array of ContentProtection elements.
32
+ *
33
+ * @param contentProtectionElements - Array of ContentProtection nodes from the manifest.
34
+ * @param schemeIdUri - schemeIdUri we are searching for.
35
+ * @returns The license server URL, and if not found then null.
36
+ *
37
+ * @public
38
+ *
39
+ * @example
40
+ * {@includeCode ../../test/cenc/getLicenseServerUrlFromContentProtection.test.ts#example}
41
+ */
42
+ export declare function getLicenseServerUrlFromContentProtection(contentProtectionElements: ContentProtection[], schemeIdUri: string): string | null;
45
43
  //#endregion
46
44
  //#region src/cenc/getPsshData.d.ts
47
45
  /**
48
- * Returns the data portion of a single PSSH box.
49
- *
50
- * @param pssh - The PSSH ArrayBuffer.
51
- * @returns The data portion of the PSSH.
52
- *
53
- * @public
54
- *
55
- * @example
56
- * {@includeCode ../../test/cenc/getPsshData.test.ts#example}
57
- */
58
- declare function getPsshData(pssh: ArrayBufferLike): ArrayBufferLike;
46
+ * Returns the data portion of a single PSSH box.
47
+ *
48
+ * @param pssh - The PSSH ArrayBuffer.
49
+ * @returns The data portion of the PSSH.
50
+ *
51
+ * @public
52
+ *
53
+ * @example
54
+ * {@includeCode ../../test/cenc/getPsshData.test.ts#example}
55
+ */
56
+ export declare function getPsshData(pssh: ArrayBufferLike): ArrayBufferLike;
59
57
  //#endregion
60
58
  //#region src/cenc/getPsshForKeySystem.d.ts
61
59
  /**
62
- * Returns the PSSH box associated with the given key system from the concatenated
63
- * list of PSSH boxes in the provided initData.
64
- *
65
- * @param uuid - The desired key system UUID
66
- * @param initData - 'cenc' initialization data. Concatenated list of PSSH boxes.
67
- * @returns The PSSH box ArrayBuffer corresponding to the given key system, or null if not found.
68
- *
69
- * @public
70
- *
71
- * @example
72
- * {@includeCode ../../test/cenc/getPsshForKeySystem.test.ts#example}
73
- */
74
- declare function getPsshForKeySystem(uuid: string, initData: ArrayBufferLike): ArrayBufferLike | null;
60
+ * Returns the PSSH box associated with the given key system from the concatenated
61
+ * list of PSSH boxes in the provided initData.
62
+ *
63
+ * @param uuid - The desired key system UUID
64
+ * @param initData - 'cenc' initialization data. Concatenated list of PSSH boxes.
65
+ * @returns The PSSH box ArrayBuffer corresponding to the given key system, or null if not found.
66
+ *
67
+ * @public
68
+ *
69
+ * @example
70
+ * {@includeCode ../../test/cenc/getPsshForKeySystem.test.ts#example}
71
+ */
72
+ export declare function getPsshForKeySystem(uuid: string, initData: ArrayBufferLike): ArrayBufferLike | null;
75
73
  //#endregion
76
74
  //#region src/cenc/parseInitDataFromContentProtection.d.ts
77
75
  /**
78
- * Parse a standard common encryption PSSH which contains a simple
79
- * base64-encoding of the init data
80
- *
81
- * @param cpData - The ContentProtection element that may contain PSSH data.
82
- * @param BASE64 - The BASE64 reference.
83
- * @returns init data as an ArrayBuffer, or null if not found.
84
- *
85
- * @public
86
- *
87
- * @example
88
- * {@includeCode ../../test/cenc/parseInitDataFromContentProtection.test.ts#example}
89
- */
90
- declare function parseInitDataFromContentProtection(cpData: ContentProtection, BASE64: {
76
+ * Parse a standard common encryption PSSH which contains a simple
77
+ * base64-encoding of the init data
78
+ *
79
+ * @param cpData - The ContentProtection element that may contain PSSH data.
80
+ * @param BASE64 - The BASE64 reference.
81
+ * @returns init data as an ArrayBuffer, or null if not found.
82
+ *
83
+ * @public
84
+ *
85
+ * @example
86
+ * {@includeCode ../../test/cenc/parseInitDataFromContentProtection.test.ts#example}
87
+ */
88
+ export declare function parseInitDataFromContentProtection(cpData: ContentProtection, BASE64: {
91
89
  decodeArray: (input: string) => Uint8Array;
92
90
  }): ArrayBuffer | null;
93
91
  //#endregion
94
92
  //#region src/cenc/parsePsshList.d.ts
95
93
  /**
96
- * Parses a list of PSSH boxes into keysystem-specific PSSH data.
97
- *
98
- * @param data - The concatenated list of PSSH boxes as provided by
99
- * the CDM as initialization data when CommonEncryption content is detected
100
- * @returns An object that has a property named according to each of
101
- * the detected key system UUIDs (e.g. 00000000-0000-0000-0000-0000000000)
102
- * and a ArrayBuffer (the entire PSSH box) as the property value
103
- *
104
- * @public
105
- *
106
- * @example
107
- * {@includeCode ../../test/cenc/parsePsshList.test.ts#example}
108
- */
109
- declare function parsePsshList(data: ArrayBufferLike): Record<string, ArrayBufferLike>;
110
- declare function parsePsshList(data: Uint8Array): Record<string, Uint8Array>;
94
+ * Parses a list of PSSH boxes into keysystem-specific PSSH data.
95
+ *
96
+ * @param data - The concatenated list of PSSH boxes as provided by
97
+ * the CDM as initialization data when CommonEncryption content is detected
98
+ * @returns An object that has a property named according to each of
99
+ * the detected key system UUIDs (e.g. 00000000-0000-0000-0000-0000000000)
100
+ * and a ArrayBuffer (the entire PSSH box) as the property value
101
+ *
102
+ * @public
103
+ *
104
+ * @example
105
+ * {@includeCode ../../test/cenc/parsePsshList.test.ts#example}
106
+ */
107
+ export declare function parsePsshList(data: ArrayBufferLike): Record<string, ArrayBufferLike>;
108
+ /**
109
+ * Parses a list of PSSH boxes into keysystem-specific PSSH data.
110
+ *
111
+ * @param data - The concatenated list of PSSH boxes as a `Uint8Array`.
112
+ * @returns An object that has a property named according to each of
113
+ * the detected key system UUIDs and a `Uint8Array` (the entire PSSH box)
114
+ * as the property value
115
+ *
116
+ * @public
117
+ */
118
+ export declare function parsePsshList(data: Uint8Array): Record<string, Uint8Array>;
111
119
  //#endregion
112
120
  //#region src/keysystem/createMediaKeySystemConfiguration.d.ts
113
121
  /**
114
- * Creates a valid KeySystemConfiguration from supported audio and video capabilities.
115
- *
116
- * @param supportedAudio - supported audio capabilities.
117
- * @param supportedVideo - supported video capabilities.
118
- * @returns KeySystemConfiguration object.
119
- *
120
- * @public
121
- *
122
- * @example
123
- * {@includeCode ../../test/keysystem/createMediaKeySystemConfiguration.test.ts#example}
124
- */
125
- declare function createMediaKeySystemConfiguration(supportedAudio: MediaKeySystemMediaCapability[] | null, supportedVideo: MediaKeySystemMediaCapability[] | null): MediaKeySystemConfiguration;
122
+ * Creates a valid KeySystemConfiguration from supported audio and video capabilities.
123
+ *
124
+ * @param supportedAudio - supported audio capabilities.
125
+ * @param supportedVideo - supported video capabilities.
126
+ * @returns KeySystemConfiguration object.
127
+ *
128
+ * @public
129
+ *
130
+ * @example
131
+ * {@includeCode ../../test/keysystem/createMediaKeySystemConfiguration.test.ts#example}
132
+ */
133
+ export declare function createMediaKeySystemConfiguration(supportedAudio: MediaKeySystemMediaCapability[] | null, supportedVideo: MediaKeySystemMediaCapability[] | null): MediaKeySystemConfiguration;
126
134
  //#endregion
127
135
  //#region src/common/MediaKeySystemAccessRequest.d.ts
128
136
  /**
129
- * Represents a valid key system for given piece of content and key system requirements.
130
- * Used to initialize license acquisition operations.
131
- *
132
- * @public
133
- */
137
+ * Represents a valid key system for given piece of content and key system requirements.
138
+ * Used to initialize license acquisition operations.
139
+ *
140
+ * @public
141
+ */
134
142
  type MediaKeySystemAccessRequest = {
135
143
  keySystem: string;
136
144
  configurations: MediaKeySystemConfiguration[];
@@ -138,414 +146,414 @@ type MediaKeySystemAccessRequest = {
138
146
  //#endregion
139
147
  //#region src/keysystem/getKeySystemAccess.d.ts
140
148
  /**
141
- * Attempts to get key system access using requestMediaKeySystemAccess from EME.
142
- *
143
- * @param requests - An array of key system access requests.
144
- * @returns MediaKeySystemAccess object if successful, or null if no system is supported.
145
- *
146
- * @public
147
- */
148
- declare function getKeySystemAccess(requests: MediaKeySystemAccessRequest[]): Promise<MediaKeySystemAccess | null>;
149
+ * Attempts to get key system access using requestMediaKeySystemAccess from EME.
150
+ *
151
+ * @param requests - An array of key system access requests.
152
+ * @returns MediaKeySystemAccess object if successful, or null if no system is supported.
153
+ *
154
+ * @public
155
+ */
156
+ export declare function getKeySystemAccess(requests: MediaKeySystemAccessRequest[]): Promise<MediaKeySystemAccess | null>;
149
157
  //#endregion
150
158
  //#region src/keysystem/getLegacyKeySystemAccess.d.ts
151
159
  /**
152
- * Fallback method to get key system access using legacy MediaKeys.isTypeSupported().
153
- *
154
- * @param requests - An array of key system access requests.
155
- * @returns A KeySystemAccess object if successful, or null if no system is supported.
156
- *
157
- * @public
158
- */
159
- declare function getLegacyKeySystemAccess(requests: MediaKeySystemAccessRequest[]): MediaKeySystemAccessRequest | null;
160
+ * Fallback method to get key system access using legacy MediaKeys.isTypeSupported().
161
+ *
162
+ * @param requests - An array of key system access requests.
163
+ * @returns A KeySystemAccess object if successful, or null if no system is supported.
164
+ *
165
+ * @public
166
+ */
167
+ export declare function getLegacyKeySystemAccess(requests: MediaKeySystemAccessRequest[]): MediaKeySystemAccessRequest | null;
160
168
  //#endregion
161
169
  //#region src/keysystem/getSupportedKeySystemConfiguration.d.ts
162
170
  /**
163
- * Filters and returns the supported key system configuration for a given system string.
164
- *
165
- * @param keySystem - Key system string such as 'com.widevine.alpha'
166
- * @param configs - An array of key system configurations.
167
- * @returns The first supported configuration or null if none are supported.
168
- *
169
- * @public
170
- */
171
- declare function getSupportedKeySystemConfiguration(keySystem: string, configs: Iterable<MediaKeySystemConfiguration>): {
171
+ * Filters and returns the supported key system configuration for a given system string.
172
+ *
173
+ * @param keySystem - Key system string such as 'com.widevine.alpha'
174
+ * @param configs - An array of key system configurations.
175
+ * @returns The first supported configuration or null if none are supported.
176
+ *
177
+ * @public
178
+ */
179
+ export declare function getSupportedKeySystemConfiguration(keySystem: string, configs: Iterable<MediaKeySystemConfiguration>): {
172
180
  supportedAudio: MediaKeySystemMediaCapability[];
173
181
  supportedVideo: MediaKeySystemMediaCapability[];
174
182
  };
175
183
  //#endregion
176
184
  //#region src/fairplay/concatInitDataIdAndCertificate.d.ts
177
185
  /**
178
- * Concatenates InitData, ID, and Certificate for FairPlay DRM.
179
- *
180
- * @param initData - The initialization data (PSSH box)
181
- * @param id - The content ID (string or Uint16Array)
182
- * @param cert - The application certificate (Uint8Array)
183
- * @returns A Uint8Array containing the concatenated data
184
- *
185
- * @public
186
- *
187
- * @example
188
- * {@includeCode ../../test/fairplay/concatInitDataIdAndCertificate.test.ts#example}
189
- */
190
- declare function concatInitDataIdAndCertificate(initData: Uint16Array, id: Uint16Array | string, cert: Uint8Array): Uint8Array;
186
+ * Concatenates InitData, ID, and Certificate for FairPlay DRM.
187
+ *
188
+ * @param initData - The initialization data (PSSH box)
189
+ * @param id - The content ID (string or Uint16Array)
190
+ * @param cert - The application certificate (Uint8Array)
191
+ * @returns A Uint8Array containing the concatenated data
192
+ *
193
+ * @public
194
+ *
195
+ * @example
196
+ * {@includeCode ../../test/fairplay/concatInitDataIdAndCertificate.test.ts#example}
197
+ */
198
+ export declare function concatInitDataIdAndCertificate(initData: Uint16Array, id: Uint16Array | string, cert: Uint8Array): Uint8Array;
191
199
  //#endregion
192
200
  //#region src/fairplay/decodeFairPlayLicense.d.ts
193
201
  /**
194
- * Decodes a FairPlay DRM license response.
195
- *
196
- * @param response - The license response, either a base64 string or ArrayBuffer
197
- * @returns A Uint8Array containing the decoded license
198
- *
199
- * @public
200
- *
201
- * @example
202
- * {@includeCode ../../test/fairplay/decodeFairPlayLicense.test.ts#example}
203
- */
204
- declare function decodeFairPlayLicense(response: string | ArrayBuffer): Uint8Array;
202
+ * Decodes a FairPlay DRM license response.
203
+ *
204
+ * @param response - The license response, either a base64 string or ArrayBuffer
205
+ * @returns A Uint8Array containing the decoded license
206
+ *
207
+ * @public
208
+ *
209
+ * @example
210
+ * {@includeCode ../../test/fairplay/decodeFairPlayLicense.test.ts#example}
211
+ */
212
+ export declare function decodeFairPlayLicense(response: string | ArrayBuffer): Uint8Array;
205
213
  //#endregion
206
214
  //#region src/fairplay/extractContentId.d.ts
207
215
  /**
208
- * Extracts the content ID from InitData using skd:// URI or query parameters.
209
- *
210
- * @param initData - The initialization data (PSSH box)
211
- * @returns The extracted content ID
212
- *
213
- * @public
214
- *
215
- * @example
216
- * {@includeCode ../../test/fairplay/extractContentId.test.ts#example}
217
- */
218
- declare function extractContentId(initData: ArrayBufferLike, encoding?: Encoding): string;
216
+ * Extracts the content ID from InitData using skd:// URI or query parameters.
217
+ *
218
+ * @param initData - The initialization data (PSSH box)
219
+ * @returns The extracted content ID
220
+ *
221
+ * @public
222
+ *
223
+ * @example
224
+ * {@includeCode ../../test/fairplay/extractContentId.test.ts#example}
225
+ */
226
+ export declare function extractContentId(initData: ArrayBufferLike, encoding?: Encoding): string;
219
227
  //#endregion
220
228
  //#region src/fairplay/getId.d.ts
221
229
  /**
222
- * Extracts the content ID from the license server URL or InitData.
223
- *
224
- * @param licenseServerUrl - The license server URL
225
- * @param initData - The initialization data (PSSH box)
226
- * @param queryParam - The query parameter key to extract (default: 'ContentId')
227
- * @returns The extracted content ID as a string or null if not found
228
- *
229
- * @public
230
- *
231
- * @example
232
- * {@includeCode ../../test/fairplay/getId.test.ts#example}
233
- */
234
- declare function getId(licenseServerUrl: string, initData: ArrayBufferLike, queryParam?: string): string;
230
+ * Extracts the content ID from the license server URL or InitData.
231
+ *
232
+ * @param licenseServerUrl - The license server URL
233
+ * @param initData - The initialization data (PSSH box)
234
+ * @param queryParam - The query parameter key to extract (default: 'ContentId')
235
+ * @returns The extracted content ID as a string or null if not found
236
+ *
237
+ * @public
238
+ *
239
+ * @example
240
+ * {@includeCode ../../test/fairplay/getId.test.ts#example}
241
+ */
242
+ export declare function getId(licenseServerUrl: string, initData: ArrayBufferLike, queryParam?: string): string;
235
243
  //#endregion
236
244
  //#region src/fairplay/getLicenseServerUrl.d.ts
237
245
  /**
238
- * Retrieves the FairPlay license server URL from InitData.
239
- *
240
- * @param initData - The initialization data (PSSH box)
241
- * @returns The license server URL as a string
242
- *
243
- * @public
244
- *
245
- * @example
246
- * {@includeCode ../../test/fairplay/getLicenseServerUrl.test.ts#example}
247
- */
248
- declare function getLicenseServerUrl(initData: Uint16Array): string;
246
+ * Retrieves the FairPlay license server URL from InitData.
247
+ *
248
+ * @param initData - The initialization data (PSSH box)
249
+ * @returns The license server URL as a string
250
+ *
251
+ * @public
252
+ *
253
+ * @example
254
+ * {@includeCode ../../test/fairplay/getLicenseServerUrl.test.ts#example}
255
+ */
256
+ export declare function getLicenseServerUrl(initData: Uint16Array): string;
249
257
  //#endregion
250
258
  //#region src/playready/getLicenseRequestFromMessage.d.ts
251
259
  /**
252
- * Gets the PlayReady license request from the MediaKeyMessageEvent.
253
- *
254
- * @param message - An ArrayBuffer from the content decryption module.
255
- * @param encoding - The message encoding type. Default is UTF-16.
256
- * @returns The license request as an ArrayBuffer.
257
- *
258
- * @public
259
- *
260
- * @example
261
- * {@includeCode ../../test/playready/getLicenseRequestFromMessage.test.ts#example}
262
- */
263
- declare function getLicenseRequestFromMessage(message: ArrayBuffer, encoding?: Encoding): ArrayBuffer;
260
+ * Gets the PlayReady license request from the MediaKeyMessageEvent.
261
+ *
262
+ * @param message - An ArrayBuffer from the content decryption module.
263
+ * @param encoding - The message encoding type. Default is UTF-16.
264
+ * @returns The license request as an ArrayBuffer.
265
+ *
266
+ * @public
267
+ *
268
+ * @example
269
+ * {@includeCode ../../test/playready/getLicenseRequestFromMessage.test.ts#example}
270
+ */
271
+ export declare function getLicenseRequestFromMessage(message: ArrayBuffer, encoding?: Encoding): ArrayBuffer;
264
272
  //#endregion
265
273
  //#region src/playready/getRequestHeadersFromMessage.d.ts
266
274
  /**
267
- * Gets the PlayReady license request headers from the MediaKeyMessageEvent.
268
- *
269
- * @param message - An ArrayBuffer from the content decryption module.
270
- * @param encoding - The message encoding type. Default is UTF-16.
271
- * @returns Request headers.
272
- *
273
- * @public
274
- *
275
- * @example
276
- * {@includeCode ../../test/playready/getRequestHeadersFromMessage.test.ts#example}
277
- */
278
- declare function getRequestHeadersFromMessage(message: ArrayBuffer, encoding?: typeof UTF_8 | typeof UTF_16): Record<string, string>;
275
+ * Gets the PlayReady license request headers from the MediaKeyMessageEvent.
276
+ *
277
+ * @param message - An ArrayBuffer from the content decryption module.
278
+ * @param encoding - The message encoding type. Default is UTF-16.
279
+ * @returns Request headers.
280
+ *
281
+ * @public
282
+ *
283
+ * @example
284
+ * {@includeCode ../../test/playready/getRequestHeadersFromMessage.test.ts#example}
285
+ */
286
+ export declare function getRequestHeadersFromMessage(message: ArrayBuffer, encoding?: typeof UTF_8 | typeof UTF_16): Record<string, string>;
279
287
  //#endregion
280
288
  //#region src/playready/toBigEndianKeyId.d.ts
281
289
  /**
282
- * Converts a 16-byte key ID from little-endian to big-endian format.
283
- *
284
- * @param keyId - The little-endian key ID to convert.
285
- * @returns The big-endian representation of the key ID.
286
- *
287
- * @public
288
- *
289
- * @example
290
- * {@includeCode ../../test/playready/toBigEndianKeyId.test.ts#example}
291
- */
292
- declare function toBigEndianKeyId(keyId: ArrayBuffer): ArrayBuffer;
290
+ * Converts a 16-byte key ID from little-endian to big-endian format.
291
+ *
292
+ * @param keyId - The little-endian key ID to convert.
293
+ * @returns The big-endian representation of the key ID.
294
+ *
295
+ * @public
296
+ *
297
+ * @example
298
+ * {@includeCode ../../test/playready/toBigEndianKeyId.test.ts#example}
299
+ */
300
+ export declare function toBigEndianKeyId(keyId: ArrayBuffer): ArrayBuffer;
293
301
  //#endregion
294
302
  //#region src/common/LicenseRequest.d.ts
295
303
  /**
296
- * Represents a DRM license request.
297
- *
298
- * Contains all data needed to make a license acquisition request
299
- * to a DRM license server.
300
- *
301
- * @public
302
- */
304
+ * Represents a DRM license request.
305
+ *
306
+ * Contains all data needed to make a license acquisition request
307
+ * to a DRM license server.
308
+ *
309
+ * @public
310
+ */
303
311
  type LicenseRequest = {
304
312
  /**
305
- * License server URL.
306
- */
313
+ * License server URL.
314
+ */
307
315
  url: string;
308
316
  /**
309
- * HTTP method
310
- */
317
+ * HTTP method
318
+ */
311
319
  method: "GET" | "POST";
312
320
  /**
313
- * The HTTP response type
314
- */
321
+ * The HTTP response type
322
+ */
315
323
  responseType: XMLHttpRequestResponseType;
316
324
  /**
317
- * The HTP request headers
318
- */
325
+ * The HTP request headers
326
+ */
319
327
  headers?: Record<string, string>;
320
328
  /**
321
- * Whether request is done using credentials (cross-site cookies)
322
- */
329
+ * Whether request is done using credentials (cross-site cookies)
330
+ */
323
331
  withCredentials?: boolean;
324
332
  /**
325
- * The license request message type
326
- * (see https://www.w3.org/TR/encrypted-media/#dom-mediakeymessagetype)
327
- */
333
+ * The license request message type
334
+ * (see https://www.w3.org/TR/encrypted-media/#dom-mediakeymessagetype)
335
+ */
328
336
  messageType?: MediaKeyMessageType;
329
337
  /**
330
- * The corresponding EME session ID
331
- */
338
+ * The corresponding EME session ID
339
+ */
332
340
  sessionId?: string;
333
341
  /**
334
- * The license request data
335
- */
342
+ * The license request data
343
+ */
336
344
  data?: ArrayBuffer;
337
345
  };
338
346
  //#endregion
339
347
  //#region src/common/CBCS.d.ts
340
348
  /**
341
- * Cipher Block Chaining Sample encryption scheme.
342
- *
343
- * @public
344
- */
345
- declare const CBCS = "cbcs";
349
+ * Cipher Block Chaining Sample encryption scheme.
350
+ *
351
+ * @public
352
+ */
353
+ export declare const CBCS = "cbcs";
346
354
  //#endregion
347
355
  //#region src/common/CENC.d.ts
348
356
  /**
349
- * Common Encryption scheme.
350
- *
351
- * @public
352
- */
353
- declare const CENC = "cenc";
357
+ * Common Encryption scheme.
358
+ *
359
+ * @public
360
+ */
361
+ export declare const CENC = "cenc";
354
362
  //#endregion
355
363
  //#region src/common/CHALLENGE.d.ts
356
364
  /**
357
- * License Challenge.
358
- *
359
- * @public
360
- */
361
- declare const CHALLENGE = "Challenge";
365
+ * License Challenge.
366
+ *
367
+ * @public
368
+ */
369
+ export declare const CHALLENGE = "Challenge";
362
370
  //#endregion
363
371
  //#region src/common/CLEAR_KEY_SYSTEM.d.ts
364
372
  /**
365
- * Clear Key System.
366
- *
367
- * @public
368
- */
369
- declare const CLEAR_KEY_SYSTEM = "org.w3.clearkey";
373
+ * Clear Key System.
374
+ *
375
+ * @public
376
+ */
377
+ export declare const CLEAR_KEY_SYSTEM = "org.w3.clearkey";
370
378
  //#endregion
371
379
  //#region src/common/CLEAR_KEY_UUID.d.ts
372
380
  /**
373
- * Clear Key UUID.
374
- *
375
- * @public
376
- */
377
- declare const CLEAR_KEY_UUID = "e2719d58-a985-b3c9-781a-b030af78d30e";
381
+ * Clear Key UUID.
382
+ *
383
+ * @public
384
+ */
385
+ export declare const CLEAR_KEY_UUID = "e2719d58-a985-b3c9-781a-b030af78d30e";
378
386
  //#endregion
379
387
  //#region src/common/CONTENT_TYPE.d.ts
380
388
  /**
381
- * Content-Type header.
382
- *
383
- * @public
384
- */
385
- declare const CONTENT_TYPE = "Content-Type";
389
+ * Content-Type header.
390
+ *
391
+ * @public
392
+ */
393
+ export declare const CONTENT_TYPE = "Content-Type";
386
394
  //#endregion
387
395
  //#region src/common/EncryptionScheme.d.ts
388
396
  /**
389
- * Encryption schemes.
390
- *
391
- * @public
392
- */
393
- declare const EncryptionScheme: {
397
+ * Encryption schemes.
398
+ *
399
+ * @public
400
+ */
401
+ export declare const EncryptionScheme: {
394
402
  readonly CENC: typeof CENC;
395
403
  readonly CBCS: typeof CBCS;
396
404
  };
397
405
  /**
398
- * Encryption schemes.
399
- *
400
- * @public
401
- */
402
- type EncryptionScheme = ValueOf<typeof EncryptionScheme>;
406
+ * Encryption schemes.
407
+ *
408
+ * @public
409
+ */
410
+ export type EncryptionScheme = ValueOf<typeof EncryptionScheme>;
403
411
  //#endregion
404
412
  //#region src/common/EXPIRED.d.ts
405
413
  /**
406
- * Expired Media Key Status.
407
- *
408
- * @public
409
- */
410
- declare const EXPIRED = "expired";
414
+ * Expired Media Key Status.
415
+ *
416
+ * @public
417
+ */
418
+ export declare const EXPIRED = "expired";
411
419
  //#endregion
412
420
  //#region src/common/FAIRPLAY_KEY_SYSTEM.d.ts
413
421
  /**
414
- * FairPlay Key System.
415
- *
416
- * @public
417
- */
418
- declare const FAIRPLAY_KEY_SYSTEM = "com.apple.fps.1_0";
422
+ * FairPlay Key System.
423
+ *
424
+ * @public
425
+ */
426
+ export declare const FAIRPLAY_KEY_SYSTEM = "com.apple.fps.1_0";
419
427
  //#endregion
420
428
  //#region src/common/FAIRPLAY_UUID.d.ts
421
429
  /**
422
- * FairPlay UUID.
423
- *
424
- * @public
425
- */
426
- declare const FAIRPLAY_UUID = "29701fe4-3cc7-4a34-8c5b-ae90c7439a47";
430
+ * FairPlay UUID.
431
+ *
432
+ * @public
433
+ */
434
+ export declare const FAIRPLAY_UUID = "29701fe4-3cc7-4a34-8c5b-ae90c7439a47";
427
435
  //#endregion
428
436
  //#region src/common/HTTP_HEADERS.d.ts
429
437
  /**
430
- * Playready HTTP Headers.
431
- *
432
- * @public
433
- */
434
- declare const HTTP_HEADERS = "HttpHeaders";
438
+ * Playready HTTP Headers.
439
+ *
440
+ * @public
441
+ */
442
+ export declare const HTTP_HEADERS = "HttpHeaders";
435
443
  //#endregion
436
444
  //#region src/common/HW_SECURE_ALL.d.ts
437
445
  /**
438
- * Hardware Secure All Robustness.
439
- *
440
- * @public
441
- */
442
- declare const HW_SECURE_ALL = "HW_SECURE_ALL";
446
+ * Hardware Secure All Robustness.
447
+ *
448
+ * @public
449
+ */
450
+ export declare const HW_SECURE_ALL = "HW_SECURE_ALL";
443
451
  //#endregion
444
452
  //#region src/common/HW_SECURE_CRYPTO.d.ts
445
453
  /**
446
- * Hardware Secure Crypto Robustness.
447
- *
448
- * @public
449
- */
450
- declare const HW_SECURE_CRYPTO = "HW_SECURE_CRYPTO";
454
+ * Hardware Secure Crypto Robustness.
455
+ *
456
+ * @public
457
+ */
458
+ export declare const HW_SECURE_CRYPTO = "HW_SECURE_CRYPTO";
451
459
  //#endregion
452
460
  //#region src/common/HW_SECURE_DECODE.d.ts
453
461
  /**
454
- * Hardware Secure Decode Robustness.
455
- *
456
- * @public
457
- */
458
- declare const HW_SECURE_DECODE = "HW_SECURE_DECODE";
462
+ * Hardware Secure Decode Robustness.
463
+ *
464
+ * @public
465
+ */
466
+ export declare const HW_SECURE_DECODE = "HW_SECURE_DECODE";
459
467
  //#endregion
460
468
  //#region src/common/INDIVIDUALIZATION_REQUEST.d.ts
461
469
  /**
462
- * Individualization Request.
463
- *
464
- * @public
465
- */
466
- declare const INDIVIDUALIZATION_REQUEST = "individualization-request";
470
+ * Individualization Request.
471
+ *
472
+ * @public
473
+ */
474
+ export declare const INDIVIDUALIZATION_REQUEST = "individualization-request";
467
475
  //#endregion
468
476
  //#region src/common/KEYIDS.d.ts
469
477
  /**
470
- * Key IDs.
471
- *
472
- * @public
473
- */
474
- declare const KEYIDS = "keyids";
478
+ * Key IDs.
479
+ *
480
+ * @public
481
+ */
482
+ export declare const KEYIDS = "keyids";
475
483
  //#endregion
476
484
  //#region src/common/WEBM.d.ts
477
485
  /**
478
- * WEBM.
479
- *
480
- * @public
481
- */
482
- declare const WEBM = "webm";
486
+ * WEBM.
487
+ *
488
+ * @public
489
+ */
490
+ export declare const WEBM = "webm";
483
491
  //#endregion
484
492
  //#region src/common/InitializationDataType.d.ts
485
493
  /**
486
- * Initialization Data Type.
487
- *
488
- * @public
489
- */
490
- declare const InitializationDataType: {
494
+ * Initialization Data Type.
495
+ *
496
+ * @public
497
+ */
498
+ export declare const InitializationDataType: {
491
499
  readonly CENC: typeof CENC;
492
500
  readonly CBCS: typeof CBCS;
493
501
  readonly KEYIDS: typeof KEYIDS;
494
502
  readonly WEBM: typeof WEBM;
495
503
  };
496
504
  /**
497
- * Initialization Data Type.
498
- *
499
- * @public
500
- */
501
- type InitializationDataType = ValueOf<typeof InitializationDataType>;
505
+ * Initialization Data Type.
506
+ *
507
+ * @public
508
+ */
509
+ export type InitializationDataType = ValueOf<typeof InitializationDataType>;
502
510
  //#endregion
503
511
  //#region src/common/INTERNAL_ERROR.d.ts
504
512
  /**
505
- * Internal Error Media Key Status.
506
- *
507
- * @public
508
- */
509
- declare const INTERNAL_ERROR = "internal-error";
513
+ * Internal Error Media Key Status.
514
+ *
515
+ * @public
516
+ */
517
+ export declare const INTERNAL_ERROR = "internal-error";
510
518
  //#endregion
511
519
  //#region src/common/LICENSE_ACQUISITION.d.ts
512
520
  /**
513
- * License Acquisition.
514
- *
515
- * @public
516
- */
517
- declare const LICENSE_ACQUISITION = "LicenseAcquisition";
521
+ * License Acquisition.
522
+ *
523
+ * @public
524
+ */
525
+ export declare const LICENSE_ACQUISITION = "LicenseAcquisition";
518
526
  //#endregion
519
527
  //#region src/common/LICENSE_RELEASE.d.ts
520
528
  /**
521
- * License Release.
522
- *
523
- * @public
524
- */
525
- declare const LICENSE_RELEASE = "license-release";
529
+ * License Release.
530
+ *
531
+ * @public
532
+ */
533
+ export declare const LICENSE_RELEASE = "license-release";
526
534
  //#endregion
527
535
  //#region src/common/LICENSE_RENEWAL.d.ts
528
536
  /**
529
- * License Renewal.
530
- *
531
- * @public
532
- */
533
- declare const LICENSE_RENEWAL = "license-renewal";
537
+ * License Renewal.
538
+ *
539
+ * @public
540
+ */
541
+ export declare const LICENSE_RENEWAL = "license-renewal";
534
542
  //#endregion
535
543
  //#region src/common/LICENSE_REQUEST.d.ts
536
544
  /**
537
- * License Request.
538
- *
539
- * @public
540
- */
541
- declare const LICENSE_REQUEST = "license-request";
545
+ * License Request.
546
+ *
547
+ * @public
548
+ */
549
+ export declare const LICENSE_REQUEST = "license-request";
542
550
  //#endregion
543
551
  //#region src/common/MediaKeyMessageType.d.ts
544
552
  /**
545
- * Media Key Message Types.
546
- *
547
- * @public
548
- */
553
+ * Media Key Message Types.
554
+ *
555
+ * @public
556
+ */
549
557
  declare const MediaKeyMessageType$1: {
550
558
  readonly LICENSE_REQUEST: typeof LICENSE_REQUEST;
551
559
  readonly LICENSE_RENEWAL: typeof LICENSE_RENEWAL;
@@ -553,59 +561,59 @@ declare const MediaKeyMessageType$1: {
553
561
  readonly INDIVIDUALIZATION_REQUEST: typeof INDIVIDUALIZATION_REQUEST;
554
562
  };
555
563
  /**
556
- * Media Key Message Types.
557
- *
558
- * @public
559
- */
564
+ * Media Key Message Types.
565
+ *
566
+ * @public
567
+ */
560
568
  type MediaKeyMessageType$1 = ValueOf<typeof MediaKeyMessageType$1>;
561
569
  //#endregion
562
570
  //#region src/common/OUTPUT_DOWNSCALED.d.ts
563
571
  /**
564
- * Output Downscaled Media Key Status.
565
- *
566
- * @public
567
- */
568
- declare const OUTPUT_DOWNSCALED = "output-downscaled";
572
+ * Output Downscaled Media Key Status.
573
+ *
574
+ * @public
575
+ */
576
+ export declare const OUTPUT_DOWNSCALED = "output-downscaled";
569
577
  //#endregion
570
578
  //#region src/common/OUTPUT_RESTRICTED.d.ts
571
579
  /**
572
- * Output Restricted Media Key Status.
573
- *
574
- * @public
575
- */
576
- declare const OUTPUT_RESTRICTED = "output-restricted";
580
+ * Output Restricted Media Key Status.
581
+ *
582
+ * @public
583
+ */
584
+ export declare const OUTPUT_RESTRICTED = "output-restricted";
577
585
  //#endregion
578
586
  //#region src/common/RELEASED.d.ts
579
587
  /**
580
- * Released Media Key Status.
581
- *
582
- * @public
583
- */
584
- declare const RELEASED = "released";
588
+ * Released Media Key Status.
589
+ *
590
+ * @public
591
+ */
592
+ export declare const RELEASED = "released";
585
593
  //#endregion
586
594
  //#region src/common/STATUS_PENDING.d.ts
587
595
  /**
588
- * Status Pending Media Key Status.
589
- *
590
- * @public
591
- */
592
- declare const STATUS_PENDING = "status-pending";
596
+ * Status Pending Media Key Status.
597
+ *
598
+ * @public
599
+ */
600
+ export declare const STATUS_PENDING = "status-pending";
593
601
  //#endregion
594
602
  //#region src/common/USABLE.d.ts
595
603
  /**
596
- * Usable Media Key Status.
597
- *
598
- * @public
599
- */
600
- declare const USABLE = "usable";
604
+ * Usable Media Key Status.
605
+ *
606
+ * @public
607
+ */
608
+ export declare const USABLE = "usable";
601
609
  //#endregion
602
610
  //#region src/common/MediaKeyStatus.d.ts
603
611
  /**
604
- * Media Key Statuses.
605
- *
606
- * @public
607
- */
608
- declare const MediaKeyStatus: {
612
+ * Media Key Statuses.
613
+ *
614
+ * @public
615
+ */
616
+ export declare const MediaKeyStatus: {
609
617
  readonly USABLE: typeof USABLE;
610
618
  readonly EXPIRED: typeof EXPIRED;
611
619
  readonly RELEASED: typeof RELEASED;
@@ -615,107 +623,107 @@ declare const MediaKeyStatus: {
615
623
  readonly INTERNAL_ERROR: typeof INTERNAL_ERROR;
616
624
  };
617
625
  /**
618
- * Media Key Statuses.
619
- *
620
- * @public
621
- */
622
- type MediaKeyStatus = ValueOf<typeof MediaKeyStatus>;
626
+ * Media Key Statuses.
627
+ *
628
+ * @public
629
+ */
630
+ export type MediaKeyStatus = ValueOf<typeof MediaKeyStatus>;
623
631
  //#endregion
624
632
  //#region src/common/MP4_PROTECTION_SCHEME.d.ts
625
633
  /**
626
- * The DASH MP4 Protection Scheme schemeIdUri.
627
- *
628
- * @public
629
- */
630
- declare const MP4_PROTECTION_SCHEME = "urn:mpeg:dash:mp4protection:2011";
634
+ * The DASH MP4 Protection Scheme schemeIdUri.
635
+ *
636
+ * @public
637
+ */
638
+ export declare const MP4_PROTECTION_SCHEME = "urn:mpeg:dash:mp4protection:2011";
631
639
  //#endregion
632
640
  //#region src/common/PLAYREADY_KEY_MESSAGE.d.ts
633
641
  /**
634
- * Playready Key Message.
635
- *
636
- * @public
637
- */
638
- declare const PLAYREADY_KEY_MESSAGE = "PlayReadyKeyMessage";
642
+ * Playready Key Message.
643
+ *
644
+ * @public
645
+ */
646
+ export declare const PLAYREADY_KEY_MESSAGE = "PlayReadyKeyMessage";
639
647
  //#endregion
640
648
  //#region src/common/PLAYREADY_KEY_SYSTEM.d.ts
641
649
  /**
642
- * Playready Key System.
643
- *
644
- * @public
645
- */
646
- declare const PLAYREADY_KEY_SYSTEM = "com.microsoft.playready";
650
+ * Playready Key System.
651
+ *
652
+ * @public
653
+ */
654
+ export declare const PLAYREADY_KEY_SYSTEM = "com.microsoft.playready";
647
655
  //#endregion
648
656
  //#region src/common/PLAYREADY_RECOMMENDATION_KEY_SYSTEM.d.ts
649
657
  /**
650
- * Playready Recommendation Key System.
651
- *
652
- * @public
653
- */
654
- declare const PLAYREADY_RECOMMENDATION_KEY_SYSTEM = "com.microsoft.playready.recommendation";
658
+ * Playready Recommendation Key System.
659
+ *
660
+ * @public
661
+ */
662
+ export declare const PLAYREADY_RECOMMENDATION_KEY_SYSTEM = "com.microsoft.playready.recommendation";
655
663
  //#endregion
656
664
  //#region src/common/PLAYREADY_UUID.d.ts
657
665
  /**
658
- * Playready UUID.
659
- *
660
- * @public
661
- */
662
- declare const PLAYREADY_UUID = "9a04f079-9840-4286-ab92-e65be0885f95";
666
+ * Playready UUID.
667
+ *
668
+ * @public
669
+ */
670
+ export declare const PLAYREADY_UUID = "9a04f079-9840-4286-ab92-e65be0885f95";
663
671
  //#endregion
664
672
  //#region src/common/SW_SECURE_CRYPTO.d.ts
665
673
  /**
666
- * Software Secure Crypto Robustness.
667
- *
668
- * @public
669
- */
670
- declare const SW_SECURE_CRYPTO = "SW_SECURE_CRYPTO";
674
+ * Software Secure Crypto Robustness.
675
+ *
676
+ * @public
677
+ */
678
+ export declare const SW_SECURE_CRYPTO = "SW_SECURE_CRYPTO";
671
679
  //#endregion
672
680
  //#region src/common/SW_SECURE_DECODE.d.ts
673
681
  /**
674
- * Software Secure Decode Robustness.
675
- *
676
- * @public
677
- */
678
- declare const SW_SECURE_DECODE = "SW_SECURE_DECODE";
682
+ * Software Secure Decode Robustness.
683
+ *
684
+ * @public
685
+ */
686
+ export declare const SW_SECURE_DECODE = "SW_SECURE_DECODE";
679
687
  //#endregion
680
688
  //#region src/common/TEXT_XML_UTF8.d.ts
681
689
  /**
682
- * XML formatted, UTF-8 encoded, text header.
683
- *
684
- * @public
685
- */
686
- declare const TEXT_XML_UTF8 = "text/xml; charset=utf-8";
690
+ * XML formatted, UTF-8 encoded, text header.
691
+ *
692
+ * @public
693
+ */
694
+ export declare const TEXT_XML_UTF8 = "text/xml; charset=utf-8";
687
695
  //#endregion
688
696
  //#region src/common/W3C_CLEAR_KEY_UUID.d.ts
689
697
  /**
690
- * W3C Clear Key UUID.
691
- *
692
- * @public
693
- */
694
- declare const W3C_CLEAR_KEY_UUID = "1077efec-c0b2-4d02-ace3-3c1e52e2fb4b";
698
+ * W3C Clear Key UUID.
699
+ *
700
+ * @public
701
+ */
702
+ export declare const W3C_CLEAR_KEY_UUID = "1077efec-c0b2-4d02-ace3-3c1e52e2fb4b";
695
703
  //#endregion
696
704
  //#region src/common/WIDEVINE_KEY_SYSTEM.d.ts
697
705
  /**
698
- * Widevine Key System.
699
- *
700
- * @public
701
- */
702
- declare const WIDEVINE_KEY_SYSTEM = "com.widevine.alpha";
706
+ * Widevine Key System.
707
+ *
708
+ * @public
709
+ */
710
+ export declare const WIDEVINE_KEY_SYSTEM = "com.widevine.alpha";
703
711
  //#endregion
704
712
  //#region src/common/WIDEVINE_UUID.d.ts
705
713
  /**
706
- * Widevine UUID.
707
- *
708
- * @public
709
- */
710
- declare const WIDEVINE_UUID = "edef8ba9-79d6-4ace-a3c8-27dcd51d21ed";
714
+ * Widevine UUID.
715
+ *
716
+ * @public
717
+ */
718
+ export declare const WIDEVINE_UUID = "edef8ba9-79d6-4ace-a3c8-27dcd51d21ed";
711
719
  //#endregion
712
720
  //#region src/common/WidevineRobustness.d.ts
713
721
  /**
714
- * Widevine Robustness.
715
- *
716
- * @public
717
- */
718
- declare const WidevineRobustness: {
722
+ * Widevine Robustness.
723
+ *
724
+ * @public
725
+ */
726
+ export declare const WidevineRobustness: {
719
727
  readonly SW_SECURE_CRYPTO: typeof SW_SECURE_CRYPTO;
720
728
  readonly SW_SECURE_DECODE: typeof SW_SECURE_DECODE;
721
729
  readonly HW_SECURE_CRYPTO: typeof HW_SECURE_CRYPTO;
@@ -723,59 +731,59 @@ declare const WidevineRobustness: {
723
731
  readonly HW_SECURE_ALL: typeof HW_SECURE_ALL;
724
732
  };
725
733
  /**
726
- * Widevine Robustness.
727
- *
728
- * @public
729
- */
730
- type WidevineRobustness = ValueOf<typeof WidevineRobustness>;
734
+ * Widevine Robustness.
735
+ *
736
+ * @public
737
+ */
738
+ export type WidevineRobustness = ValueOf<typeof WidevineRobustness>;
731
739
  //#endregion
732
740
  //#region src/ensureEncryptedInit.d.ts
733
741
  /**
734
- * Options for the `ensureEncryptedInit` function.
735
- *
736
- * @public
737
- */
738
- type EnsureEncryptedInitOptions = {
742
+ * Options for the `ensureEncryptedInit` function.
743
+ *
744
+ * @public
745
+ */
746
+ export type EnsureEncryptedInitOptions = {
739
747
  /**
740
- * Whether to prepend the encrypted entries to the sample table.
741
- *
742
- * @defaultValue `true`
743
- */
748
+ * Whether to prepend the encrypted entries to the sample table.
749
+ *
750
+ * @defaultValue `true`
751
+ */
744
752
  prepend: boolean;
745
753
  /**
746
- * Whether to include the original init segment in the result.
747
- *
748
- * @defaultValue `true`
749
- */
754
+ * Whether to include the original init segment in the result.
755
+ *
756
+ * @defaultValue `true`
757
+ */
750
758
  includeOriginal: boolean;
751
759
  /**
752
- * The scheme type to use for the encryption. Defaults to `cenc`.
753
- *
754
- * @defaultValue `1667591779`
755
- */
760
+ * The scheme type to use for the encryption. Defaults to `cenc`.
761
+ *
762
+ * @defaultValue `1667591779`
763
+ */
756
764
  schemeType: number;
757
765
  /**
758
- * The default KID to use for the encryption.
759
- *
760
- * @defaultValue `[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]`
761
- */
766
+ * The default KID to use for the encryption.
767
+ *
768
+ * @defaultValue `[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]`
769
+ */
762
770
  defaultKid: number[];
763
771
  };
764
772
  /**
765
- * Ensures that the init segment is encrypted. Used on platforms that have issues playing unencrypted
766
- * content before playing encrypted content. Both prepend and includeOriginal are optional.
767
- *
768
- * @param init - The init segment to ensure is encrypted.
769
- * @param options - The options for the encryption.
770
- *
771
- * @returns The encrypted init segment.
772
- *
773
- * @public
774
- *
775
- * @example
776
- * {@includeCode ../test/ensureEncryptedInit.test.ts#example}
777
- */
778
- declare function ensureEncryptedInit(init: Uint8Array, options?: Partial<EnsureEncryptedInitOptions>): Uint8Array;
779
- //#endregion
780
- export { CBCS, CENC, CHALLENGE, CLEAR_KEY_SYSTEM, CLEAR_KEY_UUID, CONTENT_TYPE, ContentProtection, EXPIRED, EncryptionScheme, EnsureEncryptedInitOptions, FAIRPLAY_KEY_SYSTEM, FAIRPLAY_UUID, HTTP_HEADERS, HW_SECURE_ALL, HW_SECURE_CRYPTO, HW_SECURE_DECODE, INDIVIDUALIZATION_REQUEST, INTERNAL_ERROR, InitializationDataType, KEYIDS, LICENSE_ACQUISITION, LICENSE_RELEASE, LICENSE_RENEWAL, LICENSE_REQUEST, LicenseRequest, MP4_PROTECTION_SCHEME, MediaKeyMessageType$1 as MediaKeyMessageType, MediaKeyStatus, MediaKeySystemAccessRequest, OUTPUT_DOWNSCALED, OUTPUT_RESTRICTED, PLAYREADY_KEY_MESSAGE, PLAYREADY_KEY_SYSTEM, PLAYREADY_RECOMMENDATION_KEY_SYSTEM, PLAYREADY_UUID, RELEASED, STATUS_PENDING, SW_SECURE_CRYPTO, SW_SECURE_DECODE, TEXT_XML_UTF8, USABLE, W3C_CLEAR_KEY_UUID, WEBM, WIDEVINE_KEY_SYSTEM, WIDEVINE_UUID, WidevineRobustness, concatInitDataIdAndCertificate, createMediaKeySystemConfiguration, decodeFairPlayLicense, ensureEncryptedInit, extractContentId, findCencContentProtection, getId, getKeySystemAccess, getLegacyKeySystemAccess, getLicenseRequestFromMessage, getLicenseServerUrl, getLicenseServerUrlFromContentProtection, getPsshData, getPsshForKeySystem, getRequestHeadersFromMessage, getSupportedKeySystemConfiguration, parseInitDataFromContentProtection, parsePsshList, toBigEndianKeyId };
773
+ * Ensures that the init segment is encrypted. Used on platforms that have issues playing unencrypted
774
+ * content before playing encrypted content. Both prepend and includeOriginal are optional.
775
+ *
776
+ * @param init - The init segment to ensure is encrypted.
777
+ * @param options - The options for the encryption.
778
+ *
779
+ * @returns The encrypted init segment.
780
+ *
781
+ * @public
782
+ *
783
+ * @example
784
+ * {@includeCode ../test/ensureEncryptedInit.test.ts#example}
785
+ */
786
+ export declare function ensureEncryptedInit(init: Uint8Array, options?: Partial<EnsureEncryptedInitOptions>): Uint8Array;
787
+ //#endregion
788
+ export { type ContentProtection, type LicenseRequest, MediaKeyMessageType$1 as MediaKeyMessageType, type MediaKeySystemAccessRequest };
781
789
  //# sourceMappingURL=index.d.ts.map