feat(showcase): add reusable demo video recorder
This commit is contained in:
@@ -5,10 +5,7 @@ This directory contains local-only automation for regenerating public showcase a
|
||||
Currently implemented:
|
||||
|
||||
- `capture-screenshots.js`: captures the reusable screenshot set into `assets/screenshots/`.
|
||||
|
||||
Planned later:
|
||||
|
||||
- a video/demo recorder script can be added here with the same environment conventions.
|
||||
- `capture-demo-video.js`: records a reusable product-tour video into `assets/videos/`.
|
||||
|
||||
## Screenshot Prerequisites
|
||||
|
||||
@@ -37,6 +34,12 @@ or point the script to your installed Chrome:
|
||||
$env:QLOCKIFY_CHROME_PATH="C:\Program Files\Google\Chrome\Application\chrome.exe"
|
||||
```
|
||||
|
||||
Video recording also requires Playwright's bundled ffmpeg:
|
||||
|
||||
```powershell
|
||||
npx playwright install ffmpeg
|
||||
```
|
||||
|
||||
## Capture Public And App Screenshots
|
||||
|
||||
From the showcase repo root:
|
||||
@@ -87,3 +90,40 @@ $env:QLOCKIFY_BACKEND_REPO="D:\Programing\Scripts\Qlockify\qlockify-backend"
|
||||
- `QLOCKIFY_ADMIN_USER_ID`: optional user id for the admin user-detail screenshot; defaults to the demo owner when available.
|
||||
- `QLOCKIFY_CHROME_PATH` or `CHROME_EXECUTABLE`: optional installed Chrome path.
|
||||
- `QLOCKIFY_CLEAN_SCREENSHOTS`: set `0` to keep existing PNG files before capture.
|
||||
|
||||
## Capture Demo Video
|
||||
|
||||
The video recorder creates a deterministic local fixture before recording:
|
||||
|
||||
- one dedicated superuser
|
||||
- three workspaces
|
||||
- one populated workspace with clients, projects, tags, members, rates, time entries, and report data
|
||||
|
||||
It resets only the dedicated video fixture user/workspaces.
|
||||
|
||||
From the showcase repo root:
|
||||
|
||||
```powershell
|
||||
node scripts/capture-demo-video.js
|
||||
```
|
||||
|
||||
Or from the `scripts` directory:
|
||||
|
||||
```powershell
|
||||
npm run video
|
||||
```
|
||||
|
||||
The output is:
|
||||
|
||||
```text
|
||||
assets/videos/qlockify-demo-flow.webm
|
||||
```
|
||||
|
||||
Video-specific variables:
|
||||
|
||||
- `QLOCKIFY_VIDEO_OUTPUT`: optional WebM output path.
|
||||
- `QLOCKIFY_VIDEO_MOBILE`: fixture login mobile, default `09900000001`.
|
||||
- `QLOCKIFY_VIDEO_PASSWORD`: fixture login password, default `QlockifyVideo!2026`.
|
||||
- `QLOCKIFY_VIDEO_CURSOR`: set `0` to disable the visible cursor overlay.
|
||||
|
||||
The export section of the video needs the local Celery worker/report export pipeline to be running. If export notifications do not arrive, the recorder fails with a timeout instead of producing a misleading video.
|
||||
|
||||
Reference in New Issue
Block a user