Continuing the discussion from File upload support?:
Well, for audio we hope SoundCloud oneboxing works:
This certainly shouldn’t prevent anyone else from looking at it, but I was going to try to toy with a generic mp3 one. I just might write some crappy ruby code in the process because I haven’t touched it in probably 5 years.
If I were to use an external js, such as SoundManager2 (which I believe SoundCloud uses), what would be the proper way to include js for a onebox?
see the onebox dir, essentially it would be done in two parts, you would probably add your component in jsapp/components then you would fire it inline using your onebox (or amend the composer to have a post hook after it brings in a good onebox)
Very little ruby code needed for this.
I’ve done a onebox that required just html and ruby. It’s the .js from an external library that I wasn’t sure about.
This is nice, but took alot more work than embedding an .mp3 sample should. Drag-n-drop is what I want. Discourse has me lovin’ it…
[Ahh! To get it to onebox I had to https: -> http: We should probably fix that.]
You have to turn on embedding in your SoundCloud account as I recall. None of your clips you upload are public by default. I wrote this up a while ago:
It was public already. The problem was that the link supplied is httpS: not http: - we should probably deal with that more gracefully, since it is what soundcloud supplies as a cut/paste link.
Oh, and since they do their own shortening, we should accept their shortcode as well.
Should work now