XF 2.2 How to properly implement a Soundcloud player in a Xenforo Page with BB code?



I've been through the manual, and searched online, but I can't find the proper way to implement a Soundcloud player in a Xenforo PAGE (NOT a thread).

I'm currently copy/pasting the Embed code directly into the page without any wrapper BB code because I don't know how that's supposed to be formatted:

<iframe width="100%" height="166" scrolling="no" frameborder="no" allow="autoplay" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/1272893641&color=%23356faf&auto_play=false&hide_related=true&show_comments=true&show_user=true&show_reposts=false&show_teaser=false"></iframe><div style="font-size: 10px; color: #cccccc;line-break: anywhere;word-break: normal;overflow: hidden;white-space: nowrap;text-overflow: ellipsis; font-family: Interstate,Lucida Grande,Lucida Sans Unicode,Lucida Sans,Garuda,Verdana,Tahoma,sans-serif;font-weight: 100;"><a href="https://soundcloud.com/user-185903816" title="Tom Wood" target="_blank" style="color: #cccccc; text-decoration: none;">Tom Wood</a> · <a href="https://soundcloud.com/user-185903816/story-teller-scene-1" title="Story Teller - Scene 1" target="_blank" style="color: #cccccc; text-decoration: none;">Story Teller - Scene 1</a></div>

That works for the horizontal player in both a desktop and mobile. Buf I use the Embed code for the square player, it's too big and runs off the screen of a phone.

There's also this Share code:


What's the best way to embed a Soundcloud player in a Xenforo PAGE using the Xenforo native BB code system? I don't want any add-ons.

  • Like
Reactions: OCC
Isn’t it simpler to just paste in the html embed iframe?
This isn't necessarily the case. If the embed code ever changes and the HTML was copied, all copies would have to be updated - if BB Code is used there is no update existing embeds in this case.

Furthermore if there are Add-ons that modify the behaviour of [media] (like an Add-on to entirely block any external content until consent is given) this probably would not work with plain embed HTML.

Last but not least embed code might be more complex than just an IFrame - Twitter for example does need a JavaScript file to be loaded as well.

It is easier at first glance, but not necessarily the best option
  • Like
Reactions: OCC
Thank you for all your help!

I'm going to just leave it as is, and ask around for people to try it on their different devices. I have no idea if it works on Apple devices or other tablets, for example. The nice thing about being a tiny presence on the web is that you can try stuff and almost nobody will ever see it anyway.

We've all had the experience of pushing the send/publish button, and then seeing all our mistakes. The great thing about having a decent digital read-back is that it -really- shows the mistakes in the writing. The first time I edited the audio file and wanted to replace it in the Soundcloud player, the whole concept of Freemium slapped me upside the head. Oh no, you can't just replace the audio file, for that you have to upgrade. At $6 a month, it's worth it so I don't have to re-deploy the player.

Thank you all for trying to help me!
  • Like
Reactions: OCC
Top Bottom