{"id":1384,"date":"2026-10-24T10:05:52","date_gmt":"2026-10-24T10:05:52","guid":{"rendered":"https:\/\/radioveerman.nl\/?page_id=1384"},"modified":"2026-10-24T10:05:52","modified_gmt":"2026-10-24T10:05:52","slug":"reeds-gedraaid","status":"publish","type":"page","link":"https:\/\/radioveerman.nl\/index.php\/reeds-gedraaid\/","title":{"rendered":"Reeds gedraaid"},"content":{"rendered":"\n<div id=\"rv-history\">\n\n  <div class=\"rv-history-heading\">\n    <span class=\"rv-history-icon\">\u266b<\/span>\n    <span>REEDS GEDRAAID<\/span>\n  <\/div>\n\n  <div class=\"rv-history-subtitle\">\n    De laatste 20 nummers op Radioveerman.nl\n  <\/div>\n\n  <div id=\"rv-history-list\">\n    <div class=\"rv-history-message\">Geschiedenis wordt geladen&#8230;<\/div>\n  <\/div>\n\n  <div class=\"rv-history-footer\">\n    <span class=\"rv-history-dot\"><\/span>\n    24\/7 De beste Hits op jouw Radio\n  <\/div>\n\n<\/div>\n\n<style>\n#rv-history {\n  width: 100%;\n  max-width: 813px;\n  box-sizing: border-box;\n  margin: 10px auto;\n  padding: 24px 20px;\n  color: #fff;\n  font-family: Arial, sans-serif;\n  background:\n    linear-gradient(120deg, rgba(0,0,0,.94), rgba(100,0,0,.88), rgba(190,0,0,.92));\n  border: 2px solid #e50914;\n  border-radius: 20px;\n  box-shadow: 0 0 10px rgba(229,9,20,.25);\n  overflow: hidden;\n}\n\n#rv-history .rv-history-heading {\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  gap: 10px;\n  margin-bottom: 8px;\n  color: #fff;\n  font-size: 22px;\n  font-weight: bold;\n  text-shadow: 2px 2px 4px #000;\n}\n\n#rv-history .rv-history-icon {\n  color: #ff3038;\n  font-size: 30px;\n}\n\n#rv-history .rv-history-subtitle {\n  margin-bottom: 20px;\n  color: #eee;\n  font-size: 13px;\n  text-align: center;\n}\n\n#rv-history .rv-history-row {\n  display: flex;\n  align-items: center;\n  gap: 12px;\n  padding: 10px 4px;\n  border-bottom: 1px solid rgba(255,255,255,.18);\n}\n\n#rv-history .rv-history-number {\n  flex: 0 0 28px;\n  color: #ff5a60;\n  font-size: 14px;\n  font-weight: bold;\n  text-align: center;\n}\n\n#rv-history .rv-history-title {\n  min-width: 0;\n  flex: 1;\n  color: #fff;\n  font-size: 15px;\n  line-height: 1.4;\n  overflow-wrap: anywhere;\n}\n\n#rv-history .rv-history-time {\n  flex: 0 0 auto;\n  color: #ddd;\n  font-size: 11px;\n}\n\n#rv-history .rv-history-message {\n  padding: 18px 5px;\n  color: #eee;\n  text-align: center;\n}\n\n#rv-history .rv-history-footer {\n  margin-top: 20px;\n  color: #fff;\n  font-size: 13px;\n  text-align: center;\n}\n\n#rv-history .rv-history-dot {\n  display: inline-block;\n  width: 9px;\n  height: 9px;\n  margin-right: 6px;\n  background: #28d76a;\n  border-radius: 50%;\n}\n\n@media (max-width: 480px) {\n  #rv-history {\n    padding: 20px 12px;\n  }\n\n  #rv-history .rv-history-heading {\n    font-size: 18px;\n  }\n\n  #rv-history .rv-history-title {\n    font-size: 13px;\n  }\n\n  #rv-history .rv-history-time {\n    font-size: 10px;\n  }\n}\n<\/style>\n\n<script>\n(function () {\n  const endpoint = \"\/played-proxy.php\";\n  const list = document.getElementById(\"rv-history-list\");\n\n  if (!list) return;\n\n  function formatTime(timestamp) {\n    if (!timestamp) return \"\";\n\n    const date = new Date(timestamp * 1000);\n\n    if (Number.isNaN(date.getTime())) return \"\";\n\n    return date.toLocaleTimeString(\"nl-NL\", {\n      hour: \"2-digit\",\n      minute: \"2-digit\"\n    });\n  }\n\n  async function loadHistory() {\n    try {\n      const response = await fetch(\n        endpoint + \"?t=\" + Date.now(),\n        { cache: \"no-store\" }\n      );\n\n      if (!response.ok) {\n        throw new Error(\"HTTP \" + response.status);\n      }\n\n      const data = await response.json();\n\n      if (!Array.isArray(data.songs) || data.songs.length === 0) {\n        throw new Error(data.error || \"Geen nummers ontvangen\");\n      }\n\n      const fragment = document.createDocumentFragment();\n\n      data.songs.slice(0, 20).forEach(function (song, index) {\n        const row = document.createElement(\"div\");\n        row.className = \"rv-history-row\";\n\n        const number = document.createElement(\"span\");\n        number.className = \"rv-history-number\";\n        number.textContent = String(index + 1).padStart(2, \"0\");\n\n        const title = document.createElement(\"span\");\n        title.className = \"rv-history-title\";\n        title.textContent = song.title;\n\n        row.append(number, title);\n\n        const time = formatTime(song.playedAt);\n\n        if (time) {\n          const timeElement = document.createElement(\"span\");\n          timeElement.className = \"rv-history-time\";\n          timeElement.textContent = time;\n          row.appendChild(timeElement);\n        }\n\n        fragment.appendChild(row);\n      });\n\n      list.replaceChildren(fragment);\n\n    } catch (error) {\n      console.error(\"Radioveerman geschiedenis:\", error);\n\n      list.replaceChildren();\n\n      const message = document.createElement(\"div\");\n      message.className = \"rv-history-message\";\n      message.textContent =\n        \"Geschiedenis tijdelijk niet beschikbaar\";\n\n      list.appendChild(message);\n    }\n  }\n\n  loadHistory();\n  setInterval(loadHistory, 30000);\n})();\n<\/script>\n","protected":false},"excerpt":{"rendered":"<p>\u266b REEDS GEDRAAID De laatste 20 nummers op Radioveerman.nl Geschiedenis wordt geladen&#8230; 24\/7 De beste Hits op jouw Radio<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1384","page","type-page","status-publish","hentry","nodate","item-wrap"],"_links":{"self":[{"href":"https:\/\/radioveerman.nl\/index.php\/wp-json\/wp\/v2\/pages\/1384","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/radioveerman.nl\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/radioveerman.nl\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/radioveerman.nl\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/radioveerman.nl\/index.php\/wp-json\/wp\/v2\/comments?post=1384"}],"version-history":[{"count":1,"href":"https:\/\/radioveerman.nl\/index.php\/wp-json\/wp\/v2\/pages\/1384\/revisions"}],"predecessor-version":[{"id":1385,"href":"https:\/\/radioveerman.nl\/index.php\/wp-json\/wp\/v2\/pages\/1384\/revisions\/1385"}],"wp:attachment":[{"href":"https:\/\/radioveerman.nl\/index.php\/wp-json\/wp\/v2\/media?parent=1384"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}