Answer the question
In order to leave comments, you need to log in
How to make the function start at the end of the sound (play)?
Goodnight. It's time for bed, but I won't sleep until I finish it. There is a code:
var voice = $('#voice');
voice[0].play(); //запуск аудио
getWordData(); //некая функция
voice[0].play(); //запуск аудио
voice.on('ended',function () {
getWordData(); //некая функция
});
Answer the question
In order to leave comments, you need to log in
you are doing everything right.
But there, in the function, there is a launch of another audio, and through the replacement of src for the same voiceso in the same function you run before the function that starts another audio...
getWordData(); //некая функция
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question