diff --git a/index.php b/index.php index d371c9d..5148727 100644 --- a/index.php +++ b/index.php @@ -327,12 +327,21 @@ $facebook_link = "https://www.facebook.com/profile.php?id=61587890927489"; opacity: 0.6; } + .quality-selector-wrapper:hover { + background: rgba(255,255,255,0.15) !important; + border-color: rgba(255,255,255,0.2) !important; + } + .controls { display: flex; align-items: center; - gap: 1rem; + gap: 1.5rem; + margin-top: 1.5rem; + justify-content: center; + flex-wrap: wrap; } + .play-btn { width: 72px; height: 72px; @@ -1110,9 +1119,20 @@ $facebook_link = "https://www.facebook.com/profile.php?id=61587890927489"; - + - + + + + + + Alta (HD) + Ahorro (SD) + + + + @@ -1562,6 +1582,34 @@ $facebook_link = "https://www.facebook.com/profile.php?id=61587890927489"; audio.volume = val; } + function changeQuality(quality) { + const isPlaying = !audio.paused; + + // NOTE: Replace the 'low' URL with your actual low-quality/mobile stream if available. + const streams = { + high: 'https://listen.radioking.com/radio/828046/stream/897251', + low: 'https://listen.radioking.com/radio/828046/stream/897251' + }; + + const newSrc = streams[quality]; + + // Visual feedback + const wrapper = document.querySelector('.quality-selector-wrapper'); + wrapper.style.borderColor = 'var(--primary-color)'; + wrapper.style.transform = 'scale(1.05)'; + + setTimeout(() => { + wrapper.style.borderColor = 'rgba(255,255,255,0.1)'; + wrapper.style.transform = 'scale(1)'; + }, 300); + + audio.src = newSrc; + audio.load(); + if (isPlaying) { + audio.play().catch(e => console.error("Error al reproducir el stream:", e)); + } + } + function copyTrackTitle() { const title = document.getElementById('track-title').innerText.replace(/\s{2,}/g, ' ').trim(); const artist = document.getElementById('track-artist').innerText.trim();