- Centova Cast - Client Usage Guide
- Centova Cast - Client Reference Manual
Stream Details
About the Widget
The Stream Details widget is a more flexible version of the Stream Status Summary widget, and is designed for more advanced users who wish to customize the placement of the individual elements of stream information.
Using this snippet, you can individually place the elements for the current song, stream title, bit rate, and many more status indicators anywhere on your web page, and Centova Cast will automatically fill them in.
Much like the Stream Status Summary widget, all of the elements of the Stream Details widget are automatically updated at regular intervals such that they always display the correct information.
Available Elements
As of this writing, the Stream Details widget provides the following status elements:
Current song
The current track information, formatted asArtist - Title
, and hyperlinked such that clicking launches the visitor's default media player to tune in to the stream.Stream title
The title for the stream.Bit rate
The bit rate at which the stream is currently broadcasting.Current listeners
The number of listeners currently connected to the stream.Maximum listeners
The maximum number of listeners which may connect to the stream.Server status
The current status of the stream (eitherOnline
orOffline
).AutoDJ status
The current status of the autoDJ (eitherOnline
orOffline
).Source connected
An indication of whether a source is currently connected to the stream (eitherYes
orNo
).Station time
The current date and time relative to the station's time zone, formatted per the station's locale settings.Current playlist
The name of the playlist from which the current track was selected, if the autoDJ is active.Track artist
The artist of the current track.Track title
The title of the current track.Track album
The album of the current track.Album image
The album cover image for the current track.Album URL
The album URL (if available) for the current track.
Advanced Customization
Configurable Options
Developers familiar with JavaScript may embed in their pages a code block similar to the following to customize the behavior of the widget.
This configuration block must appear before the JavaScript code for the widget.
<script language="javascript">
(function(){ var centovacast = (window.centovacast||(window.centovacast={}));
(centovacast.streaminfo||(centovacast.streaminfo={})).config = {
poll_limit: 60, // specify how many times to poll the server
poll_frequency: 60000 // specify the poll frequency in milliseconds
};})();
</script>
CSS
Developers familiar with cascading stylesheets (CSS) may embed in their pages a stylesheet similar to the following to customize the appearance of the widget:
/* Element(s) containing the stream information */
.cc_streaminfo {
}
Note that the stream details sample provided on the Widgets page is plain HTML and the developer may optionally customize the HTML and/or add custom class names to each <span>/<a>/<img> element to address it via CSS.