More volume docs

This commit is contained in:
Amish Shah
2017-10-26 16:44:21 +01:00
parent b83e12634c
commit c8a75e4c29
2 changed files with 11 additions and 3 deletions

View File

@@ -168,6 +168,7 @@ class StreamDispatcher extends Writable {
*/
get bitrateEditable() { return this.streams.opus && this.streams.opus.setBitrate; }
// Volume
get volume() {
return this.player.streams.volume ? this.player.streams.volume.volume : 1;
}
@@ -177,6 +178,13 @@ class StreamDispatcher extends Writable {
this.player.streams.volume.setVolume(value);
return true;
}
// Volume stubs for docs
/* eslint-disable no-empty-function*/
get volumeDecibels() {}
get volumeLogarithmic() {}
setVolumeDecibels() {}
setVolumeLogarithmic() {}
}
VolumeInterface.applyToClass(StreamDispatcher);