Recording buttons
Add a button to your website so visitors can record a short video message for you. Videos arrive in your Lassu workspace, ready to watch and share with your team.
Quick start
- In Workspace › Recording buttons, create a button. Add each website it will appear on, such as
https://www.example.com, and choose how long visitors can record: 1 to 60 minutes, or up to 10 minutes on the Free plan. - Choose Add to website. On Integrate with AI, copy the prompt into Claude Code, Codex, Cursor or another coding agent working in your site’s code; it adds the button in one go. Or copy the code from the Code tab and paste it where the button should appear.
- Record a test video. It appears under Received videos once it’s processed.
<script async src="https://www.lassu.ai/embed/record.js"></script>
<div data-lassu-button="YOUR_BUTTON_ID"></div>The button only works on the websites you list. Add the www and non-www versions separately if your site uses both. On any other website it appears greyed out, with a note that it isn’t set up there yet.
Who can record
- Visitors confirm their email
- Visitors enter a 6-digit code we email them. They can come back later from the link in our “video ready” email to review, trim, replace or delete it. No Lassu account is needed.
- Anyone, no sign-in
- The quickest option for visitors. They can change or delete their video only until they close the page.
- Signed-in users of your website
- Your server vouches for each signed-in user with a short-lived token. See Signed identity.
Details and submission keys
Attach details to every video so you know where it came from, and use a submission key when each item should have its own video.
<div data-lassu-button="YOUR_BUTTON_ID"
data-lassu-theme="auto"
data-lassu-submission-key="order-482"
data-lassu-metadata='{"plan":"pro","rating":4}'></div>- Details (
data-lassu-metadata): a flat JSON object of text, numbers and true/false values. Up to 32 fields, 64 characters per name, 512 characters per value, 8 KiB in total. Details are fixed once recording starts. - Submission key (
data-lassu-submission-key): a stable name for one item, such as an order ID. A returning visitor sees, and can replace, their video for that item. It isn’t a password: it only works for the person who recorded. - Theme (
data-lassu-theme):autofollows the visitor’s device;lightanddarkmatch your site.
JavaScript SDK
For single-page apps, mount buttons yourself after loading https://www.lassu.ai/embed/record.js once.
const widget = LassuRecord.mount(element, {
buttonId: "YOUR_BUTTON_ID",
submissionKey: "order-482", // optional
metadata: { plan: "pro" }, // optional
theme: "auto", // auto, light or dark
onEvent(type, detail) {
// submitted, ready, updated, deleted, error, identity-required
},
});
widget.update({ metadata: { plan: "team" } });
widget.destroy(); // when your component unmountsEvents also fire as lassu:submitted, lassu:ready and so on, on the container element. They carry IDs and state, never credentials. Use them to update your page, such as showing a thank-you message. They aren’t proof that a video arrived: before granting rewards or access, confirm it from your server with the API or a webhook.
Signed identity
Use this when visitors already sign in to your website. Show the signing key on the button’s page (Add to website), keep it in your server’s secret store, and never send it to the browser.
// On your server: sign a short-lived token for the signed-in user.
import { SignJWT } from "jose";
const token = await new SignJWT({ email: user.email, email_verified: true, metadata: { account: user.accountId } })
.setProtectedHeader({ alg: "HS256" })
.setIssuer(WORKSPACE_ID)
.setAudience(BUTTON_ID)
.setSubject(user.id)
.setIssuedAt()
.setExpirationTime("5m")
.sign(new TextEncoder().encode(LASSU_SIGNING_KEY));- Required claims:
iss(workspace ID),aud(button ID),sub(your user ID),iatandexpno more than five minutes later. - Optional claims:
submissionKey,metadata(kept as signed details, which take precedence over the button’s defaults and can’t be overridden by the page), andemailwithemail_verified. We show that email to your team but don’t send it messages. - If a key leaks, choose Rotate key. Tokens signed with the old key stop working immediately.
const widget = LassuRecord.mount(element, {
buttonId: "YOUR_BUTTON_ID",
identityToken: await getLassuToken(),
async onEvent(type) {
// Tokens last five minutes. Hand over a fresh one when asked.
if (type === "identity-required") widget.update({ identityToken: await getLassuToken() });
},
});
// When the user signs out:
widget.update({ identityToken: null });A refreshed token for the same user keeps any recording in progress. A different user, or signing out, starts the recorder over, so one person never sees another’s video.
Receiving videos
Sent videos appear under Received videos on the Recording buttons page, with who sent them, the page they came from and their details. They also appear under Videos, where each one shows who sent it. Everyone in the workspace can watch them; admins manage the buttons.
Visitors can delete a video they sent. It then disappears from your workspace, though copies someone already downloaded can’t be recalled. Recordings that are never sent are removed automatically.
To act on videos from your own servers, such as confirming that a customer sent one, use the API with a workspace API key, or get a webhook when each one arrives.
Troubleshooting
- The button doesn’t appear. Check that the page’s Content-Security-Policy allows
https://www.lassu.aiinscript-srcandframe-src. - The button is grey and says it isn’t set up for this website. Add the page’s exact address to the button’s websites: the scheme, the host with or without www, and the port when testing locally, such as
http://localhost:3000. The button also reports aWEBSITE_NOT_ALLOWEDerror event. - The camera won’t turn on. Make sure your site doesn’t block camera or microphone access for embedded content. Visitors can always choose Record in a new window.
- “Isn’t accepting videos right now.” The button is paused or archived, or the workspace has reached its plan’s video limit. Visitors can still manage videos they already sent, from the button or the link in their email.
The recorder uses WebM (VP8/Opus) or MP4 (H.264/AAC), whichever the visitor’s browser supports. Recordings are limited to the length you set on the button and your plan’s limit.