mirror of https://github.com/calzoneman/sync.git
Fix soundcloud/soundcloud transition
This commit is contained in:
parent
afe14c2128
commit
b243f8bc7e
|
@ -1010,7 +1010,6 @@ Callbacks = {
|
||||||
|
|
||||||
changeMedia: function(data) {
|
changeMedia: function(data) {
|
||||||
if (PLAYER) {
|
if (PLAYER) {
|
||||||
console.log('getting volume for', PLAYER.type);
|
|
||||||
PLAYER.getVolume(function (v) {
|
PLAYER.getVolume(function (v) {
|
||||||
VOLUME = v;
|
VOLUME = v;
|
||||||
setOpt("volume", VOLUME);
|
setOpt("volume", VOLUME);
|
||||||
|
|
|
@ -468,6 +468,11 @@ var SoundcloudPlayer = function (data) {
|
||||||
self.videoLength = data.seconds;
|
self.videoLength = data.seconds;
|
||||||
if(self.player && self.player.load) {
|
if(self.player && self.player.load) {
|
||||||
self.player.load(data.id, { auto_play: true });
|
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);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue