Docs
Product demos
How to show an app by recording the real app, by rebuilding its screens with s.ui, or with a screen recording of your own.
What is a product demo?
A product demo shows how someone uses your app to do a task. For example, it can show a person entering a website address and saving a draft. Start with the task, then show the steps and the result.
When the app runs on your computer, or on a site a browser can open, record the real app with explainroo record. Every button in the video is then a real one. When the app can’t be recorded, rebuild its screens with s.ui, in the app’s colors and fonts. A screen recording you made yourself plays with s.clip. Keep the narration about what the viewer can see.
The recording example comes with its steps but not with its video, and its README says how to record it. The Unspar example is a complete demo made with s.ui. Both also come with explainroo, in the examples folder that explainroo doctor prints.
How do I record the real app?
The steps of a recording go in recordings/<name>.json in the project. Your agent writes them:
{
"url": "http://localhost:3000/invoices",
"viewport": { "width": 1280, "height": 720 },
"steps": [
{ "do": "click", "text": "Accept cookies", "before": true },
{ "do": "click", "text": "New invoice", "cue": "#new" },
{ "do": "type", "text": "Amount", "value": "2400", "press": "Tab" },
{ "do": "press", "key": "Enter", "cue": "#add" },
{ "do": "zoom", "selector": "form", "cue": "#check" },
{ "do": "click", "text": "Save invoice", "cue": "save" },
{ "do": "zoom" },
{ "do": "scroll", "text": "Total" },
{ "do": "mark", "name": "saved" }
],
"blur": [{ "selector": ".email" }, { "text": "jane@example.com" }]
}
Each step does one thing, like a person at the keyboard would:
clickandhovermove the pointer to an element.typeclicks a field and typesvalueinto it, at 14 characters a second.presspresses a key like"Enter", or a combination like"Control+A".scrollmoves the page, by pixels or to an element. Onlyscrollsteps move the page.waitwaits for some seconds or for an element.zoombrings the camera close to an element, and azoomwithout one goes back out.marknames a moment, so the narration can refer to it.opengoes to another address.
A step finds its element by text or by a CSS selector. The text is the words the element shows, and its label or placeholder counts too. nth: 2 takes the second match from the top. cue is a spoken word or a [#marker] of the scene that plays the recording, and the step happens on it.
Then record it:
npx --yes explainroo record videos/invoices new-invoice
record runs the steps in a browser of its own and saves assets/recordings/new-invoice.webm. Next to it, new-invoice.log.json has the time of each step and the place of its element. The video shows only the page, with no browser bars or pop-ups. record needs the ffmpeg that comes with Playwright, and the first recording downloads it. explainroo doctor --fetch --record gets it ahead of time.
Every run starts with an empty browser profile, so the site has no cookies from an earlier run. Steps with "before": true run before the video starts, like closing a cookie banner. Such a step that finds nothing is skipped, so it can close a pop-up that shows only sometimes. For a site that needs a login, --keep-profile keeps the profile for the next run.
The browser asks the site for the project’s language, like en-US for an English video or de-DE for a German one. So a site with several languages shows the one the video speaks. "locale": "en-GB" in the step file sets another one.
A cue only changes the playback, so a new cue needs no new recording. Any other change to the steps needs one, and so does a change to url or viewport. check says when that is the case.
How does the agent find the right button?
npx --yes explainroo record videos/invoices --inspect https://example.com --viewport 1280x720
--inspect opens the page in the browser that record uses and records nothing. It lists every visible element you can click or type into, with a text and a selector that find only that element. The agent copies one of them into the step as it is, so it never has to guess what a page holds. Use the viewport of the steps, because the page may lay itself out differently in another size.
A zoom or a scroll often goes to plain content, like a heading or a chart. --all adds the visible headings, sections and images to the list. --text "Solutions" lists only the elements that hold those words, from the smallest to the section around it. --selector ".results" says how many elements a selector matches and which of them are visible.
record prints one line per step with what it found, and saves a small picture of each step’s element in build/record/<name>/. A step that found the wrong element still records, so look at the pictures before you write the scene. When a step can’t find its element, record stops and names the step. It lists close words from the page and saves a picture of the page.
How do I play the recording in a scene?
const r = s.recording("new-invoice", {
frame: "browser",
url: "app.example.com",
cues: { saved: "#saved" },
});
s.text("Saved", { y: 120, at: r.times.saved });
s.recording plays the video with a pointer that moves from step to step and a ring on each click. Its zoom steps move the camera. A step with a cue happens on its word. The video holds the frame before the step until the action lands on the cue, or it plays up to twice as fast when the steps before it take longer than the words. check warns about a step that is still late.
from and to play part of the recording, so one recording can serve several scenes. Write the narration around what the video shows, and look at stills. The scene reference has the options.
Which viewport should a recording use?
viewport is 1920 x 1080 by default, which is too large for most videos. The page plays smaller than it was recorded, so its text gets smaller too. Pick the viewport from the size the page plays at. These are the numbers for a recording that fills the content area in a browser frame:
| Size | Played size | Viewport |
|---|---|---|
16:9 (youtube) |
1697 x 829 | 942 x 460 |
4:5 (instagram, linkedin) |
891 x 872 | 494 x 484 |
shorts with bold captions |
848 x 654 | 472 x 364 |
tiktok package with bold captions |
715 x 769 | 398 x 428 |
reels with bold captions |
860 x 669 | 478 x 372 |
At these viewports, the page’s 16 px text plays at about 29 px. A page this narrow may lay itself out as on a phone, which often reads best in a tall video. An app with a side panel or a canvas needs room. Record it at 1280 wide or more, and zoom on the parts the narration names.
check warns when a recording’s 16 px text would play under 24 px. It names the size the page plays at and a viewport that fits. A zoom makes the text larger only while it holds. When every type step and every step with a cue plays inside a zoom, the warning becomes a hint.
How do I hide email addresses and keys?
blur in the step file blurs elements on every page, before anything is recorded. Give each one a CSS selector or its exact text. Use it for real email addresses and keys. A blurred element is blurred from its first frame. When the page’s own style keeps a matched element sharp anyway, record stops and keeps no video.
How do I capture a live website?
npx --yes explainroo capture videos/my-demo https://example.com --mobile
capture opens the page in a fresh browser with no cookies or logins. It saves these files in assets/capture/<hostname>/:
page.pngfor the first screen andfull.pngfor the whole page, up to 8000 pixels tall. They use twice the pixel density for clearer zooms.mobile.pngandmobile-full.pngwhen you add--mobile.capture.jsonwith the page’s colors and fonts, and its wording, like the headings and buttons. Itstext.bodyhas the readable text of the whole page in page order, so you can check claims and example values against it. Itsimageslist has the page’s pictures, with the address and size of each.- Up to three logo files.
- The font files the page loaded, in the weights it uses, in
fonts/. Theirfonts.jsonsays where each file came from. Fonts that come with explainroo are not copied.
It prints brand and fonts settings you can paste into video.json. Compare them with the screenshots before using them. A font on a website isn’t always free to use in a video, so check the license of each saved font and keep its license file beside it. Capturing the same site again replaces its files.
To keep several pages of one site, give each page a name:
npx --yes explainroo capture videos/my-demo https://example.com/pricing --name pricing
This saves the same files in assets/capture/example.com/pricing/. Capturing again with the same name replaces only that folder, and a capture without a name keeps the named folders.
Cookie banners and chat widgets may appear, as they do for a new visitor. Pick a screenshot or part of one without them. For screens behind a login, record the app with "before" steps that log in, or supply your own screenshots.
How do I rebuild the app’s screens?
Use the studio look, and set brand in video.json to the app’s colors and fonts. See settings for the fields. With "defaults": "0.6", the accent also colors the *starred* words of titles and text, and background is the background of every scene.
s.ui has cards, browser frames, buttons, fields, dropdowns, toggles and status labels. A cursor can move, click and type on script cues. The scene reference lists every part and option.
Build one scene in this order: background, camera, headline, screens, cursor. Put the cursor last so it stays on top. Time clicks to [#markers] in the script. Start each cursor move early enough to arrive before the click. Leave the first 0.7 seconds of a scene free of clicks while its transition finishes.
Zoom into the part the voice mentions. Keep the headline fully in view, or zoom far enough that it leaves the frame. Check stills at those moments for cut-off text and a cursor covering words. Keep long typing quiet and give each moment one sound. Too many sounds make the voice hard to follow.
How do I use a screen recording of my own?
Put the recording in assets/ and show it with s.clip. A browser frame can give it an address bar. One long file is enough for every scene, so there is no need to cut it into pieces first. This plays seconds 31 to 38.5 of it:
s.clip("assets/take.mp4", {
from: 31,
to: 38.5,
crop: [0, 120, 1280, 720],
speed: "fit",
});
It shows only the part of the screen in crop, given as [x, y, w, h] in the file’s own pixels. Here that part is 1280 wide and 720 tall and starts 120 pixels from the top. speed: "fit" fits those seconds into the scene. See the clip reference for the other options.
Long clips fill build/clips/ with extracted frames, and explainroo clean takes them out again. Record at a fixed frame rate when the motion matters. Use example data and make the text large enough to read in the player’s final size. To cut a recording of yourself talking by its words, see cutting your own recording.
How do I keep the demo true?
A demo makes claims about your product. Check every one:
- Copy labels, buttons and status names from the app or captured page. Use the app’s templates, language files or components when you have its code.
- Show features customers can use. Leave out admin screens, debug views and plans that are not built yet.
- Make example data look like example data. Use
example.com, a made up project or a made up article title. Do not invent customers, numbers or results. - Take narration claims from the live product website. Show prices only when that website shows them.
- Resolve differences between the website and app with the person who owns the product before making the claim.
Put the product’s name in plain text in the first frame. Then check the video and choose its publishing size.