soundcloud: fix volume preservation

Soundcloud requires rebinding the READY event when a new track is loaded
in order to set the volume.
This commit is contained in:
calzoneman 2016-03-26 11:25:04 -07:00
parent 319c52911a
commit efdab32aa8
2 changed files with 9 additions and 1 deletions

View file

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