fix: stopAll只suspend不resume,防止停止后声音立即恢复
This commit is contained in:
@@ -322,8 +322,7 @@ function stopAll() {
|
||||
// Stop any Web Audio sources
|
||||
const ctx = getAudioContext()
|
||||
if (ctx && ctx.state === "running") {
|
||||
// Suspending and resuming is the cleanest way to halt all sources
|
||||
ctx.suspend().then(() => ctx.resume()).catch(() => {})
|
||||
ctx.suspend().catch(() => {})
|
||||
}
|
||||
// Stop HTML pool elements
|
||||
for (const el of htmlPool) {
|
||||
|
||||
Reference in New Issue
Block a user