green-audio-player
green-audio-player copied to clipboard
Listen for load to toggle back to the initial state
I'm updating the source of an audio player based on a slider.
// Set new audio link
audioSrc.src = audioLink;
// Reload player & set it to start
player.load();
However, the load event does not reset the progress bar or the play button.
An alternative (less preferable) would be to have a destroy option, so I can create a new instance of the player