Earlier this year, Cloudflare Apps was launched so app developers may leverage our global network of 6 million+ websites, applications, and APIs. I’d like to take a moment to highlight Spotify, which was a launch partner for Cloudflare Apps, especially since they have elected to open source the code to their Cloudflare App.
Spotify is the leading digital service for streaming music, serving more than 140 million listeners.
What does the Spotify app do?
Recently, Spotify launched a Cloudflare App to instantly and easily embed the Spotify player onto your website without having to copy / paste anything.
Who should install the Spotify app?
A musician who runs a site for their band – they can now play samples of new tracks on their tour calendar page and psych up their fans.
A game creator who wants to share their game’s soundtrack with their fans.
An activewear company which wants to deliver popular running playlists to its customers.
Web properties that install the Spotify app have the ability to increase user engagement.
Add Spotify widgets to your web pages and let your users play tracks and follow Spotify profiles. Add a Spotify Play Button to your blog, website, or social page; all your fans have to do is hit “Play” to enjoy the music. You can create Play Buttons for albums, tracks, artists, or playlists.
How it works for the user
When a logged-in Spotify user clicks the button on your page, the music will start playing in the Spotify player. If the user isn’t logged into their Spotify account, the play button will play a 30-second audio preview of the music and they will be prompted to login or sign up.
How it works for the website owner
You can customize your button as well as link to any song or album you prefer in Spotify’s music catalog or to a playlist you’ve generated. Take a look at the preview of how the Spotify app would appear on a site here:
The Cloudflare App creator allows you to preview the app on your site without making any changes to your code.
In the left pane, you can see the install options where you can select what kind of widget you’d like displayed: a playlist, a track, or a follow button. You can customize the size, theme and position of the banner on your site. The “Pick a location” tool uses CSS selectors to allow you to pinpoint the location on your site where it’s displayed.
In the right pane, you can preview your choices, seeing what they’d look like on your website and experiment with placement and how it flows with the site. This is very similar to the tool that the app developer uses to test the app for how it behaves on a wide range of web properties.
Fork this App
Our friends at Spotify made their code available on GitHub. You can clone and fork the repository here. It’s a great way to get some practice developing Cloudflare Apps and to start with some basic scaffolding for your app.
Check out the documentation for Cloudflare Apps here.
Check out Cloudflare’s new App Developer Playbook, a step-by-step marketing guide for Cloudflare app developers here.
Read more here:: CloudFlare