Created
June 14, 2012 16:58
-
-
Save futuredarrell/2931479 to your computer and use it in GitHub Desktop.
barbones-mashupper
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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