Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.
TypeScript cross-platformelectronffmpegopen-sourceproduct-demorustscreen-capturescreen-recorderscreen-recordingscreen-studioscreencastspeech-to-texttypescriptvideo-editingvideo-editorwaylandwgpuwhisper
sunset windows support
Siddharthdda08172d956
diff --git a/.github/workflows/build.yml b/.github/workflows/build.ymlindex 50d861d97..a3b5cee00 100644--- a/.github/workflows/build.yml+++ b/.github/workflows/build.yml@@ -6,34 +6,7 @@ on:workflow_dispatch:jobs:- build-windows:- runs-on: windows-latest- steps:- - name: Checkout code- uses: actions/checkout@v3-- - name: Setup Node.js- uses: actions/setup-node@v3- with:- node-version: '22'-- - name: Install dependencies- run: npm ci-- - name: Install app dependencies- run: npx electron-builder install-app-deps-- - name: Build Windows app- run: npm run build:win- env:- GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}-- - name: Upload Windows build- uses: actions/upload-artifact@v4- with:- name: windows-installer- path: release/**/*.exe- retention-days: 30+build-macos:runs-on: macos-latestdiff --git a/README.md b/README.mdindex b78e63603..5f9ed6ef8 100644--- a/README.md+++ b/README.md@@ -37,7 +37,6 @@ OpenScreen is 100% free for personal and commercial use. Use it, modify it, dist- Motion blur and exponential easing for smoother pan and zoom effects**Note:**-- OpenScreen is designed to support both Windows and macOS. We did not use any native APIs specific to one OS, so it should work on both. However, it hasn't been fully tested on Windows yet, if you run into issues, please let me know!- After you install the app, you'll need to grant it accessibility and screen recording permissions for it to work properly.diff --git a/dist-electron/main.js b/dist-electron/main.jsindex ed376262a..22982c9a8 100644--- a/dist-electron/main.js+++ b/dist-electron/main.js@@ -41,21 +41,13 @@ function createHudOverlayWindow() {return win;}function createEditorWindow() {- const isMac = process.platform === "darwin";const win = new BrowserWindow({width: 1200,height: 800,minWidth: 800,minHeight: 600,- // On macOS, use hiddenInset for native controls; on Windows, frameless- ...isMac ? {- titleBarStyle: "hiddenInset",- trafficLightPosition: { x: 12, y: 12 }- } : {- frame: false,- icon: void 0- // No app icon on Windows- },+ titleBarStyle: "hiddenInset",+ trafficLightPosition: { x: 12, y: 12 },transparent: false,resizable: true,alwaysOnTop: false,@@ -369,28 +361,6 @@ function registerIpcHandlers(createEditorWindow2, createSourceSelectorWindow2, g};}});- ipcMain.handle("minimize-window", () => {- const mainWin = getMainWindow();- if (mainWin) {- mainWin.minimize();- }- });- ipcMain.handle("maximize-window", () => {- const mainWin = getMainWindow();- if (mainWin) {- if (mainWin.isMaximized()) {- mainWin.unmaximize();- } else {- mainWin.maximize();- }- }- });- ipcMain.handle("close-window", () => {- const mainWin = getMainWindow();- if (mainWin) {- mainWin.close();- }- });}const __dirname = path.dirname(fileURLToPath(import.meta.url));const RECORDINGS_DIR = path.join(app.getPath("userData"), "recordings");@@ -469,11 +439,6 @@ function createSourceSelectorWindowWrapper() {return sourceSelectorWindow;}app.on("window-all-closed", () => {- if (process.platform !== "darwin") {- cleanupMouseTracking();- app.quit();- mainWindow = null;- }});app.on("activate", () => {if (BrowserWindow.getAllWindows().length === 0) {diff --git a/dist-electron/preload.mjs b/dist-electron/preload.mjsindex 51a8efa48..5c862ea39 100644--- a/dist-electron/preload.mjs+++ b/dist-electron/preload.mjs@@ -47,14 +47,5 @@ electron.contextBridge.exposeInMainWorld("electronAPI", {},saveExportedVideo: (videoData, fileName) => {return electron.ipcRenderer.invoke("save-exported-video", videoData, fileName);- },- minimizeWindow: () => {- return electron.ipcRenderer.invoke("minimize-window");- },- maximizeWindow: () => {- return electron.ipcRenderer.invoke("maximize-window");- },- closeWindow: () => {- return electron.ipcRenderer.invoke("close-window");}});diff --git a/electron-builder.json5 b/electron-builder.json5index 2776b200b..49774ba65 100644--- a/electron-builder.json5+++ b/electron-builder.json5@@ -26,25 +26,6 @@"icon": "icons/icons/mac/icon.icns","artifactName": "${productName}-Mac-${version}-Installer.${ext}"},- "win": {- "target": [- {- "target": "nsis",- "arch": [- "x64"- ]- }- ],- "icon": "icons/icons/win/icon.ico",- "artifactName": "${productName}-Windows-${version}-Setup.${ext}",- "requestedExecutionLevel": "asInvoker"- },- "nsis": {- "oneClick": false,- "perMachine": false,- "allowToChangeInstallationDirectory": true,- "deleteAppDataOnUninstall": false- },"linux": {"target": ["AppImage"diff --git a/electron/electron-env.d.ts b/electron/electron-env.d.tsindex 6ac22849a..0853fc160 100644--- a/electron/electron-env.d.ts+++ b/electron/electron-env.d.ts@@ -38,9 +38,6 @@ interface Window {onStopRecordingFromTray: (callback: () => void) => () => voidopenExternalUrl: (url: string) => Promise<{ success: boolean; error?: string }>saveExportedVideo: (videoData: ArrayBuffer, fileName: string) => Promise<{ success: boolean; path?: string; message?: string }>- minimizeWindow: () => Promise<void>- maximizeWindow: () => Promise<void>- closeWindow: () => Promise<void>}}diff --git a/electron/ipc/handlers.ts b/electron/ipc/handlers.tsindex e7a7956ce..81e8af5ae 100644--- a/electron/ipc/handlers.ts+++ b/electron/ipc/handlers.ts@@ -178,30 +178,4 @@ export function registerIpcHandlers(}}})-- // Window control handlers for frameless window- ipcMain.handle('minimize-window', () => {- const mainWin = getMainWindow()- if (mainWin) {- mainWin.minimize()- }- })-- ipcMain.handle('maximize-window', () => {- const mainWin = getMainWindow()- if (mainWin) {- if (mainWin.isMaximized()) {- mainWin.unmaximize()- } else {- mainWin.maximize()- }- }- })-- ipcMain.handle('close-window', () => {- const mainWin = getMainWindow()- if (mainWin) {- mainWin.close()- }- })}diff --git a/electron/main.ts b/electron/main.tsindex 04d15b69e..2051eb85b 100644--- a/electron/main.ts+++ b/electron/main.ts@@ -109,15 +109,10 @@ function createSourceSelectorWindowWrapper() {return sourceSelectorWindow}-// Quit when all windows are closed, except on macOS. There, it's common-// for applications and their menu bar to stay active until the user quits+// On macOS, applications and their menu bar stay active until the user quits// explicitly with Cmd + Q.app.on('window-all-closed', () => {- if (process.platform !== 'darwin') {- cleanupMouseTracking()- app.quit()- mainWindow = null- }+ // Keep app running (macOS behavior)})app.on('activate', () => {diff --git a/electron/preload.ts b/electron/preload.tsindex b8d29a746..2b94f790e 100644--- a/electron/preload.ts+++ b/electron/preload.ts@@ -49,13 +49,4 @@ contextBridge.exposeInMainWorld('electronAPI', {saveExportedVideo: (videoData: ArrayBuffer, fileName: string) => {return ipcRenderer.invoke('save-exported-video', videoData, fileName)},- minimizeWindow: () => {- return ipcRenderer.invoke('minimize-window')- },- maximizeWindow: () => {- return ipcRenderer.invoke('maximize-window')- },- closeWindow: () => {- return ipcRenderer.invoke('close-window')- },})\ No newline at end of filediff --git a/electron/windows.ts b/electron/windows.tsindex 03720f4fb..42875ee98 100644--- a/electron/windows.ts+++ b/electron/windows.ts@@ -47,21 +47,13 @@ export function createHudOverlayWindow(): BrowserWindow {}export function createEditorWindow(): BrowserWindow {- const isMac = process.platform === 'darwin'-const win = new BrowserWindow({width: 1200,height: 800,minWidth: 800,minHeight: 600,- // On macOS, use hiddenInset for native controls; on Windows, frameless- ...(isMac ? {- titleBarStyle: 'hiddenInset',- trafficLightPosition: { x: 12, y: 12 },- } : {- frame: false,- icon: undefined, // No app icon on Windows- }),+ titleBarStyle: 'hiddenInset',+ trafficLightPosition: { x: 12, y: 12 },transparent: false,resizable: true,alwaysOnTop: false,diff --git a/package.json b/package.jsonindex fc49c3fec..24d80ab56 100644--- a/package.json+++ b/package.json@@ -8,8 +8,7 @@"build": "tsc && vite build && electron-builder","lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0","preview": "vite preview",- "build:mac": "tsc && vite build && electron-builder --mac",- "build:win": "tsc && vite build && electron-builder --win --x64"+ "build:mac": "tsc && vite build && electron-builder --mac"},"dependencies": {"@fix-webm-duration/fix": "^1.0.1",@@ -57,4 +56,4 @@"vite-plugin-electron-renderer": "^0.14.5"},"main": "dist-electron/main.js"-}+}\ No newline at end of filediff --git a/src/components/video-editor/VideoEditor.tsx b/src/components/video-editor/VideoEditor.tsxindex c1bb49b4e..8b75b200e 100644--- a/src/components/video-editor/VideoEditor.tsx+++ b/src/components/video-editor/VideoEditor.tsx@@ -9,7 +9,7 @@ import PlaybackControls from "./PlaybackControls";import TimelineEditor from "./timeline/TimelineEditor";import { SettingsPanel } from "./SettingsPanel";import { ExportDialog } from "./ExportDialog";-import { WindowControls } from "./WindowControls";+import type { Span } from "dnd-timeline";import {DEFAULT_ZOOM_DEPTH,@@ -275,7 +275,7 @@ export default function VideoEditor() {style={{ WebkitAppRegion: 'drag' } as React.CSSProperties}><div className="flex-1" />- <WindowControls />+</div><div className="flex-1 p-4 gap-4 flex min-h-0 relative">diff --git a/src/components/video-editor/WindowControls.tsx b/src/components/video-editor/WindowControls.tsxdeleted file mode 100644index 4845d170e..000000000--- a/src/components/video-editor/WindowControls.tsx+++ /dev/null@@ -1,57 +0,0 @@-export function WindowControls() {- // Only show custom controls on Windows- const isWindows = navigator.userAgent.includes('Windows');-- if (!isWindows) {- return null;- }-- const handleMinimize = () => {- window.electronAPI?.minimizeWindow?.();- };-- const handleMaximize = () => {- window.electronAPI?.maximizeWindow?.();- };-- const handleClose = () => {- window.electronAPI?.closeWindow?.();- };-- return (- <div className="flex items-center" style={{ WebkitAppRegion: 'no-drag' } as React.CSSProperties}>- {/* Minimize - Horizontal Line */}- <button- onClick={handleMinimize}- className="w-12 h-8 flex items-center justify-center hover:bg-white/10 transition-colors group"- aria-label="Minimize"- >- <svg width="12" height="1" viewBox="0 0 12 1" className="text-gray-400 group-hover:text-white transition-colors">- <rect width="12" height="1" fill="currentColor" />- </svg>- </button>-- {/* Maximize - Square */}- <button- onClick={handleMaximize}- className="w-12 h-8 flex items-center justify-center hover:bg-white/10 transition-colors group"- aria-label="Maximize"- >- <svg width="10" height="10" viewBox="0 0 10 10" className="text-gray-400 group-hover:text-white transition-colors">- <rect x="0" y="0" width="10" height="10" fill="none" stroke="currentColor" strokeWidth="1" />- </svg>- </button>-- {/* Close - X */}- <button- onClick={handleClose}- className="w-12 h-8 flex items-center justify-center hover:bg-[#e81123] transition-colors group"- aria-label="Close"- >- <svg width="10" height="10" viewBox="0 0 10 10" className="text-gray-400 group-hover:text-white transition-colors">- <path d="M 0 0 L 10 10 M 10 0 L 0 10" stroke="currentColor" strokeWidth="1" />- </svg>- </button>- </div>- );-}diff --git a/src/lib/exporter/videoExporter.ts b/src/lib/exporter/videoExporter.tsindex a3619d466..e299b696c 100644--- a/src/lib/exporter/videoExporter.ts+++ b/src/lib/exporter/videoExporter.ts@@ -119,9 +119,7 @@ export class VideoExporter {const canvas = this.renderer!.getCanvas();- // CRITICAL FIX for Windows: Explicitly specify colorSpace when creating VideoFrame from canvas- // Without this, VideoFrame.colorSpace can be null on Windows, causing "Cannot read properties of null" error- // Using BT.709 with sRGB transfer (IEC 61966-2-1) which is standard for HD video+// @ts-ignore - TypeScript definitions may not include all VideoFrameInit propertiesconst exportFrame = new VideoFrame(canvas, {timestamp,