Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions docs/Options.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,3 +173,15 @@ How to animate the currently playing track display.
Default: none (use Stream URL.) Key: player_bar_metadata
Alternative metadata source URL for Now Playing Track metadata.

#### [Pro] Fetch Album Artwork?
Default: on. Key: player_bar_artwork
Look up and display album artwork for the current track via the iTunes Search API (and Spotify as a fallback, if configured below.) Useful for streams like Live365 that do not include artwork in their metadata. See [Track Metadata](./Player.md#pro-track-metadata) for more info.

#### [Pro] Spotify Client ID
Default: none. Key: player_bar_artwork_spotify_id
Optional fallback artwork source used when iTunes has no match for a track. Requires a free Spotify Developer account - see [Track Metadata](./Player.md#pro-track-metadata) for setup instructions.

#### [Pro] Spotify Client Secret
Default: none. Key: player_bar_artwork_spotify_secret
Used together with the Spotify Client ID above.

7 changes: 7 additions & 0 deletions docs/Player.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,15 @@ And in addition to the existing Light and Dark button themes, you can also choos

#### [Pro] Track Metadata

When "Display Now Playing" is enabled, Stream Player PRO retrieves the currently playing track's title and artist directly from your stream's metadata (via the Stream URL, or an alternative Metadata URL if configured). Most streaming providers - Live365, Icecast, Shoutcast, ZenoFM, StreamGuys - support this out of the box.

##### Album Artwork

Track metadata from most streaming providers does not include album artwork - Live365 in particular sends only title and artist. To fill this gap, enable "Fetch Album Artwork?" under Settings > Bar tab (on by default). When enabled, Stream Player PRO looks up artwork for the current track via the free [iTunes Search API](https://performance-partners.apple.com/search-api) - no signup or account required.

If you'd like a fallback for tracks iTunes doesn't have artwork for, you can optionally configure Spotify as a second source. This requires signing up for your own free [Spotify Developer account](https://developer.spotify.com/dashboard), creating an app there, and entering the resulting Client ID and Client Secret into the Bar tab settings. Stream Player PRO cannot provide these credentials for you - Spotify issues them per developer account, and you are responsible for creating your own. Without Spotify credentials configured, the plugin uses iTunes only and simply won't display artwork for tracks iTunes has no match for.

Artwork lookups (including "no match found" results) are cached for an hour per track, so the same song won't trigger repeated API calls while it's playing. If your stream's own metadata already includes artwork, Stream Player PRO will use that directly and skip the iTunes/Spotify lookup entirely.



Expand Down
38 changes: 38 additions & 0 deletions options.php
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,44 @@ function stream_player_get_plugin_options( $admin = false ) {
'pro' => true,
),

// --- [Pro/Player] Fetch Track Artwork ---
// 2.8.0: added album artwork lookup via iTunes/Spotify
'player_bar_artwork' => array(
'type' => 'checkbox',
'label' => $admin ? __( 'Fetch Album Artwork?', 'stream-player' ) : '',
'default' => 'yes',
'value' => 'yes',
'tab' => 'bar',
'section' => 'metadata',
'helper' => $admin ? __( 'Look up and display album artwork for the current track via the iTunes Search API (and Spotify as a fallback, if configured below). Useful for streams like Live365 that do not include artwork in their metadata.', 'stream-player' ) : '',
'pro' => true,
),

// --- [Pro/Player] Spotify Client ID ---
// 2.8.0: optional fallback artwork source when iTunes has no match
'player_bar_artwork_spotify_id' => array(
'type' => 'text',
'options' => 'TEXT',
'label' => $admin ? __( 'Spotify Client ID', 'stream-player' ) : '',
'default' => '',
'tab' => 'bar',
'section' => 'metadata',
'helper' => $admin ? __( 'Optional. Used as a fallback artwork source when iTunes has no match. Create an app at developer.spotify.com to get a Client ID and Secret.', 'stream-player' ) : '',
'pro' => true,
),

// --- [Pro/Player] Spotify Client Secret ---
'player_bar_artwork_spotify_secret' => array(
'type' => 'text',
'options' => 'TEXT',
'label' => $admin ? __( 'Spotify Client Secret', 'stream-player' ) : '',
'default' => '',
'tab' => 'bar',
'section' => 'metadata',
'helper' => $admin ? __( 'Used together with the Spotify Client ID above.', 'stream-player' ) : '',
'pro' => true,
),

// --- [Pro/Player] Track Animation ---
'player_bar_track_animation' => array(
'type' => 'select',
Expand Down
2 changes: 2 additions & 0 deletions player/radio-player.php
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,8 @@ function stream_player_output( $args = array(), $echo = false ) {

// --- Current Track ---
$html['track'] = '<div class="rp-now-playing">' . "\n";
// 2.8.0: added track artwork image (populated via JS when available - eg. PRO's iTunes/Spotify lookup)
$html['track'] .= '<img class="rp-now-playing-item rp-now-playing-artwork" src="" alt="" style="display:none;">' . "\n";
$html['track'] .= '<div class="rp-now-playing-item rp-now-playing-title"></div>' . "\n";
$html['track'] .= '<div class="rp-now-playing-item rp-now-playing-artist"></div>' . "\n";
$html['track'] .= '<div class="rp-now-playing-item rp-now-playing-album"></div>' . "\n";
Expand Down
2 changes: 2 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ For Stream Player customers using the free, open-source version of our plugin, y

Stream Player uses the Amplitude and jPlayer scripts to play audio. In the that case you are connecting the player to a Soundcloud stream URL, Amplitude may load the latest Soundcloud SDK automatically via connect.soundcloud.com ... Soundcloud's terms of service are available at [here](https://soundcloud.com/terms-of-use).

[Pro] If the "Fetch Album Artwork?" setting is enabled (on by default), Stream Player PRO looks up album artwork for the currently playing track via the free iTunes Search API - no signup or account required. If iTunes has no match, and you have configured a Spotify Client ID and Secret under Settings > Bar tab, it will also query the Spotify Search API as a fallback. Spotify credentials must be obtained by signing up for your own free [Spotify Developer account](https://developer.spotify.com/dashboard) and creating an app there; Stream Player PRO cannot supply these on your behalf.


== Screenshots ==

Expand Down