mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-13 07:55:18 +00:00
dependency bumps & Player bug fix
This commit is contained in:
parent
4aa80fbee5
commit
5ec3ef9cda
Binary file not shown.
Before Width: | Height: | Size: 93 KiB |
BIN
assets/spotube.png
Normal file
BIN
assets/spotube.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 63 KiB |
726
node-mpv.d.ts
vendored
726
node-mpv.d.ts
vendored
@ -1,726 +0,0 @@
|
||||
// Type definitions for node-mpv 2.0-beta.0
|
||||
// Project: node-mpv <https://github.com/j-holub/Node-MPV>
|
||||
// Definitions by: leonekmi <me@leonekmi.fr>
|
||||
|
||||
declare module "node-mpv" {
|
||||
import EventEmitter = NodeJS.EventEmitter;
|
||||
|
||||
interface NodeMpvOptions {
|
||||
// Print debug lines
|
||||
debug?: boolean;
|
||||
// Print more lines
|
||||
verbose?: boolean;
|
||||
// Specify socket
|
||||
socket?: string;
|
||||
// Don't open video display
|
||||
audio_only?: boolean;
|
||||
// Auto-restart on a crash
|
||||
auto_restart?: boolean;
|
||||
// Time update for timeposition event
|
||||
time_update?: number;
|
||||
// Path to mpv binary
|
||||
binary?: string;
|
||||
}
|
||||
|
||||
/*interface NodeMpvError {
|
||||
|
||||
}*/
|
||||
|
||||
// these are the emitted events
|
||||
type EventNames = "crashed" | "getrequest" | "seek" | "started" | "stopped" | "paused" | "resumed" | "status" | "timeposition" | "quit";
|
||||
type VoidCallback = () => void;
|
||||
type VoidCallbackWithData<ArgType> = (arg: ArgType) => void;
|
||||
type VoidCallbackWithData2<ArgType, ArgType2> = (arg: ArgType, arg2: ArgType2) => void;
|
||||
|
||||
type LoadMode = "replace" | "append";
|
||||
type MediaLoadMode = LoadMode | "append-play";
|
||||
type AudioFlag = "select" | "auto" | "cached";
|
||||
type SeekMode = "relative" | "absolute";
|
||||
type RepeatMode = number | "inf" | "no";
|
||||
type PlaylistMode = "weak" | "force";
|
||||
|
||||
interface TimePosition {
|
||||
start: number;
|
||||
end: number;
|
||||
}
|
||||
type StatusObjectProperties = "mute" | "pause" | "duration" | "volume" | "filename" | "path" | "media-title" | "playlist-pos" | "playlist-count" | "loop" | "fullscreen" | "sub-visibility";
|
||||
|
||||
interface StatusObject {
|
||||
property: StatusObjectProperties;
|
||||
value: string | number | boolean;
|
||||
}
|
||||
|
||||
type EventListenerArgs<EventName extends EventNames> = [EventName, VoidCallback];
|
||||
type EventListenerArgsWithData<EventName extends EventNames, DataType> = [EventName, VoidCallbackWithData<DataType>];
|
||||
type EventListenerArgsWithMultipleData<EventName extends EventNames, DataType, DataType1> = [EventName, VoidCallbackWithData2<DataType, DataType1>];
|
||||
|
||||
export default class NodeMpv implements EventEmitter {
|
||||
/**
|
||||
* Listen to certain events which are emitted after any kind of
|
||||
* status change of mpv player.
|
||||
* @param args
|
||||
* @see for Events https://github.com/j-holub/Node-MPV#events
|
||||
*/
|
||||
|
||||
addListener(...args: EventListenerArgs<"crashed">): this;
|
||||
addListener(...args: EventListenerArgsWithMultipleData<"getrequest", string, any>): this;
|
||||
addListener(...args: EventListenerArgs<"paused">): this;
|
||||
addListener(...args: EventListenerArgs<"quit">): this;
|
||||
addListener(...args: EventListenerArgs<"resumed">): this;
|
||||
addListener(...args: EventListenerArgsWithData<"seek", TimePosition>): this;
|
||||
addListener(...args: EventListenerArgs<"started">): this;
|
||||
addListener(...args: EventListenerArgsWithData<"status", StatusObject>): this;
|
||||
addListener(...args: EventListenerArgs<"stopped">): this;
|
||||
addListener(...args: EventListenerArgsWithData<"timeposition", number>): this;
|
||||
|
||||
/**
|
||||
* Listen to certain events which are emitted after any kind of
|
||||
* status change of mpv player
|
||||
* @param args
|
||||
* @see for Events https://github.com/j-holub/Node-MPV#events
|
||||
*/
|
||||
on(...args: EventListenerArgs<"crashed">): this;
|
||||
on(...args: EventListenerArgsWithMultipleData<"getrequest", string, any>): this;
|
||||
on(...args: EventListenerArgs<"paused">): this;
|
||||
on(...args: EventListenerArgs<"quit">): this;
|
||||
on(...args: EventListenerArgs<"resumed">): this;
|
||||
on(...args: EventListenerArgsWithData<"seek", TimePosition>): this;
|
||||
on(...args: EventListenerArgs<"started">): this;
|
||||
on(...args: EventListenerArgsWithData<"status", StatusObject>): this;
|
||||
on(...args: EventListenerArgs<"stopped">): this;
|
||||
on(...args: EventListenerArgsWithData<"timeposition", number>): this;
|
||||
|
||||
/**
|
||||
* Listen to certain events which are emitted after any kind of
|
||||
* status change of mpv player
|
||||
* @param args
|
||||
* @see for Events https://github.com/j-holub/Node-MPV#events
|
||||
*/
|
||||
once(...args: EventListenerArgs<"crashed">): this;
|
||||
once(...args: EventListenerArgsWithMultipleData<"getrequest", string, any>): this;
|
||||
once(...args: EventListenerArgs<"paused">): this;
|
||||
once(...args: EventListenerArgs<"quit">): this;
|
||||
once(...args: EventListenerArgs<"resumed">): this;
|
||||
once(...args: EventListenerArgsWithData<"seek", TimePosition>): this;
|
||||
once(...args: EventListenerArgs<"started">): this;
|
||||
once(...args: EventListenerArgsWithData<"status", StatusObject>): this;
|
||||
once(...args: EventListenerArgs<"stopped">): this;
|
||||
once(...args: EventListenerArgsWithData<"timeposition", number>): this;
|
||||
|
||||
/**
|
||||
* Remove listener that is listening to the provided event `eventName`
|
||||
* @param args
|
||||
*/
|
||||
off(...args: EventListenerArgs<"crashed">): this;
|
||||
off(...args: EventListenerArgsWithMultipleData<"getrequest", string, any>): this;
|
||||
off(...args: EventListenerArgs<"paused">): this;
|
||||
off(...args: EventListenerArgs<"quit">): this;
|
||||
off(...args: EventListenerArgs<"resumed">): this;
|
||||
off(...args: EventListenerArgsWithData<"seek", TimePosition>): this;
|
||||
off(...args: EventListenerArgs<"started">): this;
|
||||
off(...args: EventListenerArgsWithData<"status", StatusObject>): this;
|
||||
off(...args: EventListenerArgs<"stopped">): this;
|
||||
off(...args: EventListenerArgsWithData<"timeposition", number>): this;
|
||||
|
||||
/**
|
||||
* Remove listener that is listening to the provided event `eventName`
|
||||
* @param args
|
||||
*/
|
||||
removeListener(...args: EventListenerArgs<"crashed">): this;
|
||||
removeListener(...args: EventListenerArgsWithMultipleData<"getrequest", string, any>): this;
|
||||
removeListener(...args: EventListenerArgs<"paused">): this;
|
||||
removeListener(...args: EventListenerArgs<"quit">): this;
|
||||
removeListener(...args: EventListenerArgs<"resumed">): this;
|
||||
removeListener(...args: EventListenerArgsWithData<"seek", TimePosition>): this;
|
||||
removeListener(...args: EventListenerArgs<"started">): this;
|
||||
removeListener(...args: EventListenerArgsWithData<"status", StatusObject>): this;
|
||||
removeListener(...args: EventListenerArgs<"stopped">): this;
|
||||
removeListener(...args: EventListenerArgsWithData<"timeposition", number>): this;
|
||||
|
||||
/**
|
||||
* Removes all listeners listening to a particular event `eventName`
|
||||
* @param {EventNames?} event - Event names
|
||||
*/
|
||||
|
||||
removeAllListeners(event?: EventNames): this;
|
||||
|
||||
setMaxListeners(n: number): this;
|
||||
|
||||
getMaxListeners(): number;
|
||||
|
||||
listeners(event: EventNames): Function[];
|
||||
|
||||
rawListeners(event: EventNames): Function[];
|
||||
emit(event: EventNames, ...args: any[]): boolean;
|
||||
listenerCount(event: EventNames): number;
|
||||
// Added in Node 6...
|
||||
prependListener(...args: EventListenerArgs<"crashed">): this;
|
||||
prependListener(...args: EventListenerArgsWithMultipleData<"getrequest", string, any>): this;
|
||||
prependListener(...args: EventListenerArgs<"paused">): this;
|
||||
prependListener(...args: EventListenerArgs<"quit">): this;
|
||||
prependListener(...args: EventListenerArgs<"resumed">): this;
|
||||
prependListener(...args: EventListenerArgsWithData<"seek", TimePosition>): this;
|
||||
prependListener(...args: EventListenerArgs<"started">): this;
|
||||
prependListener(...args: EventListenerArgsWithData<"status", StatusObject>): this;
|
||||
prependListener(...args: EventListenerArgs<"stopped">): this;
|
||||
prependListener(...args: EventListenerArgsWithData<"timeposition", number>): this;
|
||||
|
||||
prependOnceListener(...args: EventListenerArgs<"crashed">): this;
|
||||
prependOnceListener(...args: EventListenerArgsWithMultipleData<"getrequest", string, any>): this;
|
||||
prependOnceListener(...args: EventListenerArgs<"paused">): this;
|
||||
prependOnceListener(...args: EventListenerArgs<"quit">): this;
|
||||
prependOnceListener(...args: EventListenerArgs<"resumed">): this;
|
||||
prependOnceListener(...args: EventListenerArgsWithData<"seek", TimePosition>): this;
|
||||
prependOnceListener(...args: EventListenerArgs<"started">): this;
|
||||
prependOnceListener(...args: EventListenerArgsWithData<"status", StatusObject>): this;
|
||||
prependOnceListener(...args: EventListenerArgs<"stopped">): this;
|
||||
prependOnceListener(...args: EventListenerArgsWithData<"timeposition", number>): this;
|
||||
|
||||
eventNames(): Array<string | symbol>;
|
||||
|
||||
/**
|
||||
* A mpv wrapper for node
|
||||
*
|
||||
* @param options - Tweak NodeMPV behaviour
|
||||
* @param mpv_args - Arrays of CLI options to pass to mpv. IPC options are automatically appended.
|
||||
*/
|
||||
constructor(options?: NodeMpvOptions, mpv_args?: string[]);
|
||||
|
||||
/**
|
||||
* Loads a file into MPV
|
||||
*
|
||||
* @param source - Path to the media file
|
||||
* @param mode
|
||||
* `replace`: replace the current media
|
||||
*
|
||||
* `append`: Append at the end of the playlist
|
||||
*
|
||||
* `append-play`: Append after the current song
|
||||
* @param options - Options formatted as option=label
|
||||
*/
|
||||
load(source: string, mode?: MediaLoadMode, options?: string[]): Promise<void>;
|
||||
|
||||
// https://github.com/j-holub/Node-MPV/blob/master/lib/mpv/_audio.js
|
||||
/**
|
||||
* Add an audio track to the media file
|
||||
*
|
||||
* @param file - Path to the audio track
|
||||
* @param flag - Flag to use (select, auto, cached)
|
||||
* @param title - Title in OSD/OSC
|
||||
* @param lang - Language
|
||||
*/
|
||||
addAudioTrack(file: string, flag?: AudioFlag, title?: string, lang?: string): Promise<void>;
|
||||
|
||||
/**
|
||||
* Remove an audio track based on its id.
|
||||
*
|
||||
* @param id - ID of the audio track to remove
|
||||
*/
|
||||
removeAudioTrack(id: number): Promise<void>;
|
||||
|
||||
/**
|
||||
* Select an audio track based on its id.
|
||||
*
|
||||
* @param id - ID of the audio track to select
|
||||
*/
|
||||
selectAudioTrack(id: number): Promise<void>;
|
||||
|
||||
/**
|
||||
* Cycles through the audio track
|
||||
*/
|
||||
cycleAudioTracks(): Promise<void>;
|
||||
|
||||
/**
|
||||
* Adjust audio timing
|
||||
* @param seconds - Delay in seconds
|
||||
*/
|
||||
adjustAudioTiming(seconds: number): Promise<void>;
|
||||
|
||||
/**
|
||||
* Set playback speed
|
||||
* @param factor - 0.1 - 100: percentage of playback speed
|
||||
*/
|
||||
speed(factor: number): Promise<void>;
|
||||
|
||||
// https://github.com/j-holub/Node-MPV/blob/master/lib/mpv/_controls.js
|
||||
/**
|
||||
* Toggle play/pause
|
||||
*/
|
||||
togglePause(): Promise<void>;
|
||||
|
||||
/**
|
||||
* Pauses playback
|
||||
*/
|
||||
pause(): Promise<void>;
|
||||
|
||||
/**
|
||||
* Resumes playback
|
||||
*/
|
||||
resume(): Promise<void>;
|
||||
|
||||
/**
|
||||
* Play the file in playlist
|
||||
*/
|
||||
play(): Promise<void>;
|
||||
|
||||
/**
|
||||
* Stop playback immediately
|
||||
*/
|
||||
stop(): Promise<void>;
|
||||
|
||||
/**
|
||||
* Set volume
|
||||
*
|
||||
* @param volume
|
||||
*/
|
||||
volume(volume: number): Promise<void>;
|
||||
|
||||
/**
|
||||
* Increase/Decrease volume
|
||||
*
|
||||
* @param volume
|
||||
*/
|
||||
adjustVolume(volume: number): Promise<void>;
|
||||
|
||||
/**
|
||||
* Mute
|
||||
*
|
||||
* @param set - setMute, if not specified, cycles
|
||||
*/
|
||||
mute(set?: boolean): Promise<void>;
|
||||
|
||||
/**
|
||||
* Seek
|
||||
*
|
||||
* @param seconds - Seconds
|
||||
* @param mode - Relative, absolute
|
||||
* @see for info about seek https://mpv.io/manual/stable/#command-interface-seek-%3Ctarget%3E-[%3Cflags%3E]
|
||||
*/
|
||||
seek(seconds: number, mode?: SeekMode): Promise<void>;
|
||||
|
||||
/**
|
||||
* Shorthand for absolute seek
|
||||
*
|
||||
* @param seconds - Seconds
|
||||
*/
|
||||
goToPosition(seconds: number): Promise<void>;
|
||||
|
||||
/**
|
||||
* Set loop mode for current file
|
||||
*
|
||||
* @param times - either a number of loop iterations, 'inf' for infinite loop or 'no' to disable loop.
|
||||
* If it's not specified, the property will cycle through inf and no.
|
||||
*/
|
||||
loop(times?: RepeatMode): Promise<void>;
|
||||
|
||||
// https://github.com/j-holub/Node-MPV/blob/master/lib/mpv/_commands.js
|
||||
// List of mpv properties are available here: https://mpv.io/manual/stable/#property-list
|
||||
/**
|
||||
* Retrieve a property
|
||||
*
|
||||
* @param property
|
||||
*/
|
||||
getProperty(property: string): Promise<string>;
|
||||
|
||||
/**
|
||||
* Set a property
|
||||
*
|
||||
* @param property
|
||||
* @param value
|
||||
*/
|
||||
setProperty(property: string, value: any): Promise<void>;
|
||||
|
||||
/**
|
||||
* Set a set of properties
|
||||
*
|
||||
* @param properties - {property1: value1, property2: value2}
|
||||
*/
|
||||
setMultipleProperties(properties: object): Promise<void>;
|
||||
|
||||
/**
|
||||
* Add value to a property (only on number properties)
|
||||
*
|
||||
* @param property
|
||||
* @param value
|
||||
*/
|
||||
addProperty(property: string, value: number): Promise<void>;
|
||||
/**
|
||||
* Multiply a property by value (only on number properties)
|
||||
*
|
||||
* @param property
|
||||
* @param value
|
||||
*/
|
||||
multiplyProperty(property: string, value: number): Promise<void>;
|
||||
|
||||
/**
|
||||
* Cycle through different modes of a property (boolean, enum)
|
||||
*
|
||||
* @param property
|
||||
*/
|
||||
cycleProperty(property: string): Promise<void>;
|
||||
|
||||
/**
|
||||
* Send a custom command to mpv
|
||||
*
|
||||
* @param command Command name
|
||||
* @param args Array of arguments
|
||||
*/
|
||||
command(command: string, args: string[]): Promise<void>;
|
||||
|
||||
/**
|
||||
* Send a custom payload to mpv
|
||||
*
|
||||
* @param command the JSON command to send to mpv
|
||||
*/
|
||||
commandJSON(command: object): Promise<void>;
|
||||
|
||||
/**
|
||||
* Send a custom payload to mpv (no JSON encode)
|
||||
*
|
||||
* @param command the JSON encoded command to send to mpv
|
||||
*/
|
||||
freeCommand(command: string): Promise<void>;
|
||||
|
||||
/**
|
||||
* Observe a property
|
||||
* You can receive events with the 'status' event
|
||||
*
|
||||
* @param property The property to observe
|
||||
*/
|
||||
observeProperty(property: string): any;
|
||||
|
||||
/**
|
||||
* Unobserve a property
|
||||
*
|
||||
* @param property
|
||||
*/
|
||||
unobserveProperty(property: string): any;
|
||||
|
||||
// https://github.com/j-holub/Node-MPV/blob/master/lib/mpv/_information.js
|
||||
/**
|
||||
* Returns the mute status of mpv
|
||||
*/
|
||||
isMuted(): Promise<boolean>;
|
||||
|
||||
/**
|
||||
* Returns the pause status of mpv
|
||||
*/
|
||||
isPaused(): Promise<boolean>;
|
||||
|
||||
/**
|
||||
* Returns the seekable property of the loaded media
|
||||
* Some medias are not seekable (livestream, unbuffered media)
|
||||
*/
|
||||
isSeekable(): Promise<boolean>;
|
||||
|
||||
/**
|
||||
* Retrieve the duration of the loaded media
|
||||
*/
|
||||
getDuration(): Promise<number>;
|
||||
|
||||
/**
|
||||
* Retrieve the current time position of the loaded media
|
||||
*/
|
||||
getTimePosition(): Promise<number>;
|
||||
|
||||
/**
|
||||
* Retrieve the current time position (in percentage) of the loaded media
|
||||
*/
|
||||
getPercentPosition(): Promise<number>;
|
||||
|
||||
/**
|
||||
* Retrieve the time remaining of the loaded media
|
||||
*/
|
||||
getTimeRemaining(): Promise<number>;
|
||||
|
||||
/**
|
||||
* Retrieve the metadata of the loaded media
|
||||
*/
|
||||
getMetadata(): Promise<object>;
|
||||
|
||||
/**
|
||||
* Retrieve the title of the loaded media
|
||||
*/
|
||||
getTitle(): Promise<string>;
|
||||
|
||||
/**
|
||||
* Retrieve the artist of the loaded media
|
||||
*/
|
||||
getArtist(): Promise<string>;
|
||||
|
||||
/**
|
||||
* Retrieve the album of the loaded media
|
||||
*/
|
||||
getAlbum(): Promise<string>;
|
||||
|
||||
/**
|
||||
* Retrieve the year of the loaded media
|
||||
*/
|
||||
getYear(): Promise<number>;
|
||||
|
||||
/**
|
||||
* Retrieve the filename of the loaded media
|
||||
*
|
||||
* @param format 'stripped' remove the extension, default to 'full'
|
||||
*/
|
||||
getFilename(format?: "full" | "stripped"): Promise<string>;
|
||||
|
||||
// https://github.com/j-holub/Node-MPV/blob/master/lib/mpv/_playlist.js
|
||||
/**
|
||||
* Load a playlist file
|
||||
*
|
||||
* @param playlist Path to the playlist file
|
||||
* @param mode 'append' adds the playlist to the existing one. Defaults to 'replace'
|
||||
*/
|
||||
loadPlaylist(playlist: string, mode?: LoadMode): Promise<void>;
|
||||
|
||||
/**
|
||||
* Add a song to the playlist
|
||||
*
|
||||
* @param source File path of media
|
||||
* @param mode
|
||||
* replace: replace the current media
|
||||
* append: Append at the end of the playlist
|
||||
* append-play: Append after the current song
|
||||
* @param options
|
||||
*/
|
||||
append(source: string, mode?: MediaLoadMode, options?: string[]): Promise<void>;
|
||||
|
||||
/**
|
||||
* Load next element in playlist
|
||||
*
|
||||
* @param mode - 'force' may go into an undefined index of the playlist
|
||||
*/
|
||||
next(mode?: PlaylistMode): Promise<void>;
|
||||
|
||||
/**
|
||||
* Load previous element in playlist
|
||||
*
|
||||
* @param mode - 'force' may go into an undefined index of the playlist
|
||||
*/
|
||||
prev(mode?: PlaylistMode): Promise<void>;
|
||||
|
||||
/**
|
||||
* Jump to position in playlist
|
||||
*
|
||||
* @param position
|
||||
*/
|
||||
jump(position: number): Promise<void>;
|
||||
|
||||
/**
|
||||
* Empty the playlist
|
||||
*/
|
||||
clearPlaylist(): Promise<void>;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param index
|
||||
*/
|
||||
playlistRemove(index: number): Promise<void>;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param index1
|
||||
* @param index2
|
||||
*/
|
||||
playlistMove(index1: number, index2: number): Promise<void>;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
shuffle(): Promise<void>;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
getPlaylistSize(): Promise<number>;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
getPlaylistPosition(): Promise<number>;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
getPlaylistPosition1(): Promise<number>;
|
||||
|
||||
/**
|
||||
* Set loop mode for playlist
|
||||
*
|
||||
* @param times - either a number of loop iterations, 'inf' for infinite loop or 'no' to disable loop.
|
||||
* If it's not specified, the property will cycle through inf and no.
|
||||
*/
|
||||
loopPlaylist(times?: RepeatMode): Promise<void>;
|
||||
|
||||
// https://github.com/j-holub/Node-MPV/blob/master/lib/mpv/_startStop.js
|
||||
/**
|
||||
* Starts mpv, by spawning a child process or by attaching to existing socket
|
||||
*/
|
||||
start(): Promise<void>;
|
||||
/**
|
||||
* Closes mpv
|
||||
*
|
||||
* [Important!] Calling method `quit` doesn't trigger the event `quit`
|
||||
*/
|
||||
quit(): Promise<void>;
|
||||
/**
|
||||
* Returns the status of mpv
|
||||
*/
|
||||
isRunning(): boolean;
|
||||
|
||||
// https://github.com/j-holub/Node-MPV/blob/master/lib/mpv/_subtitle.js
|
||||
/**
|
||||
* Loads a subtitle file into the current media file
|
||||
*
|
||||
* @param file Path to the subtitle file
|
||||
* @param flag
|
||||
* Select: Select the loaded file
|
||||
* Auto: Let mpv decide
|
||||
* Cached: Don't select the loaded file
|
||||
* @param title Title to show in OSD/OSC
|
||||
* @param lang Language of the subtitles
|
||||
*/
|
||||
addSubtitles(file: string, flag?: "select" | "auto" | "cached", title?: string, lang?: string): Promise<void>;
|
||||
|
||||
/**
|
||||
* Remove subtitles
|
||||
*
|
||||
* @param id Index of subtitles to delete
|
||||
*/
|
||||
removeSubtitles(id: number): Promise<void>;
|
||||
|
||||
/**
|
||||
* Cycle through available subtitles
|
||||
*/
|
||||
cycleSubtitles(): Promise<void>;
|
||||
|
||||
/**
|
||||
* Select subtitles by its id
|
||||
*
|
||||
* @param id
|
||||
*/
|
||||
selectSubtitles(id: number): Promise<void>;
|
||||
|
||||
/**
|
||||
* Toggle subtitles visibility
|
||||
*/
|
||||
toggleSubtitleVisibility(): Promise<void>;
|
||||
|
||||
/**
|
||||
* Show the subtitles on the screen
|
||||
*/
|
||||
showSubtitles(): Promise<void>;
|
||||
|
||||
/**
|
||||
* Hide the subtitles on the screen
|
||||
*/
|
||||
hideSubtitles(): Promise<void>;
|
||||
|
||||
/**
|
||||
* Adjust the subtitles offset to seconds
|
||||
*
|
||||
* @param seconds Offset to apply in seconds
|
||||
*/
|
||||
adjustSubtitleTiming(seconds: number): Promise<void>;
|
||||
|
||||
/**
|
||||
* Seek based on subtitles lines
|
||||
*
|
||||
* @param lines
|
||||
*/
|
||||
subtitleSeek(lines: number): Promise<void>;
|
||||
|
||||
/**
|
||||
* Scale the font of subtitles based on scale
|
||||
*
|
||||
* @param scale
|
||||
*/
|
||||
subtitleScale(scale: number): Promise<void>;
|
||||
|
||||
/**
|
||||
* Show a text using ASS renderer
|
||||
*
|
||||
* @param ass an ass string
|
||||
* @param duration duration in seconds
|
||||
* @param position ASS alignment
|
||||
*/
|
||||
displayASS(ass: string, duration: number, position?: number): Promise<void>;
|
||||
|
||||
// https://github.com/j-holub/Node-MPV/blob/master/lib/mpv/_video.js
|
||||
/**
|
||||
* Enter fullscreen
|
||||
*/
|
||||
fullscreen(): Promise<void>;
|
||||
|
||||
/**
|
||||
* Leave fullscreen
|
||||
*/
|
||||
leaveFullscreen(): Promise<void>;
|
||||
|
||||
/**
|
||||
* Toggle fullscreen
|
||||
*/
|
||||
toggleFullscreen(): Promise<void>;
|
||||
|
||||
/**
|
||||
* Take a screenshot
|
||||
*
|
||||
* @param file
|
||||
* @param option
|
||||
* Subtitles: show subtitles
|
||||
* Video: hide subtitles/osd/osc
|
||||
* Window: Take the screen at the size of the window
|
||||
*/
|
||||
screenshot(file: string, option: "subtitles" | "video" | "window"): Promise<void>;
|
||||
|
||||
/**
|
||||
* Rotate the video
|
||||
*
|
||||
* @param degrees
|
||||
*/
|
||||
rotateVideo(degrees: number): Promise<void>;
|
||||
|
||||
/**
|
||||
* Zoom the video, 0 means no zoom, 1 means x2
|
||||
*
|
||||
* @param factor
|
||||
*/
|
||||
zoomVideo(factor: number): Promise<void>;
|
||||
|
||||
/**
|
||||
* Set Brightness
|
||||
*
|
||||
* @param value
|
||||
*/
|
||||
brightness(value: number): Promise<void>;
|
||||
|
||||
/**
|
||||
* Set Contrast
|
||||
*
|
||||
* @param value
|
||||
*/
|
||||
contrast(value: number): Promise<void>;
|
||||
|
||||
/**
|
||||
* Set saturation
|
||||
*
|
||||
* @param value
|
||||
*/
|
||||
saturation(value: number): Promise<void>;
|
||||
|
||||
/**
|
||||
* Set gamme on media
|
||||
*
|
||||
* @param value
|
||||
*/
|
||||
gamma(value: number): Promise<void>;
|
||||
|
||||
/**
|
||||
* Set Hue
|
||||
*
|
||||
* @param value
|
||||
*/
|
||||
hue(value: number): Promise<void>;
|
||||
}
|
||||
}
|
158
package-lock.json
generated
158
package-lock.json
generated
@ -1601,9 +1601,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"@types/eslint": {
|
||||
"version": "7.2.6",
|
||||
"resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-7.2.6.tgz",
|
||||
"integrity": "sha512-I+1sYH+NPQ3/tVqCeUSBwTE/0heyvtXqpIopUUArlBm0Kpocb8FbMa3AZ/ASKIFpN3rnEx932TTXDbt9OXsNDw==",
|
||||
"version": "7.2.7",
|
||||
"resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-7.2.7.tgz",
|
||||
"integrity": "sha512-EHXbc1z2GoQRqHaAT7+grxlTJ3WE2YNeD6jlpPoRc83cCoThRY+NUWjCUZaYmk51OICkPXn2hhphcWcWXgNW0Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/estree": "*",
|
||||
@ -2056,9 +2056,9 @@
|
||||
}
|
||||
},
|
||||
"acorn": {
|
||||
"version": "8.0.5",
|
||||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.0.5.tgz",
|
||||
"integrity": "sha512-v+DieK/HJkJOpFBETDJioequtc3PfxsWMaxIdIwujtF7FEV/MAyDQLlm6/zPvr7Mix07mLh6ccVwIsloceodlg==",
|
||||
"version": "8.1.0",
|
||||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.1.0.tgz",
|
||||
"integrity": "sha512-LWCF/Wn0nfHOmJ9rzQApGnxnvgfROzGilS8936rqN/lfcYkY9MYZzdMqN+2NJ4SlTc+m5HiSa+kNfDtI64dwUA==",
|
||||
"dev": true
|
||||
},
|
||||
"ajv": {
|
||||
@ -2408,9 +2408,9 @@
|
||||
}
|
||||
},
|
||||
"broadcast-channel": {
|
||||
"version": "3.4.1",
|
||||
"resolved": "https://registry.npmjs.org/broadcast-channel/-/broadcast-channel-3.4.1.tgz",
|
||||
"integrity": "sha512-VXYivSkuBeQY+pL5hNQQNvBdKKQINBAROm4G8lAbWQfOZ7Yn4TMcgLNlJyEqlkxy5G8JJBsI3VJ1u8FUTOROcg==",
|
||||
"version": "3.5.3",
|
||||
"resolved": "https://registry.npmjs.org/broadcast-channel/-/broadcast-channel-3.5.3.tgz",
|
||||
"integrity": "sha512-OLOXfwReZa2AAAh9yOUyiALB3YxBe0QpThwwuyRHLgpl8bSznSDmV6Mz7LeBJg1VZsMcDcNMy7B53w12qHrIhQ==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.7.2",
|
||||
"detect-node": "^2.0.4",
|
||||
@ -3031,9 +3031,9 @@
|
||||
"integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups="
|
||||
},
|
||||
"detect-node": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.0.4.tgz",
|
||||
"integrity": "sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw=="
|
||||
"version": "2.0.5",
|
||||
"resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.0.5.tgz",
|
||||
"integrity": "sha512-qi86tE6hRcFHy8jI1m2VG+LaPUR1LhqDa5G8tVjuUXmOrpuAgqsA1pN0+ldgr3aKUH+QLI9hCY/OcRYisERejw=="
|
||||
},
|
||||
"dom-serializer": {
|
||||
"version": "1.2.0",
|
||||
@ -3215,9 +3215,9 @@
|
||||
}
|
||||
},
|
||||
"es-module-lexer": {
|
||||
"version": "0.3.26",
|
||||
"resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.3.26.tgz",
|
||||
"integrity": "sha512-Va0Q/xqtrss45hWzP8CZJwzGSZJjDM5/MJRE3IXXnUCcVLElR9BRaE9F62BopysASyc4nM3uwhSW7FFB9nlWAA==",
|
||||
"version": "0.4.1",
|
||||
"resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.4.1.tgz",
|
||||
"integrity": "sha512-ooYciCUtfw6/d2w56UVeqHPcoCFAiJdz5XOkYpv/Txl1HMUozpXjz/2RIQgqwKdXNDPSF1W7mJCFse3G+HDyAA==",
|
||||
"dev": true
|
||||
},
|
||||
"escalade": {
|
||||
@ -3281,9 +3281,9 @@
|
||||
"integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc="
|
||||
},
|
||||
"events": {
|
||||
"version": "3.2.0",
|
||||
"resolved": "https://registry.npmjs.org/events/-/events-3.2.0.tgz",
|
||||
"integrity": "sha512-/46HWwbfCX2xTawVfkKLGxMifJYQBWMwY1mjywRtb4c9x8l5NP3KoJtnIOiL1hfdRkIuYhETxQlo62IF8tcnlg==",
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz",
|
||||
"integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==",
|
||||
"dev": true
|
||||
},
|
||||
"execa": {
|
||||
@ -3515,9 +3515,9 @@
|
||||
"integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE="
|
||||
},
|
||||
"fork-ts-checker-webpack-plugin": {
|
||||
"version": "6.1.0",
|
||||
"resolved": "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-6.1.0.tgz",
|
||||
"integrity": "sha512-xLNufWQ1dfQUdZe48TGQlER/0OkcMnUB6lfbN9Tt13wsYyo+2DwcCbnOaPBo1PoFow/WL8pJPktGIdbJaHxAnw==",
|
||||
"version": "6.2.0",
|
||||
"resolved": "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-6.2.0.tgz",
|
||||
"integrity": "sha512-DTNbOhq6lRdjYprukX54JMeYJgQ0zMow+R5BMLwWxEX2NAXthIkwnV8DBmsWjwNLSUItKZM4TCCJbtgrtKBu2Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/code-frame": "^7.8.3",
|
||||
@ -3534,40 +3534,6 @@
|
||||
"tapable": "^1.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"ansi-styles": {
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
|
||||
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"color-convert": "^2.0.1"
|
||||
}
|
||||
},
|
||||
"chalk": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
|
||||
"integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ansi-styles": "^4.1.0",
|
||||
"supports-color": "^7.1.0"
|
||||
}
|
||||
},
|
||||
"color-convert": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
|
||||
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"color-name": "~1.1.4"
|
||||
}
|
||||
},
|
||||
"color-name": {
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
|
||||
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
|
||||
"dev": true
|
||||
},
|
||||
"fs-extra": {
|
||||
"version": "9.1.0",
|
||||
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz",
|
||||
@ -3580,12 +3546,6 @@
|
||||
"universalify": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"has-flag": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
|
||||
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
|
||||
"dev": true
|
||||
},
|
||||
"jsonfile": {
|
||||
"version": "6.1.0",
|
||||
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",
|
||||
@ -3616,15 +3576,6 @@
|
||||
"lru-cache": "^6.0.0"
|
||||
}
|
||||
},
|
||||
"supports-color": {
|
||||
"version": "7.2.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
|
||||
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"has-flag": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"universalify": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz",
|
||||
@ -3798,9 +3749,9 @@
|
||||
}
|
||||
},
|
||||
"glob-parent": {
|
||||
"version": "5.1.1",
|
||||
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz",
|
||||
"integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==",
|
||||
"version": "5.1.2",
|
||||
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
|
||||
"integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-glob": "^4.0.1"
|
||||
@ -4191,23 +4142,6 @@
|
||||
"@types/node": "*",
|
||||
"merge-stream": "^2.0.0",
|
||||
"supports-color": "^7.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"has-flag": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
|
||||
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
|
||||
"dev": true
|
||||
},
|
||||
"supports-color": {
|
||||
"version": "7.2.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
|
||||
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"has-flag": "^4.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"jimp": {
|
||||
@ -4661,9 +4595,9 @@
|
||||
}
|
||||
},
|
||||
"node-mpv": {
|
||||
"version": "2.0.0-beta.1",
|
||||
"resolved": "https://registry.npmjs.org/node-mpv/-/node-mpv-2.0.0-beta.1.tgz",
|
||||
"integrity": "sha512-HebogSElIoclVcs2qWH1jXaRayGVzh0Q+hsTXOMHrKN0MbQJqisaimOeZuyCJDIwt4NhmfWwavsYEeXkiMFjuA=="
|
||||
"version": "2.0.0-beta.2",
|
||||
"resolved": "https://registry.npmjs.org/node-mpv/-/node-mpv-2.0.0-beta.2.tgz",
|
||||
"integrity": "sha512-jf1InAB6tSXYlLs53DSw7ZEGCAhuWibILMF8GU6FmX6jXvkScLfGa9B7nmrIidG8euDpi3hdnUht0PqrHlAbXA=="
|
||||
},
|
||||
"node-releases": {
|
||||
"version": "1.1.70",
|
||||
@ -4773,9 +4707,9 @@
|
||||
}
|
||||
},
|
||||
"open": {
|
||||
"version": "7.4.1",
|
||||
"resolved": "https://registry.npmjs.org/open/-/open-7.4.1.tgz",
|
||||
"integrity": "sha512-Pxv+fKRsd/Ozflgn2Gjev1HZveJJeKR6hKKmdaImJMuEZ6htAvCTbcMABJo+qevlAelTLCrEK3YTKZ9fVTcSPw==",
|
||||
"version": "7.4.2",
|
||||
"resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz",
|
||||
"integrity": "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==",
|
||||
"requires": {
|
||||
"is-docker": "^2.0.0",
|
||||
"is-wsl": "^2.1.1"
|
||||
@ -5306,9 +5240,9 @@
|
||||
}
|
||||
},
|
||||
"react-query": {
|
||||
"version": "3.12.0",
|
||||
"resolved": "https://registry.npmjs.org/react-query/-/react-query-3.12.0.tgz",
|
||||
"integrity": "sha512-WJYECeZ6xT2oxIlgqXUjLNLWRvJbeelXscVnAFfyUFgO21OYEYHMWPG61V9W57EUUqrXioQsNPsU9XyddfEvXQ==",
|
||||
"version": "3.13.0",
|
||||
"resolved": "https://registry.npmjs.org/react-query/-/react-query-3.13.0.tgz",
|
||||
"integrity": "sha512-CzBvgjMh8jNJMSPhXCE92DBIFbE31j8PA2k7ipR1F8DlcNAEsZwLsUzh1cTtzpDaS2+r6sntgmM6qKnCD6E5zQ==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.5.5",
|
||||
"broadcast-channel": "^3.4.1",
|
||||
@ -5970,9 +5904,9 @@
|
||||
}
|
||||
},
|
||||
"terser": {
|
||||
"version": "5.5.1",
|
||||
"resolved": "https://registry.npmjs.org/terser/-/terser-5.5.1.tgz",
|
||||
"integrity": "sha512-6VGWZNVP2KTUcltUQJ25TtNjx/XgdDsBDKGt8nN0MpydU36LmbPPcMBd2kmtZNNGVVDLg44k7GKeHHj+4zPIBQ==",
|
||||
"version": "5.6.1",
|
||||
"resolved": "https://registry.npmjs.org/terser/-/terser-5.6.1.tgz",
|
||||
"integrity": "sha512-yv9YLFQQ+3ZqgWCUk+pvNJwgUTdlIxUk1WTN+RnaFJe2L7ipG2csPT0ra2XRm7Cs8cxN7QXmK1rFzEwYEQkzXw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"commander": "^2.20.0",
|
||||
@ -6119,9 +6053,9 @@
|
||||
}
|
||||
},
|
||||
"typescript": {
|
||||
"version": "4.1.4",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.1.4.tgz",
|
||||
"integrity": "sha512-+Uru0t8qIRgjuCpiSPpfGuhHecMllk5Zsazj5LZvVsEStEjmIRRBZe+jHjGQvsgS7M1wONy2PQXd67EMyV6acg==",
|
||||
"version": "4.2.3",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.2.3.tgz",
|
||||
"integrity": "sha512-qOcYwxaByStAWrBf4x0fibwZvMRG+r4cQoTjbPtUlrWjBHbmCAww1i448U0GJ+3cNNEtebDteo/cHOR3xJ4wEw==",
|
||||
"dev": true
|
||||
},
|
||||
"unicode-canonical-property-names-ecmascript": {
|
||||
@ -6286,9 +6220,9 @@
|
||||
}
|
||||
},
|
||||
"webpack": {
|
||||
"version": "5.21.2",
|
||||
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.21.2.tgz",
|
||||
"integrity": "sha512-xHflCenx+AM4uWKX71SWHhxml5aMXdy2tu/vdi4lClm7PADKxlyDAFFN1rEFzNV0MAoPpHtBeJnl/+K6F4QBPg==",
|
||||
"version": "5.27.1",
|
||||
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.27.1.tgz",
|
||||
"integrity": "sha512-rxIDsPZ3Apl3JcqiemiLmWH+hAq04YeOXqvCxNZOnTp8ZgM9NEPtbu4CaMfMEf9KShnx/Ym8uLGmM6P4XnwCoA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/eslint-scope": "^3.7.0",
|
||||
@ -6300,7 +6234,7 @@
|
||||
"browserslist": "^4.14.5",
|
||||
"chrome-trace-event": "^1.0.2",
|
||||
"enhanced-resolve": "^5.7.0",
|
||||
"es-module-lexer": "^0.3.26",
|
||||
"es-module-lexer": "^0.4.0",
|
||||
"eslint-scope": "^5.1.1",
|
||||
"events": "^3.2.0",
|
||||
"glob-to-regexp": "^0.4.1",
|
||||
@ -6509,9 +6443,9 @@
|
||||
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
|
||||
},
|
||||
"yaml": {
|
||||
"version": "1.10.0",
|
||||
"resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.0.tgz",
|
||||
"integrity": "sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg==",
|
||||
"version": "1.10.2",
|
||||
"resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz",
|
||||
"integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==",
|
||||
"dev": true
|
||||
},
|
||||
"yargs": {
|
||||
|
12
package.json
12
package.json
@ -27,11 +27,11 @@
|
||||
"is-url": "^1.2.4",
|
||||
"jimp": "^0.16.1",
|
||||
"node-localstorage": "^2.1.6",
|
||||
"node-mpv": "^2.0.0-beta.1",
|
||||
"open": "^7.4.1",
|
||||
"node-mpv": "^2.0.0-beta.2",
|
||||
"open": "^7.4.2",
|
||||
"react": "^16.14.0",
|
||||
"react-dom": "^17.0.1",
|
||||
"react-query": "^3.12.0",
|
||||
"react-query": "^3.13.0",
|
||||
"react-router": "^5.2.0",
|
||||
"scrape-yt": "^1.4.7",
|
||||
"spotify-web-api-node": "^5.0.2",
|
||||
@ -58,10 +58,10 @@
|
||||
"clean-webpack-plugin": "^3.0.0",
|
||||
"cross-env": "^7.0.3",
|
||||
"file-loader": "^6.2.0",
|
||||
"fork-ts-checker-webpack-plugin": "^6.1.0",
|
||||
"fork-ts-checker-webpack-plugin": "^6.2.0",
|
||||
"native-addon-loader": "^2.0.1",
|
||||
"typescript": "^4.0.3",
|
||||
"webpack": "^5.18.0",
|
||||
"typescript": "^4.2.3",
|
||||
"webpack": "^5.27.0",
|
||||
"webpack-cli": "^4.4.0"
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
import React, { useState, useEffect, useRef } from "react";
|
||||
import { Window, hot, View, useEventHandler, BoxView } from "@nodegui/react-nodegui";
|
||||
import { Direction, QIcon, QKeyEvent, QMainWindow, QMainWindowSignals, WidgetEventTypes, WindowState } from "@nodegui/nodegui";
|
||||
import nodeguiIcon from "../assets/nodegui.jpg";
|
||||
import { MemoryRouter } from "react-router";
|
||||
import Routes from "./routes";
|
||||
import { LocalStorage } from "node-localstorage";
|
||||
@ -16,6 +15,7 @@ import showError from "./helpers/showError";
|
||||
import fs from "fs"
|
||||
import path from "path";
|
||||
import { confDir } from "./conf";
|
||||
import spotubeIcon from "../assets/spotube.png";
|
||||
|
||||
export enum CredentialKeys {
|
||||
credentials = "credentials",
|
||||
@ -28,7 +28,7 @@ export interface Credentials {
|
||||
}
|
||||
|
||||
const minSize = { width: 700, height: 750 };
|
||||
const winIcon = new QIcon(nodeguiIcon);
|
||||
const winIcon = new QIcon(spotubeIcon);
|
||||
const localStorageDir = path.join(confDir, "local");
|
||||
fs.mkdirSync(localStorageDir, {recursive: true});
|
||||
global.localStorage = new LocalStorage(localStorageDir);
|
||||
|
@ -117,7 +117,7 @@ function Player(): ReactElement {
|
||||
if (playerRunning) {
|
||||
const statusListener = (status: { property: string; value: any }) => {
|
||||
if (status?.property === "duration") {
|
||||
setTotalDuration(status.value);
|
||||
setTotalDuration(status.value ?? 0);
|
||||
}
|
||||
};
|
||||
const stopListener = () => {
|
||||
|
@ -26,9 +26,6 @@ export const tabBarStylesheet = `
|
||||
#tabmenu-item:hover{
|
||||
color: green;
|
||||
}
|
||||
#tabmenu-item:active{
|
||||
color: #59ff88;
|
||||
}
|
||||
#tabmenu-active-item{
|
||||
background-color: green;
|
||||
color: white;
|
||||
|
Loading…
Reference in New Issue
Block a user