feat: smart video recording with viewport matching and enhanced tool descriptions
Video Recording Enhancements: - Add intelligent recording modes: smart, continuous, action-only, segment - Implement automatic viewport matching to eliminate gray borders in videos - Add pause/resume functionality with manual and automatic control - Default to 1280x720 HD recording with auto-viewport matching - Enhanced browser_start_recording with autoSetViewport parameter Smart Recording System: - Smart mode: Auto-pause during waits, resume during actions (perfect for demos) - Action-only mode: Only record during browser interactions - Segment mode: Create separate video files for each action sequence - Continuous mode: Traditional behavior with optional manual pause/resume Tool Enhancements: - Comprehensive descriptions for all video recording tools - Professional context and use case guidance - Integration with browser_wait_for for recordDuringWait parameter - Action-aware recording in navigation and interaction tools - Enhanced browser_recording_status with mode and viewport info Documentation & Testing: - Complete best practices guide for video recording workflows - Viewport matching diagnostic and setup scripts - Recommended video sizes and quality settings - Gray border problem solution with automatic viewport matching Solves the gray border issue by ensuring browser viewport matches video recording dimensions, creating professional full-frame demo videos.
This commit is contained in:
parent
9257404ba3
commit
224f040645
7 changed files with 840 additions and 13 deletions
|
|
@ -31,9 +31,15 @@ const navigate = defineTool({
|
|||
},
|
||||
|
||||
handle: async (context, params, response) => {
|
||||
// Smart recording: Begin action
|
||||
await context.beginVideoAction('navigate');
|
||||
|
||||
const tab = await context.ensureTab();
|
||||
await tab.navigate(params.url);
|
||||
|
||||
// Smart recording: End action (auto-pause in smart mode)
|
||||
await context.endVideoAction('navigate');
|
||||
|
||||
response.setIncludeSnapshot();
|
||||
response.addCode(`// Navigate to ${params.url}`);
|
||||
response.addCode(`await page.goto('${params.url}');`);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue