Skip to content

feat: update @svta/cml-cmcd to 2.4.0 - [Cursor]#6

Open
littlespex wants to merge 3 commits into
developmentfrom
task/cml-cmcd-2.4.0-cursor
Open

feat: update @svta/cml-cmcd to 2.4.0 - [Cursor]#6
littlespex wants to merge 3 commits into
developmentfrom
task/cml-cmcd-2.4.0-cursor

Conversation

@littlespex
Copy link
Copy Markdown
Member

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates dash.js’ CMCD integration and related tests to align with @svta/cml-cmcd 2.4.0, including new/updated CMCD v2 event semantics and functional test tooling.

Changes:

  • Bump @svta/cml-cmcd from 2.3.2 to 2.4.0 and update lockfile.
  • Refactor CMCD controller/model interactions (state updates, error event payload, continuous vs event-mode data paths).
  • Modernize functional CMCD v2 tests to use CmcdReportRecorder and add a dedicated functional streams config for CMCD.

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
test/unit/test/streaming/streaming.controllers.CmcdController.js Extends unit coverage for CMCD v2 event payloads (e.g., ec) and playback-rate (pr) events.
test/functional/test/feature-support/cmcd.js Removes progressing-state assertion from CMCD functional test flow.
test/functional/test/feature-support/cmcd-v2.js Migrates request/event capture from custom collector to CmcdReportRecorder and updates assertions accordingly.
test/functional/helpers/CmcdRequestCollector.js Removes the now-replaced custom XHR CMCD request collector helper.
test/functional/config/test-configurations/streams/cmcd.json Adds a focused CMCD functional test stream configuration.
src/streaming/models/CmcdModel.js Adds getContinuousCmcdData() and updates CMCD data-generation notes.
src/streaming/controllers/CmcdController.js Refactors reporter updates and event triggering to match the updated CMCD library behavior, including updated ec formatting.
package.json Updates @svta/cml-cmcd dependency version.
package-lock.json Updates @svta/cml-cmcd resolved version/integrity metadata.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +604 to +609
function getContinuousCmcdData() {
const data = getEventModeData();
delete data.bg;
delete data.br;
return data;
}
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in d22b82c: _getMetricsCmcdData() builds continuous snapshots without calling _getEncodedBitrateData() or setting bg, instead of computing those fields and deleting them on every applyCmcdToRequest refresh.

Comment on lines 449 to 451
for (const evt of events) {
const contentType = evt.httpRequest.headers['content-type'] || '';
const contentType = evt.request.headers['content-type'] || '';
expect(contentType).to.include('application/cmcd');
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No change needed for this harness: every cmcd-v2.js suite attaches createXhrTransport(), which stores headers as this._cmcdHeaders[name.toLowerCase()] = value in @svta/cml-cmcd@2.4.0. evt.request.headers['content-type'] matches the recorded HttpRequest regardless of the casing dash.js passes to setRequestHeader (Content-Type).

Build continuous reporter snapshots without encoded bitrate or
background fields instead of computing and deleting them on every request.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants