@phenixrts/sdk
Version:
JavaScript SDK
25 lines (24 loc) • 1.17 kB
TypeScript
import ReadOnlySubject from '../../rx/ReadOnlySubject';
import IProtectionStrategy, { ProtectionConfiguration } from './IProtectionStrategy';
export type FairPlayProtectionSessionConfiguration = ProtectionConfiguration & {
fairplay?: {
certificate: string;
licenseUrl: string;
licenseHeaders?: Record<string, string>;
};
};
export default class FairPlayProtectionStrategy implements IProtectionStrategy<FairPlayProtectionSessionConfiguration> {
private static readonly _fairPlayKeySystemIdentifier;
private static readonly _fairPlayMediaKeySystemConfigurations;
private readonly _logger;
private readonly _disposables;
private readonly _keySession;
private readonly _readOnlyKeySession;
static isSupported(): Promise<boolean>;
get protectionSystemName(): string;
get keySession(): ReadOnlySubject<MediaKeySession | null>;
initializeMediaKeys(): Promise<MediaKeys>;
createSession(mediaKeys: MediaKeys, configuration: FairPlayProtectionSessionConfiguration): Promise<void>;
handleMediaElementEncryptedEvent({ initDataType, initData }: MediaEncryptedEvent): Promise<void>;
dispose(): void;
}