Topics 📻

Embed in WordPress with oEmbed

WordPress deletes parameters when embedding in iframes

When people embed Soundsgood playlists in WordPress, they often come back editing their post/page in VISUAL mode. In VISUAL mode, WordPress removes the necessary iframe parameters required for the Soundsgood player to work well.

With oEmbed, your Soundsgood iframes will always remain up to date. Your team will just have to paste the playlist link directly into the editor, that’s it!

Switching to oEmbed to embed without iframes

If you want to whitelist Soundsgood oEmbeds in your WordPress website, open your wp-includes/embed.php file and call the wp_oembed_add_provider() function in this format:

<?php wp_oembed_add_provider( $format, $provider, $regex ); ?>

Please refer to https://oembed.com/ to fill in the strings with Soundsgood’s latest documentation.

The $format string should include the proper structure of the URL with a wildcard asterisk to represent the pretty permalink portion of the URL where the media can be found. The $provider string is the base URL of the oEmbed provider and the $regex boolean that sets whether or not the format parameter is using a regular expression. If set to true, this means it’s a regular expression. The default and other option is false which means it’s not a regex.

When you put it all together and enter the URL’s you need, the result should look similar to this:

// Register oEmbed providers
function custom_oembed_provider() {
wp_oembed_add_provider( 'https://play.soundsgood.co/playlist/*', 'https://example.com/oembed', false ); }
add_action( 'init', 'custom_oembed_provider' );

 

If at some point, you would like to remove Soundsgood oEmbeds, you can use the wp_oembed_remove_provider function in your site’s wp-includes/media.php file. Here’s the structure you need to follow:

<?php wp_oembed_remove_provider( $format ) ?>

The $format string is the URL of the oEmbed site you want to remove. You can get this from the wp-includes/class-oembed.php file.

Achieving oEmbed with Plugins

Soundsgood is also natively whitelisted if you install the Embedly plugin for WordPress.

It installs as easily as most other plugins and you can even customize the styling if you want. To use it, you just need to add a URL to your posts and pages just as you normally would.

Create a website section with several playlists

You can create any experience with the Soundsgood widget player, just think of it as a tile that you can disguise into your own design. In the following example, the orange square is the Soundsgood widget, everything else can be yours:

Purple: Your design / Orange : Soundsgood iframe

The Soundsgood embed player focuses more on the playlist identity (artwork, title, etc.) than on the tracklist, because if tracks matters to you as a curator, nowadays people tend to prefer a leanback listening experience. It gives you more space below the widget to add interesting content such as describing the tracks with insightful reviews rather than just displaying tracks titles and duration. (Note: Listeners can still scroll within the widget to see the tracklist if needed.)

If your audience focuses more on tracks, you can embed the Soundsgood playlist page (instead of embedding the widget). As a result your listeners will be able to see the tracklist directly on desktops, and with a more comfortable view on smartphones. You can add a sticky header of your own to handle navigation to your other pages.

You can achieve such a result by replacing “/embed/” by “/playlist/” in your iframe code :

<iframe height="800" width="100%" src="https://play.soundsgood.co/playlist/playlist-ID" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen allow="autoplay; encrypted-media" allowtransparency="true"></iframe>

Use Case: BACKPACKERZ

BACKPACKERZ is a famous French hip-hop music blog. They chose Soundsgood to power their music pages.

#01 — The main page on desktops
https://www.thebackpackerz.com/radio/

This page is 100% developed by BACKPACKERZ. There is no Soundsgood widgets yet.

#02 — The playlist page on desktops
https://www.thebackpackerz.com/radio/heavy-rotation/

You can see the Soundsgood Widget at the top. Everything else is custom.

#03 — Both pages on smartphones

 

 

Autosync playlists from JSON file

Why this feature?

This feature is especially useful:

  • for radios who want to mirror in real-time their playlists on streaming services to grow their notoriety and follower base and increase retention.
  • for brands who already have in-store music playlists and want these playlists to exist online for obvious marketing purposes.

How to activate the feature?

  • Create a new playlist on Soundsgood
  • Activate “Auto sync from …” and select “from JSON”
  • Paste your JSON public URL and click Run Now
  • (The playlist is imported in Soundsgood)
  • Click PUBLISH to make your playlist public, convert it across your streaming profiles and get your shareable player for websites, social networks and newsletters.
  • The playlist will be automatically updated twice a day from your linked JSON file

Please find below the Minimum JSON Structure and some advanced optional tweaks.

Minimum required JSON Structure

You must send the playlist title, description and tracklist. Each track must have a title and at least one artist.

{
    "title": "My playlist title",
    "description": "My playlist description",
    "tracklist": [
        {
            "title": "Can't Stop",
            "artists": [
            "The Red Hot Chili Peppers"
            ]
        },
        {
            "title": "Shallow",
            "artists": [
            "Lady Gaga", "Bradley Cooper"
            ]
        }
    ]
}

Notes

  • We do not recommend syncing playlists over 80/100 tracks. The more tracks, the more chances Apple Music and Deezer will not be able to handle the sync queries. Other streaming services are stable with over 100 tracks though.
  • The source attribute allows Soundsgood to pre-match a specific source for a song (ex. The Apple Music link for that song) and to retrieve automatically all the associated metadata (album, year of release, track duration, etc.). The source attribute only works with appleMusic links for now, and only works with Apple Music links containing a track ID (e.g. ?i=1342287541&). In other scenarii, Soundsgood will use the basic required track title and track artists attributes:
 {
"title": "My playlist title",
"description": "My playlist description",
"tracklist": [
{
"title": "Can't Stop",
"artists": [
"The Red Hot Chili Peppers"
],
"source":
{
"platformName": "appleMusic",
"url": "https://itunes.apple.com/fr/album/one-people/1342287536?i=1342287541"
}
},
{
"title": "Shallow",
"artists": [
"Lady Gaga", "Bradley Cooper"
]
}
]

 

SOUNDSGOOD

About

Pricing

COMMUNITY 

Contact

Facebook Group