---
updatedAt: 2026-04-28T09:43:13.000Z
agentTools:
  siteIndex: https://developer.bitmovin.com/llms.txt
  projectIndex: https://developer.bitmovin.com/playback/llms.txt
---

# Setup using multiple DRM solutions

## Overview

Using the Bitmovin player in a multi DRM configuration is very simple. You can add multiple DRM configurations (e.g., Widevine configuration, PlayReady configuration, TVKey configuration etc.) to the player configuration and you can also set all the advanced options for each DRM configuration. An example multi DRM configuration could look like the following:

```javascript
var conf = {
    key: 'YOUR-PLAYER-LICENSE-KEY-HERE',
    source: {
        dash: 'DASH_MANIFEST_URL',
        hls: 'HLS_MASTER_PLAYLIST_URL',
        drm: {
            widevine: {
                LA_URL: 'https://mywidevine.licenseserver.com/',
                prepareMessage: function (keyMessage) {
                    return keyMessage.message;
                }
            },
            playready: {
                LA_URL: 'https://myplayready.licenseserver.com/',
                customData: 'INSERT-YOUR-CUSTOMDATA'
            },
            access: {
                LA_URL: 'https://myaccess.licenseserver.com/',
                authToken: 'INSERT-YOUR-BASE64-ENCODED-AUTH-TOKEN'
            },
            primetime: {
                LA_URL: 'https://myprimetime.licenseserver.com/'
            },
            fairplay: {
                LA_URL: 'https://fairplay.licenseserver.com/',
                certificateURL: 'https://fairplay.licenseserver.com/certificate-url'
            },
            tvkey: {
                LA_URL: 'https://tvkey.license.server/api/license',
                headers: {
                    'AuthKey': 'YOUR-TVKEY-TOKEN'
                }
            },
        }
    }
};
```

### Controlling DRM Key System Priority

By default, the player negotiates with the browser to select an available DRM key system. On some platforms, browser updates may change which key system takes priority (e.g., Chrome on Windows may select PlayReady over Widevine).

To explicitly control the order in which key systems are attempted, use the `preferredKeySystems` property on the DRM configuration:

```javascript
var conf = {
    key: 'YOUR-PLAYER-LICENSE-KEY-HERE',
    source: {
        dash: 'DASH_MANIFEST_URL',
        hls: 'HLS_MASTER_PLAYLIST_URL',
        drm: {
            preferredKeySystems: [
                'widevine',  // Try Widevine first
                'playready'  // Fall back to PlayReady
            ],
            widevine: {
                LA_URL: 'https://mywidevine.licenseserver.com/',
                prepareMessage: function (keyMessage) {
                    return keyMessage.message;
                }
            },
            playready: {
                LA_URL: 'https://myplayready.licenseserver.com/',
                customData: 'INSERT-YOUR-CUSTOMDATA'
            }
        }
    }
};
```

> **When to use this:** If you observe unexpected DRM key system selection after a browser update (e.g., PlayReady being used on Chrome where Widevine was previously selected), `preferredKeySystems` lets you enforce a consistent priority order.

## Widevine

```javascript
var conf = {
    key: 'YOUR-PLAYER-LICENSE-KEY-HERE',
    source: {
        dash: 'DASH_MANIFEST_URL',
        hls: 'HLS_MASTER_PLAYLIST_URL',
        drm: {
            widevine: {
                LA_URL: 'https://mywidevine.licenseserver.com/',
                prepareMessage: function (keyMessage) {
                    return keyMessage.message;
                }
            }
        }
    }
};
```

## Playready

```javascript
var conf = {
    key: 'YOUR-PLAYER-LICENSE-KEY-HERE',
    source: {
        dash: 'DASH_MANIFEST_URL',
        hls: 'HLS_MASTER_PLAYLIST_URL',
        drm: {
            playready: {
                LA_URL: 'https://myplayready.licenseserver.com/',
                customData: 'INSERT-YOUR-CUSTOMDATA'
            }
        }
    }
};
```

## Fairplay

```javascript
var conf = {
    key: 'YOUR-PLAYER-LICENSE-KEY-HERE',
    source: {
        dash: 'DASH_MANIFEST_URL',
        hls: 'HLS_MASTER_PLAYLIST_URL',
        drm: {
            fairplay: {
                LA_URL: 'https://fairplay.licenseserver.com/',
                certificateURL: 'https://fairplay.licenseserver.com/certificate-url'
            }
        }
    }
};
```

## Adobe Primetime

```javascript
var conf = {
    key: 'YOUR-PLAYER-LICENSE-KEY-HERE',
    source: {
        dash: 'DASH_MANIFEST_URL',
        hls: 'HLS_MASTER_PLAYLIST_URL',
        drm: {
            primetime: {
                LA_URL: 'https://myprimetime.licenseserver.com/'
            }
        }
    }
};
```

## Adobe Access

```javascript
var conf = {
    key: 'YOUR-PLAYER-LICENSE-KEY-HERE',
    source: {
        dash: 'DASH_MANIFEST_URL',
        hls: 'HLS_MASTER_PLAYLIST_URL',
        drm: {
            access: {
                LA_URL: 'https://myaccess.licenseserver.com/',
                authToken: 'INSERT-YOUR-BASE64-ENCODED-AUTH-TOKEN'
            }
        }
    }
};
```

## TVKey

```javascript
var conf = {
    key: 'YOUR-PLAYER-LICENSE-KEY-HERE',
    source: {
        dash: 'DASH_MANIFEST_URL',
        hls: 'HLS_MASTER_PLAYLIST_URL',
        drm: {
            tvkey: {
                LA_URL: 'https://tvkey.license.server/api/license',
                headers: {
                    'AuthKey': 'YOUR-TVKEY-TOKEN'
                }
            }
        }
    }
};
```