diff --git a/apps/desktop/electron/main.ts b/apps/desktop/electron/main.ts index 229e080c55..d466ea652d 100644 --- a/apps/desktop/electron/main.ts +++ b/apps/desktop/electron/main.ts @@ -179,6 +179,7 @@ import { buildHudWindowUrl } from './hud-url' import { imageContextMenuItems } from './image-context-menu' import { createLinkTitleWindow, guardLinkTitleSession, readLinkTitleWindowTitle } from './link-title-window' import { ensureMainWindow } from './main-window-lifecycle' +import { createMediaProtocolHandler, MEDIA_PROTOCOL } from './media-protocol' import { oauthGuardMayHardFail, oauthSessionIsLive, @@ -1067,30 +1068,10 @@ app.setAboutPanelOptions({ copyright: 'Copyright © 2026 Nous Research' }) -// Custom scheme for streaming local media (video/audio) into the renderer. -// Reading large media through `readFileDataUrl` failed: it base64-loads the -// whole file into memory and is hard-capped (default 16 MB, Settings → Chat), -// so any non-trivial video silently refused to load. Streaming via a protocol -// handler removes the size cap and gives the