Fix listen button not working
This commit is contained in:
parent
9428116c84
commit
1715d28cf6
|
@ -11,6 +11,7 @@ const playAudio = async (text, lang) => {
|
||||||
text
|
text
|
||||||
)}&tl=${lang}`;
|
)}&tl=${lang}`;
|
||||||
const audio = new Audio(url);
|
const audio = new Audio(url);
|
||||||
|
audio.crossOrigin = "anonymous";
|
||||||
audio.load();
|
audio.load();
|
||||||
await audio.play().catch(e => log.error(logDir, "playAudio()", e, url));
|
await audio.play().catch(e => log.error(logDir, "playAudio()", e, url));
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue