mirror of
https://github.com/open-webui/open-webui
synced 2025-01-19 01:06:45 +00:00
refac: call
This commit is contained in:
parent
5cbb79fa6e
commit
063e1ee46c
@ -139,7 +139,17 @@
|
|||||||
const audio = assistantAudio[idx];
|
const audio = assistantAudio[idx];
|
||||||
|
|
||||||
audioElement.src = audio.src; // Assume `assistantAudio` has objects with a `src` property
|
audioElement.src = audio.src; // Assume `assistantAudio` has objects with a `src` property
|
||||||
audioElement.play();
|
|
||||||
|
audioElement.muted = true;
|
||||||
|
|
||||||
|
audioElement
|
||||||
|
.play()
|
||||||
|
.then(() => {
|
||||||
|
audioElement.muted = false;
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
toast.error(error);
|
||||||
|
});
|
||||||
|
|
||||||
audioElement.onended = async (e) => {
|
audioElement.onended = async (e) => {
|
||||||
await new Promise((r) => setTimeout(r, 300));
|
await new Promise((r) => setTimeout(r, 300));
|
||||||
|
Loading…
Reference in New Issue
Block a user