MinimapPlugin
Extends:
Implements:
Renders a smaller version waveform as a minimap of the main waveform.
Example:
// es6
import MinimapPlugin from 'wavesurfer.minimap.js';
// commonjs
var MinimapPlugin = require('wavesurfer.minimap.js');
// if you are using <script> tags
var MinimapPlugin = window.WaveSurfer.minimap;
// ... initialising wavesurfer with the plugin
var wavesurfer = WaveSurfer.create({
// wavesurfer options ...
plugins: [
MinimapPlugin.create({
// plugin options ...
})
]
});
Static Method Summary
Static Public Methods | ||
public static |
create(params: MinimapPluginParams): PluginDefinition Minimap plugin definition factory |
Constructor Summary
Public Constructor | ||
public |
|
Member Summary
Public Members | ||
public |
|
|
public |
|
|
public |
drawer: * |
|
public |
|
|
public |
|
|
public |
|
|
public |
params: * |
|
public |
ratio: * |
|
public |
regions: {} |
|
public |
|
|
public |
|
|
public |
util: * |
|
public |
|
|
public |
waveWidth: * |
|
public |
wavesurfer: * |
Method Summary
Public Methods | ||
public |
|
|
public |
|
|
public |
|
|
public |
destroy() |
|
public |
|
|
public |
getWidth(): * |
|
public |
init() |
|
public |
moveOverviewRegion(pixels: *) |
|
public |
render() |
|
public |
|
Inherited Summary
From class Observer | ||
public |
handlers: * |
|
public |
Manually fire an event |
|
public |
on(event: string, fn: function): ListenerDescriptor Attach a handler function for an event. |
|
public |
once(event: string, handler: function): ListenerDescriptor Attach a handler to an event. |
|
public |
setDisabledEventEmissions(eventNames: string[]) Disable firing a list of events by name. |
since 4.0.0 |
public |
Remove an event handler. |
|
public |
unAll() Remove all event handlers. |
Static Public Methods
public static create(params: MinimapPluginParams): PluginDefinition source
Minimap plugin definition factory
This function must be used to create a plugin definition which can be used by wavesurfer to correctly instantiate the plugin.
Params:
Name | Type | Attribute | Description |
params | MinimapPluginParams | parameters use to initialise the plugin |
Public Constructors
Public Members
public drawer: * source
public overviewRegion: * source
public overviewWidth: * source
public params: * source
public ratio: * source
public regions: {} source
public regionsPlugin: * source
public util: * source
public waveShowedWidth: * source
public waveWidth: * source
public wavesurfer: * source
Public Methods
public bindMinimapEvents() source
public bindWavesurferEvents() source
public createElements() source
public destroy() source
public drawRegions() source
public init() source
public moveOverviewRegion(pixels: *) source
Params:
Name | Type | Attribute | Description |
pixels | * |