Documentation
Classes
discord-player
VolumeTransformer

VolumeTransformer extends PCMTransformer

new VolumeTransformer(options)
ParameterTypeOptionalDescription
optionsVolumeTransformerOptionsβœ…-

Properties

private _volume: any

  • Source: packages/equalizer/dist/index.d.ts#L322

public allowHalfOpen: boolean

If

  • Source: node_modules/@types/node/stream.d.ts#L872

public bits: number

  • Source: packages/equalizer/dist/index.d.ts#L77

public bytes: number

  • Source: packages/equalizer/dist/index.d.ts#L78

public closed: boolean

  • Source: node_modules/@types/node/stream.d.ts#L861

public destroyed: boolean

Is

  • Source: node_modules/@types/node/stream.d.ts#L128

public disabled: boolean

  • Source: packages/equalizer/dist/index.d.ts#L80

public errored: null | Error

  • Source: node_modules/@types/node/stream.d.ts#L862

public extremum: number

  • Source: packages/equalizer/dist/index.d.ts#L79

public onUpdate: (...args: unknown[]) => void

  • Source: packages/equalizer/dist/index.d.ts#L82

public readable: boolean

Is

  • Source: node_modules/@types/node/stream.d.ts#L84

public readableAborted: boolean

Returns whether the stream was destroyed or errored before emitting

  • Source: node_modules/@types/node/stream.d.ts#L78

public readableDidRead: boolean

Returns whether

  • Source: node_modules/@types/node/stream.d.ts#L90

public readableEncoding: null | BufferEncoding

Getter for the property

  • Source: node_modules/@types/node/stream.d.ts#L95

public readableEnded: boolean

Becomes

  • Source: node_modules/@types/node/stream.d.ts#L100

public readableFlowing: null | boolean

This property reflects the current state of a

  • Source: node_modules/@types/node/stream.d.ts#L106

public readableHighWaterMark: number

Returns the value of

  • Source: node_modules/@types/node/stream.d.ts#L111

public readableLength: number

This property contains the number of bytes (or objects) in the queue ready to be read. The value provides introspection data regarding the status of the

  • Source: node_modules/@types/node/stream.d.ts#L118

public readableObjectMode: boolean

Getter for the property

  • Source: node_modules/@types/node/stream.d.ts#L123

public sampleRate: number

  • Source: packages/equalizer/dist/index.d.ts#L81

public type: 's16le' | 's16be' | 's32le' | 's32be'

  • Source: packages/equalizer/dist/index.d.ts#L76

public writable: boolean

  • Source: node_modules/@types/node/stream.d.ts#L853

public writableCorked: number

  • Source: node_modules/@types/node/stream.d.ts#L859

public writableEnded: boolean

  • Source: node_modules/@types/node/stream.d.ts#L854

public writableFinished: boolean

  • Source: node_modules/@types/node/stream.d.ts#L855

public writableHighWaterMark: number

  • Source: node_modules/@types/node/stream.d.ts#L856

public writableLength: number

  • Source: node_modules/@types/node/stream.d.ts#L857

public writableNeedDrain: boolean

  • Source: node_modules/@types/node/stream.d.ts#L860

public writableObjectMode: boolean

  • Source: node_modules/@types/node/stream.d.ts#L858

public static captureRejectionSymbol: (typeof captureRejectionSymbol)

  • Source: node_modules/@types/node/events.d.ts#L291

public static captureRejections: boolean

Sets or gets the default captureRejection value for all emitters.

  • Source: node_modules/@types/node/events.d.ts#L296

public static defaultMaxListeners: number

  • Source: node_modules/@types/node/events.d.ts#L297

public static errorMonitor: (typeof errorMonitor)

This symbol shall be used to install a listener for only monitoring

  • Source: node_modules/@types/node/events.d.ts#L290

public volume: number

Methods

public [asyncIterator](): AsyncIterableIterator<any>

  • Source: node_modules/@types/node/stream.d.ts#L502

public _construct(callback): void

ParameterTypeOptionalDescription
callback(error: null | Error) => void❌-
  • Source: node_modules/@types/node/stream.d.ts#L140

