mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-16 21:28:06 +00:00
feat: send current track to main process and provide an api
This commit is contained in:
parent
c564d03c17
commit
07455c8ecd
3 changed files with 15 additions and 0 deletions
|
|
@ -177,6 +177,14 @@ export default class {
|
|||
setInterval(() => {
|
||||
this._progress = this._howler === null ? 0 : this._howler.seek();
|
||||
}, 1000);
|
||||
|
||||
// 发送正在播放的信息给主进程
|
||||
setInterval(() => {
|
||||
ipcRenderer.send('playerInfo', {
|
||||
currentTrack: this.currentTrack,
|
||||
progress: this._progress,
|
||||
});
|
||||
}, 1000);
|
||||
}
|
||||
_getNextTrack() {
|
||||
if (this._playNextList.length > 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue