Skip to main content
This guide is for React.js applications (Create React App, Vite, custom setups).For Next.js, see the Next.js VideoEditor Integration guide.
This page still describes the version 1 setup. In version 2 (@layermetry/media-editor 2.0.0) ffmpeg was removed, so the 31 MB of WebAssembly named below no longer ships with the package and there is nothing to copy into public/. React is no longer pinned to 18.2.0 either — React 18 and React 19 both work, and the editor also runs with no React at all.Follow Installation for the version 2 setup. This page is being rewritten.

Prerequisites

Node.js 18+

Node.js 18 or newer

React 18 or 19

React 18 or React 19 — both work. Version 2 does not pin React.

Storage Space

~40MB for WASM modules
VideoEditor uses WebAssembly (WASM) for video processing. These files must be copied to your public/ folder.

Installation

1

Install the SDK

2

Install Required Dependencies

3

Copy WASM Files

Copy the required WASM modules to your public folder:
4

Verify Files

Your public/ folder should contain:
Add this to your package.json:
package.json
Create scripts/copy-wasm.js:
scripts/copy-wasm.js

VideoEditor Interface

Core Props

Step-by-Step Integration

Step 1: Create Your Component

src/components/VideoStudio.js

Step 2: Implement File Selection

Step 3: Implement Export Callback

Step 4: Render the Editor

Video Processing

Understanding Export Performance

The VideoEditor uses FFmpeg (WebAssembly) for video processing. This happens entirely in the browser.
Expected Processing Times:
  • 720p 10s video: ~30 seconds
  • 1080p 30s video: ~2 minutes
  • 4K video: May not work (memory constraints)
Video processing is not supported on mobile devices due to memory limitations.

Export Options

Theme Customization

Complete Example

src/components/VideoStudio.js

Troubleshooting

Symptom: “MediaInfoModule.wasm 404 Not Found”Solution:
  1. Verify WASM files are in public/ folder
  2. Restart dev server
  3. Hard refresh browser (Cmd+Shift+R)
Symptom: Export hangs or takes >5 minutesSolutions:
  • Use shorter video clips (< 30 seconds recommended)
  • Lower video resolution before editing
  • Consider server-side processing for production
Symptom: VideoEditor fails on mobile devicesSolution: Mobile is not supported. Detect and show warning:

Next Steps

Image Editor

Learn how to integrate the ImageEditor component

FAQ

Common issues and troubleshooting
Need help? Contact us at support@layermetry.com