2.5 Radio station channels

Most Viewed Article

New since OnAir2 Version 1.9.4 – 2017 September 11

 

 

Screen Shot 2017-01-19 at 00.07.15

This website has the possibility to stream music from any public mp3 radio stream. To be sure that your stream works, you can open it in Chrome. If a download action starts or a music player appears, then your stream is publically accessible.

You can’t access a radio stream in http from a https website (the protocols must match).

To add your radio stream you need the Host and Port, and create the stream URL by adding one of the following:

  • /listen#.mp3
  • ;listen.mp3
  • /stream.mp3
  • /stream#.mp3

For example, this is a valid radio stream URL (http protocol omitted to avoid wordpress embedding):

173.192.105.231:3540/stream.mp3

If you put the URL in a wordpress and your stream is OK, it will be playable:

If you are not sure of what your direct mp3 stream URL is, you have to ask to your radio streaming provider.

AAC stream is not accepted as is not compatible by most of the devices.

This is how a valid radio stream appear when accessed directly from Chrome, but it may also try to download a file. In both cases it will work with this theme:

Screen Shot 2017-01-19 at 00.36.17

Important:

This theme only provides an access from the browser to the radio stream. It works like a window to see outside of your home: if you see black because outsideis dark (means your stream is unaccessible or doesn’t play) is not the window broken (is not the theme’s player broken) but is a problem on the panorama view (your stream is not accessible).
It means that if your stream is valid and working it will always work on the theme. If doesn’t work on the theme it may be that the URL is incorrect or that your stream is not public or not in MP3.

Always test the stream URL directly in the browser before using it with the theme to be sure it’s working.

Shoutcast streams prior to 2.x are not accepted by Chrome for security issues. Be sure that your Shoutcast version is updated. Talk to your streaming provider to be sure about your streaming version.

Creating the radio channel:

Important: this feature requires you to have a normal MP3 stream url, such as Shoutcast, Icecast, Radio.co, Wavestreaming or similar.

A radio channel is composed of:

  • A visible radio channel page (with its own custom post type and a custom template in the theme)
  • A featured image (or logo)
  • A playable stream of the radio station

To create a radio channel page, use the title and text editors like you do for a normal page.

If your radio is correctly created, you can enable the player in the customizer->Header settings, and the player will contain your channel.

Note: not any mp3 stream URL allows data access. If the data access of your stream is blocked, the player will still reproduce the music, but you won’t see the equalizer animation.

If the equalizer animation doesn’t work, is because your specific radio stream is blocking the browser from accessing the information about the sound.

To view the radio channel in the player, you need to do two things:

Compile the Radio Channel Details when you create a new radio channel.
Have your player visible under Appearance->Customize-> Header->Display “Listen” button

Screen Shot 2017-01-19 at 00.27.04

How to compile the radio player details MP3 Stream URL:

You can get host and port from your radio station’s .pls file.

To find the correct URL for your stream, you may need to try the following URL extensions:

  • /listen#.mp3
  • ;listen.mp3
  • /stream.mp3
  • /stream#.mp3

 

Screen-Shot-2017-01-16-at-17.20.23

Song information:

To display song infors in the player you need:

  • A valid Shoutcast V2 XML feed
  • The feed must be public and not protected
  • The songs you upload need to be compiled with all the MP3 tags and V2.4 ID3 tags
  • The domain needs to be in the same protocol as the feed (you can’t access an http feed from https website)

You can add Host and Port to the radio settings, and check if it works. If it doesn’t you can enable the console in Appearance->Customize->Developer settings, then in Chrome open the javascript console and verify if there are any error messages.

If there aren’t it means that your XML feed is empty, blocked or it doesn’t exists. Contact your radio provider for more details about your XML SHOUTcast V2 feed if you need more help with the implementation.

More details and troubleshooting for the stream integration:

To obtain the mp3 URL, it is very simple, usually web radio stations provide a file that will allow you to stream the broadcast on iTunes, Winamp, Windows Media Player and other players.

Here are a few examples:

http://neon.wavestreamer.com:3540/listen.m3u?sid=1
http://neon.wavestreamer.com:3540/listen.asx?sid=1
http://neon.wavestreamer.com:3540/listen.pls?sid=1
You could use one of the URL streams above, but you will probably want to use you own URL or one from another radio provider:

Get the URL of the player from your radio provider. For Wavestream users, you find this url in the integration tools:

Download one of the files for integration. It is a simple text file, masked as a different format.
Rename the file in player.txt
Open this file with any text editor, like notepad (PC) or TextEdit (Mac)
You will find something like this:
#EXTM3U
#EXTINF:-1,06 AM Ibiza Underground

http://173.192.105.231:3540/Live
This URL will be your mp3 stream, just add at the end

  • /listen#.mp3
  • ;listen.mp3
  • /stream.mp3
  • /stream#.mp3

We can’t know in advance which of the extensions above is the one that works with your provider. You have to try them manually.
To be sure that your mp3 stream is valid, open it in the browser, with a modern browser it should render as a music player, and play the radio stream: if the radio stream works correctly, you can integrate it in your site.

If the stream URL you have doesn’t work, contact your radio provider to ask for the correct direct MP3 URL.

Also be sure that the provider settings allows direct access to the stream, as the theme’s player is nothing more than a “link” to the stream, which needs to be “open” to the public for listening.

Don’t use the link the the .pls file, which is nothing more than a TXT file.

Autoplay

Attention: autoplay is a very bad usability choice, use the function at your own risk. It may severely annoy your visitors and make you loose audience.

If you are really sure about this poor bad choice, go in Appearance->Customize->Radio settings and enable autoplay there.

Important: this function is very simple: the music will start whenever you enter in the site, whatever page you go. We do not provide any other kind of customization/option for the autoplay mode and it is already an ugly choice for a website, so please don’t ask how to disable it on certain pages or how to customize autoplay furthermore. Autoplay is bad, you can enable it, that’s all.

Play/Pause switch:

As the Autoplay really hurts your website, your visitors, and their patience, we added another optional button to quickly pause/unpause the music. To enable it, go in Appearance->Customize->Radio settings and enable the quick sqitch:

Screen Shot 2017-04-20 at 20.36.19

Example: it appears in hover on the Listen button

Screen Shot 2017-04-20 at 20.37.08

The player wuick-switch can only pause/unpause the music when autoplay is on. It can’t be used without autoplay. It can only be actived or deactived (no further options will be added). This is a small “patch” to save the life to the visitors of your website if you really want to use the autoplay function.

 

 


Icecast support

Since OnAir 1.9.4 you can now add the song titles from Icecast.

There are 2 types of Icecast feed: with and without mountpoint. You need to check your data directly to understand which type is yours.

  • Icecast with mountpoint:
    You can recognize it because it starts with “parseMusic” and this is an example:
    Screen Shot 2017-09-10 at 14.16.00Configuration:Screen Shot 2017-09-10 at 14.15.12
  • Icacast without mountpoint
    This URL should end with “status-json.xsl”, example:Screen Shot 2017-09-10 at 14.18.22
    In this case you don’t need the mountpoint.
    Configuration example:Screen Shot 2017-09-10 at 14.19.40

 

 

Radio.co support

 

Since OnAir 1.9.4 you can add Radio.co streaming info. Configuration example:

Screen Shot 2017-09-10 at 14.21.58

Airtime pro support

Since OnAir 1.9.4 you can add Airtime Pro streaming info. Configuration example:

Screen Shot 2017-09-10 at 14.24.25