Fix soundcloud/soundcloud transition

This commit is contained in:
calzoneman 2014-01-02 10:04:16 -05:00
parent afe14c2128
commit b243f8bc7e
2 changed files with 5 additions and 1 deletions

View file

@ -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);

View file

@ -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);
}
};