Page 2 of 2

Re: Adding soundcloud bbcode?

Posted: Wed Oct 02, 2013 4:29 pm
by xgarb
I'm doing something like this for the HTML5 player. Flash isn't supported on many devices. I'm using the track ID which you have to get from one of the embed options. You don't want to be allowing people to paste whole URLs in an iFrame on your site.

BBCode Usage:

Code: Select all

[soundcloud]{IDENTIFIER}[/soundcloud]
HTML replacement:

Code: Select all

<iframe width="100%" height="166" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F{IDENTIFIER}"></iframe>
Help Line:

Code: Select all

Embed the tracks from SoundCloud into your post. Use the track ID: [soundcloud]123456789[/soundcloud]
Settings ~ Display on Posting Page (Your choice)

Re: Adding soundcloud bbcode?

Posted: Sat Aug 09, 2014 12:10 am
by youngjediknight
xgarb wrote:I'm doing something like this for the HTML5 player. Flash isn't supported on many devices. I'm using the track ID which you have to get from one of the embed options. You don't want to be allowing people to paste whole URLs in an iFrame on your site.

BBCode Usage:

Code: Select all

[soundcloud]{IDENTIFIER}[/soundcloud]
HTML replacement:

Code: Select all

<iframe width="100%" height="166" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F{IDENTIFIER}"></iframe>
Help Line:

Code: Select all

Embed the tracks from SoundCloud into your post. Use the track ID: [soundcloud]123456789[/soundcloud]
Settings ~ Display on Posting Page (Your choice)
Thanks for this and to the OP as well!

xgarb, can this be configured to accept URLs rather than track IDs? My concern is that members might find tracking the ID through the embed screen a bit tedious. Unless there's an easier way to get to the track ID?

Thanks again to you both.

Re: Adding soundcloud bbcode?

Posted: Sat Aug 09, 2014 8:58 am
by xgarb
Not that I know of. You don't want to allow people to add whole iFrames as they could be anything.

It is tedious to add the code. Maybe you could ask Soundcloud to put it somewhere clearer.

Re: Adding soundcloud bbcode?

Posted: Sat Jun 27, 2015 7:55 am
by mungbean
Can someone post how to do Soundcloud now?

Nothing works any more.

Re: Adding soundcloud bbcode?

Posted: Sat Jun 27, 2015 8:21 am
by mungbean
I worked out it's because all links are now https.

sigh

Re: Adding soundcloud bbcode?

Posted: Thu Jul 02, 2015 8:50 pm
by Theriddler1
BBCode:

Code: Select all

[soundcloud]{URL}[/soundcloud]
HTML:

Code: Select all

<iframe width="100%" height="166" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url={URL}&color=ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false"></iframe>
Helpline:

Code: Select all

Use the track URL taken from your browser address bar: example [soundcloud]https://soundcloud.com/forss/speech-craft-no-sleep-til-dawn-remix-by-forss[/soundcloud]

Re: Adding soundcloud bbcode?

Posted: Sun Dec 11, 2016 1:12 am
by Hypolite
Thanks for the HTML5 version, however it doesn't work for me in an iframe.When I got to

https://w.soundcloud.com/player/?url=ht ... /sets/an-i

in my browser, it shows the embedded player for the associated playlist, but when I try

Code: Select all

<iframe width="100%" height="300" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=https://soundcloud.com/hindelstark/sets/an-i"></iframe>
It doesn't work with a weird JS error. The Soundcloud background shows up but it's unable to load the player.

Does anyone have any idea what iframe attribute could help the player load?

Thanks!