const playBtn = document.getElementById("play-btn")
const pauseBtn = document.getElementById("pause-btn")
const stopBtn = document.getElementById("stop-btn")
const container = document.getElementById("container")
const audio = new Audio("bells.mp3");
audio.controls = true ;
container.appendChild(document.createElement("p"))
container.appendChild(audio)
// Task:
function play() {
audio.play()
}
function pause() {
audio.pause()
}
function stop() {
audio.pause()
audio.currentTime = 0
}
// - Add the functionality to play, pause and stop the jingling bells (bells.mp3).
playBtn.addEventListener("click", play )
pauseBtn.addEventListener("click", pause )
stopBtn.addEventListener("click", stop )
// Stretch goals:
// - Add volume controls.
// - Allow the user to select different sounds.