🎥 Make videos programmatically with React
Add new TikTok template
Jonny Burger7b7eafc116df
diff --git a/packages/create-video/src/templates.tsx b/packages/create-video/src/templates.tsxindex f2d9b35c0a..3eb4755ee4 100644--- a/packages/create-video/src/templates.tsx+++ b/packages/create-video/src/templates.tsx@@ -40,7 +40,8 @@ export type Template = {| 'skia'| 'tailwind'| 'overlay'- | 'stargazer';+ | 'stargazer'+ | 'tiktok';defaultBranch: string;featuredOnHomePage: string | null;} & DynamicTemplate;@@ -328,4 +329,22 @@ export const FEATURED_TEMPLATES: Template[] = [defaultBranch: 'main',featuredOnHomePage: null,},+ {+ homePageLabel: 'TikTok',+ shortName: 'TikTok',+ org: 'remotion-dev',+ repoName: 'template-tiktok',+ description: 'Generate animated word-by-word captions',+ longerDescription:+ 'Caption a video of your choice locally with animated word-by-word captions. Automatically installs Whisper.cpp for you and allows you to customize the animation style.',+ promoVideo: {+ muxId: 'BzwCAYgGPqNtLk301tsgWCDvuWVWfEvaO2bIo2lGEd300',+ height: 1920,+ width: 1080,+ },+ cliId: 'tiktok' as const,+ type: 'video' as const,+ defaultBranch: 'main',+ featuredOnHomePage: null,+ },].filter(truthy);diff --git a/packages/docs/src/components/IconForTemplate.tsx b/packages/docs/src/components/IconForTemplate.tsxindex 5f626828b0..be3bde6501 100644--- a/packages/docs/src/components/IconForTemplate.tsx+++ b/packages/docs/src/components/IconForTemplate.tsx@@ -10,6 +10,7 @@ import { SkiaIcon } from "./icons/skia";import { Stargazer } from "./icons/stargazer";import { StillIcon } from "./icons/still";import { Tailwind } from "./icons/tailwind";+import { TikTok } from "./icons/tiktok";import { TypeScriptIcon } from "./icons/ts";import { TTSIcon } from "./icons/tts";import { Waveform } from "./icons/waveform";@@ -141,6 +142,10 @@ export const IconForTemplate: React.FC<{return <Stargazer style={{ height: scale * 36 }} />;}+ if (template.cliId === "tiktok") {+ return <TikTok style={{ height: scale * 36 }} />;+ }+return (<Blankstyle={{diff --git a/packages/docs/src/components/TemplateModalContent.tsx b/packages/docs/src/components/TemplateModalContent.tsxindex 584f6b9cee..dc69a4e7b4 100644--- a/packages/docs/src/components/TemplateModalContent.tsx+++ b/packages/docs/src/components/TemplateModalContent.tsx@@ -193,6 +193,7 @@ export const TemplateModalContent: React.FC<{aspectRatio: `${template.promoVideo.width} / ${template.promoVideo.height}`,width: "100%",height: "auto",+ maxHeight: 450,opacity: Number(loaded),display: loaded ? "inline-flex" : "none",borderRadius: 5,diff --git a/packages/docs/src/components/icons/tiktok.tsx b/packages/docs/src/components/icons/tiktok.tsxnew file mode 100644index 0000000000..d2821ea2b2--- /dev/null+++ b/packages/docs/src/components/icons/tiktok.tsx@@ -0,0 +1,13 @@+import type { SVGProps } from "react";+import React from "react";++export const TikTok: React.FC<SVGProps<SVGSVGElement>> = (props) => {+ return (+ <svg {...props} viewBox="0 0 448 512">+ <path+ fill="currentcolor"+ d="M448 209.9a210.1 210.1 0 0 1 -122.8-39.3V349.4A162.6 162.6 0 1 1 185 188.3V278.2a74.6 74.6 0 1 0 52.2 71.2V0l88 0a121.2 121.2 0 0 0 1.9 22.2h0A122.2 122.2 0 0 0 381 102.4a121.4 121.4 0 0 0 67 20.1z"+ />+ </svg>+ );+};