Files
llink/js/src/electron.d.ts
T
talksik fe2a003e94 fix: huddles not launching reliably
Closes #160
Race condition preventing proper initialization.
2026-04-14 07:58:45 -07:00

57 lines
1.7 KiB
TypeScript

import type { LinkMetadata } from './lib/link-metadata';
import type { AutoplayPayload } from './lib/autoplay-ipc';
declare global {
interface ScreenSource {
id: string;
name: string;
thumbnailDataUrl: string;
appIconDataUrl: string | null;
}
interface Window {
electronWindow: {
minimize: () => void;
maximize: () => void;
fullscreen: () => void;
close: () => void;
openHuddle: (data: { token: string; serverUrl: string }) => void;
closeHuddle: () => void;
};
electronHuddle: {
getScreenSources: () => Promise<ScreenSource[]>;
};
electronAutoplay: {
play: (payload: AutoplayPayload) => void;
dismiss: () => void;
navigate: (data: { networkId: string; streamId: string }) => void;
onPlay: (callback: (payload: AutoplayPayload) => void) => () => void;
onStop: (callback: () => void) => () => void;
onNavigate: (callback: (data: { networkId: string; streamId: string }) => void) => () => void;
};
electronScreen: {
getScreenSources: () => Promise<ScreenSource[]>;
startRecordingWindow: () => void;
stopRecordingWindow: () => void;
onStopRequested: (callback: () => void) => () => void;
};
electronScreenRecord: {
stop: () => void;
onInit: (callback: () => void) => () => void;
};
electronLink: {
fetchMetadata: (url: string) => Promise<LinkMetadata | null>;
openExternal: (url: string) => Promise<void>;
};
electronAttachment: {
download: (url: string, filename?: string) => void;
};
electronApp: {
setDockBadge: (count: number) => void;
getVersion: () => Promise<string>;
};
}
}
export {};