# Clear Key on Web

This article provides a simple example of how to use Clear Key with THEOplayer.

Usually, DRM systems require you to specify a `licenseAcquisitionURL` and additional optional data (e.g.: certificate, credentials, headers). Clear Key does not need a DRM provider. You can provide the key(s) directly to the player (hence "clear" key) through the `keys` property in its `LicenseAcquisitionDescription` (in fact, this property is only available for Clear Key). Alternatively, you can have the player fetch the keys from a `licenseAcquisitionURL`, which returns a JSON object containing the same keys.

Head to our page on [DRM](https://docs-preview.optiview.dolby.com/pr-860/theoplayer/how-to-guides/web/drm/introduction.md) for more general information.

Please check also our related [API documentation](https://docs-preview.optiview.dolby.com/pr-860/theoplayer/v11/api-reference/web/interfaces/ClearkeyKeySystemConfiguration) on how to set these.

## Code example

With keys:

```js
player.source = {
  sources: {
    src: 'your-manifest-URL',
    useCredentials: false,
    contentProtection: {
      clearkey: {
        keys: [
          {
            id: 'id',
            value: 'value',
          },
        ],
      },
    },
  },
};
```

With a license URL:

```js
player.source = {
  sources: {
    src: 'https://storage.googleapis.com/shaka-demo-assets/angel-one-clearkey/dash.mpd',
    useCredentials: false,
    contentProtection: {
      clearkey: {
        licenseAcquisitionURL: 'https://cwip-shaka-proxy.appspot.com/clearkey?_u3wDe7erb7v8Lqt8A3QDQ=ABEiM0RVZneImaq7zN3u_w',
      },
    },
  },
};
```

## Resources

* [API Reference - ClearkeyDecryptionKey](https://docs-preview.optiview.dolby.com/pr-860/theoplayer/v11/api-reference/web/interfaces/ClearkeyDecryptionKey)
* [Generate MPEG DASH content encrypted with MPEG CENC ClearKey](https://github.com/Dash-Industry-Forum/dash.js/wiki/Generate-MPEG-DASH-content-encrypted-with-MPEG-CENC-ClearKey): DASH IF on GitHub
* [Clear Key license format](https://w3c.github.io/encrypted-media/#clear-key-license-format): W3C - Encrypted Media Extensions
