-
Notifications
You must be signed in to change notification settings - Fork 41
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
cb380ff
to
fa28996
Compare
fa28996
to
28a7ddf
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
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. |
12b33f9
to
f428efd
Compare
d4b0653
to
b7ff54c
Compare
There was a problem hiding this 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 }; |
There was a problem hiding this comment.
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!
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)
b78f43a
to
6791417
Compare
6791417
to
3990253
Compare
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)