diff --git a/player/soundcloud.coffee b/player/soundcloud.coffee index 75261a5a..bb072d07 100644 --- a/player/soundcloud.coffee +++ b/player/soundcloud.coffee @@ -69,6 +69,9 @@ window.SoundCloudPlayer = class SoundCloudPlayer extends Player else soundUrl = data.id @soundcloud.load(soundUrl, auto_play: true) + @soundcloud.bind(SC.Widget.Events.READY, => + @setVolume(VOLUME) + ) else console.error('SoundCloudPlayer::load() called but soundcloud is not ready') diff --git a/www/js/player.js b/www/js/player.js index 7974fcb3..b7f6ac24 100644 --- a/www/js/player.js +++ b/www/js/player.js @@ -771,9 +771,14 @@ } else { soundUrl = data.id; } - return this.soundcloud.load(soundUrl, { + this.soundcloud.load(soundUrl, { auto_play: true }); + return this.soundcloud.bind(SC.Widget.Events.READY, (function(_this) { + return function() { + return _this.setVolume(VOLUME); + }; + })(this)); } else { return console.error('SoundCloudPlayer::load() called but soundcloud is not ready'); }