From b243f8bc7e8b73c54edfede3b7e7b729ad87526c Mon Sep 17 00:00:00 2001 From: calzoneman Date: Thu, 2 Jan 2014 10:04:16 -0500 Subject: [PATCH] Fix soundcloud/soundcloud transition --- www/assets/js/callbacks.js | 1 - www/assets/js/player.js | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/www/assets/js/callbacks.js b/www/assets/js/callbacks.js index 75b53c8a..b8ed06f3 100644 --- a/www/assets/js/callbacks.js +++ b/www/assets/js/callbacks.js @@ -1010,7 +1010,6 @@ Callbacks = { changeMedia: function(data) { if (PLAYER) { - console.log('getting volume for', PLAYER.type); PLAYER.getVolume(function (v) { VOLUME = v; setOpt("volume", VOLUME); diff --git a/www/assets/js/player.js b/www/assets/js/player.js index 60838da7..4458fa0a 100644 --- a/www/assets/js/player.js +++ b/www/assets/js/player.js @@ -468,6 +468,11 @@ var SoundcloudPlayer = function (data) { self.videoLength = data.seconds; if(self.player && self.player.load) { self.player.load(data.id, { auto_play: true }); + var soundcloudNeedsToFuckingFixTheirPlayer = function () { + self.setVolume(VOLUME); + self.player.unbind(SC.Widget.Events.PLAY_PROGRESS); + }; + self.player.bind(SC.Widget.Events.PLAY_PROGRESS, soundcloudNeedsToFuckingFixTheirPlayer); } };