How to play MPEG-CENC ClearKey content

Overview

Please replace YOUR-PLAYER-LICENSE-KEY-HERE,YOUR-KEY-HERE, and YOUR-KID-HERE with its respective value, in the example below, then it should work as expected. You can create MPEG-CENC ClearKey encrypted content with our service as well.

Example

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <script src="https://bitmovin-a.akamaihd.net/bitmovin-player/stable/7/bitmovinplayer.js"></script>
</head>

<body>
<div id="player"></div>
<script type="text/javascript">
    var conf = {
        key: "YOUR-PLAYER-LICENSE-KEY-HERE",
        source: {
            dash: "https://example.com/path/to/your/clear-key/content/manifest.mpd",
            drm: {
                clearkey: [{
                    key: 'YOUR-KEY-HERE',
                    kid: 'YOUR-KID-HERE' //optional
                }]
            }
        }
    };

    var player = bitmovin.player("player");
    player.setup(conf).then(function (value) {
        console.log("Successfully created bitmovin player instance");
    }, function (reason) {
        console.log("Error while creating bitmovin player instance");
    });
</script>
</body>
</html>