Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 29 additions & 7 deletions api-extractor/report/hls.js.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1104,7 +1104,7 @@ export const enum DecrypterAesMode {
export type DRMSystemConfiguration = {
licenseUrl: string;
serverCertificateUrl?: string;
generateRequest?: (this: Hls, initDataType: string, initData: ArrayBuffer | null, keyContext: MediaKeySessionContext) => {
generateRequest?: (this: Hls, initDataType: string, initData: ArrayBuffer | null, keyContext: MediaKeySessionContextAndLevelKey) => {
initDataType: string;
initData: ArrayBuffer | null;
} | undefined | never;
Expand Down Expand Up @@ -1189,8 +1189,8 @@ export class EMEController extends Logger implements ComponentAPI {
//
// @public (undocumented)
export type EMEControllerConfig = {
licenseXhrSetup?: (this: Hls, xhr: XMLHttpRequest, url: string, keyContext: MediaKeySessionContext, licenseChallenge: Uint8Array) => void | Uint8Array | Promise<Uint8Array | void>;
licenseResponseCallback?: (this: Hls, xhr: XMLHttpRequest, url: string, keyContext: MediaKeySessionContext) => ArrayBuffer;
licenseXhrSetup?: (this: Hls, xhr: XMLHttpRequest, url: string, keyContext: MediaKeySessionContextAndLevelKey, licenseChallenge: Uint8Array) => void | Uint8Array | Promise<Uint8Array | void>;
licenseResponseCallback?: (this: Hls, xhr: XMLHttpRequest, url: string, keyContext: MediaKeySessionContextAndLevelKey) => ArrayBuffer;
emeEnabled: boolean;
widevineLicenseUrl?: string;
drmSystems: DRMSystemsConfiguration | undefined;
Expand Down Expand Up @@ -3361,7 +3361,9 @@ export class LevelKey implements DecryptData {
// (undocumented)
readonly encrypted: boolean;
// (undocumented)
getDecryptData(sn: number | 'initSegment'): LevelKey | null;
getDecryptData(sn: number | 'initSegment', levelKeys?: {
[key: string]: LevelKey | undefined;
}): LevelKey | null;
// (undocumented)
readonly isCommonEncryption: boolean;
// (undocumented)
Expand Down Expand Up @@ -3996,16 +3998,18 @@ export type MediaKeyFunc = (keySystem: KeySystems, supportedConfigurations: Medi
// @public (undocumented)
export interface MediaKeySessionContext {
// (undocumented)
decryptdata: LevelKey;
// (undocumented)
keyStatus?: MediaKeyStatus;
keyStatuses: {
[keyId: string]: MediaKeyStatus;
};
// (undocumented)
keyStatusTimeouts?: {
[keyId: string]: number;
};
// (undocumented)
keySystem: KeySystems;
// (undocumented)
levelKeys: LevelKey[];
// (undocumented)
licenseXhr?: XMLHttpRequest;
// (undocumented)
mediaKeys: MediaKeys;
Expand All @@ -4017,6 +4021,24 @@ export interface MediaKeySessionContext {
_onmessage?: (this: MediaKeySession, ev: MediaKeyMessageEvent) => any;
}

// Warning: (ae-missing-release-tag) "MediaKeySessionContextAndLevelKey" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type MediaKeySessionContextAndLevelKey = {
decryptdata: LevelKey;
keySystem: KeySystems;
levelKeys: LevelKey[];
mediaKeys: MediaKeys;
mediaKeysSession: MediaKeySession;
keyStatuses: {
[keyId: string]: MediaKeyStatus;
};
keyStatusTimeouts?: {
[keyId: string]: number;
};
licenseXhr?: XMLHttpRequest;
};

// Warning: (ae-missing-release-tag) "MediaOverrides" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
Expand Down
8 changes: 4 additions & 4 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import FetchLoader, { fetchSupported } from './utils/fetch-loader';
import { requestMediaKeySystemAccess } from './utils/mediakeys-helper';
import { stringify } from './utils/safe-json-stringify';
import XhrLoader from './utils/xhr-loader';
import type { MediaKeySessionContext } from './controller/eme-controller';
import type { MediaKeySessionContextAndLevelKey } from './controller/eme-controller';
import type Hls from './hls';
import type {
FragmentLoaderContext,
Expand Down Expand Up @@ -92,7 +92,7 @@ export type DRMSystemConfiguration = {
this: Hls,
initDataType: string,
initData: ArrayBuffer | null,
keyContext: MediaKeySessionContext,
keyContext: MediaKeySessionContextAndLevelKey,
) =>
| { initDataType: string; initData: ArrayBuffer | null }
| undefined
Expand All @@ -108,14 +108,14 @@ export type EMEControllerConfig = {
this: Hls,
xhr: XMLHttpRequest,
url: string,
keyContext: MediaKeySessionContext,
keyContext: MediaKeySessionContextAndLevelKey,
licenseChallenge: Uint8Array,
) => void | Uint8Array | Promise<Uint8Array | void>;
licenseResponseCallback?: (
this: Hls,
xhr: XMLHttpRequest,
url: string,
keyContext: MediaKeySessionContext,
keyContext: MediaKeySessionContextAndLevelKey,
) => ArrayBuffer;
emeEnabled: boolean;
widevineLicenseUrl?: string;
Expand Down
Loading
Loading