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 the foundational elements for a video quality selection feature. It includes a new UI component for users to choose video renditions, integrates this component into the existing watch controls, and updates the underlying context and core video source logic to support managing and applying manual rendition selections.

Highlights

  • New Quality Selector Component: A new QualitySelector Solid.js component has been added, allowing users to view available video renditions and select their preferred quality (Auto or specific rendition).
  • Integration into Watch Controls: The newly created QualitySelector component has been integrated into the WatchControls UI, placing it alongside other playback controls like the Latency Slider.
  • Extended WatchUIContext: The WatchUIContext has been extended to manage the state of available and active video renditions, providing signals and a setter function (setActiveRendition) for UI components to interact with.
  • Core Rendition Selection Logic: The core Source class in the hang package now includes a mechanism for manual rendition selection, allowing external callers to set a specific rendition by name, which takes precedence over automatic selection.
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 a quality selector component for the video player. The implementation looks solid, with changes spanning the UI component, the context provider, and the underlying video source logic to handle manual rendition selection. I've identified a couple of areas for improvement regarding type safety in an event handler and code duplication in the context provider. Addressing these will enhance the code's maintainability and robustness.

Comment on lines 81 to 87
const setActiveRenditionValue = (name: string | undefined) => {
const hangWatchEl = props.hangWatch();

if (hangWatchEl) {
hangWatchEl.video.source.setActiveRendition(name);
}
};

Choose a reason for hiding this comment

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

medium

This function repeats a pattern of getting hangWatch and checking if it exists. This pattern is also used in togglePlayback, setVolume, toggleMuted, and setLatencyValue. To reduce code duplication and improve maintainability, consider extracting this logic into a helper function.

For example, you could create a withHangWatch helper:

const withHangWatch = (fn: (hangWatch: HangWatch) => void) => {
    const hangWatchEl = props.hangWatch();
    if (hangWatchEl) {
        fn(hangWatchEl);
    }
};

Then, this function and others could be simplified:

const setActiveRenditionValue = (name: string | undefined) => {
    withHangWatch((hangWatch) => hangWatch.video.source.setActiveRendition(name));
};

@cotid-qualabs cotid-qualabs changed the title Feat: quality selector component wip feat: quality selector component Dec 10, 2025
cotid-qualabs and others added 2 commits December 11, 2025 11:47
…ties

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
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