HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Spotify embed in discussions?
asleulv
✭
Hi.
This used to be possibly using a plugin, but it seems this feature is now gone..?
Anyone able to do this? Really don't wanna allow HTML in posts...
BTW, this is what the embed code looks like:
<iframe src="https://open.spotify.com/embed/album/734AFYo34Q1zRpg9N8E2Ho" width="300" height="380" frameborder="0" allowtransparency="true" allow="encrypted-media"></iframe>
0
Comments
Based on your requirements I jotted down a short "proof of concept", but I assume it is also possible to link to a single song and the url for that would look different. Right now it will only work for albums and there are some forum configuration conditions under which it would fail, but you can already test it if you like and give some feedback.
Thank you @R_J !
I created a folder for it in my plugins folder, but I'm not able to activate it (I do see it in the plugins list though).
I found the error log. I'll PM it to you.
I'm not able to get any relevant info from what you have sent me. My best guess is that you have simply unzipped it and the folder is now called "spotify-embed-master" while it should be called ""spotify-embed". Try renaming it and delete the file /cache/addon.php
After that yo should be able to enable the plugin.
Ah, I had it named "Spotify-Embed" instead of "spotify-embed". Thanks!
The plugin is not doing anything atm though. Just leaves a blank space when trying the embed. I'll do some more testing.
Thanks @R_J !
Please take a look at the html code and report what the output is, I hope this could help me to support.
When posting the iframe code I get absolutely nothing in the html code.
When trying to post the album link:
I just get a plain link (I see that there is an embed function working on this forum).
It should replace urls like
https://open.spotify.com/embed/album/734AFYo34Q1zRpg9N8E2Ho
Wow,that looks awful!
Maybe I have to put it like that:
If you simply write something like
The link in there should be replaced
I guess we haven't really given much messaging to the open source community on what's been going on with the embed system. It's a good reminder that we could use some more transparency with these types of things for the open source community.
Embeds
Rich Editor uses a new embed system that works in a far more structured way than the old embed system. This system is very much a work in progress, but is meant to allow for much richer, and more robust embeds. I've drafted up something on our issue tracker for the plans we have before adding public documentation and and path to migrate existing embeds written for advanced editor.
Rich Editor & HTML content
For what it's worth I don't think Vanilla has ever supported arbitrary iframe embeds out of the box and we don't have Spotify in our default list of auto embeds. That said I can see the case for adding it to our default list. Please open an issue or pull request if that's something you'd like to see.
Hi again @R_J .
I get it. I have to use only part of the embed code, I was able to get this to work. When "sharing" a Spotify album there are three options:
Album link: https://open.spotify.com/album/734AFYo34Q1zRpg9N8E2Ho?si=8AGRF3QKQ2uYbhZbJQ_CvA
or
Embed code: <iframe src="https://open.spotify.com/embed/album/734AFYo34Q1zRpg9N8E2Ho" width="300" height="380" frameborder="0" allowtransparency="true" allow="encrypted-media"></iframe>
or
Spotify URL: spotify:album:734AFYo34Q1zRpg9N8E2Ho
It would be great if the plugin could work with either one of these.
Again, thank you so much for all the great help!
Is there any documentation about that available? I see the mistake I made last time.
Your album link shows a parameter that the spotify link doesn't have "?si=...". Since it is only shown for this one option, is it relevant and what does it mean?
Support for the iframe would be quite wonky, I guess. I would not suggest to support use that.
How would a link to a single song would look like?
Here is the documentation, @R_J :
---
Typical album link: https://open.spotify.com/album/3yOfc5cP8x1x2Un1F0QkgT?si=-cz7ZTUHREyAQwxAor74mQ
Song link: https://open.spotify.com/track/1xCdc9QiF8g1ZwLhQnXanA?si=pVHxhrofRC256il5HohTug
Artist link: https://open.spotify.com/artist/15FyiY3ChN0QRspHIQYq0W?si=Qw42LHfxRyirjSNKaREcHg
Playlist link: https://open.spotify.com/user/117574590/playlist/4XB0n0PwThD5zUiPfrk9qe?si=W3k3o7x0ShKphBjERz8w5A
It seems the ?si=-cz7ZTUHREyAQwxAor74mQ part of the URL is not needed. They all work without it.
hi
i too need document needed to validate. parameters may suits to this.i feel after satisfying your own soul, start using this
Regards
John smith