Add in app video creation example - #14
Open
musab123-afk wants to merge 2 commits into
Open
Conversation
Companion code for the "Add video creation to your app without building an editor" guide: an embedded Studio SDK editor, a quick form, and a one-click headless render, all through one render proxy that keeps the API key server-side, records render ownership, validates asset URLs on both render paths, and rate limits per user.
Server: re-fetch the render from the API in the webhook receiver instead of trusting the unauthenticated payload's url, widen the private-address check to IPv4-mapped, unique-local and link-local IPv6, match leading whitespace in the asset-URL collector so " https://..." can't skip validation, and cap the request body. Client: register the form, headless and reset handlers without waiting on the editor mount so they work while it loads, seed the gallery from the user's own renders on load, add the missing audio track to the headless edit so all three paths produce the same video, and report a missing render proxy clearly instead of a JSON parse error.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
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.
Companion code for Add video creation to your app without building an editor (https://shotstack.io/learn/add-video-creation-to-your-app/): an embedded Studio SDK editor, a quick form, and a one-click headless render, all through one render proxy that keeps the API key server-side, records render ownership, validates asset URLs on both render paths, and rate limits per user.
Gated live on the sandbox: all three paths render to done (the editor verified mounting in headless Chrome), missing and wrong keys fail with one line and a non-zero exit, non-HTTPS and private-address asset URLs are rejected on both render paths, and the ownership record keeps one user's renders invisible to another. Second commit addresses code review: the webhook receiver re-fetches the render from the API instead of trusting the unauthenticated payload, the private-address check covers IPv4-mapped and link-local IPv6, the gallery seeds from the user's own renders on load, and the headless path gained the audio track the other two paths already had. Prettier passes with the root config.