mirror of https://github.com/calzoneman/sync.git
soundcloud: fix getVolume to match setVolume
This commit is contained in:
parent
c7f7dcfed3
commit
8b7cdfd4c3
|
@ -2,7 +2,7 @@
|
||||||
"author": "Calvin Montgomery",
|
"author": "Calvin Montgomery",
|
||||||
"name": "CyTube",
|
"name": "CyTube",
|
||||||
"description": "Online media synchronizer and chat",
|
"description": "Online media synchronizer and chat",
|
||||||
"version": "3.44.3",
|
"version": "3.44.4",
|
||||||
"repository": {
|
"repository": {
|
||||||
"url": "http://github.com/calzoneman/sync"
|
"url": "http://github.com/calzoneman/sync"
|
||||||
},
|
},
|
||||||
|
|
|
@ -103,6 +103,6 @@ window.SoundCloudPlayer = class SoundCloudPlayer extends Player
|
||||||
|
|
||||||
getVolume: (cb) ->
|
getVolume: (cb) ->
|
||||||
if @soundcloud and @soundcloud.ready
|
if @soundcloud and @soundcloud.ready
|
||||||
@soundcloud.getVolume(cb)
|
@soundcloud.getVolume((vol) -> cb(vol / 100))
|
||||||
else
|
else
|
||||||
cb(VOLUME)
|
cb(VOLUME)
|
||||||
|
|
|
@ -896,7 +896,9 @@
|
||||||
|
|
||||||
SoundCloudPlayer.prototype.getVolume = function(cb) {
|
SoundCloudPlayer.prototype.getVolume = function(cb) {
|
||||||
if (this.soundcloud && this.soundcloud.ready) {
|
if (this.soundcloud && this.soundcloud.ready) {
|
||||||
return this.soundcloud.getVolume(cb);
|
return this.soundcloud.getVolume(function(vol) {
|
||||||
|
return cb(vol / 100);
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
return cb(VOLUME);
|
return cb(VOLUME);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue