FIX: prevents audio to play when appended (#19199)

This commit is contained in:
Joffrey JAFFEUX 2022-11-28 09:22:13 +01:00 committed by GitHub
parent 46c44a3b0f
commit 0cb6d8c8fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -13,6 +13,7 @@ const DEFAULT_SOUND_NAME = "bell";
const createAudioCache = (sources) => {
const audio = new Audio();
audio.pause();
sources.forEach(({ type, src }) => {
const source = document.createElement("source");
source.type = type;