Skip to content

Feature/cmcdv2 update#162

Merged
cotid-qualabs merged 10 commits into
feature/cmcdv2from
feature/cmcdv2-update
Feb 10, 2026
Merged

Feature/cmcdv2 update#162
cotid-qualabs merged 10 commits into
feature/cmcdv2from
feature/cmcdv2-update

Conversation

@littlespex

Copy link
Copy Markdown

No description provided.

@gemini-code-assist

Copy link
Copy Markdown

Warning

Gemini encountered an error creating the summary. You can try again by commenting /gemini summary.

@littlespex littlespex marked this pull request as ready for review February 10, 2026 00:38
@littlespex

Copy link
Copy Markdown
Author

@nicolaslevy @cotid-qualabs These changes are ready to merge, but I noticed something when reviewing the CMCD event reports: When no events or keys are provided, the current code treats that as "All keys/events enabled". We moved away from this approach in CML for 2 reasons:

  1. There are so many new keys and events in v2, so defaulting to everything seems like too much.
  2. It is easier to reason about the code base when an empty array simply means "nothing", instead of it being a special case that actually means "everything".

Was this functionality added in the initial v2 changes, or was this how it worked in previous versions of dash.js with CMCD v1 support?

@cotid-qualabs

Copy link
Copy Markdown

@littlespex We implemented that behavior in the first approach we took for CMCDv2, but it seems we missed updating it after it became deprecated. We will update the behavior on this branch if that’s okay

@cotid-qualabs

Copy link
Copy Markdown

Just to be aligned, the updated behavior is:

  • If no events are defined (or the array is empty), no reports are sent.
  • If no keys are defined (or the array is empty), only mandatory keys are sent.

Combinations:

  • No events + defined keys → no report is sent.
  • Events + undefined keys → only mandatory keys are sent.
  • No events + no keys → no report is sent.
  • Events + keys → a report is sent.

Is this correct?

@littlespex

Copy link
Copy Markdown
Author

That is the correct behavior.

@cotid-qualabs cotid-qualabs merged commit 72787f9 into feature/cmcdv2 Feb 10, 2026
1 check passed
cotid-qualabs added a commit that referenced this pull request Jun 10, 2026
* Feature MPD  update on validity expiration (#68)

* Revert "Feature MPD  update on validity expiration (#68)"

This reverts commit bf31094.

* feat: implement CMCD v2 functionality

* event mode with body transmission mode only

* remove url encode from body transmission mode

* add editable configs to cmcd sample page

* add src input to cmcd v2 sample page

* create provider for CMCDParameters lazy loading

* chore: CMCDv2 migration to CMCD Reporter (#159)

* cmcd reporter initialization

* request mode migration

* event mode migration

* cmcd model migration

* fix cmcd model unit tests

* fixes for cmcd parameters and cleanup -
protection controller fixes WIP

* cleanup and update unit tests

* refactor unit tests and fixes

* fix unit tests and remove batchTimer

* Cmcdv2: keys compliance check (#160)

* ab, lab and tab inner list and request mode

* ab, tab and lab inner list for v2

* bl inner list and event mode

* br inner list and event mode

* toInnerList helper

* bsd inner list

* mtp inner list and event mode

* nor inner list

* pb inner list and event mode

* tp inner list and event mode

* tpb inner list and event mode

* fix unit tests

* feat: update CML dependencies

* fix race condition on cmcd contrller for cmcd parameters

* Feature/cmcdv2 update (#162)

* chore: update CML dependencies

* fix: update common media request

* fix: update resourceTiming properties to use performance.now()

* fix: update cmcd data formatting

* fix: remove redundant rr values

* refactor: simplify cmcd reporting

* fix: test mock requests missing parameters

* chore: update cml cmcd version

* should not send report if events are undefined

* fix unit tests

---------

Co-authored-by: cotid-qualabs <constanzad@qualabs.com>

* feat/cmcd-v2-request-validation (#163)

* feat: add CMCD v2 Playwright E2E tests with spec validation

Adds comprehensive E2E tests using Playwright to validate CMCD v2 payloads
at the network level during real playback. Uses @svta/cml-cmcd validation
functions (validateCmcd, validateCmcdHeaders, validateCmcdEvent, validateCmcdKeys)
for spec-level compliance checks across query, header, and event modes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: replace Playwright E2E tests with Karma functional tests for CMCD v2

Replace the Playwright-based E2E test suite with Karma functional tests
that use XHR interceptors to validate CMCD v2 spec compliance. This
eliminates the @playwright/test dependency (~100MB) while maintaining
full test coverage across all three transmission modes (query, header,
event), key filtering, and version validation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor: remove double parsing from CMCD v2 tests

CmcdRequestCollector now stores raw CMCD strings instead of pre-parsed
objects, removing its dependency on @svta/cml-cmcd entirely. Tests use
validation function return values (result.data) for both spec validation
and data assertions in a single pass.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* chore: update cml packages

* fix: add logging to xhr collector

* refactor: use unified collector and validateCmcdRequest for CMCD v2 tests

Rewrite CmcdRequestCollector with a single requests array storing
httpRequest objects compatible with CML's validateCmcdRequest(). Replace
mode-specific validators (validateCmcd, validateCmcdHeaders) with the
unified validateCmcdRequest() and remove the invalid validateCmcdKeys
test that was passing a string to a function expecting a parsed object.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

* chore: update CMCD version

* Dedicated sample section for CMCD

* Use headers transmission mode string from CML

* Align CMCD v2 config naming with CML spec

Rename targets->eventTargets, timeInterval->interval, includeOnRequests->
includeInRequests across settings, samples, and tests. Switch event
validation to validateCmcdEvents (batch). HTTPLoader now accepts empty
POST bodies so CMCD event endpoints don't trigger retries.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* chore: update cml versions

* Catch errors in recordResponseReceived

* Fix wrong URLs in CMCD demos

* Small refactoring in DashManifestModel.js

* Minor refactoring

* Cleanup all events in CmcdController.js when resetting

* Refactor CustomParametersModel.js

* Add CMCD version to reference UI

* Small refactoring in CmcdModel.js

* Add link to sample setion in reference UI

* Add missing CMCD fields to JSDoc in Settings.js

* Add include in requests CMCD field to reference UI

* Add a warning when catching an error in the CmcdController.js

* Add a simple express.js server that the local CMCD demos can report against

* Refactoring of CMCD demo and classes

* Additional CMCD refactoring

* fix: update CML dependencies to address missing CMCD nor values

* Check for CMCD enabled directly for each request

* Function renaming for CMCD

* Rework the CMCD samples

* Fix unit tests

* Adjust samples

* Fix linting issues

* Rename context to dataContext for clarity

* Fix wrong use of this instead of instance

* Reset _isSeeking and remove wrong payload for getGenericCmcdData

* Remove duplicate entries in HTTPRequest.js

* Do not execute CMCD tests when no init segment was identified

* Avoid error when representationController is not defined in _onDataUpdateCompleted

---------

Co-authored-by: Sebastian Piquerez <89274285+sebastianpiq@users.noreply.github.com>
Co-authored-by: Casey Occhialini <1508707+littlespex@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Daniel Silhavy <daniel.silhavy@fokus.fraunhofer.de>
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