Configuring Now Playing

Streams and Players Now Playing Configuring Now Playing

Display a list of recently played songs on your website and app by configuring OneCMS to parse Now Playing data from your streaming provider. This tutorial guides you through the process of configuring that data connection from your streaming provider via a JSON, XML link, or API.

Configuring Now Playing

Navigate to OneCMS Tools > Stream Manager and select Now Playing from the tabs along the header.

now playing tab

Here, you’ll find a list of any previously set-up Now Playing Configurations.

now playing list

Creating a Now Playing Config

Creating a Now Playing Config is straightforward. Click the Configure New Now Playing button to open a short form for configuring and mapping your Now Playing feed.

configure new now playing

Configuring from a Triton API

For Triton API configuration, enter your Triton Station in the Stream Name and Stream Slug fields, and select Triton API from the Stream Source dropdown.

OneCMS will seamlessly connect to Triton’s API, automatically pulling in your feed of current and recently played songs.

select triton api

Configuring from an XML or JSON feed

Most other providers allow access to the feed of your recently played songs via an XML or JSON feed URL.

Provide a descriptive name for your Now Playing Config. While this name won’t be visible on your website or app, it plays quite a few roles in the backend of OneCMS across various areas. You can opt to use the same name without spaces as the slug.

custom now playing name slug

Next, choose Custom under Stream Source. This will unveil additional fields, allowing you to input and map the Now Playing Feed URL provided by your streaming provider.

select custom

Choose whether you want OneCMS to automatically retrieve album art from iTunes using the Artist and Song name from your feed. This feature proves particularly useful if your feed lacks this information.

Additionally, you can opt to display items in reverse order, starting from the top of the feed. This is the default setting, aligning with the common practice of showcasing the newest played songs first in most feeds.

album art

Paste the feed URL provided by your streaming provider and indicate the feed Data Format (XML / JSON / Array, etc.). In this illustration, we are inserting a JSON feed and choosing JSON as the format.

now playing URL

Mapping your Now Playing Feed

Given that streaming providers present their now-playing data in many differing formats, it’s imperative to map the specific fields in OneCMS to those in your data URL.

Open the feed URL in your browser and examine the nodes containing data for each song. If the containing node has a name, often “item” or “song,” enter this in the Item Tag field. In instances where the containing node lacks a name, as demonstrated in the example below, leave the Item Tag field empty.

json feed source

Once you’ve entered the node name in the Item Tag field (or left it empty if there’s no node name),  click the Create Field Mapping button. This initiates a quick scan of the feed URL, examining individual fields within each containing node.

Following this, it will present fields for mapping, allowing you to align each OneCMS field with its corresponding field from the feed.

create field mapping

Refer to your feed as a guide and map the OneCMS fields with the correct field names from your feed.
map now playing fields

Saving Your Now Playing Config

Once you have completed all the necessary fields, click the Save button.

save now playing

Your Now Playing Configuration is ready for use in OneCMS, allowing you to attach it to a stream or display it in a widget.

saved now playing

Display Recently Played Songs on your website via the Now Playing Info Widget

Now that your Now Playing is configured, you can use the data to showcase a list of recently played songs on your website. Simply drag the Now Playing Info Widget to the desired location to display the song list.

Title: Enter the text you want to display over the song list.

Station Logo URL: Enter a link to your station logo. This will display next to any song for which album art is unavailable.

Next, select which Now Playing Config you want to parse and display on your website.
select now playing in widget
Specify the number of seconds you want OneCMS to check the Now Playing Feed for new songs. Exercise caution not to set this too low, as frequent calls may lead to your streaming provider blocking the requests.
Indicate the number of recently played songs you wish to display in the widget.
refresh rate and number of songs to display
Click the Save button to save the widget.
widget save button
Now on your website, you’ll see the list of your recently played songs from the Configuration that you set up.
now playing on website