// Use minimal react-konva core to avoid Node.js dependencies import 'konva/lib/Animation'; import 'konva/lib/shapes/Image'; import 'konva/lib/shapes/Text'; import { Image, Layer, Stage, Text } from 'react-konva/lib/ReactKonvaCore'; const VideoPreview = ({ // Dimensions dimensions, // Timeline state currentTime, totalDuration, isPlaying, status, // Export state isExporting, exportProgress, exportStatus, // Data timelineElements, activeElements, videoElements, loadedVideos, videoStates, ffmpegCommand, // Event handlers handlePlay, handlePause, handleReset, handleSeek, copyFFmpegCommand, exportVideo, // Refs layerRef, }) => { return (
{activeElements.map((element) => { if (element.type === 'video' && videoElements[element.id]) { return ( ); } else if (element.type === 'text') { return ( ); } else if (element.type === 'image' && element.imageElement) { return ( ); } return null; })}
); }; export default VideoPreview;