Update: 使用 howler 优化音效播放逻辑

This commit is contained in:
2025-08-08 20:06:52 +08:00
parent 86a59aff1f
commit 1f954aad35
3 changed files with 36 additions and 4 deletions

View File

@ -8,6 +8,7 @@ contextBridge.exposeInMainWorld('electronAPI', {
console.error('播放音效失败:', err)
}
},
getSoundPath: (soundFile) => ipcRenderer.invoke('get-sound-path', soundFile),
showTooltip: (text) => ipcRenderer.send('show-tooltip', text),
onUpdatePosition: (callback) => {
ipcRenderer.on('update-position', (_, position) => callback(position))