dash.js

dash.js supports CMCD v1 and both CMCD v2 modes. CMCD stays off until you enable it.

Updated

Support

CMCD dash.js 5.3.0
CMCD v1 since 3.2.0
CMCD v2 since 5.2.0
Default transmission Query parameter
On by default No

CMCD v2 support has been available since 5.2.0, with further fields being added; EINBLIQ.IO contributed custom keys and improved timing metrics to dash.js 5.3.0. CMCD v1 arrived as a draft implementation in 3.0.3, was aligned with the published CTA-5004 in 3.2.0, and gained header mode in 3.2.2.

Configuration

JavaScript
// All CMCD keys dash.js knows. Keys that do not apply to event mode are filtered out.
const CMCD_KEYS = [
  'bl', 'br', 'bs', 'cid', 'd', 'dl', 'mtp', 'nor', 'nrr', 'ot', 'pr', 'rtp', 'sf', 'sid', 'st', 'su', 'tb', 'v',
  'ab', 'bg', 'bsa', 'bsd', 'bsda', 'cdn', 'cs', 'dfa', 'ec', 'lab', 'lb', 'ltc', 'msd', 'nr', 'pb', 'pt', 'sn',
  'sta', 'tab', 'tbl', 'tpb', 'cmsdd', 'cmsds', 'rc', 'smrt', 'ttfb', 'ttfbb', 'ttlb', 'url', 'cen', 'e', 'h', 'ts',
];
const CUSTOM_KEYS = ['org.svta-p-n', 'org.svta-p-v'];

player.updateSettings({
  streaming: {
    cmcd: {
      enabled: true,
      version: 2,
      cid: '<CONTENT_ID>',
      customKeys: [
        { key: 'org.svta-p-n', value: 'dash.js' },
        { key: 'org.svta-p-v', value: player.getVersion() },
      ],
      eventTargets: [{
        url: '<CMCD_V2_ENDPOINT>',
        events: ['ps', 'e', 't'],
        enabledKeys: [...CMCD_KEYS, ...CUSTOM_KEYS],
      }],
    },
  },
});
  • Query parameters and all request mode keys are the defaults, so the example sets neither mode nor enabledKeys for requests. To send headers instead, set mode: 'headers'; the value 'header' from the dash.js documentation is not recognised and silently keeps query mode.
  • Without sid, dash.js generates a UUID as session ID. Set cid only if you know the content ID.
  • Event targets have no option for all keys, so the example lists them in enabledKeys. A target needs at least one entry in events; t sends a status report every 30 seconds by default.
  • org.svta-p-n and org.svta-p-v report the player name and version, as defined in the CMCD custom key repository. dash.js adds custom keys to requests automatically; event targets only send them when they are listed in enabledKeys.
  • <CMCD_V2_ENDPOINT> is the address of the EINBLIQ.IO CMCD v2 endpoint, provided during onboarding.

dash.js CMCD documentation