i have a small issue: i want to check if an audio element has been played, and after write something somewhere in my document. here is one of my audio element:
<input class ='drum-pad' type="button" value="Q" onclick="play1()">
<audio id="Q" class="clip" src="https://s3.amazonaws.com/freecodecamp/drums/Heater-1.mp3"></audio>
the api .ended it is not functional, i need to write some text just after the audio start. Thank you for help
var audio = document.getElementById("Q");
audio.onended = function() {
//code here
};