public _destroy(error, callback): void

ParameterTypeOptionalDescription
errornull | Error❌-
callback(error: null | Error) => void❌-
  • Source: node_modules/@types/node/stream.d.ts#L904

public _final(callback): void

ParameterTypeOptionalDescription
callback(error: null | Error) => void❌-
  • Source: node_modules/@types/node/stream.d.ts#L905

public _flush(callback): void

ParameterTypeOptionalDescription
callbackTransformCallback❌-
  • Source: node_modules/@types/node/stream.d.ts#L947

public _read(size): void

ParameterTypeOptionalDescription
sizenumber❌-
  • Source: node_modules/@types/node/stream.d.ts#L141

public _readInt(buffer, index): number

ParameterTypeOptionalDescription
bufferBuffer❌-
indexnumber❌-
  • Source: packages/equalizer/dist/index.d.ts#L87

public _transform(chunk, encoding, callback): void

ParameterTypeOptionalDescription
chunkBuffer❌-
encodingBufferEncoding❌-
callbackTransformCallback❌-
  • Source: packages/equalizer/dist/index.d.ts#L327

public _write(chunk, encoding, callback): void

ParameterTypeOptionalDescription
chunkany❌-
encodingBufferEncoding❌-
callback(error: null | Error) => void❌-
  • Source: node_modules/@types/node/stream.d.ts#L896

public _writeInt(buffer, int, index): number

ParameterTypeOptionalDescription
bufferBuffer❌-
intnumber❌-
indexnumber❌-
  • Source: packages/equalizer/dist/index.d.ts#L88

public _writev(chunks, callback): void

ParameterTypeOptionalDescription
chunksArray<{ chunk: any,encoding: BufferEncoding }>❌-
callback(error: null | Error) => void❌-
  • Source: node_modules/@types/node/stream.d.ts#L897

public addListener(event, listener): VolumeTransformer

Event emitter The defined events on documents including:

  1. close
  2. data
  3. end
  4. error
  5. pause
  6. readable
  7. resume
ParameterTypeOptionalDescription
event'close'❌-
listener(...args: unknown[]) => void❌-
  • Source: node_modules/@types/node/stream.d.ts#L446

public clamp(val, max?, min?): number

ParameterTypeOptionalDescription
valnumber❌-
maxnumberβœ…-
minnumberβœ…-
  • Source: packages/equalizer/dist/index.d.ts#L89

public cork(): void

  • Source: node_modules/@types/node/stream.d.ts#L912

public destroy(error?): VolumeTransformer

Destroy the stream. Optionally emit an

ParameterTypeOptionalDescription
errorErrorβœ…Error which will be passed as payload in
  • Source: node_modules/@types/node/stream.d.ts#L434

public disable(): void

  • Source: packages/equalizer/dist/index.d.ts#L84

public emit(event): boolean

ParameterTypeOptionalDescription
event'close'❌-
  • Source: node_modules/@types/node/stream.d.ts#L454

public enable(): void

  • Source: packages/equalizer/dist/index.d.ts#L85

public end(cb?): VolumeTransformer

ParameterTypeOptionalDescription
cb(...args: unknown[]) => voidβœ…-
  • Source: node_modules/@types/node/stream.d.ts#L909

public eventNames(): Array<string | symbol>

Returns an array listing the events for which the emitter has registered listeners. The values in the array are strings or

  • Source: node_modules/@types/node/events.d.ts#L632

public getMaxListeners(): number

Returns the current max listener value for the

  • Source: node_modules/@types/node/events.d.ts#L489

public isPaused(): boolean

The

  • Source: node_modules/@types/node/stream.d.ts#L301

public listenerCount(eventName): number

Returns the number of listeners listening to the event named

ParameterTypeOptionalDescription
eventNamestring | symbol❌The name of the event being listened for
  • Source: node_modules/@types/node/events.d.ts#L579

public listeners(eventName): Array<Function>

Returns a copy of the array of listeners for the event named

ParameterTypeOptionalDescription
eventNamestring | symbol❌-
  • Source: node_modules/@types/node/events.d.ts#L502

