Embeddable video editor
One line of code puts a timeline editor on your site.
TutuCut's embeddable component: one line of code puts a timeline video editor (trim, subtitles, effects, transitions) into any site. Theme, tools and export are configurable, domain allow/deny lists are supported, and editor updates apply automatically.
One script tag puts the TutuCut timeline editor on your page. Visitors trim, add subtitles and effects right there; when they press Done, the current frame is handed to your page as an image through the onSave callback.
</body> <script src="https://tutucut.com/embed.js"
data-key="pk_live_YOUR_KEY"
data-mount="#cc-editor" defer></script> Replace pk_live_YOUR_KEY with a key you generate yourself in the console (any registered user, no review, effective instantly); the container #cc-editor must have a width and height. Register your embed URL when integrating (a whitelist; use localhost for local dev) — it only shows on the sites you register.
Try it live
Click the button below to try the embedded video editor right on this page.
JS API (for callbacks / customization)
<script src="https://tutucut.com/embed.js"></script>
<script>
const cc = TutuCut.mount('#cc-editor', {
key: 'pk_live_YOUR_KEY',
theme: 'auto', // auto | light | dark
onSave: (file) => {
// file.dataUrl = current frame image (base64)
upload(file.dataUrl);
}
});
cc.open('https://your.site/clip.mp4'); // import a media clip
</script>Full parameter reference
| Parameter | Type | Description |
|---|---|---|
| key | string | Your public key pk_ (generated in the console). Required. |
| theme | 'auto'|'light'|'dark' | Theme; auto follows the host/system light-dark mode. |
| hideHeader | boolean | Hide the top bar (when you build your own UI and export via export()). |
| hideOpen | boolean | Hide the "Open media" button. |
| hideExport | boolean | Hide the "Export & download" button. |
| saveText | string | Text of the "Done" button (default "Done & send back", ≤16 chars). |
Methods
cc.open(url, name?)Import a media clip into the timeline (video/audio/image url or dataURL).cc.export(format?)Export the current frame → Promise<{dataUrl,mime,size}>.cc.setTheme('dark')Switch the theme at runtime.cc.destroy()Unmount the widget (removes the iframe).
Event callbacks
onReady()The editor is ready.onSave(file)User taps "Done" → file.dataUrl is the current frame image.onError(e)e.message is human-readable (not enabled / no permission / load failed).onClose()The fullscreen overlay was closed.
Security · auto-updates
- · Self-service, auto-approved: any registered user gets a key by registering a site name + embed URL in the console, effective instantly.
- · The key is public; abuse is prevented by a registered-URL allow/deny list (deny takes priority). Unregistered domains are rejected with a prompt to register; you can enable or disable at any time.
- · Real-origin analytics: every load is counted by Origin (blocked ones too); the console shows a per-origin breakdown, and unregistered domains can be whitelisted in one click.
- · The editor runs on TutuCut's own domain (isolated); your page cannot access any TutuCut credentials, and a visitor's private works on TutuCut never appear in the embedded widget.
- · The widget is self-hosted and auto-updated by TutuCut — feature upgrades require no code changes from you and zero maintenance.
FAQ
- Does it affect my page’s cross-origin isolation?
- No. The editor runs in an iframe on TutuCut’s own domain and does not need SharedArrayBuffer, so your page needs no COOP / COEP headers.
- Are visitors’ videos uploaded to your servers?
- No. Editing happens in the visitor’s own browser, and embed mode does not even leave drafts there. Your page receives only the image handed over when the visitor presses Done.
- How do I get a key?
- Sign in, register a site name and the page URL in the console, and you get a public key that works immediately. The key itself is public; misuse is blocked by the URL allow and deny lists you register (deny wins).