function removePlaying() {
    for (const el of document.getElementsByClassName("playing")) {
        el.classList.add("fadeout");
        el.addEventListener("transitionend", () => el.remove());
    }
}

function showPlaying({ cover, title, artist, album }) {
    removePlaying();
    const container = document.createElement("div");
    container.classList.add("playing");
    container.innerHTML = `
        <img class="cover" src="${cover}">
        <span class="title">${title}</span>
        <span class="artist">${artist}</span>
        <span class="album">${album}</span>
    `;
    document.body.appendChild(container);
}
