Developer reference
/integrations/player-sdk

A player SDK shape,
not a shipped SDK claim.

TESTED

Claim status labels: see definitions.

This page is a reference for the planned Open Player SDK integration shape: initialize a player with a session and content identity, emit a periodic heartbeat with playback and session state, and attach a small CMCD payload to segment-request callbacks. The public implementation and API are not available yet.

Planned shape

Three signals from one playback integration boundary.

The illustrative stub below shows the intended handoff points without pretending to be an installable library or a final API. Heartbeats carry only clearly labeled playback and session state; CMCD is emitted separately when a segment request provides its context.

Illustrative only — API names may change
// Illustrative only; API names may change.
const player = createPlayer({
  sessionId: 'session-example',
  contentId: 'content-example',
});

// The planned SDK would invoke this on a periodic heartbeat cadence.
player.on('heartbeat', () => {
  player.emitHeartbeat({
    session: {
      sessionId: player.sessionId,
      contentId: player.contentId,
    },
    playback: {
      positionSeconds: player.currentTime(),
      paused: player.isPaused(),
      bufferSeconds: player.bufferedAhead(),
    },
  });
});

// Emit the small CMCD shape when a segment request completes.
player.on('segmentRequest', ({ startedAt, bitrateKbps, bufferSeconds, response }) => {
  player.emitCmcd({
    'CMCD-Object': {
      sid: player.sessionId,
      cid: player.contentId,
      br: bitrateKbps,
      bl: bufferSeconds,
    },
    'CMCD-Request': {
      ts: startedAt,
      ttfb: response.ttfbMs,
    },
  });
});
What the stub covers
  1. 01
    InitializeEstablish the player session with a sessionId and contentId.
  2. 02
    HeartbeatReport playback position, pause state, and buffered seconds on the planned cadence.
  3. 03
    Emit CMCDAttach the six-field CMCD shape when a segment request completes.
Field reference

The six fields shown in the illustrative stub.

This list mirrors the stub exactly and groups each key under the CMCD object where it is shown. It is not a complete implementation of every CTA-5004 family.

CMCD-Object
4 fields
sid
The player session identifier.
cid
The content identifier from player initialization.
br
The encoded bitrate for the requested object.
bl
The playback buffer length at request time.
CMCD-Request
2 fields
ts
The timestamp associated with the segment request.
ttfb
The illustrative time-to-first-byte measurement.
Repository status

Repository coming soon.

The public repository is coming soon. There is no installable or public implementation to link from this page yet.

For currently available CMCD setup and evidence context, visit the existing CMCD evidence surface. That surface is separate from this planned SDK reference; it is not the Open Player SDK repository or API.