Bitmovin Player

The Bitmovin Player supports CMCD v1 on Web, Android, iOS and tvOS. It is off until you configure it.

Updated

Support

CMCD Bitmovin Player
CMCD v1 since Web with the CMCD integration, Android 3.153.0, iOS and tvOS 3.104.0
CMCD v2 since Not known
Default transmission Header; query parameter available on Web and Android
On by default No

Bitmovin states that the player supports CMCD v1 only for now. On Web, CMCD is not part of the player itself but comes from a separate open-source integration, first released in May 2023.

Web

Install the CMCD integration:

Shell
npm install --save @bitmovin/player-web-integration-cmcd

Add it to your player configuration before you create the player:

TypeScript
import { CmcdConfig, CmcdIntegration, CustomKey, HeaderType } from '@bitmovin/player-web-integration-cmcd';

const cmcdConfig: CmcdConfig = {
  useQueryArgs: true,
  contentId: '<CONTENT_ID>',
  customKeys: [
    new CustomKey('org.svta-p-n', 'Bitmovin Player', HeaderType.Session),
    new CustomKey('org.svta-p-v', '<PLAYER_VERSION>', HeaderType.Session),
  ],
};

const cmcdIntegration = new CmcdIntegration(cmcdConfig);

playerConfig.network = {
  preprocessHttpRequest: cmcdIntegration.preprocessHttpRequest,
  preprocessHttpResponse: cmcdIntegration.preprocessHttpResponse,
};
playerConfig.adaptation = {
  desktop: {
    onVideoAdaptation: cmcdIntegration.onVideoAdaptation,
    onAudioAdaptation: cmcdIntegration.onAudioAdaptation,
  },
  mobile: {
    onVideoAdaptation: cmcdIntegration.onVideoAdaptation,
    onAudioAdaptation: cmcdIntegration.onAudioAdaptation,
  },
};

Then connect the integration to the player and load the source:

TypeScript
cmcdIntegration.setPlayer(player);
cmcdIntegration.setSessionId(player.analytics.getCurrentImpressionId());
player.load(source);
  • useQueryArgs: true sends the CMCD query parameter. Without it, the integration sends headers.
  • The integration does not generate a session ID. The example uses the Bitmovin Analytics impression ID, as in the integration’s README; without a session ID, sid is omitted.
  • Set contentId only if you know the content ID; otherwise cid is omitted.
  • org.svta-p-n and org.svta-p-v report the player name and version, as defined in the CMCD custom key repository. Replace <PLAYER_VERSION> with the version of the Bitmovin Player you use. In header mode, each custom key needs its header; both keys belong in CMCD-Session.

Android

Since 3.153.0, CMCD is configured per source through SourceConfig.cmcdConfig, which defaults to CmcdConfig.Disabled. It applies to DASH, HLS and Smooth Streaming sources; progressive sources ignore it.

Kotlin
sourceConfig.cmcdConfig = CmcdConfig.Enabled(
  transmissionMode = CmcdTransmissionMode.Query,
  contentId = "<CONTENT_ID>",
)
  • CmcdTransmissionMode.Header is the default; Query sends the CMCD query parameter.
  • CmcdSessionId.Generate, the default, creates a random session ID per source.
  • Set contentId only if you know the content ID.
  • The Android SDK has no option for custom keys.

iOS and tvOS

Since 3.104.0, CMCD is enabled per source on iOS and tvOS 18 and visionOS 2 or later:

Swift
sourceConfig.cmcdConfig.isEnabled = true
  • The iOS SDK sends CMCD only as headers, so your CDN must log the CMCD headers.
  • By default, CMCD is sent only on video and audio requests.
  • The iOS SDK has no option for custom keys.

Bitmovin documentation