Interface KeyOSKeySystemConfiguration

Describes the KeyOS key system configuration.

interface KeyOSKeySystemConfiguration {
    audioRobustness?: string;
    certificate?: string | BufferSource;
    customdata?: string;
    distinctiveIdentifier?: "required" | "optional" | "not-allowed";
    headers?: {
        [headerName: string]: string;
    };
    licenseAcquisitionURL?: string;
    persistentState?: "required" | "optional" | "not-allowed";
    queryParameters?: {
        [key: string]: any;
    };
    useCredentials?: boolean;
    videoRobustness?: string;
}

Hierarchy (view full)

Properties

audioRobustness?: string

Allows to configure the robustness level required for audio data. The robustness level can be used to define the DRM security level. If the security level requested is not available on the platform, playback will fail.

Following values are supported for Widevine:

  • "": Lowest security level
  • "SW_SECURE_CRYPTO": Secure decryption in software is required. This matches Widevine L3.
  • "SW_SECURE_DECODE": Media data is to be decoded securely in software. This matches Widevine L3.
  • "HW_SECURE_CRYPTO": Secure decryption in hardware is required. This matches Widevine L2.
  • "HW_SECURE_DECODE": Media data is to be decoded securely in hardware. This matches Widevine L1.
  • "HW_SECURE_ALL": The media pipeline must be decrypted and decoded securely in hardware. This matches Widevine L1.
certificate?: string | BufferSource

The certificate for the key system. This can be either an ArrayBuffer or Uint8Array containing the raw certificate bytes or a base64-encoded variant of this.

customdata?: string

The custom data for the licence acquisition request.

distinctiveIdentifier?: "required" | "optional" | "not-allowed"

Used to indicate if media key sessions can be shared across different instances, for example different browser profiles, player instances or applications. The player will forward this information to the CDM when requesting access to the media key system. Available values are:

  • “required”
  • “optional”
  • “not-allowed”
headers?: {
    [headerName: string]: string;
}

Record of HTTP headers for the licence acquisition request. Each entry contains a header name with associated value.

Type declaration

  • [headerName: string]: string
licenseAcquisitionURL?: string

The licence acquisition URL.

Remarks


- If provided, the player will send license requests for the intended DRM scheme to the provided value.
- If not provided, the player will use the default license acquisition URLs.

persistentState?: "required" | "optional" | "not-allowed"

Property to indicate whether the ability to persist state is required. This includes session data and any other type of state. The player will forward this information to the CDM when requesting access to the media key system.

Available values are:

  • "required": This will instruct the player to make the key sessions persistent.
  • "optional": Choice of making use of a persistent key session is up to the player.
  • "not-allowed": A temporary key session will be used.
queryParameters?: {
    [key: string]: any;
}

Record of query parameters for the licence acquisition request. Each entry contains a query parameter name with associated value.

Type declaration

  • [key: string]: any
useCredentials?: boolean

Whether the player is allowed to use credentials for cross-origin requests.

Remarks


- Credentials are cookies, authorization headers or TLS client certificates.

Default Value

false

videoRobustness?: string

Allows to configure the robustness level required for video data. The robustness level can be used to define the DRM security level. If the security level requested is not available on the platform, playback will fail.

Following values are supported for Widevine:

  • "": Lowest security level
  • "SW_SECURE_CRYPTO": Secure decryption in software is required. This matches Widevine L3.
  • "SW_SECURE_DECODE": Media data is to be decoded securely in software. This matches Widevine L3.
  • "HW_SECURE_CRYPTO": Secure decryption in hardware is required. This matches Widevine L2.
  • "HW_SECURE_DECODE": Media data is to be decoded securely in hardware. This matches Widevine L1.
  • "HW_SECURE_ALL": The media pipeline must be decrypted and decoded securely in hardware. This matches Widevine L1.