Code Snippets

Centova Cast provides a number of JavaScript code snippets which you can include
in your own web pages to display information about your stream.

The code for each of these snippets can be obtained using the “Code Snippets”
link in your Centova Cast control panel. “Live” examples of all of these
snippets are available on your stream start page.The following code snippets
are available.

Stream Status Summary
This snippet displays a brief line of information about your current stream status.
Artist Name – Track Title (Online)
In this example, Artist Name – Track Title refers to the artist and track that
are currently being played on your stream, and Online refers to the status
of your stream (which will be Offline if your stream is offline).

Stream Details
This snippet is a more flexible version of the Stream Status Summary, for more
advanced users who wish to customize placement of the individual elements of
stream information. Using this snippet, you can place the <span> elements
for the current song, stream title, bit rate, server status, and source
status individually, anywhere on your web page, and Centova Cast will
automatically fill them in.

On-demand Content
This snippet allows you to embed an on-demand content browser in your web page,
which allows the visitor to browse, stream, or download the media you've published
in your “ondemand” folder. The ondemand content browser operates using AJAX
technology such that the page never re-loads, and thus can be safely embedded into
any web page.

Recent Tracks
This snippet displays a list of the 5 tracks which were most recently played
on your stream, along with the name of the artist associated with each.
If Amazon.com integration is enabled, and you've entered your Amazon.com access
key ID on the “Start Page” tab of the “Configure Server” page, Centova Cast
will also display the album cover (when available) along with a “Buy this album”
link next to each track.

Song Requests
This snippet displays a form allowing your visitors to submit song requests.
When a request is received, it is automatically sent via E-mail to the E-mail
address configured for your account. Note that you (as the stream administrator)
are responsible for handling the request yourself, and queuing the requested
tracks if desired.

Tune In
This snippet displays a list of tune-in links for various media players.
Users can click on the appropriate link for their media player to tune in
to your stream.

Alternate Character Encodings
If you find that the code snippets show certain accented characters incorrectly
when used on your web site, it is possible that you are not using UTF-8 encoding
on your web page. To correct this, you should set the “Character encoding”
setting to the correct character encoding for your web page. This will re-load the
“Code Snippets” page and update each snippet to use the correct character encoding.
(Note that after changing the character encoding, you must copy and paste the
updated snippets into your web site, replacing the originals.)

  • 30 Els usuaris han Trobat Això Útil
Ha estat útil la resposta?