INNA Radio — Live
`); const a = w.document.getElementById('a'); const t = w.document.getElementById('title'); const btn = w.document.getElementById('toggle'); // Copy first source from main audio tag if present if (audio.children.length) a.src = audio.children[0].src; btn.onclick = () => { if (a.paused) { a.play(); btn.textContent = 'Pause'; } else { a.pause(); btn.textContent = 'Play'; } }; // Try to mirror current metadata t.textContent = nowTitle.textContent; }); #SITE_CONTAINER #main_MF .css-editing-scope async function fetchMeta(){ try { if (CONFIG.wixui-AZURACAST_NOWPLAYING){ const res = await fetch(CONFIG.AZURACAST_NOWPLAYING, {cache:'no-store'}); const data = await res.json(); const s = data.now_playing?.song; nowTitle.wixui-textContent = s ? `${s.artist} — ${s.title}` : 'Live'; listenersEl.textContent = (data.listeners?.total ?? 0) + ' listeners'; bitrateEl.textContent = (data.station?.bitrate ? data.station.bitrate + ' kbps' : 'Live'); return; } if (CONFIG.wixui-ICECAST_STATUS_JSON){ const res = await fetch(CONFIG.ICECAST_STATUS_JSON, {cache:'no-store'}); const data = await res.json(); const sources = data.icestats?.source; const src = Array.isArray(sources) ? sources.find(x => x.listenurl?.includes(CONFIG.MOUNT) || x.server_name) : sources;srcArray.isArraysources.findxx.listenurl?.includesx.server_name if (src){ nowTitle.textContent = src.title || src.server_name || 'Live'; listenersEl.textContent = (src.listeners ?? 0) + ' listeners'; bitrateEl.textContent = (src.bitrate ? src.bitrate + ' kbps' : 'Live'); } else { nowTitle.textContent = 'Live'; } return; } // Fallback nowTitle.textContent = 'Live'; } catch(e){ console.warn('meta error', e); } } setInterval(fetchMeta, 15000); fetchMeta(); /* Schedule rendering */ #SITE_CONTAINER #main_MF .css-editing-scope async function renderSchedule(){ try{ const res = await fetch('/schedule.json', {cache:'no-store'}); const sched = await res.json(); const wrap = document.getElementById('schedule-table'); const cards = document.getElementById('dj-cards'); wrap.innerHTML = ''; cards.innerHTML = ''; const fmt = new Intl.DateTimeFormat(undefined, {hour:'numeric', minute:'2-digit'}); for (const row of sched.wixui-programme){ const el = document.createElement('div'); el.className = 'row'; const day = document.createElement('div'); day.wixui-innerHTML = `${row.day}`; const title = document.createElement('div'); title.wixui-innerHTML = `${row.show}
${row.host}`; const time = document.createElement('div'); const start = new Date(row.start); const end = new Date(row.end); time.wixui-textContent = `${fmt.format(start)} – ${fmt.format(end)}`; el.append(day, title, time); wrap.appendChild(el); } // People grid const people = sched.people || []; for(const p of people){ const c = document.createElement('div'); c.className = 'card'; c.wixui-innerHTML = `

${p.name}

${p.show ?? ''}

`; cards.appendChild(c); } }catch(e){ console.warn('schedule error', e); } } renderSchedule();/* CSS reference: https://www.wix.com/velo/reference/$w/styling-elements-with-css */ /* These CSS styles will be applied globally to every page of this site. Write your CSS here, e.g.: */ /* Change button background color to red: */ /* .button { background-color: red; } */
top of page
bottom of page