Getting started
Install
npm install @video-ultra/reactReact 18 or 19. The engine (@video-ultra/core) comes with it.
Show the editor
import { VideoEditor } from '@video-ultra/react';
import '@video-ultra/react/styles.css';
export function Editor() {
return (
<div style={{ height: '100dvh' }}>
<VideoEditor />
</div>
);
}The editor fills its container — give the container a height. It chooses the phone, tablet or desktop layout from its own width (container queries), so it works the same in a full page, a modal or a side panel.
Keep the work
The editor autosaves to the browser for crash recovery. To keep a project for good, store what onSave gives you (plain JSON) and pass it back as initialProject:
<VideoEditor
initialProject={savedProject}
onSave={async (project) => {
await fetch('/api/projects/42', { method: 'PUT', body: JSON.stringify(project) });
}}
onExport={({ blob, extension }) => download(blob, 'my-video.' + extension)}
/>Media files stay on the device (the browser's private storage). To keep them with the project on your side, see Saving and projects.
When a device can't run it
Browsers without WebCodecs get a clear message in the editor. Pass onUnsupported to do something else (offer an upload instead, say).