mirror of
https://github.com/webadderallorg/Recordly.git
synced 2026-09-25 07:16:02 +00:00
Split all source files exceeding 500 lines into smaller, focused modules:
- electron/main.ts → mainBootstrapHelpers, mainRuntimeState, mainUpdateIntegration, mainWindowControls
- electron/windows.ts → editorWindows, hudWindows, windowShared
- electron/updater.ts → updaterDialogs, updaterEventHandlers, updaterShared
- electron/preload.ts → preloadExtensionsBridge, preloadUpdateBridge
- electron/ipc/register/recording.ts → recording/ directory with focused handlers
- src/components/video-editor/VideoEditor.tsx → EditorContent, EditorHeader, EditorSidebar, EditorToolbar, hooks/
- src/components/video-editor/SettingsPanel.tsx → settings/ directory with per-section components
- src/components/video-editor/AnnotationSettingsPanel.tsx → tab components
- src/components/video-editor/ExtensionManager.tsx → extension-manager/ directory
- src/components/video-editor/VideoPlayback.tsx → videoPlaybackComponent/ directory
- src/components/video-editor/projectPersistence.ts → projectPersistence{Normalization,Paths,Regions,Shared}.ts
- src/components/video-editor/timeline/TimelineEditor.tsx → TimelineEditor/ directory
- src/components/video-editor/types.ts → focused type modules
- src/components/launch/LaunchWindow.tsx → LaunchWindow/ directory
- src/hooks/useScreenRecorder.ts → useScreenRecorder/ directory
- src/lib/exporter/audioEncoder.ts → audioEncoder/ directory
- src/lib/exporter/frameRenderer.ts → frameRenderer modules
- src/lib/exporter/modernFrameRenderer.ts → filters and lifecycle modules
- src/lib/exporter/modernVideoExporter.ts → modernVideoExporter/ directory
- src/lib/exporter/videoExporter.ts → video-exporter/ directory
- src/lib/exporter/streamingDecoder.ts → streamingDecoderHelpers.ts
- src/lib/extensions/extensionHost.ts → extensionHost{ApiFactory,QueryApi,RegistrationApi,Shared,State}.ts
- src/lib/extensions/types.ts → focused type modules
- electron/native/ScreenCaptureKitRecorder.swift → ScreenCaptureKitRecorder/ directory
- scripts/benchmark-export-queues.mjs → benchmark-export-queues/ directory
- .github/workflows/release.yml → extracted merge-macos-metadata composite action
- scripts/build-native-helpers.mjs → updated for multi-file Swift compilation
Also incorporates upstream default export quality change (good → source).
132 lines
3.7 KiB
TypeScript
132 lines
3.7 KiB
TypeScript
interface ElectronAPIExport {
|
|
storeRecordedVideo: (
|
|
videoData: ArrayBuffer,
|
|
fileName: string,
|
|
) => Promise<{ success: boolean; path?: string; message?: string }>;
|
|
storeMicrophoneSidecar: (
|
|
audioData: ArrayBuffer,
|
|
videoPath: string,
|
|
) => Promise<{ success: boolean; path?: string; error?: string }>;
|
|
getRecordedVideoPath: () => Promise<{ success: boolean; path?: string; message?: string }>;
|
|
listAssetDirectory: (relativeDir: string) => Promise<{
|
|
success: boolean;
|
|
files?: string[];
|
|
error?: string;
|
|
}>;
|
|
readLocalFile: (filePath: string) => Promise<{ success: boolean; data?: Uint8Array; error?: string }>;
|
|
generateWallpaperThumbnail: (
|
|
filePath: string,
|
|
) => Promise<{ success: boolean; data?: Uint8Array; error?: string }>;
|
|
nativeVideoExportStart: (options: {
|
|
width: number;
|
|
height: number;
|
|
frameRate: number;
|
|
bitrate: number;
|
|
encodingMode: "fast" | "balanced" | "quality";
|
|
inputMode?: "rawvideo" | "h264-stream";
|
|
}) => Promise<{
|
|
success: boolean;
|
|
sessionId?: string;
|
|
encoderName?: string;
|
|
error?: string;
|
|
}>;
|
|
nativeVideoExportWriteFrame: (
|
|
sessionId: string,
|
|
frameData: Uint8Array,
|
|
) => Promise<{ success: boolean; error?: string }>;
|
|
nativeVideoExportFinish: (
|
|
sessionId: string,
|
|
options?: {
|
|
audioMode?: "none" | "copy-source" | "trim-source" | "edited-track";
|
|
audioSourcePath?: string | null;
|
|
trimSegments?: Array<{ startMs: number; endMs: number }>;
|
|
editedAudioData?: ArrayBuffer;
|
|
editedAudioMimeType?: string | null;
|
|
},
|
|
) => Promise<{
|
|
success: boolean;
|
|
data?: Uint8Array;
|
|
encoderName?: string;
|
|
error?: string;
|
|
}>;
|
|
nativeVideoExportCancel: (
|
|
sessionId: string,
|
|
) => Promise<{ success: boolean; error?: string }>;
|
|
muxExportedVideoAudio: (
|
|
videoData: ArrayBuffer,
|
|
options?: {
|
|
audioMode?: "none" | "copy-source" | "trim-source" | "edited-track";
|
|
audioSourcePath?: string | null;
|
|
trimSegments?: Array<{ startMs: number; endMs: number }>;
|
|
editedAudioData?: ArrayBuffer;
|
|
editedAudioMimeType?: string | null;
|
|
},
|
|
) => Promise<{
|
|
success: boolean;
|
|
data?: Uint8Array;
|
|
error?: string;
|
|
}>;
|
|
getVideoAudioFallbackPaths: (
|
|
videoPath: string,
|
|
) => Promise<{ success: boolean; paths: string[]; error?: string }>;
|
|
saveExportedVideo: (
|
|
videoData: ArrayBuffer,
|
|
fileName: string,
|
|
) => Promise<{ success: boolean; path?: string; message?: string; canceled?: boolean }>;
|
|
writeExportedVideoToPath: (
|
|
videoData: ArrayBuffer,
|
|
outputPath: string,
|
|
) => Promise<{
|
|
success: boolean;
|
|
path?: string;
|
|
message?: string;
|
|
error?: string;
|
|
canceled?: boolean;
|
|
}>;
|
|
openVideoFilePicker: () => Promise<{ success: boolean; path?: string; canceled?: boolean }>;
|
|
openAudioFilePicker: () => Promise<{ success: boolean; path?: string; canceled?: boolean }>;
|
|
openWhisperExecutablePicker: () => Promise<{
|
|
success: boolean;
|
|
path?: string;
|
|
canceled?: boolean;
|
|
error?: string;
|
|
}>;
|
|
openWhisperModelPicker: () => Promise<{
|
|
success: boolean;
|
|
path?: string;
|
|
canceled?: boolean;
|
|
error?: string;
|
|
}>;
|
|
getWhisperSmallModelStatus: () => Promise<{
|
|
success: boolean;
|
|
exists: boolean;
|
|
path?: string | null;
|
|
error?: string;
|
|
}>;
|
|
downloadWhisperSmallModel: () => Promise<{
|
|
success: boolean;
|
|
path?: string;
|
|
alreadyDownloaded?: boolean;
|
|
error?: string;
|
|
}>;
|
|
deleteWhisperSmallModel: () => Promise<{ success: boolean; error?: string }>;
|
|
onWhisperSmallModelDownloadProgress: (
|
|
callback: (state: {
|
|
status: "idle" | "downloading" | "downloaded" | "error";
|
|
progress: number;
|
|
path?: string | null;
|
|
error?: string;
|
|
}) => void,
|
|
) => () => void;
|
|
generateAutoCaptions: (options: {
|
|
videoPath: string;
|
|
whisperExecutablePath?: string;
|
|
whisperModelPath: string;
|
|
language?: string;
|
|
}) => Promise<{
|
|
success: boolean;
|
|
cues?: AutoCaptionCue[];
|
|
message?: string;
|
|
error?: string;
|
|
}>;
|
|
} |