public off(eventName, listener): VolumeTransformer

Alias for

ParameterTypeOptionalDescription
eventNamestring | symbol❌-
listener(args: Array<any>) => void❌-
  • Source: node_modules/@types/node/events.d.ts#L462

public on(event, listener): VolumeTransformer

ParameterTypeOptionalDescription
event'close'❌-
listener(...args: unknown[]) => void❌-
  • Source: node_modules/@types/node/stream.d.ts#L462

public once(event, listener): VolumeTransformer

ParameterTypeOptionalDescription
event'close'❌-
listener(...args: unknown[]) => void❌-
  • Source: node_modules/@types/node/stream.d.ts#L470

public pause(): VolumeTransformer

The

  • Source: node_modules/@types/node/stream.d.ts#L265

public pipe(destination, options?): T

ParameterTypeOptionalDescription
destinationT❌-
options{ end: boolean }βœ…-
  • Source: node_modules/@types/node/stream.d.ts#L25

public prependListener(event, listener): VolumeTransformer

ParameterTypeOptionalDescription
event'close'❌-
listener(...args: unknown[]) => void❌-
  • Source: node_modules/@types/node/stream.d.ts#L478

public prependOnceListener(event, listener): VolumeTransformer

ParameterTypeOptionalDescription
event'close'❌-
listener(...args: unknown[]) => void❌-
  • Source: node_modules/@types/node/stream.d.ts#L486

public push(chunk, encoding?): boolean

ParameterTypeOptionalDescription
chunkany❌-
encodingBufferEncodingβœ…-
  • Source: node_modules/@types/node/stream.d.ts#L421

public rawListeners(eventName): Array<Function>

Returns a copy of the array of listeners for the event named

ParameterTypeOptionalDescription
eventNamestring | symbol❌-
  • Source: node_modules/@types/node/events.d.ts#L532

public read(size?): any

The

ParameterTypeOptionalDescription
sizenumberβœ…Optional argument to specify how much data to read.
  • Source: node_modules/@types/node/stream.d.ts#L218

public removeAllListeners(event?): VolumeTransformer

Removes all listeners, or those of the specified

ParameterTypeOptionalDescription
eventstring | symbolβœ…-
  • Source: node_modules/@types/node/events.d.ts#L473

public removeListener(event, listener): VolumeTransformer

ParameterTypeOptionalDescription
event'close'❌-
listener(...args: unknown[]) => void❌-
  • Source: node_modules/@types/node/stream.d.ts#L494

public resume(): VolumeTransformer

The

  • Source: node_modules/@types/node/stream.d.ts#L284

public setDefaultEncoding(encoding): VolumeTransformer

ParameterTypeOptionalDescription
encodingBufferEncoding❌-
  • Source: node_modules/@types/node/stream.d.ts#L908

public setEncoding(encoding): VolumeTransformer

The

ParameterTypeOptionalDescription
encodingBufferEncoding❌The encoding to use.
  • Source: node_modules/@types/node/stream.d.ts#L243

public setMaxListeners(n): VolumeTransformer

By default

ParameterTypeOptionalDescription
nnumber❌-
  • Source: node_modules/@types/node/events.d.ts#L483

public setSampleRate(rate): void

ParameterTypeOptionalDescription
ratenumber❌-
  • Source: packages/equalizer/dist/index.d.ts#L90

public setVolume(volume): boolean

ParameterTypeOptionalDescription
volumenumber❌-
  • Source: packages/equalizer/dist/index.d.ts#L326

public toString(): string

  • Source: packages/equalizer/dist/index.d.ts#L328

public toggle(): void

  • Source: packages/equalizer/dist/index.d.ts#L86

public uncork(): void

  • Source: node_modules/@types/node/stream.d.ts#L913

public unpipe(destination?): VolumeTransformer

The

ParameterTypeOptionalDescription
destinationWritableStreamβœ…Optional specific stream to unpipe
  • Source: node_modules/@types/node/stream.d.ts#L328

public unshift(chunk, encoding?): void

Passing

