mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-14 02:23:31 +01:00
More volume docs
This commit is contained in:
@@ -168,6 +168,7 @@ class StreamDispatcher extends Writable {
|
|||||||
*/
|
*/
|
||||||
get bitrateEditable() { return this.streams.opus && this.streams.opus.setBitrate; }
|
get bitrateEditable() { return this.streams.opus && this.streams.opus.setBitrate; }
|
||||||
|
|
||||||
|
// Volume
|
||||||
get volume() {
|
get volume() {
|
||||||
return this.player.streams.volume ? this.player.streams.volume.volume : 1;
|
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);
|
this.player.streams.volume.setVolume(value);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Volume stubs for docs
|
||||||
|
/* eslint-disable no-empty-function*/
|
||||||
|
get volumeDecibels() {}
|
||||||
|
get volumeLogarithmic() {}
|
||||||
|
setVolumeDecibels() {}
|
||||||
|
setVolumeLogarithmic() {}
|
||||||
}
|
}
|
||||||
|
|
||||||
VolumeInterface.applyToClass(StreamDispatcher);
|
VolumeInterface.applyToClass(StreamDispatcher);
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ class VolumeInterface extends EventEmitter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The current volume of the broadcast
|
* The current volume of the stream
|
||||||
* @readonly
|
* @readonly
|
||||||
* @type {number}
|
* @type {number}
|
||||||
*/
|
*/
|
||||||
@@ -27,7 +27,7 @@ class VolumeInterface extends EventEmitter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The current volume of the broadcast in decibels
|
* The current volume of the stream in decibels
|
||||||
* @readonly
|
* @readonly
|
||||||
* @type {number}
|
* @type {number}
|
||||||
*/
|
*/
|
||||||
@@ -36,7 +36,7 @@ class VolumeInterface extends EventEmitter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The current volume of the broadcast from a logarithmic scale
|
* The current volume of the stream from a logarithmic scale
|
||||||
* @readonly
|
* @readonly
|
||||||
* @type {number}
|
* @type {number}
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user