---
title: Enable CMCD in Players
description: "#### Enable CMCD in dash.js Add the following code to your player application: ``` const player = dashjs.MediaPlayer().create(); player.updateSettings({ streaming: { cmcd: { enabled: true, mode: 'header', enabledKeys: [ 'bs', 'su', 'rtp', 'mtp', 'tb', 'br', 'bl', 'dl', 'ot', 'st', 'sf',…"
url: "https://www.flumotion.com/docs/multiCDN/enable-cmcd-in-players/"
updated: "2026-09-07"
category: Guides / Media Streaming
---

# Enable CMCD in Players

#### Enable CMCD in dash.js

Add the following code to your player application:

```
const player = dashjs.MediaPlayer().create();

player.updateSettings({
  streaming: {
    cmcd: {
      enabled: true,
      mode: 'header',
      enabledKeys: [
        'bs', 'su', 'rtp', 'mtp', 'tb', 'br', 'bl',
        'dl', 'ot', 'st', 'sf', 'pr', 'd', 'v'
      ]
    }
  }
});

player.initialize(videoElement, mpdUrl, true);
```

#### Enable CMCD in Shaka Player

Add the following code to your player application:

```
const player = new shaka.Player(videoElement);

player.configure({
  cmcd: {
    enabled: true,
    useHeaders: true,
    version: 1,
    includeKeys: [
      'bs', 'su', 'rtp', 'mtp', 'tb', 'br', 'bl',
      'dl', 'ot', 'st', 'sf', 'pr', 'd', 'v'
    ]
  }
});

player.load(manifestUri);
```

#### Enable CMCD in hls.js

Add the following code to your player application:

```
const hls = new Hls({
  cmcd: {
    useHeaders: true,
    includeKeys: [
      'bs', 'su', 'rtp', 'mtp', 'tb', 'br', 'bl',
      'dl', 'ot', 'st', 'sf', 'pr', 'd', 'v'
    ]
  }
});

hls.loadSource('https://example.com/stream.m3u8');
hls.attachMedia(videoElement);
```
