Skip to content

Conversation

@cjpillsbury
Copy link
Contributor

@cjpillsbury cjpillsbury commented Jan 15, 2026

Exposes hls.js's capRenditionToPlayerSize option with a Mux-optimized default.

Closes #1238 (based off of initial effort from @spuppo-mux in #1251)

Behavior

Value Behavior
undefined (default) Caps to player size, 720p minimum floor
true Standard hls.js capping (may go below 720p)
false No capping

Test plan

  • npm run devhttp://localhost:3000/MuxPlayer
  • Toggle "Cap Level To Player Size" between None/true/false
  • Verify no console errors
  • Verify config: document.querySelector('mux-player').media.nativeEl._hls.config.capLevelToPlayerSize
  • Trigger a rendition switch/re-selection via ABR - e.g. open Chrome Dev Tools, resize player size, seek backwards during playback to prompt segment reloading, and confirm that rendition does(n't) get capped under different permutations

@snyk-io
Copy link

snyk-io bot commented Jan 15, 2026

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@cjpillsbury cjpillsbury requested a review from a team as a code owner January 15, 2026 16:10
@vercel
Copy link

vercel bot commented Jan 15, 2026

@cjpillsbury is attempting to deploy a commit to the Mux Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link

vercel bot commented Jan 15, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
elements-demo-astro Ready Ready Preview, Comment Jan 15, 2026 8:37pm
elements-demo-nextjs Ready Ready Preview, Comment Jan 15, 2026 8:37pm
elements-demo-svelte-kit Ready Ready Preview, Comment Jan 15, 2026 8:37pm
elements-demo-vanilla Ready Ready Preview, Comment Jan 15, 2026 8:37pm
elements-demo-vue Ready Ready Preview, Comment Jan 15, 2026 8:37pm

Review with Vercel Agent

Copy link
Contributor

@heff heff left a comment

Choose a reason for hiding this comment

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

A few problems I see with the API:

We're pulling in the word "level" from HLS.js, but it's a vague term that we don't use anywhere else in the player settings docs. We use "resolution" otherwise.

We're explicitly calling out HLS.js, while otherwise we've only ever mentioned it as "(currently hls.js)". So this hardens the tie to HLS.js to some degree.

There's also not quite enough detail in the docs on the interaction between this, maxAutoResolution, maxResolution (not quite sure how this differs from the auto version), minResolution. Some quick notes in each setting about the interaction could solve this one.

Considering the future of MuxPlayer there's a world where we call this a "quick and advanced" feature and lean harder into that with the messaging: Say "ADVANCED" in the setting description, name it "capHlsLevel..." to be explicit abou the tie in the name.

But I think we should just polish it up.

  • Change Level to Resolution
  • Get clear on the interaction beteween related settings and make them clear in the docs.

Copy link
Contributor

@luwes luwes left a comment

Choose a reason for hiding this comment

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

Code looks good to me but yes def agree with Steve about the naming.

…cap controller type (build + test issues with prior impl)
Copy link
Contributor

@heff heff left a comment

Choose a reason for hiding this comment

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

API updates look good, thanks 👍

@cjpillsbury cjpillsbury merged commit 9dfac1b into muxinc:main Jan 16, 2026
13 checks passed
@github-actions github-actions bot mentioned this pull request Jan 16, 2026
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.

Feature Request: Expose a capLevelToPlayerSize property and attribute on Mux media elements

4 participants