Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Stream

Hierarchy

  • EventEmitter
    • Stream

Index

Constructors

constructor

  • new Stream(readable?: Readable, options?: StreamOptions): Stream
  • Parameters

    • Optional readable: Readable
    • Optional options: StreamOptions

    Returns Stream

Properties

Readonly bitsPerSample

bitsPerSample: number

Readonly channelCount

channelCount: number

Readonly framerate

framerate: number = 24

height

height: number = 360

Readonly sampleRate

sampleRate: number

Readonly video

video: boolean = false

width

width: number = 640

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.

Accessors

finished

  • get finished(): boolean

paused

  • get paused(): boolean

stopped

  • get stopped(): boolean

Methods

addListener

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

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

          • Rest ...args: any[]

          Returns void

    Returns Stream

createTrack

  • createTrack(): MediaStreamTrack

emit

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

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

    Returns boolean

eventNames

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

finish

  • finish(): void

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): Stream
  • Parameters

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

          • Rest ...args: any[]

          Returns void

    Returns Stream

on

  • on(event: "pause", listener: (paused: boolean) => void): Stream
  • on(event: "finish", listener: () => void): Stream
  • on(event: "almost-finished", listener: () => void): Stream
  • on(event: "error", listener: (error: Error) => void): Stream
  • on(event: string, listener: Function): Stream
  • Parameters

    • event: "pause"
    • listener: (paused: boolean) => void
        • (paused: boolean): void
        • Parameters

          • paused: boolean

          Returns void

    Returns Stream

  • Parameters

    • event: "finish"
    • listener: () => void
        • (): void
        • Returns void

    Returns Stream

  • Parameters

    • event: "almost-finished"
    • listener: () => void
        • (): void
        • Returns void

    Returns Stream

  • Parameters

    • event: "error"
    • listener: (error: Error) => void
        • (error: Error): void
        • Parameters

          • error: Error

          Returns void

    Returns Stream

  • Parameters

    • event: string
    • listener: Function

    Returns Stream

once

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

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

          • Rest ...args: any[]

          Returns void

    Returns Stream

pause

  • pause(): void

prependListener

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

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

          • Rest ...args: any[]

          Returns void

    Returns Stream

prependOnceListener

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

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

          • Rest ...args: any[]

          Returns void

    Returns Stream

rawListeners

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

    • event: string | symbol

    Returns Function[]

removeAllListeners

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

    • Optional event: string | symbol

    Returns Stream

removeListener

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

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

          • Rest ...args: any[]

          Returns void

    Returns Stream

setMaxListeners

  • setMaxListeners(n: number): Stream
  • Parameters

    • n: number

    Returns Stream

setReadable

  • setReadable(readable?: Readable): void
  • Parameters

    • Optional readable: Readable

    Returns void

stop

  • stop(): 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