Skip to content

Instantly share code, notes, and snippets.

@futuredarrell
Created June 14, 2012 16:58
Show Gist options
  • Save futuredarrell/2931479 to your computer and use it in GitHub Desktop.
Save futuredarrell/2931479 to your computer and use it in GitHub Desktop.
barbones-mashupper
<html>
<head>
<title>mashupper</title>
</head>
<body>
<div id="mashup-left" style="width: 50%; float: left">
</div>
<div id="mashup-right" style="width: 50%; float: left">
</div>
<script src="js/jquery.min.js"></script>
<script src="http://connect.soundcloud.com/sdk.js" type="text/JavaScript"></script>
<script src="http://w.soundcloud.com/player/api.js"></script>
<script type="text/JavaScript">
SC.initialize({
client_id: "YOUR CLIENT KEY",
});
SC.whenStreamingReady(function(){
SC.get("/tracks", {genre: 'instrumental'}, function(tracks){
var track_one = tracks[0];
var track_two = tracks[1];
SC.oEmbed(track_one.permalink_url, {auto_play: true}, function(oembed){
$('#mashup-left').html(oembed.html);
});
SC.oEmbed(track_two.permalink_url, {auto_play: true}, function(oembed){
$('#mashup-right').html(oembed.html);
});
});
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment