mirror of
https://github.com/webadderallorg/Recordly.git
synced 2026-09-29 17:25:54 +00:00
- IPC: new inputMode 'h264-stream' — browser VideoEncoder output stream-copied into MP4 via ffmpeg rather than piping raw RGBA frames, cuts memory usage - Security: replace flat approvedLocalReadPaths with userApprovedPaths fed from dialog pickers and project load; isAllowedLocalReadPath uses it alongside dir prefix / existsSync checks - nativeVideoExport: add buildNativeH264StreamExportArgs for stream-copy path - frameRenderer / modernFrameRenderer: cursor-follow camera integration, annotation blur post-processing, shadow profile, squircle geometry - audioEncoder / streamingDecoder / gifExporter / muxer: full pipeline hardening — drift correction, backpressure, proper teardown - Rename native helpers openscreen-* → recordly-* on darwin-arm64 and darwin-x64; update helpers-manifest.json for win32-x64 - electron/main, windows, updater, rendererServer: startup and window lifecycle improvements - preload: expose inputMode and new IPC surface to renderer
42 lines
1019 B
TypeScript
42 lines
1019 B
TypeScript
export type WindowsCaptureSourceLike = {
|
|
display_id?: string;
|
|
};
|
|
|
|
export type WindowsCaptureDisplayBounds = {
|
|
x: number;
|
|
y: number;
|
|
width: number;
|
|
height: number;
|
|
};
|
|
|
|
export type WindowsCaptureDisplayLike = {
|
|
id: number;
|
|
bounds: WindowsCaptureDisplayBounds;
|
|
};
|
|
|
|
export type ResolvedWindowsCaptureDisplay = {
|
|
displayId: number;
|
|
bounds: WindowsCaptureDisplayBounds;
|
|
};
|
|
|
|
export function resolveWindowsCaptureDisplay(
|
|
source: WindowsCaptureSourceLike | null | undefined,
|
|
allDisplays: WindowsCaptureDisplayLike[],
|
|
primaryDisplay: WindowsCaptureDisplayLike,
|
|
): ResolvedWindowsCaptureDisplay {
|
|
const requestedDisplayId = Number(source?.display_id);
|
|
const primaryDisplayId = Number(primaryDisplay.id);
|
|
const displayId =
|
|
Number.isFinite(requestedDisplayId) && requestedDisplayId > 0
|
|
? requestedDisplayId
|
|
: primaryDisplayId;
|
|
|
|
const matchedDisplay =
|
|
allDisplays.find((display) => String(display.id) === String(displayId)) ?? primaryDisplay;
|
|
|
|
return {
|
|
displayId,
|
|
bounds: matchedDisplay.bounds,
|
|
};
|
|
}
|