-
Notifications
You must be signed in to change notification settings - Fork 32
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: decoupled video config #306
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #306 +/- ##
==========================================
- Coverage 90.67% 88.09% -2.59%
==========================================
Files 30 32 +2
Lines 2456 2562 +106
Branches 350 285 -65
==========================================
+ Hits 2227 2257 +30
- Misses 228 304 +76
Partials 1 1 ☔ View full report in Codecov by Sentry. |
9e6b7e0
to
8343c5b
Compare
71644d3
to
6367285
Compare
6367285
to
70e9f42
Compare
70e9f42
to
2526e28
Compare
2526e28
to
cc5a56b
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.
Should the CLI create/write this file on init now? Docs updates?
7928ae0
to
25e88f0
Compare
fix #304
related #281
This change adds a video config that is decoupled (not stored) in the Next runtime config which allows us to store complex objects like functions. It's a similar pattern that next-auth uses.
The old pattern of adding the video config to next.config.js still works for processing local assets but remote assets will require adding a
next-video.(js|mjs)
file with the video config. This file will export some functions that can then be used in the video API routes.for example:
withNextVideo
is exported as well so devs don't need to duplicate the video config.In this file devs will be able to add auth or other access control.
The processing on a GET request if the file is not processed yet is removed.
This requires an explicit POST request now to
e.g.
/api/video?url=https://storage.googleapis.com/muxdemofiles/mux.mp4