Home Reference Source Test
public class | source

ElanPlugin

Extends:

Observer → ElanPlugin

Implements:

Downloads and renders ELAN audio transcription documents alongside the waveform.

Example:

// es6
import ElanPlugin from 'wavesurfer.elan.js';

// commonjs
var ElanPlugin = require('wavesurfer.elan.js');

// if you are using <script> tags
var ElanPlugin = window.WaveSurfer.elan;

// ... initialising wavesurfer with the plugin
var wavesurfer = WaveSurfer.create({
  // wavesurfer options ...
  plugins: [
    ElanPlugin.create({
      // plugin options ...
    })
  ]
});

Static Method Summary

Static Public Methods
public static

Elan plugin definition factory

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public

Types: *

public
public

data: *

public

params: *

public

Method Summary

Public Methods
public
public
public

getAnnotationNode(annotation: *): *

public

getRenderedAnnotation(time: *): *

public

init()

public

load(url: *)

public

loadXML(url: *, callback: *)

public

parseElan(xml: *): *

public

render()

Inherited Summary

From class Observer
public
public

fireEvent(event: string, args: ...any)

Manually fire an event

public

Attach a handler function for an event.

public

once(event: string, handler: function): ListenerDescriptor

Attach a handler to an event.

public

Disable firing a list of events by name.

since 4.0.0
public

un(event: string, fn: function)

Remove an event handler.

public

unAll()

Remove all event handlers.

Static Public Methods

public static create(params: ElanPluginParams): PluginDefinition source

Elan 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:

NameTypeAttributeDescription
params ElanPluginParams

parameters use to initialise the plugin

Return:

PluginDefinition

an object representing the plugin

Public Constructors

public constructor() source

Instantiate Observer

Override:

Observer#constructor

Public Members

public Types: * source

public container: * source

public data: * source

public params: * source

public renderedAlignable: * source

Public Methods

public bindClick() source

public destroy() source

public getAnnotationNode(annotation: *): * source

Params:

NameTypeAttributeDescription
annotation *

Return:

*

public getRenderedAnnotation(time: *): * source

Params:

NameTypeAttributeDescription
time *

Return:

*

public init() source

public load(url: *) source

Params:

NameTypeAttributeDescription
url *

public loadXML(url: *, callback: *) source

Params:

NameTypeAttributeDescription
url *
callback *

public parseElan(xml: *): * source

Params:

NameTypeAttributeDescription
xml *

Return:

*

public render() source