splitbrain / dokuwiki-plugin-vshare

Plugin to easily embed videos from various video sharing sites into DokuWiki
http://www.dokuwiki.org/plugin:vshare
17 stars 19 forks source link

SoundCloud support #45

Closed espiegel123 closed 2 years ago

espiegel123 commented 7 years ago

Hi,

I have modified my sites.js and sites.conf to support SoundCloud. It would be great if you could add these:

in sites.js, add

 'soundcloud': 'soundcloud\\.com(\\d+)' 

in sites.conf, add soundcloud iframe https://w.soundcloud.com/player/?url=http://api.soundcloud.com/tracks/@VIDEO@

You can see it in action at: http://metasynth.com/wikifarm/metasynth/doku.php?id=blog:2013_06_14_found_image_exploration

(Note that our ISP is having some issues -- so the page may or may not load correctly depending on whether they have sorted things out)

Thanks,

Edward

splitbrain commented 7 years ago

Hmm, soundcloud track urls seem not to follow your sites.js pattern.

espiegel123 commented 7 years ago

Hmmm. If you take a look at the page I mentioned above, it works.

Take a look at this page where I use it:

http://metasynth.com/wikifarm/metasynth/doku.php?id=blog:2013_06_14_found_image_exploration

Did you try it and find that it didn't work?

splitbrain commented 7 years ago

The embed code works fine. But a track URL at soundcloud looks like this: https://soundcloud.com/marcutio/welcome-to-jamrockmarcutio-remix

This does not match the pattern in your sites.js. So I wonder if there's a way to embed a track based on the info from that URL. eg marcutio/welcome-to-jamrockmarcutio-remix

espiegel123 commented 7 years ago

Hi Andreas,

Ahh. It looks like SoundCloud changed the format sometime after I came up with the mod (back in 2013) but still supports the old format. And since it still supports the old style, I didn't realize that they made it hard to find the id. The code that I provided does work, but to find the id number to supply, one needs to go to the track's page and do "View Source" in the browser and look for "sounds:", the number that follows the colon is the real track id.

If you use the code I supplied and grab the tracks 'real' id (as described above), the following works in Dokuwiki:

{{soundcloud>93109392}}

splitbrain commented 2 years ago

soundcloud support added