Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: replace Mux player w/ Media Chrome + media #303

Merged
merged 14 commits into from
Dec 20, 2024

Conversation

luwes
Copy link
Collaborator

@luwes luwes commented Sep 27, 2024

BREAKING CHANGE: Replace the default player, Mux player with Media Chrome + media elements.

fix #292

Warning

Just noting here that users will lose access to the default Mux player theme since it's not easily accessible.

https://next-video-demo-git-fork-luwes-media-chrome-player-mux.vercel.app/
https://next-video-demo-git-fork-luwes-media-chrome-player-mux.vercel.app/custom-theme

An interesting one is again that we use the mux-video custom element instead of MuxVideoReact because we want to support the renditions and audio tracks API. We did the same in Player.style. (See muxinc/elements#910)

@luwes luwes self-assigned this Sep 27, 2024
Copy link

vercel bot commented Sep 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
next-video-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 20, 2024 0:12am

@codecov-commenter
Copy link

codecov-commenter commented Oct 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.01%. Comparing base (199e158) to head (3990253).
Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #303      +/-   ##
==========================================
- Coverage   88.88%   86.01%   -2.88%     
==========================================
  Files          32       36       +4     
  Lines        2601     2995     +394     
  Branches      362      387      +25     
==========================================
+ Hits         2312     2576     +264     
- Misses        286      416     +130     
  Partials        3        3              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@luwes luwes marked this pull request as ready for review October 2, 2024 20:56
@luwes luwes changed the title feat: replace Mux player w/ Media Chrome + media feat!: replace Mux player w/ Media Chrome + media Oct 3, 2024
Copy link
Contributor

@mmcc mmcc left a comment

Choose a reason for hiding this comment

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

I need to get into the rest of the code, it gets pretty dense and requires a thinking hat (for me, I'm rusty). Started at least with some questions in the readme that might affect some of the implementation review?


export type VideoProps<TPlaybackId = string | undefined> = TPlaybackId extends string
? Omit<Partial<MuxVideoProps> & PlayerProps, 'src' | 'poster'> & SuperVideoProps & { playbackId?: TPlaybackId }
: Omit<NativeVideoProps & PlayerProps, 'src' | 'poster'> & SuperVideoProps & { playbackId?: undefined };
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this makes it so that when a playbackId is inferred from the src the types adapt to MuxVideoProps, otherwise restricted to native video props. didn't know this was possible since a few days ago, did take some time to figure it out but it's so good!

luwes added a commit to luwes/elements that referenced this pull request Dec 19, 2024
luwes added a commit to muxinc/elements that referenced this pull request Dec 19, 2024
related muxinc/next-video#303

motivation:

- we use the React wrapper with custom mux-video element in 2 places
(player.style and next-video soon)
- open issue asking for support
(#910)
@luwes luwes force-pushed the media-chrome-player branch from b78f43a to 6791417 Compare December 20, 2024 00:07
@luwes luwes force-pushed the media-chrome-player branch from 6791417 to 3990253 Compare December 20, 2024 00:11
@luwes luwes merged commit 439d96a into muxinc:main Dec 20, 2024
8 checks passed
@luwes luwes deleted the media-chrome-player branch December 20, 2024 00:15
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.

Switch player to Media Chrome + smart media element selection
3 participants