feat:确保仅在 Electron 中调用 API 发送歌曲数据

This commit is contained in:
alger
2025-04-12 13:05:08 +08:00
parent 09f8837fe4
commit b9b52f4d9f
2 changed files with 6 additions and 2 deletions
+3 -1
View File
@@ -395,7 +395,9 @@ const setupAudioListeners = () => {
// 监听播放
audioService.on('play', () => {
playerStore.setPlayMusic(true);
window.api.sendSong(cloneDeep(playerStore.playMusic));
if (isElectron) {
window.api.sendSong(cloneDeep(playerStore.playMusic));
}
clearInterval();
interval = window.setInterval(() => {
try {