Closed adamtoth closed 12 years ago
+1
Can you give me an example URL for playlist/song you'd like to embed?
http://grooveshark.com/s/Fly+feat+Rihanna/3lnPIs?src=5 (from the homepage, choose any song, click "share")
Here are developers info for the player: http://developers.grooveshark.com/docs/apiplayer/
Ok I have been looking into this and I'm not sure how it can be done.... :( For example the URL of http://grooveshark.com/#!/s/Fly+feat+Rihanna/3lnPIs/overview?src=5 has embed code of
<object width="250" height="40" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="gsSong2779880685" name="gsSong2779880685">
<param name="movie" value="http://grooveshark.com/songWidget.swf" />
<param name="wmode" value="window" />
<param name="allowScriptAccess" value="always" />
<param name="flashvars" value="hostname=grooveshark.com&songID=27798806&style=metal&p=0" />
<object type="application/x-shockwave-flash" data="http://grooveshark.com/songWidget.swf" width="250" height="40">
<param name="wmode" value="window" />
<param name="allowScriptAccess" value="always" />
<param name="flashvars" value="hostname=grooveshark.com&songID=27798806&style=undefined&p=0" />
<span>
<a href="http://grooveshark.com/search/song?q=Nicki%20Minaj%20Fly%20(feat.%20Rihanna)" title="Fly (feat. Rihanna) by Nicki Minaj on Grooveshark">Fly (feat. Rihanna) by Nicki Minaj on Grooveshark</a></span>
</object>
</object>
To build this I need the songID of 27798806 for the flashvars however the URL has no mention of the id in it's source code or URL. I had a look at the API and it doesn't seem to have a way (that I could easily see) to turn the URL into the embed code (or even the song Id). As as soon as API's have keys and such this library is usually not a good fit.
I also had a look at playlists and they don't have and usable embed option either...
Perhaps you could lobby Grooveshark for a oembed endpoint or at least decent OGP data in the page headers! :) If this happens I'm more than happy to add this!
I know they support an SWF embed. Not sure about anything else.