Skip to content

Commit

Permalink
add getFilters method (#982)
Browse files Browse the repository at this point in the history
* add getFilters method

* add getFilters() method

add 'Filters must be set with setFilters method first' note.

* return empty array if no filters are set

* change to `return this.backend.filters || [];`
  • Loading branch information
entonbiba authored and katspaugh committed Feb 12, 2017
1 parent f46df77 commit d69fa6e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/wavesurfer.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,15 @@ var WaveSurfer = {
return this.isMuted;
},

/**
* Get the list of current set filters as an array.
*
* Filters must be set with setFilters method first
*/
getFilters: function() {
return this.backend.filters || [];
},

toggleScroll: function () {
this.params.scrollParent = !this.params.scrollParent;
this.drawBuffer();
Expand Down

0 comments on commit d69fa6e

Please sign in to comment.