Skip to content

Cmcdv2/cmcd parameters#156

Merged
cotid-qualabs merged 9 commits into
sgai/alternative-cmcdfrom
cmcdv2/cmcd-parameters
Jan 23, 2026
Merged

Cmcdv2/cmcd parameters#156
cotid-qualabs merged 9 commits into
sgai/alternative-cmcdfrom
cmcdv2/cmcd-parameters

Conversation

@cotid-qualabs

Copy link
Copy Markdown

No description provided.

@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello @cotid-qualabs, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the CMCD implementation by enabling the definition and processing of CMCD version 2 reporting targets directly from the DASH manifest. This change provides greater flexibility and dynamic control over how CMCD data is collected and transmitted, allowing content providers to specify reporting endpoints and parameters within the media manifest itself. The update includes new data structures, parsing logic, and configuration prioritization to seamlessly integrate manifest-driven CMCD reporting into the player's workflow.

Highlights

  • CMCD v2 Manifest-based Reporting Targets: Introduced support for defining CMCD (Common Media Client Data) reporting targets directly within the DASH manifest, allowing for dynamic configuration of CMCD data collection and transmission.
  • New EventTarget Class: Added a new EventTarget class to represent individual CMCD reporting endpoints, including properties for URL, time interval, mode, keys, events, and enabled status.
  • Configuration Priority: Updated the CMCD configuration system to prioritize manifest-defined reporting targets over existing player settings, ensuring that manifest specifications take precedence.
  • DASH Parser Enhancements: Modified the DASH parser to recognize and process ReportingTargets and EventTarget elements within the manifest, integrating them into the player's CMCD logic.
  • Comprehensive Unit Tests: Added extensive unit tests to validate the new manifest-based CMCD v2 reporting target functionality, covering various scenarios such as URL, mode, event filtering, multiple targets, and configuration priority.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request introduces comprehensive support for CMCD v2 parameters, specifically focusing on ReportingTargets and EventTarget objects as defined in the CMCD specification. The changes include adding new constants, updating the DASH parser to recognize EventTarget nodes, and implementing a new EventTarget class. The CMCDParameters class has been enhanced to correctly parse ReportingTargets from the manifest, handling both single and multiple EventTarget entries. The CmcdPropertyMap has been updated to prioritize manifest-defined CMCD v2 parameters over player settings, ensuring adherence to the specification's precedence rules. Additionally, new unit tests have been added to thoroughly validate the new functionality across various scenarios, including different reporting modes, event filtering, and manifest-settings priority. Overall, the implementation appears robust and well-tested, significantly extending the player's CMCD capabilities.

this.mode = data.mode ?? 'query';
this.keys = data.keys ? data.keys.split(' ') : null;
this.events = data.events ? data.events.split(' ') : null;
this.enabled = data.enabled;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The enabled property is initialized to true in the constructor, but then directly assigned data.enabled in the init method. If data.enabled is undefined or null (meaning it's not explicitly provided in the manifest or settings), it will overwrite the default true with undefined or null. It's generally safer to provide a fallback for data.enabled if it's not explicitly set, similar to how mode is handled, to ensure the property always has a boolean value.

Suggested change
this.enabled = data.enabled;
this.enabled = data.enabled ?? true;

@cotid-qualabs cotid-qualabs merged commit 41bd934 into sgai/alternative-cmcd Jan 23, 2026
1 check passed
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.

1 participant