Skip to content

Conversation

@sebastianpiq
Copy link

No description provided.

@gemini-code-assist
Copy link

Summary of Changes

Hello @sebastianpiq, 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 implements a significant feature to improve the "live to live switch back" experience within the player. It introduces more robust seeking behavior for dynamic live streams by intelligently handling target seek times relative to the DVR window. Additionally, it provides new functionalities for managing the DVR window and includes general code cleanup and refactoring to enhance the player's stability and maintainability.

Highlights

  • Improved Live Stream Seeking: Enhanced the logic for switching back to live content, ensuring that seeks are correctly handled within the DVR window for dynamic manifests. If a target seek time is before the DVR window start, the player now intelligently seeks to the beginning of the DVR window.
  • DVR Window Control: Introduced new API methods (getDvrWindowStart, seekToStartDvrWindow) in PlaybackController for better management and interaction with the DVR window in live streams.
  • Code Refinements and Cleanup: Cleaned up unused fullscreenDiv related code from MediaManager.js and refactored event resolution logic in EventController.js and seek time calculation in AlternativeMediaController.js for improved maintainability.
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 implements the switch back from a live alternative stream to the main live stream, ensuring seeks are handled correctly within the DVR window. The changes look good overall, but I've found a couple of minor issues: a typo in a variable name and a leftover debugging statement that should be removed.


const type = streamController && streamController.hasVideoTrack() ? Constants.VIDEO : Constants.AUDIO;
const dvrInfo = dashMetrics.getCurrentDVRInfo(type);
console.log(dvrInfo);

Choose a reason for hiding this comment

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

high

This console.log statement appears to be for debugging purposes and should be removed before merging.

Comment on lines 537 to 543
const erarlyToResolveEvent = _checkForEarliestResolutionTimeEvents(event);

if (!erarlyToResolveEvent || event.triggeredReadyToResolve) {
return false;
}

const resolutionTime = event.calculatedPresentationTime - event.alternativeMpd .earliestResolutionTimeOffset;
const resolutionTime = event.calculatedPresentationTime - erarlyToResolveEvent.earliestResolutionTimeOffset;

Choose a reason for hiding this comment

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

medium

There's a typo in the variable name erarlyToResolveEvent. It should be earlyToResolveEvent for better readability and to avoid confusion. I've corrected it in the suggestion.

Suggested change
const erarlyToResolveEvent = _checkForEarliestResolutionTimeEvents(event);
if (!erarlyToResolveEvent || event.triggeredReadyToResolve) {
return false;
}
const resolutionTime = event.calculatedPresentationTime - event.alternativeMpd .earliestResolutionTimeOffset;
const resolutionTime = event.calculatedPresentationTime - erarlyToResolveEvent.earliestResolutionTimeOffset;
const earlyToResolveEvent = _checkForEarliestResolutionTimeEvents(event);
if (!earlyToResolveEvent || event.triggeredReadyToResolve) {
return false;
}
const resolutionTime = event.calculatedPresentationTime - earlyToResolveEvent.earliestResolutionTimeOffset;

@cotid-qualabs cotid-qualabs merged commit c871f7f into feature/alternative-media-presentations Sep 25, 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