ParameterTypeOptionalDescription
chunkany❌Chunk of data to unshift onto the read queue. For streams not operating in object mode,
encodingBufferEncodingβœ…Encoding of string chunks. Must be a valid
  • Source: node_modules/@types/node/stream.d.ts#L394

public wrap(stream): VolumeTransformer

Prior to Node.js 0.10, streams did not implement the entire

ParameterTypeOptionalDescription
streamReadableStream❌An "old style" readable stream
  • Source: node_modules/@types/node/stream.d.ts#L420

public write(chunk, encoding?, cb?): boolean

ParameterTypeOptionalDescription
chunkany❌-
encodingBufferEncodingβœ…-
cb(error: undefined | null | Error) => voidβœ…-
  • Source: node_modules/@types/node/stream.d.ts#L906

public static from(src): Duplex

A utility method for creating duplex streams.

ParameterTypeOptionalDescription
srcstring | Object | Stream | Blob | ArrayBuffer | Iterable<any> | AsyncIterable<any> | AsyncGeneratorFunction | Promise<any>❌-
  • Source: node_modules/@types/node/stream.d.ts#L895

public static fromWeb(readableStream, options?): Readable

A utility method for creating a

ParameterTypeOptionalDescription
readableStreamReadableStream<any>❌-
optionsPick<ReadableOptions, 'encoding' | 'highWaterMark' | 'objectMode' | 'signal'>βœ…-
  • Source: node_modules/@types/node/stream.d.ts#L61

public static getEventListeners(emitter, name): Array<Function>

Returns a copy of the array of listeners for the event named

ParameterTypeOptionalDescription
emitterDOMEventTarget | EventEmitter❌-
namestring | symbol❌-
  • Source: node_modules/@types/node/events.d.ts#L262

public static isDisturbed(stream): boolean

Returns whether the stream has been read from or cancelled.

ParameterTypeOptionalDescription
streamReadable | ReadableStream❌-
  • Source: node_modules/@types/node/stream.d.ts#L66

public static listenerCount(emitter, eventName): number

A class method that returns the number of listeners for the given

  • ⚠️ Deprecated
ParameterTypeOptionalDescription
emitterEventEmitter❌The emitter to query
eventNamestring | symbol❌The event name
  • Source: node_modules/@types/node/events.d.ts#L234

public static on(emitter, eventName, options?): AsyncIterableIterator<any>

const { on, EventEmitter } = require('events');
 
(async () => {
const ee = new EventEmitter();
 
// Emit later on
process.nextTick(() => {
ee.emit('foo', 'bar');
ee.emit('foo', 42);
});
 
for await (const event of on(ee, 'foo')) {
// The execution of this inner block is synchronous and it
// processes one event at a time (even with await). Do not use
// if concurrent execution is required.
console.log(event); // prints ['bar'] [42]
}
// Unreachable here
})();
ParameterTypeOptionalDescription
emitterEventEmitter❌-
eventNamestring❌The name of the event being listened for
optionsStaticEventEmitterOptionsβœ…-
  • Source: node_modules/@types/node/events.d.ts#L217

public static once(emitter, eventName, options?): Promise<Array<any>>

Creates a

ParameterTypeOptionalDescription
emitterNodeEventTarget❌-
eventNamestring | symbol❌-
optionsStaticEventEmitterOptionsβœ…-
  • Source: node_modules/@types/node/events.d.ts#L157

public static setMaxListeners(n?, eventTargets): void

const {
setMaxListeners,
EventEmitter
} = require('events');
 
const target = new EventTarget();
const emitter = new EventEmitter();
 
setMaxListeners(5, target, emitter);
ParameterTypeOptionalDescription
nnumberβœ…A non-negative number. The maximum number of listeners per
eventTargetsArray<DOMEventTarget | EventEmitter>❌-
  • Source: node_modules/@types/node/events.d.ts#L280

public static toWeb(streamReadable): ReadableStream<any>

A utility method for creating a web

ParameterTypeOptionalDescription
streamReadableReadable❌-
  • Source: node_modules/@types/node/stream.d.ts#L72