mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-01 10:23:33 +00:00
Add ability to save/restore queue (#111)
* add ability to save/restore play queue * Add restoreQueue action * Add optional pause param on setQueue --------- Co-authored-by: jeffvli <jeffvictorli@gmail.com>
This commit is contained in:
parent
c1c6ce33e4
commit
106fc90c4a
10 changed files with 180 additions and 7 deletions
6
src/renderer/preload.d.ts
vendored
6
src/renderer/preload.d.ts
vendored
|
|
@ -1,5 +1,5 @@
|
|||
import { IpcRendererEvent } from 'electron';
|
||||
import { PlayerData } from './store';
|
||||
import { PlayerData, PlayerState } from './store';
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
|
|
@ -17,6 +17,8 @@ declare global {
|
|||
PLAYER_PAUSE(): void;
|
||||
PLAYER_PLAY(): void;
|
||||
PLAYER_PREVIOUS(): void;
|
||||
PLAYER_RESTORE_DATA(): void;
|
||||
PLAYER_SAVE_QUEUE(data: PlayerState): void;
|
||||
PLAYER_SEEK(seconds: number): void;
|
||||
PLAYER_SEEK_TO(seconds: number): void;
|
||||
PLAYER_SET_QUEUE(data: PlayerData): void;
|
||||
|
|
@ -30,6 +32,8 @@ declare global {
|
|||
RENDERER_PLAYER_PLAY(cb: (event: IpcRendererEvent, data: any) => void): void;
|
||||
RENDERER_PLAYER_PLAY_PAUSE(cb: (event: IpcRendererEvent, data: any) => void): void;
|
||||
RENDERER_PLAYER_PREVIOUS(cb: (event: IpcRendererEvent, data: any) => void): void;
|
||||
RENDERER_PLAYER_RESTORE_QUEUE(cb: (event: IpcRendererEvent, data: any) => void): void;
|
||||
RENDERER_PLAYER_SAVE_QUEUE(cb: (event: IpcRendererEvent, data: any) => void): void;
|
||||
RENDERER_PLAYER_STOP(cb: (event: IpcRendererEvent, data: any) => void): void;
|
||||
SETTINGS_GET(data: { property: string }): any;
|
||||
SETTINGS_SET(data: { property: string; value: any }): void;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue