Skip to content

docs(design): add PlaybackRates design#1572

Closed
ronald-urbina wants to merge 2 commits into
videojs:mainfrom
ronald-urbina:design/playback-rates
Closed

docs(design): add PlaybackRates design#1572
ronald-urbina wants to merge 2 commits into
videojs:mainfrom
ronald-urbina:design/playback-rates

Conversation

@ronald-urbina

@ronald-urbina ronald-urbina commented May 20, 2026

Copy link
Copy Markdown
Collaborator

Adds the PlaybackRates feature design — store state, configuration API, and
architectural decisions for consumer-configurable playback rate lists with
optional source plugin constraints.

Design summary

  • playback-rates attribute on <media-player> / playbackRates prop on
    <Player.Provider> — rates live at the root
  • Three store actions: setRequestedRates, setSourceRates, setPlaybackRate
  • playbackRates is a derived getter (intersection of requested and source),
    never stored directly
  • Source plugins constrain via setSourceRates; no overlap → empty list,
    controls disabled
  • Pattern scales to quality selection and other source-constrained features

@vercel

vercel Bot commented May 20, 2026

Copy link
Copy Markdown

@ronald-urbina is attempting to deploy a commit to the Mux Team on Vercel.

A member of the Team first needs to authorize it.

@netlify

netlify Bot commented May 20, 2026

Copy link
Copy Markdown

‼️ Deploy request for vjs10-site rejected.

Name Link
🔨 Latest commit 43022e4

@ronald-urbina ronald-urbina requested review from decepulis and luwes May 21, 2026 13:55
@ronald-urbina ronald-urbina marked this pull request as ready for review May 21, 2026 18:09
@ronald-urbina ronald-urbina marked this pull request as draft May 21, 2026 19:15
@ronald-urbina ronald-urbina changed the title docs(design): add PlaybackRates headless component design docs(design): add PlaybackRates design May 25, 2026
@ronald-urbina ronald-urbina marked this pull request as ready for review June 11, 2026 14:55
Comment on lines +62 to +71
interface MediaPlaybackRateState {
/** Derived — the effective list the UI reads. Never set directly. */
readonly playbackRates: readonly number[];
/** Set by the root player — consumer intent. */
readonly requestedRates: readonly number[];
/** Set by source plugins — null when unconstrained. */
readonly sourceRates: readonly number[] | null;
/** Currently active rate. */
readonly playbackRate: number;
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

comment: on first read I didn't understand what sourceRates meant (from what I understand, rates allowed by, for example, Vimeo Provider), maybe we should change the name. I was thinking supportedRates but not fully convinced either.

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.

4 participants