A small radio player you can drop into any website: pick a station, press play.
Use height="84" for embeds 440px wide or more. Narrower embeds stack the volume slider on its own row, so use height="124".
The player reports its height to the parent page. Add this once if you want the iframe to size itself:
<script>
addEventListener('message', function (e) {
if (!e.data || e.data.type !== 'slightly-epic-radio:height') return;
document.querySelectorAll('iframe.slightly-epic-radio').forEach(function (f) {
if (f.contentWindow === e.source) f.style.height = e.data.height + 'px';
});
});
</script>| Parameter | Example | What it does |
|---|---|---|
default | ?default=zen-garden | Starting station for first-time visitors, by title (lowercase, dashes) or id. Returning visitors get the station they last listened to. |
station | ?station=zen-garden | Forces the starting station, even over the visitor's last station. |
size | ?size=slim | One-row 54px bar for docking along the bottom of every page of a site. |
frame | ?frame=none | No panel background, border or outer padding, so the player blends into the host page's own bar (e.g. inside a nav menu). |
resume | ?resume=0 | Turns off carrying playback over to the next page (on by default; see below). |
theme | ?theme=dark | light, dark or auto (follows the visitor's system, default). |
accent | ?accent=ff6a3d | Hex color for the play button, slider and equaliser. |
If a visitor is listening when they click to another page, the player on the next page picks the same station back up. In Chrome and Edge it resumes on its own after a second or so. Firefox and Safari don't allow automatic sound, so the player keeps the station selected and shows Tap ▶ to keep listening. Pausing before leaving means it stays paused. Only one player plays at a time, so starting it in another tab stops the first.