I think it’s keyup,
So that pressing enter on the keyboard will work also.
(function iife() {
"use strict";
const player = document.getElementById("player");
const button = document.getElementById("button");
const value = document.getElementById("input");
const sent = document.getElementById("sent");
button.addEventListener("click", function() {
if (player.paused) {
player.play();
} else {
player.pause();
}
});
sent.addEventListener("click", function() {
player.src = value.value;
player.volume = 1.0;
});
}());