Skip to content

Instantly share code, notes, and snippets.

@jessmatthews
Created July 7, 2016 09:48
Show Gist options
  • Save jessmatthews/7842bfed049d68776196211168dbee50 to your computer and use it in GitHub Desktop.
Save jessmatthews/7842bfed049d68776196211168dbee50 to your computer and use it in GitHub Desktop.

BBcode should support embeds for music platforms, including Apple Music (and eventually Spotify and Soundcloud).

For Apple Music, I propose that we add a new bbcode tag [applemusic... that supports the following attributes/embeds:

Playlist

[applemusic playlist="pl.def41ac4ce5545ea8aafeff0b935bba5"]

Embed code

<iframe src="//tools.applemusic.com/embed/v1/playlist/pl.def41ac4ce5545ea8aafeff0b935bba5?country=gb" height="500px" width="100%" frameborder="0"></iframe>

Album

[applemusic album="203708420"]

Embed code

<iframe src="//tools.applemusic.com/embed/v1/album/203708420?country=gb" height="500px" width="100%" frameborder="0"></iframe>

Song

[applemusic song="192811017"]

Embed code

<iframe src="//tools.applemusic.com/embed/v1/song/192811017?country=gb" height="106px" width="100%" frameborder="0"></iframe>

Post

[applemusic post="idsa.8cb3ce5e-2f19-11e5-a918-44cc07f94356"]

Embed code

<iframe src="https://embed.itunes.apple.com/us/embedded-player/idsa.8cb3ce5e-2f19-11e5-a918-44cc07f94356" width="560" height="315" frameborder="0" allowfullscreen scrolling="no"></iframe>
@DanElliottPalmer
Copy link

  1. I think we should add a country attribute to it. Default it to gb but it would allow us swap to other countries?
  2. Do we need to worry about width and height? Do they need to be attributes like interactive?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment