Become a Pro / portrait-video · becomeapro.ai / src / scenes / OutroScene.tsx
| 1 | import React from "react"; |
| 2 | import { |
| 3 | AbsoluteFill, |
| 4 | Img, |
| 5 | OffthreadVideo, |
| 6 | interpolate, |
| 7 | staticFile, |
| 8 | useCurrentFrame, |
| 9 | useVideoConfig, |
| 10 | } from "remotion"; |
| 11 | import { fontFamily } from "../fonts"; |
| 12 | |
| 13 | export const OutroScene: React.FC<{ |
| 14 | bgFile?: string; |
| 15 | }> = ({ bgFile }) => { |
| 16 | const frame = useCurrentFrame(); |
| 17 | const { durationInFrames } = useVideoConfig(); |
| 18 | |
| 19 | // Quick fade-in over first 15 frames, then stay visible |
| 20 | const fadeIn = interpolate(frame, [0, 15], [0, 1], { |
| 21 | extrapolateLeft: "clamp", |
| 22 | extrapolateRight: "clamp", |
| 23 | }); |
| 24 | const logoScale = interpolate(frame, [0, 15], [0.9, 1], { |
| 25 | extrapolateLeft: "clamp", |
| 26 | extrapolateRight: "clamp", |
| 27 | }); |
| 28 | |
| 29 | // Fade everything to black over the last 30 frames |
| 30 | const fadeOut = interpolate( |
| 31 | frame, |
| 32 | [durationInFrames - 30, durationInFrames - 1], |
| 33 | [1, 0], |
| 34 | { extrapolateLeft: "clamp", extrapolateRight: "clamp" } |
| 35 | ); |
| 36 | return ( |
| 37 | <AbsoluteFill |
| 38 | style={{ |
| 39 | background: "#0d1117", |
| 40 | justifyContent: "center", |
| 41 | alignItems: "center", |
| 42 | opacity: fadeOut, |
| 43 | }} |
| 44 | > |
| 45 | {/* Full-screen background video */} |
| 46 | {bgFile && ( |
| 47 | <OffthreadVideo |
| 48 | src={staticFile(bgFile)} |
| 49 | style={{ |
| 50 | position: "absolute", |
| 51 | width: "100%", |
| 52 | height: "100%", |
| 53 | objectFit: "cover", |
| 54 | }} |
| 55 | volume={0} |
| 56 | /> |
| 57 | )} |
| 58 | {bgFile && ( |
| 59 | <div |
| 60 | style={{ |
| 61 | position: "absolute", |
| 62 | inset: 0, |
| 63 | background: "rgba(0, 0, 0, 0.7)", |
| 64 | }} |
| 65 | /> |
| 66 | )} |
| 67 | |
| 68 | <div |
| 69 | style={{ |
| 70 | position: "relative", |
| 71 | zIndex: 1, |
| 72 | display: "flex", |
| 73 | flexDirection: "column", |
| 74 | alignItems: "center", |
| 75 | gap: 0, |
| 76 | }} |
| 77 | > |
| 78 | {/* Logo image */} |
| 79 | <Img |
| 80 | src={staticFile("logo.png")} |
| 81 | style={{ |
| 82 | width: 240, |
| 83 | height: 240, |
| 84 | opacity: fadeIn, |
| 85 | transform: `scale(${logoScale})`, |
| 86 | marginBottom: 24, |
| 87 | }} |
| 88 | /> |
| 89 | |
| 90 | {/* AI Resource + PRO badge lockup */} |
| 91 | <div |
| 92 | style={{ |
| 93 | display: "flex", |
| 94 | alignItems: "center", |
| 95 | gap: 20, |
| 96 | opacity: fadeIn, |
| 97 | transform: `scale(${logoScale})`, |
| 98 | }} |
| 99 | > |
| 100 | <span |
| 101 | style={{ |
| 102 | fontFamily, |
| 103 | fontWeight: 900, |
| 104 | fontSize: 84, |
| 105 | color: "#ffffff", |
| 106 | letterSpacing: "0.04em", |
| 107 | }} |
| 108 | > |
| 109 | AI Resource |
| 110 | </span> |
| 111 | <span |
| 112 | style={{ |
| 113 | fontFamily, |
| 114 | fontWeight: 800, |
| 115 | fontSize: 42, |
| 116 | color: "#ffffff", |
| 117 | backgroundColor: "#43ACE9", |
| 118 | padding: "8px 24px", |
| 119 | borderRadius: 50, |
| 120 | letterSpacing: "0.06em", |
| 121 | }} |
| 122 | > |
| 123 | PRO |
| 124 | </span> |
| 125 | </div> |
| 126 | |
| 127 | {/* Subscribe */} |
| 128 | <div |
| 129 | style={{ |
| 130 | display: "flex", |
| 131 | flexDirection: "column", |
| 132 | alignItems: "center", |
| 133 | marginTop: 48, |
| 134 | opacity: fadeIn, |
| 135 | }} |
| 136 | > |
| 137 | <div |
| 138 | style={{ |
| 139 | fontFamily, |
| 140 | fontWeight: 700, |
| 141 | fontSize: 42, |
| 142 | color: "#ffffff", |
| 143 | letterSpacing: "0.15em", |
| 144 | }} |
| 145 | > |
| 146 | SUBSCRIBE |
| 147 | </div> |
| 148 | <div |
| 149 | style={{ |
| 150 | width: 80, |
| 151 | height: 2, |
| 152 | backgroundColor: "#43ACE9", |
| 153 | marginTop: 8, |
| 154 | }} |
| 155 | /> |
| 156 | </div> |
| 157 | |
| 158 | {/* Social handles */} |
| 159 | <div |
| 160 | style={{ |
| 161 | display: "flex", |
| 162 | gap: 40, |
| 163 | marginTop: 48, |
| 164 | opacity: fadeIn, |
| 165 | }} |
| 166 | > |
| 167 | {["YouTube", "X", "TikTok"].map((platform) => ( |
| 168 | <div |
| 169 | key={platform} |
| 170 | style={{ |
| 171 | display: "flex", |
| 172 | flexDirection: "column", |
| 173 | alignItems: "center", |
| 174 | gap: 8, |
| 175 | }} |
| 176 | > |
| 177 | <div |
| 178 | style={{ |
| 179 | fontFamily, |
| 180 | fontWeight: 400, |
| 181 | fontSize: 30, |
| 182 | color: "rgba(255, 255, 255, 0.4)", |
| 183 | letterSpacing: "0.05em", |
| 184 | }} |
| 185 | > |
| 186 | {platform} |
| 187 | </div> |
| 188 | <div |
| 189 | style={{ |
| 190 | fontFamily, |
| 191 | fontWeight: 600, |
| 192 | fontSize: 34, |
| 193 | color: "rgba(255, 255, 255, 0.75)", |
| 194 | }} |
| 195 | > |
| 196 | @airesourcepro |
| 197 | </div> |
| 198 | </div> |
| 199 | ))} |
| 200 | </div> |
| 201 | |
| 202 | {/* Tagline */} |
| 203 | <div |
| 204 | style={{ |
| 205 | fontFamily, |
| 206 | fontWeight: 400, |
| 207 | fontSize: 34, |
| 208 | color: "rgba(255, 255, 255, 0.4)", |
| 209 | letterSpacing: "0.2em", |
| 210 | marginTop: 56, |
| 211 | opacity: fadeIn, |
| 212 | }} |
| 213 | > |
| 214 | NEW EPISODES DAILY |
| 215 | </div> |
| 216 | </div> |
| 217 | </AbsoluteFill> |
| 218 | ); |
| 219 | }; |