fix: ensure video unmuted in async play callbacks after loop

This commit is contained in:
2026-06-12 23:15:51 +08:00
parent bf9bd46723
commit 1527261ac2

View File

@@ -77,6 +77,7 @@ export class VideoManager {
this.elB!.style.opacity = '0'
this.waitReady(this.elA).then(() => {
this.elA!.muted = false
this.elA!.currentTime = 0
this.elA!.play().catch(() => {})
})
@@ -124,6 +125,7 @@ export class VideoManager {
this.switching = true
inactive.currentTime = 0
inactive.muted = false
inactive.play().catch(() => {})
active.style.transition = `opacity ${this.crossFadeMs}ms ease`