Commit 063e1ee4 authored by Timothy J. Baek's avatar Timothy J. Baek
Browse files

refac: call

parent 5cbb79fa
...@@ -139,7 +139,17 @@ ...@@ -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));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment