What it does
The Automatic Status Banner is a small JavaScript widget that monitors your stream status and displays a red notification bar at the top of your website when something goes wrong. It checks your stream every 5 seconds and reacts to two conditions:
- Stream down: your server is unreachable or not responding
- Dead air: your server is online but broadcasting silence, or the audio has flatlined
When your stream is healthy, the banner stays completely hidden. Your visitors never see it unless there's a problem.
How it works
- You add a single
<script>tag to your website. - The script polls the CloudRadio status API every 5 seconds.
- If the stream status is "down" or "dead_air", a fixed red banner appears at the top of the page with a status message.
- When the stream recovers, the banner disappears automatically.
The banner shows a default message ("Investigating connection issues with our audio stream" when down, "Investigating audio quality issues" for dead air) until you publish your own from the monitor page.
Installation
Get your embed code
- Go to Monitoring in the left sidebar.
- Click the stream you want to add the banner for.
- Open the Widget tab. The Website banner section shows a preview.
- Copy the code shown under Installation code.
The code looks like this:
<script async src="https://public.cloudrad.io/embed/status/YOUR-STREAM-ID/widget.js"></script>
Add it to your website
Paste the script tag before the closing </body> tag on every page where you want the banner to appear. Most radio websites add it to the main layout or theme template so it's present site-wide.
No additional CSS or configuration is required. The widget injects its own styles and positions the banner as a fixed element at the top of the viewport.
Updating the status message
While your stream is down, has dead air, or has flatlined audio, a Public Status Message field appears in the status card of that monitor.
- Go to Monitoring and click the affected stream.
- Type your message in the Public Status Message field.
- Click the send button. The message updates on your website within 5 seconds.
Use this to tell listeners what happened and when to expect a fix. For example: "We're experiencing technical difficulties. Back shortly." or "Scheduled maintenance until 3 PM EST."
When your stream recovers, the banner disappears automatically. The status message resets when you clear it from the dashboard.
Testing your installation
You can verify the widget is working without waiting for an actual outage.
- Go to Monitoring > click the stream with the widget installed.
- Open the Widget tab.
- Under Test your installation, click Send test banner. A test banner appears on your website for 30 seconds, and the button counts down while it is active.
The test banner displays "Test Mode - Widget displayed for 30 seconds to verify installation" so you (and anyone visiting your site) can confirm it's working.
Technical details
| Detail | Value |
|---|---|
| Refresh interval | 5 seconds |
| Banner position | Fixed, top of viewport |
| Z-index | 999999 |
| CORS | Allowed from any origin |
| Caching | No-store (always fresh) |
| Failure behavior | If the API is unreachable, the banner stays hidden |
| Dependencies | None (vanilla JavaScript, no frameworks) |
The widget is served from public.cloudrad.io. It uses fetch to call the status API and creates DOM elements directly. No external libraries are loaded.
Availability
The Automatic Status Banner is included free with stream monitoring on all CloudRadio plans. You can add monitoring for any public Shoutcast, Icecast, or HLS stream.