Skip to content

qwqVictor/LyricsV-core

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LyricsV-core

The core component of LyricsV.

Architecture

LyricsV uses IPC to communicate with the core. And inside the core, worker threads of different components use MessagePort to communicate with each other.

We encapsulated IPC and MessagePort into "events" inside the SerializedEventEmitter. Now the event list is shown below.

Events

EventName Parameters EmittedBy HandledBy Comment
trackChange track: Track PlayerInterface [all]
togglePlayPause isPlaying: boolean PlayerInterface [all]
timeUpdate pos: number PlayerInterface LyricsWorker Real number in seconds, with milliseconds accuracy
playerQuit PlayerInterface [Parent]
seek pos: number [Parent] PlayerWorker
lyricChange trackUID: string, lyrics: Lyric[], offset: Number LyricsWorker [Parent]
lyricIndex index: number LyricsWorker [Parent]
lyricPreviewIndex index: number, previewTrackUID: string LyricsWorker [Parent]
updateConfig config: Config [Parent] [all]
disableLyrics trackUID: string [Parent] LyricsWorker
setLyrics track: Track, lyricPassed: Lrc | string, offset?: number [Parent] LyricsWorker
setOffset trackUID: string, offset: number [Parent] LyricsWorker
searchLyrics transactionId: number, track: Track [Parent] LyricsWorker
lyricsSearchResult transactionId: number, searchResults: LyricsSearchResult[] LyricsWorker [Parent]
getLyrics transactionId: number, searchResult: LyricsSearchResult, track: Track, preview?: boolean [Parent] LyricsWorker
lyricsGot transactionId: number, result: Lrc LyricsWorker [Parent]
cancelPreview [Parent] LyricsWorker

Music Providers

LyricsV fetches lyrics from some music providers. Currently supported (most in China):

  • Netease Cloud Music
  • QQ Music
  • Kugou Music
  • Migu Music
  • Kuwo Music
  • Gecimi 歌词迷 (A standalone platform to redistribute lyrics only)

To-dos

  • iTunes and Music.app for macOS support
  • System now playing support for Windows (via SMTC)
  • System now playing support for macOS

About

LyricsV-core is licensed under the Apache License 2.0.

Code with ♥ by Victor Huang <i@qwq.ren>

About

The core component of LyricsV

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published