New since OnAir2 Version 1.9.4 – 2017 September 11
- Icecast songs feed support (More Info)
- Radio.co songs feed support (More Info)
- Airtime Pro songs feed support (More Info)
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:
For example, this is a valid radio stream URL (http protocol omitted to avoid wordpress embedding):
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:
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
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:
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)
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:
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:
#EXTINF:-1,06 AM Ibiza Underground
This URL will be your mp3 stream, just add at the end
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.
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.
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:
Example: it appears in hover on the Listen button
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.
Since OnAir 1.9.4 you can now add the stream and song titles from Icecast.
For the IceCast audio stream URL you can usually find it in your m3u file.
Download the .m3u and open it with a text editor like Notepad++, Lime, Atom or Sublime. It will contain the URL of your stream mountpount:
ICECAST SONG TITLES FEED
There are 3 types of Icecast feed: with and without mountpoint, and with or without channel ID. The default channel ID is 0 but some providers can group radio streaming within the same URL and put them in different channels You need to check your data directly to understand which type is yours.
The Icecast stats URL is normally /json.xsl or /stats-json.xsl
Once you can find your correct URL, you can copy and paste the json feed in this site to be able to see the real structure of your feed and understand if you have mountpoints or channels to specify: http://jsonviewer.stack.hu/
- Icecast with mountpoint:
You can recognize it because it starts with “parseMusic” and this is an example:
- Icacast without mountpoint
This URL should end with “status-json.xsl”, example:
In this case you don’t need the mountpoint.
- Icecast with specific channel
HOW TO SET YOUR ICECAST FEED WITH CHANNEL ID:
Since OnAir 1.9.4 you can add Radio.co streaming info. Configuration example:
Airtime pro support
Since OnAir 1.9.4 you can add Airtime Pro streaming info. Configuration example:
HTTPS Shoutcast Issue
If your website is in HTTPS, you can’t read the songs feed of a http shoutcast feed. To avoid this issue, you can try to enable the internal proxy.
Go in Appearance > Customize > Radio and enable SSL Proxy.
Important: this will route the connection to your shoutcast server via your hosting provider. The provider security settings may be blocking this type of connection.