Add audios to DOM to avoid some playback errors
This commit is contained in:
parent
b68245f4f0
commit
5f5deb09f3
@ -221,6 +221,9 @@ export class Manager extends EventEmitter {
|
||||
if (SOUNDS.value) {
|
||||
const audio = new Audio(runtime.getURL("/style/done.opus"));
|
||||
audio.addEventListener("canplaythrough", () => audio.play());
|
||||
audio.addEventListener("ended", () => document.body.removeChild(audio));
|
||||
audio.addEventListener("error", () => document.body.removeChild(audio));
|
||||
document.body.appendChild(audio);
|
||||
}
|
||||
if (FINISH_NOTIFICATION.value) {
|
||||
new Notification(null, _("queue-finished"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user