mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/lyswhut/lx-music-desktop.git
synced 2026-09-20 08:04:00 +08:00
fix: 关于静音的问题 (#2693)
This commit is contained in:
@@ -65,6 +65,14 @@ export const createAudio = () => {
|
||||
audio.autoplay = true
|
||||
audio.preload = 'auto'
|
||||
audio.crossOrigin = 'anonymous'
|
||||
audio.addEventListener('playing', () => {
|
||||
if (audioContext?.state == 'suspended') {
|
||||
void audioContext.resume().catch((err) => {
|
||||
console.error('Resume audio context failed:', err)
|
||||
throw err
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const initAnalyser = () => {
|
||||
|
||||
Reference in New Issue
Block a user