Now-playing iframe widget

Now Playing

Most recent 5 spins with enabled sharing, cover art, player and "Buy it" links

Source code for this demo web site is on Github

Most recent spins in an iframe

Old Now Playing widget documentation

This page shows how you can put the recent spins in an iframe.

The iframe's height is set by the page's stylesheet. It does not adjust according to the height of the content.

Available parameters:

Parameter Use
station Station id, e.g. "wzbc". Mandatory
num Number of spins. Default is "1". Use negative number to reverse the order, e.g. "1", "-5".
sharing Set to "1" to request Twitter and Facebook share links in the markup. If not set, station setting 'Display: "Enable Share to ... links"' is used to determine whether links should be displayed. Enabled by default.
cover Set to "1" to request cover art images in the markup. If not set, station setting 'Display: "Enable cover art on public pages"' is used to determine whether cover art should be displayed. Enabled by default.
player Set to "1" to request an ability to play songs preview from Apple Music. Enabled by default.
You'll need to set allow="encrypted-media" attribute for the iframe tag.
merch Set to "1" to request "Buy it!" links in the markup. If not set, station setting 'Display: "Enable Buy it! links"' is used to determine whether links should be displayed. Enabled by default.
meta Set to "1" to request additional playlist and DJ metadata with each spin. Disabled by default.
non-music Set to "1" to include non-music items. Disabled by default. When disabled, the widget lists only spins. When enabled, spins and non-music items are combined in the widget display and ordered by timestamp.

Set the styles for the iframe contents in Spinitron. Go to Admin: Station settings: Custom stylesheet.

The example iframe on this page is

<iframe src="//widgets.spinitron.com/widget/now-playing-v2?station=wzbc&num=5&sharing=1&cover=1&player=1&merch=1" allow="encrypted-media"></iframe>

See also the API demo