I have a certain audio and i want to perform an action at particular times, for instance at 5 sec, 10 sec and 20 sec. I also need that when the user pause the audio , the actions happen at 5, 10 sec and 20 sec from the beginning of the audio anyway. I can only use vanilla js. I tried using setTimeout but when the user pause the audio and then click play, the timeOut starts again from that specific second.