Interface IKeySystemConfig

interface IKeySystemConfig {
    clearKeys?: Record<string, string>;
    distinctiveIdentifier?: MediaKeysRequirement;
    getContentId?: (initData: ArrayBuffer) => string;
    getLicense?: (
        contentId: string,
        keyMessage: MediaKeyMessageEvent,
    ) => ArrayBufferLike;
    individualizationServerUri?: string;
    licenseServerUri: string;
    persistentState?: MediaKeysRequirement;
    priority?: number;
    serverCertificate?: Uint8Array;
    serverCertificateUri?: string;
    sessionId?: string;
    sessionType?: MediaKeySessionType;
}

Properties

clearKeys?: Record<string, string>

A map of ClearKey key IDs to keys. These values should be encoded in hex or base64. Defaults to an empty object.

distinctiveIdentifier?: MediaKeysRequirement
getContentId?: (initData: ArrayBuffer) => string

A custom function to find the content ID from the init data.

getLicense?: (
    contentId: string,
    keyMessage: MediaKeyMessageEvent,
) => ArrayBufferLike

Rare cases when we want to leave it up to the user to get the license This function should return the response from the license request

individualizationServerUri?: string

On 'individualization-request' events, this URI will be used for the license request. playready specific Defaults to ''.

licenseServerUri: string
persistentState?: MediaKeysRequirement
priority?: number
serverCertificate?: Uint8Array
serverCertificateUri?: string
sessionId?: string
sessionType?: MediaKeySessionType