[RFC] Mux Source & URL DX#1665
Open
R-Delfino95 wants to merge 6 commits into
Open
Conversation
✅ Deploy Preview for vjs10-site ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
@R-Delfino95 is attempting to deploy a commit to the Mux Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #1432
Refs #1431
Refs #977
Summary
RFC for how
<mux-video>takes a source — and signs and refreshes its token — without the surface changing when the playback engine changes. Motivated by signed-token refresh (#1432), under the Mux Media Elements epic (#977). Status: accepted — direction approved in review.Problem
<mux-video>has no token surface today (it only reads the playback-id out ofsrcfor analytics), so signed playback hard-fails mid-session when the JWT lapses — there's nothing to refresh. Two DX goals (convenience vs. lean-on-src) had to be reconciled under one hard constraint: the surface stays engine-agnostic.Decision
src(plus an optional standalonetoMuxVideoURLhelper to build it); noplayback-id/tokenscomponent attributes. Aligns with the Video.js direction: normalize towardsource, fewer Mux-specific props than Mux Player — one surface, not two.403, re-resolving the master. On hls.js / native this is a controlled media reload (on par with Mux Player today, improvable later); seamless on SPF — the migration target.Open for the implementation design doc
Exact refresh API shape (callback vs
onTokenExpiringevent), where the resolver lives, signed-thumbnail tokens, and whether to ship a minimalplayback-tokenpass-through first.Note
Low Risk
Documentation-only RFC; no runtime or API code changes in this PR.
Overview
Adds
rfc/mux-source-dx.mdas an accepted RFC that locks direction for<mux-video>signed playback and source configuration (motivated by #1432, epic #977).The doc records a source-based public API:
srconly on the element, with an optional off-componenttoMuxVideoURLhelper — explicitly notplayback-id/tokensattributes. Player-owned token refresh is agreed: the integrator supplies one async callback; the player reads JWTexp, refreshes proactively and/or on403, and re-resolves the master URL. It states that mid-session refresh is a controlled media reload on hls.js/native (v1 bar, comparable to Mux Player) and can be seamless on SPF later.It also captures layering (surface vs resolver vs engine), resolved risk (JWT on master only; §6.3.4 not blocking), next steps (implementation design, possible minimal token pass-through first), and remaining open questions (exact refresh API shape, resolver placement, signed thumbnails).
Reviewed by Cursor Bugbot for commit 3a9a5c8. Bugbot is set up for automated code reviews on this repo. Configure here.