Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Piper

Hierarchy

  • EventEmitter
    • Piper

Index

Constructors

constructor

  • new Piper(converterCommand: string, opusFactory: OpusScript): Piper
  • Parameters

    • converterCommand: string
    • opusFactory: OpusScript

    Returns Piper

Properties

converterCommand

converterCommand: ConverterCommand

dataPacketCount

dataPacketCount: number

encoding

encoding: boolean

libopus

libopus: boolean

opus

opus: null | OpusScript

opusFactory

opusFactory: () => OpusScript

Type declaration

    • (): OpusScript
    • Returns OpusScript

volumeLevel

volumeLevel: number

Static Readonly captureRejectionSymbol

captureRejectionSymbol: typeof captureRejectionSymbol

Static captureRejections

captureRejections: boolean

Sets or gets the default captureRejection value for all emitters.

Static defaultMaxListeners

defaultMaxListeners: number

Static Readonly errorMonitor

errorMonitor: typeof errorMonitor

This symbol shall be used to install a listener for only monitoring 'error' events. Listeners installed using this symbol are called before the regular 'error' listeners are called.

Installing a listener using this symbol does not change the behavior once an 'error' event is emitted, therefore the process will still crash if no regular 'error' listener is installed.

Methods

addDataPacket

  • addDataPacket(packet: unknown): void
  • Parameters

    • packet: unknown

    Returns void

addListener

  • addListener(event: string | symbol, listener: (...args: any[]) => void): Piper
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns Piper

emit

  • emit(event: string | symbol, ...args: any[]): boolean
  • Parameters

    • event: string | symbol
    • Rest ...args: any[]

    Returns boolean

encode

  • Parameters

    Returns boolean

eventNames

  • eventNames(): (string | symbol)[]
  • Returns (string | symbol)[]

getDataPacket

  • getDataPacket(): Buffer
  • Returns Buffer

getMaxListeners

  • getMaxListeners(): number
  • Returns number

listenerCount

  • listenerCount(event: string | symbol): number
  • Parameters

    • event: string | symbol

    Returns number

listeners

  • listeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

off

  • off(event: string | symbol, listener: (...args: any[]) => void): Piper
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns Piper

on

  • on(event: string | symbol, listener: (...args: any[]) => void): Piper
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns Piper

once

  • once(event: string | symbol, listener: (...args: any[]) => void): Piper
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns Piper

prependListener

  • prependListener(event: string | symbol, listener: (...args: any[]) => void): Piper
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns Piper

prependOnceListener

  • prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): Piper
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns Piper

rawListeners

  • rawListeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

removeAllListeners

  • removeAllListeners(event?: string | symbol): Piper
  • Parameters

    • Optional event: string | symbol

    Returns Piper

removeListener

  • removeListener(event: string | symbol, listener: (...args: any[]) => void): Piper
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns Piper

reset

  • reset(): void
  • Returns void

resetPackets

  • resetPackets(): void
  • Returns void

setMaxListeners

  • setMaxListeners(n: number): Piper
  • Parameters

    • n: number

    Returns Piper

setVolume

  • setVolume(volume: number): void
  • Parameters

    • volume: number

    Returns void

stop

  • stop(e: Error, source: Duplex): void
  • Parameters

    • e: Error
    • source: Duplex

    Returns void

Static listenerCount

  • listenerCount(emitter: EventEmitter, event: string | symbol): number
  • deprecated

    since v4.0.0

    Parameters

    • emitter: EventEmitter
    • event: string | symbol

    Returns number

Static on

  • on(emitter: EventEmitter, event: string): AsyncIterableIterator<any>
  • Parameters

    • emitter: EventEmitter
    • event: string

    Returns AsyncIterableIterator<any>

Static once

  • once(emitter: NodeEventTarget, event: string | symbol): Promise<any[]>
  • once(emitter: DOMEventTarget, event: string): Promise<any[]>
  • Parameters

    • emitter: NodeEventTarget
    • event: string | symbol

    Returns Promise<any[]>

  • Parameters

    • emitter: DOMEventTarget
    • event: string

    Returns Promise<any[]>

Generated using TypeDoc