Home Reference Source
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

markers: *[]

public

params: *

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(index: number)

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 markerHeight: number source

public markerWidth: number source

public markers: *[] source

public params: * 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(index: number) source

Remove a marker

Params:

NameTypeAttributeDescription
index number

Index of the marker to remove