Getting started with CMCD on Web
Media player clients can transmit useful information to Content Delivery Networks (CDNs) with each object request. This implementation is planned to fully support Common Media Client Data (CMCD) as defined in CTA-5004-B, published in April 2026.
CMCD supports two modes of transmission:
- Request mode: CMCD data is sent as HTTP headers or query parameters on manifest and media segment requests.
- Event mode (available since v11.4.0): CMCD events are POSTed to configured HTTP endpoints.
Request Mode
For request mode, use the CMCD connector for Web.
Event Mode
Event mode allows posting CMCD events to configured HTTP endpoints.
info
Event mode is supported starting from version 11.4.0.
Player-level configuration
const player = new THEOplayer.Player(element, {
cmcd: {
externalSessionId: 'YOUR-EXTERNAL-SESSION-ID', // optional
userId: 'YOUR-USER-ID', // optional
eventEndpoints: [{ url: 'https://example.com/cmcd-event-endpoint' }],
},
});
Source-level configuration
player.source = {
sources: [{ src: 'https://example.com/stream.m3u8' }],
cmcd: {
externalSessionId: 'YOUR-EXTERNAL-SESSION-ID', // optional
sessionId: 'YOUR-SESSION-ID', // optional
userId: 'YOUR-USER-ID', // optional
eventEndpoints: [{ url: 'https://example.com/cmcd-event-other-endpoint' }],
},
};
Merging behavior
- Source-level values take precedence for
externalSessionIdanduserId. eventEndpointsfrom both levels are merged (both player and source endpoints receive events).
warning
Event mode reporting currently only supports DRM and ad events.