Fix listen button not working

This commit is contained in:
sienori 2021-05-24 01:20:28 +09:00
parent 9428116c84
commit 1715d28cf6

View file

@ -11,6 +11,7 @@ const playAudio = async (text, lang) => {
text
)}&tl=${lang}`;
const audio = new Audio(url);
audio.crossOrigin = "anonymous";
audio.load();
await audio.play().catch(e => log.error(logDir, "playAudio()", e, url));
};