Overview
TheVideoEditor component provides a powerful video editing interface with timeline, effects, text overlays, transitions, and export capabilities.
Import
Prerequisites
Required WASM Files
URL Rewrites
Add tonext.config.js:
Props
Required Props
string
required
Your SDK license key (JWT format). Contact your account manager to obtain a license key.
() => void
required
Callback function called when the user closes the editor.
Optional Props
string
Override the default license validation API endpoint.Default:
https://api.kloudleads.com/license/validateFile
Initial video file to load into the editor.Supported Formats: MP4, WebM, MOV, AVI
(result: EditorCallback) => void
Callback function called when the user exports the edited video.EditorCallback:Example:
Record<string, string>
Custom theme object to override default colors and styling.See Theme Customization for all available keys.
boolean
default:"false"
Show theme customization UI to users. Set to
false for production.BrandDetails[]
Array of brand presets for consistent styling.
Template
Load a template on editor startup.
(props: { brandId: string; template: Template }) => Promise<void>
Callback when user saves a template.
(brandIdList: string[]) => Promise<{ success: { data: Template[] } }>
Callback to fetch templates for display.
CreateAutomatedContent
AI-powered content creation function (advanced feature).
Complete Example
Features
Video Editing
- Upload & Load: MP4, WebM, MOV, AVI formats
- Trim: Cut video start and end times
- Split: Cut video into multiple clips
- Arrange: Drag-and-drop clips on timeline
- Speed: Adjust playback speed (0.25x - 4x)
- Volume: Audio volume control and mute
Timeline
- Multi-track: Video, audio, text, subtitle tracks
- Zoom: Timeline zoom in/out
- Scrubbing: Frame-accurate seeking
- Snap: Snap-to-grid for precise alignment
- Markers: Add markers for reference points
Text & Graphics
- Text Overlays: Add text with custom fonts, colors, sizes
- Shapes: Rectangles, circles, arrows, custom shapes
- Stickers: GIF stickers and emojis
- Images: Overlay images on video
Effects & Filters
- Color Filters: Grayscale, Sepia, Invert, Colorize
- Adjustments: Brightness, Contrast, Saturation
- Blur: Gaussian blur with adjustable radius
- Transitions: Fade in/out, crossfade (coming soon)
Audio
- Audio Tracks: Multiple audio tracks
- Background Music: Add music files
- Volume Control: Per-track volume adjustment
- Mute: Mute original video audio
Subtitles
- SRT Support: Import .srt subtitle files
- Styling: Font, color, size, position
- Word Highlighting: Highlight current word (karaoke style)
- Background: Subtitle background with opacity
Export
- Format: MP4 (H.264 video, AAC audio)
- Quality: Adjustable bitrate and resolution
- Frame Rate: Original or custom FPS
- Audio: Include/exclude audio tracks
Performance Considerations
Typical Export Times
Recommendations
- Show Progress Indicator: Always display a loading overlay during export
- Warn Users: Inform users about processing time upfront
- Limit Duration: Recommend videos under 60 seconds for browser processing
- Lower Resolution: Suggest 720p for faster exports
- Desktop Only: Mobile browsers not supported for video editing
- Server-Side Alternative: Consider server-side processing for production apps
Mobile Support
Browser Support
Troubleshooting
WASM Files Not Loading
Error:MediaInfoModule.wasm 404 Not Found
Solution:
- Copy WASM files to
public/folder - Add URL rewrites to
next.config.js - Restart dev server:
rm -rf .next && npm run dev
Audio Not Playing
Cause: Browser autoplay policies require user interaction. Solution: Ensure editor is opened via user click/gesture, not programmatically on page load.Export Fails or Hangs
Causes:- Video too long (>2 minutes)
- Resolution too high (4K)
- Insufficient memory
- Use shorter clips
- Lower resolution to 720p
- Close other browser tabs
- Increase Node.js memory:
NODE_OPTIONS=--max-old-space-size=4096
Next Steps
Integration Guide
Step-by-step Next.js integration
ImageEditor API
ImageEditor component reference
Troubleshooting
Common issues and solutions
Installation
Installation guide

