ddotson.com gtexthomesdubai.com iplax.in
Play
document.addEventListener("DOMContentLoaded", function () { const audio = document.getElementById("radioStream"); const playPauseBtn = document.getElementById("playPauseBtn"); const volumeControl = document.getElementById("volumeControl"); let isPlaying = false;playPauseBtn.addEventListener("click", function () { if (isPlaying) { audio.pause(); } else { audio.play(); } isPlaying = !isPlaying; });volumeControl.addEventListener("input", function () { audio.volume = volumeControl.value; }); });
#dynamic-background { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background-size: cover; background-position: center; background-repeat: no-repeat; transition: background-image 1s ease-in-out; z-index: -1; }document.addEventListener("DOMContentLoaded", function () { const images = [ "https://source.unsplash.com/1920x1080/?mountain", "https://source.unsplash.com/1920x1080/?beach", "https://source.unsplash.com/1920x1080/?space", "https://source.unsplash.com/1920x1080/?city,night", "https://source.unsplash.com/1920x1080/?forest" ];let currentIndex = 0; const intervalTime = 5000; // Temps entre chaque changement (5 secondes) const backgroundDiv = document.createElement("div"); backgroundDiv.id = "dynamic-background"; document.body.prepend(backgroundDiv); function changeBackground() { backgroundDiv.style.backgroundImage = `url('${images[currentIndex]}')`; currentIndex = (currentIndex + 1) % images.length; } changeBackground(); // Lancer immédiatement au chargement setInterval(changeBackground, intervalTime); });