/** * Media utilities shared across the app. * * Extracted from App.jsx to reduce file size and enable independent testing. */ import { API_BASE as _PREVIEW_API, isTauriContext } from './apiBase'; const isTauri = isTauriContext(); // ── Tauri window maximise on double-click ───────────────────────────── let tauriWindow = null; if (isTauri) { import('@tauri-apps/api/window').then(m => { tauriWindow = m; }); } export const doubleClickMaximize = () => { if (tauriWindow) tauriWindow.getCurrentWindow().toggleMaximize(); }; // ── File → media URL ────────────────────────────────────────────────── // _PREVIEW_API is now sourced from utils/apiBase.ts so Docker LAN users // (issue #80) get window.location.hostname:3900 instead of localhost:3900. /** * Convert a File object to a media-safe URL. * In Tauri's WebKit, blob: URLs fail for