import {Audio, Video} from '@remotion/media'; import {RemotionRiveCanvas} from '@remotion/rive'; import { Arrow, Callout, Circle, Ellipse, Heart, Pie, Polygon, Rect, Spark, Star, Triangle, } from '@remotion/shapes'; import React from 'react'; import { AbsoluteFill, AnimatedImage, CanvasImage, Html5Audio, Html5Video, HtmlInCanvas, Img, Interactive, OffthreadVideo, Sequence, Solid, staticFile, useCurrentFrame, } from 'remotion'; const TILE_WIDTH = 220; const TILE_HEIGHT = 140; const GAP = 18; const LEFT = 44; const TOP = 54; const getTileTransform = (index: number) => { const col = index % 5; const row = Math.floor(index / 5); return `translate(${LEFT + col * (TILE_WIDTH + GAP)}px, ${ TOP + row * (TILE_HEIGHT + GAP) }px)`; }; const baseTileStyle: React.CSSProperties = { width: TILE_WIDTH, height: TILE_HEIGHT, borderRadius: 8, overflow: 'hidden', boxShadow: '0 0 0 1px rgba(255,255,255,0.18)', backgroundColor: '#18202e', }; const shapeStyle = (index: number): React.CSSProperties => ({ ...baseTileStyle, padding: 28, translate: `${LEFT + (index % 5) * (TILE_WIDTH + GAP)}px ${ TOP + Math.floor(index / 5) * (TILE_HEIGHT + GAP) }px`, }); const Label: React.FC<{ readonly index: number; readonly children: React.ReactNode; }> = ({index, children}) => { return (
{children}
); }; const Counter: React.FC = () => { const frame = useCurrentFrame(); return (
frame {frame}
); }; const TrimmedSequenceBox: React.FC<{ readonly index: number; readonly name: string; readonly backgroundColor: string; }> = ({index, name, backgroundColor}) => { return ( ); }; const TrimBeforeSupportTest: React.FC = () => { const img = staticFile('1.jpg'); const gif = staticFile('giphy.gif'); const video = staticFile('blush-1x.mp4'); const audio = staticFile('sine.wav'); const rive = 'https://cdn.rive.app/animations/vehicles.riv'; const demos = [ { name: 'Sequence', element: ( ), }, { name: 'Interactive.Div', element: ( ), }, { name: 'Solid', element: ( ), }, { name: 'HtmlInCanvas', element: (
HTML
), }, { name: 'Img', element: ( ), }, { name: 'AnimatedImage', element: ( ), }, { name: 'CanvasImage', element: ( ), }, { name: 'Video', element: (