<voltar>

u-radio

NOW PLAYING:

We're currently off-air. Tune in tomorrow at 18:00!

What is this?

u-radio is a youtube-powered internet radio for your personal website. everyone checking your page will be playing the same video at the same time.

How does it work?

*whispers in your ear* it's javascript! there's a javascript file which calculates which video should be played, based on a pre-determined schedule and the current clock time. the full code is available here.

How can I add it to my own page?

to add u-radio to your webpage, you need to include three things:

  1. the player.js file hosted here
  2. the database.js containing the schedule, which can be created here
  3. the youtube iframe

the two scripts can be included by adding:

<script type="text/javascript" src="database.js"></script>
<script type="text/javascript" src="player.js"></script>

whereas the iframe can be included by:

<iframe id="uradio-iframe-yt" width="480" height="270" src="https://www.youtube.com/embed/dQw4w9WgXcQ?autoplay=1&enablejsapi=1&controls=0" frameborder="0" controls=0 allow="autoplay"></iframe>

note that the iframe contains customizable parameters, such as width and height.

It isn't working!

feel free to contact me with problems and suggestions! you can post on my neocities profile or send me an email:

hope you like it, have a good one!