MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / closeWithVideo

Function closeWithVideo

e2e/desktop/local-auth-mcp.test.ts:74–99  ·  view source on GitHub ↗
(app: ElectronApplication, runDir: string, home: string)

Source from the content-addressed store, hash-verified

72};
73
74const closeWithVideo = async (app: ElectronApplication, runDir: string, home: string) => {
75 const page = app.windows()[0];
76 const video = page?.video();
77 await app.close().catch(() => {});
78 const recordedPath = await video?.path().catch(() => undefined);
79 if (recordedPath && existsSync(recordedPath)) {
80 await promisify(execFile)("ffmpeg", [
81 "-y",
82 "-i",
83 recordedPath,
84 "-c:v",
85 "libx264",
86 "-preset",
87 "veryfast",
88 "-crf",
89 "26",
90 "-pix_fmt",
91 "yuv420p",
92 "-movflags",
93 "+faststart",
94 join(runDir, "session.mp4"),
95 ]).catch(() => {});
96 }
97 rmSync(join(runDir, ".video-tmp"), { recursive: true, force: true });
98 rmSync(home, { recursive: true, force: true });
99};
100
101// ---------------------------------------------------------------------------
102// A. MCP browser approval through the desktop app

Callers 2

runApprovalFunction · 0.85
runBearerScopingFunction · 0.85

Calls 2

videoMethod · 0.80
closeMethod · 0.65

Tested by

no test coverage detected