User Avatar

Working in tech and learning to become a writer of ✨words✨ Software development, food, video games with an artisanal dusting of sarcasm.

How to turn hourly YouTube live streams into a serial radio station so fans stay on without missing a beat

HÖR Berlin is my favorite radio station. Every afternoon, they invite DJs to perform live at their iconic studio and stream their sets to HÖR’s YouTube channel.

There’s just one little problem.

Every show is a separate, unscheduled 1 hour live stream. There’s no “tune in and relax” live stream on their channel or anywhere else. That means, when the current stream ends, you have to manually go back to the channel page, refresh until the next stream appears (sometimes >10 minutes later) and play.

To fix this, I built a little web app that always plays the current live stream of a YouTube channel. Yes, it’s TV for YouTube.

Try it now: Hör Nicht Auf

Achtung: Only works when there are ongoing live streams. Roughly Mon–Sat 4pm–8pm CET. Check the schedule. Enjoy the music and Don’t Stop Dancing.

How it works

It’s a very simple, single HTML file with no build step or bundled dependencies. I invite you to view the source like in the olden days. It’s a clever combination of YouTube’s live_stream embed, IFrame API and ~10 lines of custom JavaScript to detect stream presence, or reload and try again.

Caveats

  • Most browsers (except Safari on desktop?!) don’t allow autoplay for videos with audio. You must choose between either autoplaying on mute, or asking the user to play manually. Perhaps there’s a workaround where you hit play once and the video player is re-used for the next stream?

  • Autoplays of videos don’t count towards views. I wonder if auto-playing live streams count as viewers. I don’t want to mess with anyone’s stats.

Conclusions and next steps

I’m going to listen to HÖR way more often now. I can imagine that the next-stream-hunting has a negative effect on retention. Finding good music doesn’t have to be easy, yet here I feel we’re simply fixing the radio station.

Next, I’ll look into continuous autoplay with audio, without any interruption.

This experience was very rewarding, and I hope this encourages you to build simple little apps like this one yourself.