5 Commits

Author SHA1 Message Date
zzzworm
9c6a96c2d3 fix(video): align scene narration and fit diagrams (#3014)
* fix(video): align scene narration and fit diagrams

- Refine bilingual prompts for scene-by-scene narration and visuals
- Fit and center SVG diagrams with their labels and strokes
- Improve geometry coordinate guidance and preserve layout retries

* fix(video): do not report a fitted scene graphic as overflow

The kit scales a graphic with a transform on its full-size frame, so the
scaled frame box and the SVG canvas can exceed the region while the drawing
fits. Measure HTML overflow without that transform and canvas.

---------

Co-authored-by: zzzworm <15828873+zzzworm86@user.noreply.gitee.com>
Co-authored-by: zszz3 <91608029+zszz3@users.noreply.github.com>
2026-11-28 13:51:06 +08:00
Bingxi Zhao (Frank)
e38a1f63a1 fix(video-lesson): isolate rendering without requiring Docker 2026-10-27 03:43:53 +08:00
Bingxi Zhao (Frank)
9237139fb8 fix(video-lesson): isolate render checks and clean up cancelled processes 2026-10-27 01:46:42 +08:00
SeleiXi
40f50641a9 feat(video_lesson): add narrated scenes to the lesson kit
<Scenes> plays a lesson's scenes back to back and gives each one its voice-over
and captions from a per-lesson voice.ts. A scene stretches to fit its narration,
so the picture never cuts the voice short. The kit ships an empty voice.ts so
it still compiles on its own, and the player now shows a volume control.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 23:58:03 +08:00
SeleiXi
53c08252d7 feat(video_lesson): add a Remotion lesson kit and build runtime
Groundwork for a capability that answers with an animated explainer the
learner plays in the browser, rather than a server-rendered video.

kit.tsx is the component library lessons are written against: a paper
page, serif titles, captions, pen marks, plots (curves, point sequences,
cobwebs), an honest-scale timeline and a China map, all in DeepTutor's
palette. Style comes from the kit, so the model only arranges content.

build.mjs compiles Lesson.tsx with esbuild, renders 25 sample frames in
Node and bundles the composition into @remotion/player. Lessons may
import only react, remotion and ./kit, and the frame check runs under
Node's permission model (no file writes, child processes or workers).
Errors thrown during rendering are reported through renderToPipeableStream
so the model sees the real message.

runtime.py installs the pinned npm packages on first use, then wraps a
bundle into one self-contained page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 20:55:34 +08:00