mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 18:41:47 +00:00
* feat: electron-vite PoC * fix: fix preload path * remove rollup deps and config * fix: debug mode * fix: build mode, asset path * fix: remove unused dependencies * feat: use `executeJavaScriptInIsolatedWorld` instead of `executeJavaScript` * feat: enable `minify` * fix(actions): update task name * fix: fix dev mode check * fix: remove unused variable
47 lines
1.1 KiB
TypeScript
47 lines
1.1 KiB
TypeScript
import '@total-typescript/ts-reset';
|
|
|
|
import { ipcRenderer as electronIpcRenderer } from 'electron';
|
|
import is from 'electron-is';
|
|
|
|
import config from './config';
|
|
import { YoutubePlayer } from './types/youtube-player';
|
|
|
|
declare global {
|
|
interface Compressor {
|
|
audioSource: MediaElementAudioSourceNode;
|
|
audioContext: AudioContext;
|
|
}
|
|
|
|
interface DocumentEventMap {
|
|
'apiLoaded': CustomEvent<YoutubePlayer>;
|
|
'audioCanPlay': CustomEvent<Compressor>;
|
|
}
|
|
|
|
interface Window {
|
|
ipcRenderer: typeof electronIpcRenderer;
|
|
mainConfig: typeof config;
|
|
electronIs: typeof is;
|
|
ELECTRON_RENDERER_URL: string | undefined;
|
|
/**
|
|
* YouTube Music internal variable (Last interaction time)
|
|
*/
|
|
_lact: number;
|
|
navigation: Navigation;
|
|
download: () => void;
|
|
togglePictureInPicture: () => void;
|
|
reload: () => void;
|
|
}
|
|
}
|
|
|
|
// import { Howl as _Howl } from 'howler';
|
|
declare module 'howler' {
|
|
interface Howl {
|
|
_sounds: {
|
|
_paused: boolean;
|
|
_ended: boolean;
|
|
_id: string;
|
|
_node: HTMLMediaElement;
|
|
}[];
|
|
}
|
|
}
|