new VisuComponentStereo(options)
VisuComponentStereo is an abstraction for stereo visualisation components. It must be inherited.
Stereo components inherit this class to benefit its node routing and canvas configuration. It is meant to use a L/R canvas for stereo or merged L/R one. This class extends BaseComponent to benefits all shared properties between visualisations.
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object | The visualizer root options Properties
|
- Since:
- 2020
- Source:
Extends
Members
(private) _audioCtx :object
The audio context
Type:
- object
- Overrides:
- Source:
(private) _canvasL :object
The canvas to rendered left channed data to
Type:
- object
- Source:
(private) _canvasR :object
The canvas to rendered right channed data to
Type:
- object
- Source:
(private) _ctxL :object
The left canvas associated context
Type:
- object
- Source:
(private) _ctxR :object
The right canvas associated context
Type:
- object
- Source:
(private) _dom :object
Contains all useful DOM objects
Type:
- object
- Inherited From:
- Source:
(private) _fftSize :number
FFT size used to analyse audio stream. Must be a power of 2
Type:
- number
- Overrides:
- Source:
(private) _inputNode :object
The source node to chain from ; it will ignore the output of HTML audio player
Type:
- object
- Overrides:
- Source:
(private) _isPlaying :boolean
The playing state of the player
Type:
- boolean
- Inherited From:
- Source:
(private) _merged :boolean
Merge L and R channel on output
Type:
- boolean
- Source:
(private) _nodes :object
Audio nodes from web audio API to manipulate data with
Type:
- object
- Source:
(private) _parentDimension :object
Save container dimension to restore when closing fullscreen
Type:
- object
- Inherited From:
- Source:
(private) _player :object
The audio source (HTML audio player)
Type:
- object
- Overrides:
- Source:
(private) _renderTo :object
Target div to render module in
Type:
- object
- Overrides:
- Source:
(private) _resizeObserver :object
Resize observable to watch for any resize change
Type:
- object
- Inherited From:
- Source:
(private) _type :string
The component type. See supported componenets in AudioVisualizer factory
Type:
- string
- Overrides:
- Source:
Methods
(private, static) _buildUI()
Create and configure canvas then append it to given DOM element.
- Since:
- 2020
- Source:
(private, static) _clearCanvas()
Clear component canvas contexts from their content.
- Since:
- 2020
- Source:
(private, static) _fillAttributes(options)
Internal method to fill internal properties from options object sent to constructor.
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object | The visualizer root options Properties
|
- Since:
- 2020
- Source:
(private, static) _setAudioNodes()
Build audio chain with source -> splitter -> analyzerL/R -> merger -> destination.
- Since:
- 2020
- Source: