Spotify embed in discussions?

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>

Comments

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    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.


    asleulv
  • 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).

  • asleulvasleulv
    edited February 1

    I found the error log. I'll PM it to you.

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    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 !

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    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.

    <iframe src="https://open.spotify.com/embed/album/734AFYo34Q1zRpg9N8E2Ho" width="300" height="380" frameborder="0" allowtransparency="true" allow="encrypted-media"></iframe>
    


    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).

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    It should replace urls like https://open.spotify.com/embed/album/734AFYo34Q1zRpg9N8E2Ho

    Wow,that looks awful!

    Maybe I have to put it like that:

    https://open.spotify.com/embed/album/734AFYo34Q1zRpg9N8E2Ho
    

    If you simply write something like

    Hey dudes, listen to my new favorite album! https://open.spotify.com/embed/album/734AFYo34Q1zRpg9N8E2Ho 
    

    The link in there should be replaced


  • charrondevcharrondev Application Developer (PHP, JS) Montreal Vanilla Staff

    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.

    asleulv
  • 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!

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    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?


  • 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

Sign In or Register to comment.