Skip to content

Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.

Merge remote-tracking branch 'origin/main' into feat/cursor-pipeline

Siddharth1d36ad239d31
diff --cc src/components/video-editor/VideoEditor.tsx
index fd4ae9e93,fabdc251f..464370df5
--- a/src/components/video-editor/VideoEditor.tsx
+++ b/src/components/video-editor/VideoEditor.tsx
@@@ -90,15 -84,53 +90,62 @@@ import
import { UnsavedChangesDialog } from "./UnsavedChangesDialog";
import VideoPlayback, { VideoPlaybackRef } from "./VideoPlayback";
+function isClickInteractionType(interactionType: string | null | undefined) {
+ return (
+ interactionType === "click" ||
+ interactionType === "double-click" ||
+ interactionType === "right-click" ||
+ interactionType === "middle-click"
+ );
+}
+
+ interface ExportDiagnostics {
+ formatLabel: "GIF" | "Video";
+ reason?: string;
+ sourcePath?: string | null;
+ width?: number;
+ height?: number;
+ frameRate?: number;
+ codec?: string;
+ bitrate?: number;
+ }
+
+ function getFileNameForDiagnostics(filePath?: string | null) {
+ if (!filePath) return "unknown";
+
+ try {
+ const url = new URL(filePath);
+ if (url.protocol === "file:") {
+ return decodeURIComponent(url.pathname).split(/[\\/]/).pop() || filePath;
+ }
+ } catch {
+ // Treat non-URL values as filesystem paths.
+ }
+
+ return filePath.split(/[\\/]/).pop() || filePath;
+ }
+
+ function buildExportDiagnosticMessage(diagnostics: ExportDiagnostics) {
+ const details = [
+ diagnostics.reason ? `Reason: ${diagnostics.reason}` : null,
+ `Source: ${getFileNameForDiagnostics(diagnostics.sourcePath)}`,
+ diagnostics.width && diagnostics.height
+ ? `Output: ${diagnostics.width}x${diagnostics.height}${
+ diagnostics.frameRate ? ` @ ${diagnostics.frameRate} fps` : ""
+ }`
+ : null,
+ diagnostics.codec ? `Codec: ${diagnostics.codec}` : null,
+ diagnostics.bitrate ? `Bitrate: ${Math.round(diagnostics.bitrate / 1_000_000)} Mbps` : null,
+ `VideoEncoder: ${"VideoEncoder" in window ? "available" : "unavailable"}`,
+ ].filter(Boolean);
+
+ return `${diagnostics.formatLabel} export failed\n${details.join("\n")}`;
+ }
+
+ function buildSaveDiagnosticMessage(formatLabel: "GIF" | "Video", reason?: string) {
+ return `${formatLabel} export save failed${reason ? `\nReason: ${reason}` : ""}`;
+ }
+
export default function VideoEditor() {
const {
state: editorState,