Options
All
  • Public
  • Public/Protected
  • All
Menu

Waveform analyzer widget.

Hierarchy

Index

Constructors

constructor

Properties

Protected analyser

analyser: AnalyserNode

Protected audioContext

audioContext: AudioContext

Protected audioElement

audioElement: HTMLMediaElement

Protected bufferLength

bufferLength: number

Protected canvasContext

canvasContext: CanvasRenderingContext2D

Protected canvasElement

canvasElement: HTMLCanvasElement

Protected color

color: string

Protected connectDestination

connectDestination: boolean

Protected dataArray

dataArray: Uint8Array

Protected fftSize

fftSize: number

Protected height

height: number

Protected isAudioContextInitialized

isAudioContextInitialized: boolean = false

Protected mediaSource

mediaSource: MediaElementAudioSourceNode

Protected requestAniFrameID

requestAniFrameID: number

Protected sourceChannel

sourceChannel: number

Protected viewElement

viewElement: HTMLElement

Protected width

width: number

Protected Static audioSources

audioSources: IAudioSource[] = ...

The list of audio sources.

Methods

changeAudioSource

  • changeAudioSource(audioSource?: HTMLMediaElement | MediaElementAudioSourceNode): void

clear

  • clear(): void

Protected createAnalyzer

  • createAnalyzer(): void

getAudioSource

Protected getDefaultColor

  • getDefaultColor(): string

Protected getDefaultFftSize

  • getDefaultFftSize(): number

Protected getDefaultViewElement

  • getDefaultViewElement(): HTMLElement

getViewElement

  • getViewElement(): HTMLElement

Protected initAnalyzer

  • initAnalyzer(): void

Protected initAudio

  • initAudio(): void

Protected initView

  • initView(): void

pause

  • pause(): void

Protected render

  • render(): void

resize

  • resize(): void

Protected setAudioSource

  • setAudioSource(audioSource?: HTMLMediaElement | MediaElementAudioSourceNode): void

Protected setOptions

Protected setViewElement

  • setViewElement(viewElement?: HTMLElement): void

start

  • start(): void

stop

  • stop(): void

Protected Static createAudioSourceForElement

  • createAudioSourceForElement(audioElement: HTMLMediaElement, connectDestination: boolean): IAudioSource

Protected Static findAudioSourceByElement

  • findAudioSourceByElement(audioElement: HTMLMediaElement): void | IAudioSource

Protected Static normalizeColor

  • normalizeColor(color: string): string
  • Converts short format color '#abc' to long format color: '#aabbcc'.

    Parameters

    • color: string

    Returns string

Generated using TypeDoc