This repository was archived by the owner on Dec 22, 2023. It is now read-only.
I would like to play audio in my flashcard app #42
Answered
by
c-smile
GirkovArpa
asked this question in
Q&A
-
I made this little flashcard app and would like to play a ding whenever the user gets the answer correct, but searching this repo for the keywords "sound" and "audio" did not lead me to any examples of how to do so. Perhaps it is not possible yet, but I am crossing my fingers 🤞 |
Beta Was this translation helpful? Give feedback.
Answered by
c-smile
Feb 24, 2021
Replies: 1 comment
-
In the next build you will be able to play audio, like this: document.on("click", "button#play", async function(evt,btn) {
btn.state.disabled = true;
var audio = await Audio.load(__DIR__ + "/hasta-lavista-baby.mp3");
await audio.play();
btn.state.disabled = false;
}); |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
GirkovArpa
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In the next build you will be able to play audio, like this: