Permalink
Browse files

fixed consumer key bug

  • Loading branch information...
1 parent 44aa87f commit 1a9d03a461d19e388d545c3834652476657807ff Eric Wahlforss committed Nov 22, 2010
Showing with 5 additions and 3 deletions.
  1. +4 −2 scripts/player.js
  2. +1 −1 scripts/playlist.js
View
@@ -20,6 +20,8 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
+var CONSUMER_KEY = "UdbhZcCSuxR9AxcfR3uvgg";
+
SC.Player = SC.Class();
SC.Player.prototype = {
isPlaying: false,
@@ -579,7 +581,7 @@ SC.Player.prototype = {
var self = this;
this.audioTracks[id] = soundManager.createSound({
id: id,
- url: track.stream_url + "?consumer_key=UdbhZcCSuxR9AxcfR3uvgg",
+ url: track.stream_url + "?consumer_key=" + CONSUMER_KEY,
volume : this.volume,
whileloading : SC.throttle(200,function() {
self.loading.css('width',(self.audio.bytesLoaded/self.audio.bytesTotal)*100+"%");
@@ -683,7 +685,7 @@ SC.Player.prototype = {
},
loadArtistInfo: function(uri) {
var self = this;
- $.getJSON(uri + ".js?callback=?",function(user) {
+ $.getJSON(uri + ".js?callback=?" + "&consumer_key=" + CONSUMER_KEY,function(user) {
if(!user.city) {
user.city = "";
};
View
@@ -182,7 +182,7 @@ SC.Playlist.prototype = {
baseUrl += "&callback=?"; // add JSONP callback param
}
// limit to tracks under 20 mins long
- baseUrl += "&duration[to]=1200000&limit=" + this.limit + "&consumer_key=UdbhZcCSuxR9AxcfR3uvgg"; // increase limit to 100
+ baseUrl += "&duration[to]=1200000&limit=" + this.limit + "&consumer_key=" + CONSUMER_KEY; // increase limit to 100
return baseUrl;
},
load : function() {

0 comments on commit 1a9d03a

Please sign in to comment.