Skip to content

Conversation

@cotid-qualabs
Copy link

No description provided.

@gemini-code-assist
Copy link

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 introduces a new "clip" functionality for alternative media presentations, enabling precise control over the duration of alternative content playback before automatically returning to the main stream. It includes significant refinements to the AlternativeMediaController's switch-back logic, particularly for dynamic content, and adds robust functional tests to validate the new clipping behavior across both Video-on-Demand (VOD) and Live streaming environments.

Highlights

  • New 'Clip' Functionality: Implemented the 'clip' attribute for alternative media presentations, allowing a specific duration of alternative content to be played before automatically switching back to the main content.
  • Refined Switch-Back Logic: Updated the logic in AlternativeMediaController to more accurately determine when to switch back from alternative content, especially for dynamic streams and when the 'clip' functionality is active. This includes handling cases where the event's deltaTime might be zero or negative.
  • Comprehensive Functional Tests: Added new functional tests for both VOD-to-VOD and Live-to-Live scenarios to thoroughly validate the new 'clip' functionality, ensuring correct behavior and precise timing for content termination.
  • Improved Live Test Assertions: Enhanced existing live alternative MPD tests by refactoring event injection to allow external control over presentation time and by using closeTo assertions for more robust and accurate timing checks, accounting for live stream latency.
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.

Copy link

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

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 functional tests for the alternative media 'clip' functionality, covering both VOD-to-VOD and Live-to-Live scenarios. The changes include new test files, test configurations, and a sample MPD. The AlternativeMediaController is also updated to refine the logic for switching back from alternative content, particularly for dynamic streams and clipped content.

My review has identified a potential logic issue in AlternativeMediaController related to how maxDuration is checked, which could lead to premature switching. I've also suggested improvements to the new tests to increase their robustness and maintainability.

cotid-qualabs and others added 8 commits September 26, 2025 11:56
…pd-clip-vod.js

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…f github.com:qualabs/dash.js into alternative-media-presentations/clip-functional-test
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@sebastianpiq sebastianpiq merged commit 6594b70 into feature/alternative-media-presentations Sep 26, 2025
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.

3 participants