PluginClass
Extends:
Direct Implemented:
This is the interface which is implemented by all plugin classes. Note
that this only turns into an observer after being passed through
wavesurfer.addPlugin
.
Constructor Summary
Public Constructor | ||
public |
constructor(params: Object, ws: Object) Construct the plugin |
Method Summary
Public Methods | ||
public |
Plugin definition factory |
|
public |
destroy() Destroy the plugin instance |
|
public |
init() Initialise the plugin |
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. |
Public Constructors
Public Methods
public create(params: Object) source
Plugin definition factory
This function must be used to create a plugin definition which can be used by wavesurfer to correctly instantiate the plugin.
It returns a PluginDefinition
object representing the plugin.
Params:
Name | Type | Attribute | Description |
params | Object |
|
The plugin params (specific to the plugin) |
public destroy() source
Destroy the plugin instance
Stop doing something. This is called by
wavesurfer.destroyPlugin(pluginName)
public init() source
Initialise the plugin
Start doing something. This is called by
wavesurfer.initPlugin(pluginName)