From 8b7cdfd4c30671b91f6da841f8d1e2e48c5d2642 Mon Sep 17 00:00:00 2001 From: Calvin Montgomery Date: Mon, 7 Aug 2017 21:08:04 -0700 Subject: [PATCH] soundcloud: fix getVolume to match setVolume --- package.json | 2 +- player/soundcloud.coffee | 2 +- www/js/player.js | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 7ebc4b18..cd34f429 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "author": "Calvin Montgomery", "name": "CyTube", "description": "Online media synchronizer and chat", - "version": "3.44.3", + "version": "3.44.4", "repository": { "url": "http://github.com/calzoneman/sync" }, diff --git a/player/soundcloud.coffee b/player/soundcloud.coffee index 7be7be0f..57445977 100644 --- a/player/soundcloud.coffee +++ b/player/soundcloud.coffee @@ -103,6 +103,6 @@ window.SoundCloudPlayer = class SoundCloudPlayer extends Player getVolume: (cb) -> if @soundcloud and @soundcloud.ready - @soundcloud.getVolume(cb) + @soundcloud.getVolume((vol) -> cb(vol / 100)) else cb(VOLUME) diff --git a/www/js/player.js b/www/js/player.js index 4dd83fdb..4b6a4c27 100644 --- a/www/js/player.js +++ b/www/js/player.js @@ -896,7 +896,9 @@ SoundCloudPlayer.prototype.getVolume = function(cb) { if (this.soundcloud && this.soundcloud.ready) { - return this.soundcloud.getVolume(cb); + return this.soundcloud.getVolume(function(vol) { + return cb(vol / 100); + }); } else { return cb(VOLUME); }