Skip to main content

编辑器入门中的后端路由

为了所有功能正常工作,某些后端端点必须被实现。默认实现使用 React Router 7 框架。

🌐 Some backend endpoints must be implemented by for all features to work.
The default implementation uses the React Router 7 framework.

POST /api/captions

用于根据音频文件为视频生成字幕。

🌐 Used to generate captions for a video based on an audio file.

GET /api/font/:name

返回特定字体的元数据,例如可用的字重和样式及其对应的 Google Fonts 链接。
由于所有默认字体的元数据总量会超过 10MB,这些信息是由后台提供的。

🌐 Returns the metadata for a specific font, such as available weights and styles and their corresponding Google Fonts URLs.
This information is provided by the backend because the metadata of all default fonts would be more than 10MB.

POST /api/upload

需要创建一个预签名 URL 来上传文件到 S3。

🌐 Needed to create a presigned URL for uploading a file to S3.

POST /api/render

触发 Remotion Lambda 上的渲染。

🌐 Triggers a render on Remotion Lambda.

POST /api/progress

获取 Remotion Lambda 上渲染的当前进度。

🌐 Gets the current progress of a render on Remotion Lambda.