The video element or an associated DRM Key Session has thrown a DRM key error.

This error is triggered by the key session or the video element when a DRM error is encountered during playback. There are multiple different possible causes for this error, but the most common ones are:

  • the device/browser being unable to generate a DRM license request for the init data provided in the content
  • the init data being malformed
  • the Content Decryption Module not being able to parse/process the DRM license returned by the license server
  • the Content Decryption Module encountering a general DRM related error during playback

On certain platforms, a detailed error message is logged to the console, if one is available.

Additionally the error event will contain the code and systemError code provided by the browser, which might help narrowing down the root cause.

Troubleshooting steps for key error

  • In a FairPlay DRM stream, you can try changing the value of the setting in your player config for fairplay_ignore_duplicate_init_data_key_errors to true. It can happen that the device issued a keyneeded with the same init data twice during a FairPlay DRM protected content and setting the value to true will allow this to not stop playback

  • Make sure the platform supports the DRM configuration by checking the response from getSupportedDRM

    // Supports Widevine playback, therefore needs a Widevine DRM configuration
    ['com.widevine.alpha'] // Response will vary depending on device capabilities

    // Supported FairPlay, therefore needs a FairPlay DRM configuration
    ['com.apple.fairplay', 'com.apple.fps.1_0', 'com.apple.fps.2_0']
  • Using multiple keys in your stream will lead to a key rotation. When there was a problem with setting the key, the device will throw this error and an appropriate log message will be available in the console. You can enable more detailed logs by setting level to DEBUG in your player config

  • When the device does not support key rotation this error will be thrown. You can try to re-encode and use a single key for all segments to see if playback is still possible or ask your DRM vendor if key rotations could be disabled

  • You can ask your DRM vendor to try verifying the init data is valid and not malformed. Most commonly the PSSH boxes need to be confirmed

  • It is possible that the device might be limited based on existing hardware connected to the device. Verify that the monitors connected are HDCP compliant. You can also try to disconnect all external devices and docks which are not required for the normal operation of your device