-
Notifications
You must be signed in to change notification settings - Fork 39
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: update schema, add provider key + transform #113
Conversation
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 looks good to me! My only thought: do we need/want the CLI to migrate existing assets over? Even if it's not a big deal now, do we want to set the precedent that we'll do so?
it crossed my mind as well, I thought to keep it for the v1. |
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.
Looks good to me 👍 (without fully running and testing it)
@@ -0,0 +1,2 @@ | |||
export * as mux from './mux/transformer.js'; | |||
export * as vercelBlob from './vercel-blob/transformer.js'; |
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.
If we get up to 10+ providers is there gonna be any value int splitting them out into their own packages rather than baked in? Or should we always just bake them in since there's a finite amount, to keep our lives easier? No change needed here, just wondering.
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.
that's a good point, we might have to split them up eventually because of the added dependencies that they bring.
@@ -133,6 +126,15 @@ export function getVideoProps(allProps: VideoProps, state: { asset?: Asset }) { | |||
return props; | |||
} | |||
|
|||
function transform(asset: Asset) { |
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 think I want to keep pushing on the idea of transforming the asset before it reaches <Video>
. import awesomeVideo
could include functions for getting dynamic URLs etc, not just metadata. Then I think the next-video UI layer becomes fully optional and you could just do <video src="${awesomeVideo.src}">
. But I know the crux of that is remote URLs, so a bigger conversation.
poster
andsources
are derived data so I didn't add them to the stored state yet.to generate this derived data,
transformer
's were added alongside the provider files.not in the same file as the provider, because the front-end needs to pull this in.