Closed Oppenjaimer closed 5 years ago
See the onended event below.
const arabicAudio = morsify.audio('البراق', { // generates the morse .- .-.. -... .-. .- --.- then generates the audio from it
unit: 0.1, // period of one unit, in seconds, 1.2 / c where c is speed of transmission, in words per minute
oscillator: {
type: 'sine', // sine, square, sawtooth, triangle
frequency: 500, // value in hertz
onended: function () { // event that fires when the tone has stopped playing
console.log('ended');
}
}
});
Is there any way to detect when a morse audio has ended? What I want to do is to change the class of a button after the audio has ended. Thank you