Home Reference Source Test
import MarkersPlugin from 'wavesurfer.js/src/plugin/markers/index.js'
public class | source

MarkersPlugin

Static Member Summary

Static Public Members
public static

markers: *

Static Method Summary

Static Public Methods
public static

Markers plugin definition factory

since 4.6.0

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public
public
public
public
public

markers: *[]

public
public
public

params: *

public
public

style: *

public

util: *

public
public

wrapper: *

Method Summary

Public Methods
public

add(params: MarkerParams): object

Add a marker

public

clear()

Remove all markers

public
public

init()

public

remove(indexOrMarker: number | Object)

Remove a marker

Static Public Members

public static markers: * source

Static Public Methods

public static create(params: MarkersPluginParams): PluginDefinition since 4.6.0 source

Markers 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 MarkersPluginParams

parameters use to initialise the plugin

Return:

PluginDefinition

an object representing the plugin

Public Constructors

public constructor() source

Public Members

public dragging: boolean source

public markerHeight: number source

public markerLineWidth: number source

public markerWidth: number source

public markers: *[] source

public onMouseMove: * source

public onMouseUp: * source

public params: * source

public selectedMarker: * source

public style: * source

public util: * source

public wavesurfer: * source

public wrapper: * source

Public Methods

public add(params: MarkerParams): object source

Add a marker

Params:

NameTypeAttributeDescription
params MarkerParams

Marker definition

Return:

object

The created marker

public clear() source

Remove all markers

public destroy() source

public init() source

public remove(indexOrMarker: number | Object) source

Remove a marker

Params:

NameTypeAttributeDescription
indexOrMarker number | Object

Index of the marker to remove or the marker object itself