docs: mark getters as @ readonly

This commit is contained in:
SpaceEEC
2019-03-19 19:59:45 +01:00
parent df1889ab49
commit e62833b5e1
15 changed files with 27 additions and 4 deletions

View File

@@ -146,12 +146,14 @@ class StreamDispatcher extends Writable {
/**
* Whether or not playback is paused
* @type {boolean}
* @readonly
*/
get paused() { return Boolean(this.pausedSince); }
/**
* Total time that this dispatcher has been paused
* @type {number}
* @readonly
*/
get pausedTime() {
return this._silentPausedTime + this._pausedTime + (this.paused ? Date.now() - this.pausedSince : 0);
@@ -177,6 +179,7 @@ class StreamDispatcher extends Writable {
/**
* The time (in milliseconds) that the dispatcher has actually been playing audio for
* @type {number}
* @readonly
*/
get streamTime() {
return this.count * FRAME_LENGTH;
@@ -185,6 +188,7 @@ class StreamDispatcher extends Writable {
/**
* The time (in milliseconds) that the dispatcher has been playing audio for, taking into account skips and pauses
* @type {number}
* @readonly
*/
get totalStreamTime() {
return Date.now() - this.startTime;
@@ -322,6 +326,7 @@ class StreamDispatcher extends Writable {
/**
* Whether or not the Opus bitrate of this stream is editable
* @type {boolean}
* @readonly
*/
get bitrateEditable() { return this.streams.opus && this.streams.opus.setBitrate; }