pstream is dead; long live pstream taciturnaxolotl.github.io/pstream-ng/
at main 22 lines 538 B view raw
1// Desktop app is detected via a global set by the Electron preload script. 2declare global { 3 interface Window { 4 __PSTREAM_DESKTOP__?: boolean; 5 desktopApi?: { 6 startDownload(data: { 7 url: string; 8 title: string; 9 poster?: string; 10 subtitleText?: string; 11 duration?: number; 12 type?: string; 13 headers?: Record<string, string>; 14 }): void; 15 openOffline(): void; 16 }; 17 } 18} 19 20export function useIsDesktopApp(): boolean { 21 return Boolean(window.__PSTREAM_DESKTOP__); 22}