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
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 includes a default message like “Investigating connection issues with our audio stream,” but you can customize this from your monitoring dashboard at any time.
Installation
Get your embed code
- Go to Monitoring in the left sidebar.
- Click the stream you want to add the banner for.
- Scroll down to the Status Widget section.
- Copy the embed code shown under Installation Code.
The code looks like this:
<script 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
When your stream goes down and an alert fires, a message input field appears on your monitoring dashboard for that stream.
- Go to Monitoring > click the affected stream.
- In the status header, type your message in the text field (up to 200 characters).
- Submit the form. 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.
- Scroll to the Status Widget section.
- Click Trigger Test. A test banner will appear on your website for 30 seconds.
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.