diff --git a/.claude/skills/web-test/recording.md b/.claude/skills/web-test/recording.md index bc8fd3d4..8b40f319 100644 --- a/.claude/skills/web-test/recording.md +++ b/.claude/skills/web-test/recording.md @@ -92,7 +92,7 @@ Display a text overlay on the page (visible in recording). Calling again updates The overlay uses `pointer-events: none` — does not interfere with clicking. -**Smart TTS wait** (during recording): `showCaption` automatically pauses for the estimated TTS speech duration (~100ms per character, min 2s). The next `wait()` call accounts for this — if the explicit pause is shorter than the TTS wait already done, no extra delay is added. If longer, only the remaining difference is waited. This means script authors don't need to calculate TTS timing manually. +**Smart TTS wait** (during recording): `showCaption` automatically pauses for the estimated TTS speech duration (~70ms per character, min 2s). The next `wait()` call accounts for this — if the explicit pause is shorter than the TTS wait already done, no extra delay is added. If longer, only the remaining difference is waited. This means script authors don't need to calculate TTS timing manually. ### `hideCaption()` diff --git a/.claude/skills/web-test/scripts/browser.mjs b/.claude/skills/web-test/scripts/browser.mjs index 2913da5f..a28b6337 100644 --- a/.claude/skills/web-test/scripts/browser.mjs +++ b/.claude/skills/web-test/scripts/browser.mjs @@ -3939,7 +3939,7 @@ export async function showCaption(text, opts = {}) { // Use video timeline position (accounts for frame duplication) instead of wall-clock recorder.captions.push({ text, speech, time: Math.round(recorder.videoTimeMs) }); // Estimate TTS duration and wait so the video has enough screen time for voiceover - smartWaitMs = Math.max(2000, speech.length * 100); + smartWaitMs = Math.max(2000, speech.length * 70); } const position = opts.position || 'bottom'; const fontSize = opts.fontSize || 24; @@ -4207,7 +4207,7 @@ export async function showTitleSlide(text, opts = {}) { const captionText = typeof speech === 'string' ? speech : text.replace(/\n/g, ' '); if (captionText) { recorder.captions.push({ text: captionText, speech: captionText, time: Math.round(recorder.videoTimeMs) }); - smartWaitMs = Math.max(2000, captionText.length * 100); + smartWaitMs = Math.max(2000, captionText.length * 70); } } @@ -4315,7 +4315,7 @@ export async function showImage(imagePath, opts = {}) { const captionText = typeof speech === 'string' ? speech : ''; if (captionText) { recorder.captions.push({ text: captionText, speech: captionText, time: Math.round(recorder.videoTimeMs) }); - smartWaitMs = Math.max(2000, captionText.length * 100); + smartWaitMs = Math.max(2000, captionText.length * 70); } }