- Fix many calls to
setSinkIdresulting in no sound (#2481) - Optimize responsive resize to avoid unnecessarily firing redraw on unpainted waveforms (#2485)
- Minimap plugin:
- Remove waveform of previous audio when starting to load new audio (#2479)
- Changed regions function name to resolve ambiguities (#2482)
- Spectrogram plugin:
- Add
frequencyMin,frequencyMaxoption to scale frequency axis. And set default 12kHz range to draw spectrogram like 5.x (#2455)
- Add
- Timeline plugin:
- Fix rendering issue for negative
offsetvalues (#2463)
- Fix rendering issue for negative
- Cursor plugin:
- Fix type documentation for
followCursorYandopacityoptions (#2459) - Fix destroying cursor and showTime dom nodes (#2460)
- Fix type documentation for
- Fix regression and restore support for passing a
CanvasGradienttosetWaveColor()(#2448) - Regions plugin:
- Fixed the type annotation of
maxRegionsin the regions plugin (#2454)
- Fixed the type annotation of
- Fixed a regression that broke bars rendering when using a certain format for the peaks array (#2439)
- Add additional type to
waveColorandprogressColorparameters to support linear gradients (#2345) - Add
hideCursoroption to hide the mouse cursor when hovering over the waveform (#2367) - Add optional
channelIdxparameter tosetWaveColor,getWaveColor,setProgressColorandgetProgressColormethods (#2391) - Improved drawing waveform with bars, now bars height is the maximum peak value in range (#2428)
- Workaround for
seekTooccasionally crashing on Firefox (#1228, #2431) - Markers plugin: Add the ability to set markers as draggable using param
draggable=true,marker-dragandmarker-dropevents will be triggered (#2398) - Regions plugin:
- Increase region z-index to fix stacking inconsistencies (#2353)
- Check
maxLengthbefore resizing region (#2374) - Add support for drag selection to be separated for each channel (#2380)
- Allow
formatTimeCallbackfrom plugin params to be used (#2294) - Use of default
edgeScrollWidthvalue no longer dependent on regions being created via plugin params (#2401) - Disable
region-removeevent emission during plugin teardown (#2403)
- Spectrogram plugin:
- Remove inaccurate frequency doubling of spectrogram (#2232)
- Support for
splitChannelsoption to draw spectrogram for each channel (#2424)
- Add
ignoreSilenceModeoption to ignore iOS hardware silence switch when using theWebAudiobackend (#1864) - Fixed unhandled
Failed to execute 'stop' on 'AudioScheduledSourceNode'error (#1473) - Fixed unhandled
Cannot read property 'decodeArrayBuffer' of nullerror (#2279) - Timeline plugin: fixed unhandled
null is not an object (evaluating context.canvas)error in Safari v14 (#2333) - Regions plugin: add
directionandactionfields to theregion-updatedevent params (#2339)
- Markers plugin:
- Add the ability to use custom HTML elements in place of the default marker icon by
passing the new
markerElementparameter to the marker constructor (#2269) - Custom HTML elements are now centered over the marker line (#2298)
- Trigger
marker-clickevent on wavesurfer (#2287)
- Add the ability to use custom HTML elements in place of the default marker icon by
passing the new
- Regions plugin: handle rollover cursor bug fix (#2293)
- Timeline plugin: prevent calling
Canvascontext methods onnullvalues (#2299) - Spectrogram plugin: prevent calling
Canvascontext methods onnullvalues (#2299)
- Fix removing DOM element on
destroy()(#2258)
- Add new
verticalparameter enabling displaying waveforms vertically (#2195) - Fixed
exportPCM()to return a Promise containing valid JSON data withnoWindow(#1896, #1954) - Nullify
onaudioprocesson remove to not execute in background (#2218) - Playhead plugin: add a new plugin that allows the setting of a independent "play head", or song-start position. (#2209)
- Markers plugin: fix a bug where markers at the end of a track would cause incorrect click-to-seek behavior (#2208)
- Regions plugin:
- Fix mouseup not firing if click & drag a region handle & release outside the browser window (#2213)
- Added new
showTooltipparam allowing disabling regiontitletooltip (#2213)
- Webaudio: fix
decodeAudioDatahandling in Safari (#2201) - Markers plugin: add new plugin that allows for timeline markers (#2196)
- Split channels:
overlayparam now properly displays a single canvas (#2161) - Fixed memory leak with
destroy()inWebAudiobackend (#1940) - Fixed
WaveSurfer.load(url)not working when passing a HTMLMediaElement as the url parameter, with the WebAudio backend. - Microphone plugin: remove deprecated
MediaStream.stopcall (#2168) - Regions plugin: stop region dragging when mouse leaves canvas (#2158)
- Use Webpack 5 for build (#2093)
- Fix seeking issues for
WebAudiobackend (#2149) - Use
splitChannelsOptionsto color wave bars (#2150)
- Add
relativeNormalizationoption to maintain proportionality between waveforms whensplitChannelsandnormalizearetrue(#2108) - WebAudio backend: set playback rate modifying directly the playback property of the source node (#2118)
- Spectrogram plugin: Use
ImageDatato draw pixel-by-pixel (#2127)
- Fix performance issues with
seekTowhile audio is playing (#2045) - Trigger
waveform-readyevent when provided peaks are drawn (#2031)
- Revert Code cleanup for Observer class (#2069)
- Don't call HTMLMediaElement#load when given peaks and preload == 'none'. Prevents browsers from pre-fetching audio (#1969, #1990)
seekTobugfix inc. basic unit tests (#2047)- Fix unhandled
AbortErrorthrown duringcancelAjax(#2063) - Remove
util.extend: deprecated since v3.3.0 (#1995) - Remove
util.ajax: deprecated since v3.0.0 (#2033) - Regions plugin:
- Removed
col-resizecursor when resize is disabled (#1985) - Improved and unified loop playback logic (#1868)
- Check
minLengthbefore resizing region (#2001) - Dragging and resizing will continue outside canvas (#2006)
regionsMinLengthparameter to assign a min length to those regions for which theminLengthis not specified (#2009)- Revert PR #1926 click propagation on regions. Use event parameter passed
in
region-clickif you needstopPropagation. (#2024) - Edgescroll works for both edges (#2011)
- Removed
- Microphone plugin: move to separate directory (#1997)
- Minimap plugin: move plugin to separate directory (#1999)
- Cursor plugin: move plugin to separate directory (#1998)
- Elan plugin: move plugin to separate directory (#2019)
- Spectrogram plugin: move to separate directory (#1996)
- Mediasession plugin: move to separate directory (#2020)
- Timeline plugin: move to separate directory (#2018)
- Fixes for event handling with certain plugins (regions, microphone). The crash would have involved '_disabledEventEmissions' (#1975)
- Fixed mediaelement-webaudio playback under Safari (#1964)
- Fixed the
destroymethod of theMediaElementWebAudiobackend. Instead of destroying only the media element, the audio nodes are disconnected and the audio context is closed. This was done by splitting thedestroymethod of theWebAudiobackend, so it calls the newdestroyWebAudiomethod to cancel everything related to WebAudio (#1927) - Removed private methods of plugins and generalized plugins' access, so they can be extended creating custom plugins (#1928)
- Added plugin inheritance example (#1921)
- Added compatibility for Gatsby and other static site generators (#1938)
- Minimap plugin: added the ability to use a customized regions plugin using a new parameter
regionsPluginName(#1943) - Fixed waveform display to not always connect to the sample=0 point (#1942)
- Elan plugin: optional params.tiers (#1910)
- Regions plugin:
- Split
regions.jsintoregion.js(containingRegionclass) andindex.js. Both files moved into thesrc/plugin/regionsdirectory. This makes it easier to extend these classes and use them in custom plugins (#1934) - Fixed channelCount assignment (#1858)
- Fixed click propagation issue (#1926)
- Fixed switch loop region (#1929)
- Added ability to specify time format for Regions tooltip using timeformatCallback (#1948)
- Split
- Add
splitChannelsOptionsparam andsetFilteredChannelsmethod to configure how channels are drawn (#1947) - Added checks in
minimapplugin fordrawerpresence (#1953) - Add
setDisabledEventEmissionsmethod to optionally disable calls to event handlers for specific events (#1960) - Drawer: removed private methods to allow overriding them (#1962)
- Add optional
setMutemethod to backends to fix muting behavior with theMediaElementbackend (#1966)
- Change default
desynchronizeddrawing context attribute tofalse(#1908)
- Use
requestAnimationFramefor clearWave (#1884) - Fix
Unable to get property 'toLowerCase' of undefined or null referencein IE11 (#1771) - Spectrogram plugin: correct the hamming windfunc formula (#1850)
- Regions plugin:
- Improve handles style support (#1839)
- Add support for a context menu event on a region (#1844)
- Fix for handle position when using
channelIdxparam (#1845)
wavesurfer.exportPCMnow accepts an optionalendargument and returns a Promise (#1728)- Add
wavesurfer.setPlayEnd(position)to set a point in seconds for playback to stop at (#1795) - Add
drawingContextAttributesoption and enable canvasdesynchronizedhint (#1642) - Add
barMinHeightoption (#1693) - Expose progress to the
dblclickevent (#1790) - Deprecate
util.extendand replace usage withObject.assign(#1825) - Regions plugin:
- Add
startargument toplayandplayLoopmethods (#1794) - Add
maxRegionsoption to limit max numbers of created regions (#1793) - Don't assign to module object (#1823)
- Allow setting the
handleColorinsideaddRegion(#1798) - Disable drag selection before enabling it (#1698)
- Add
channelIdxoption to select specific channel to draw on (#1829) - Refactor for improved readability (#1826)
- Add
- Cursor plugin: fix time visibility (#1802)
- New
MediaElementWebAudiobackend (#1767):- Allows you to use Web Audio API with big audio files, loading audio
like with MediaElement backend (HTML5 audio tag), so you can use the
same methods of MediaElement backend for loading and playback. This way,
the audio resource is not loaded entirely from server, but in ranges,
allowing you to use WebAudio features, like filters, on audio files with
a long duration. You can also supply peaks data, so the entire audio file
does not have to be decoded.
For example:
wavesurfer.load(url | HTMLMediaElement, peaks, preload, duration); wavesurfer.play(); wavesurfer.setFilter(customFilter);
- Allows you to use Web Audio API with big audio files, loading audio
like with MediaElement backend (HTML5 audio tag), so you can use the
same methods of MediaElement backend for loading and playback. This way,
the audio resource is not loaded entirely from server, but in ranges,
allowing you to use WebAudio features, like filters, on audio files with
a long duration. You can also supply peaks data, so the entire audio file
does not have to be decoded.
For example:
- Add
barRadiusoption to create waveforms with rounded bars (#953) - Throw error when the url parameter supplied to
wavesurfer.load()is empty (#1773, #1775) - Specify non-minified wavesurfer.js in
mainentry ofpackage.json(#1759) - Add
dblclickevent listener to wavesurfer wrapper (#1764) - Fix
destroy()inMediaElementbackend (#1778) - Cursor plugin: flip position of time text to left of the cursor where needed to improve readability (#1776)
- Regions plugin: change region end handler position (#1762, #1781)
- Add
autoCenterandautoCenterRateoptions (#1699) - Make sure
isReadyis true before firing thereadyevent (#1749) - Improve fetch error messages (#1748)
- Use
MediaElementbackend for browsers that don't support WebAudio (#1739) - Regions plugin:
- Use
isResizingandisDraggingto filter events in region-updated listener (#1716) - Fix
playLoopandloopoption for clips with duration <15s (#1626)
- Use
- Spectrogram plugin: fix variable name in click handler (#1742)
- Minimap plugin: fix left/width calculations for regions on retina/4k screens (#1743)
- New example: video-annotation (#1726)
- Add
wavesurfer.getActivePlugins(): return map of plugins that are currently initialised - Replace usage of
util.ajaxwithutil.fetchFile(#1365) - Update progress when seeking with HTML media controls (#1535)
- Make sure mute/volume is updated when using
MediaElementbackend (#1615) - Refactor
MultiCanvasand addCanvasEntryclass (#1617) - Fix
wavesurfer.isReady: make it a public boolean, the brokenisReadymethod is removed (#1597) - Add support for
Bloboutput type inwavesurfer.exportImage(#1610) - Fix fallback to Audio Element in browsers that don't support Web Audio (#1614)
util.getId()now accepts aprefixargument (#1619)- Improve documentation for
xhroption (#1656) - Fix: the
progressWaveshould not be rendered when specifying the same value for theprogressColorandwaveColoroptions (#1620) - Cursor plugin:
- Add
formatTimeCallbackoption - Add
followCursorYoption (#1605) - Remove deprecated
enableCursormethod (#1646) - Hide the cursor elements before first mouseover if
hideOnBluris set (#1663)
- Add
- Spectrogram plugin:
- Fix
readylistener when loading multiple audio files (#1572) - Allow user to specify a colorMap (#1436)
- Fix
- Regions plugin:
- Fix
readylistener when loading multiple audio files (#1602) - Add
snapToGridIntervalandsnapToGridOffsetoptions (#1632) - Allow drawing regions over existing regions, if the underlying ones are not draggable or resizable (#1633)
- Calculate the duration at event time to allow predefined regions to be dragged and resized (#1673)
- Remove deprecated
initRegionsmethod (#1646)
- Fix
- Timeline plugin: fix
readylistener when loading multiple audio files - Minimap plugin: remove deprecated
initMinimapmethod (#1646)
Check UPGRADE.md for backward incompatible changes since v2.x.
- Add
backgroundColoroption (#1118) - Spectrogram plugin: fix click handler (#1585)
- Cursor plugin: fix
displayTime(#1589)
- Add
rtloption (#1296) - Fix peaks rendering issue on zooming and scrolling multicanvas (#1570)
- Add
durationoption to specify an explicit audio length (#1441) - Spectrogram plugin: fix event listener removal (#1571)
- Regions plugin: display regions before file load using
durationoption (#1441) - Build: switch to terser-webpack-plugin for minifying
- Fix removeOnAudioProcess for Safari (#1215, #1367, #1398)
- Fix computing peaks when buffer is not set (#1530)
- Cursor plugin: fix displayed time (#1543)
- Cursor plugin: document new params (#1516)
- Add syntax highlighting in examples (#1522)
- Fix order of arguments for PluginClass.constructor (#1472)
- Microphone plugin: Safari support (#1377)
- Minimap plugin: fix styling issues and add support for zooming (#1464)
- Timeline plugin: add duration parameter handling (#1491)
- Cursor plugin: add showTime option (#1143)
- Fix: progress bar did not reach 100% when audio file is small (#1502)
- Add wavesurfer.js logo, created by @entonbiba (#1409)
- Library version number is now available as
WaveSurfer.VERSION(#1430) - Fix
setSinkIdthat used deprecated API (#1428) - Set
isReadyattribute to false when emptying wavesufer (#1396, #1403) - Microphone plugin: make it work in MS Edge browser (#627)
- Timeline plugin: display more tick marks as the user zooms in closely (#1455)
- Cursor plugin: fix
destroy(#1435)
- Build library using webpack 4 (#1376)
- Add
audioScriptProcessoroption to use custom script processor node (#1389) - Added
muteandvolumeevents (#1345)
- Fix
util.ajaxon iteratingrequestHeaders(#1329) - Add version information to distributed files (#1330)
- Regions plugin: prevent click when creating / updating region (#1295)
- Add
wavesurfer.isReadymethod (#1333)
- Added
xhroption to configure util.ajax for authorization (#1310, #1038, #1100) - Fix
setCurrentTimemethod (#1292) - Fix
getScrollXmethod: Check bounds whenscrollParent: true(#1312) - Minimap plugin: fix initial load, canvas click did not work (#1265)
- Regions plugin: fix dragging a region utside of scrollbar (#430)
- Added support for selecting different audio output devices using
setSinkId(#1293) - Replace deprecated playbackRate.value setter (#1302)
- Play method now properly returns a Promise (#1229)
- Added
barGapparameter to set the space between bars (#1058) - Replace deprecated gain.value setter (#1277)
- MediaElement backend: Update progress on pause events (#1267)
- Restore missing MediaSession plugin (#1286)
- Core library and the plugins were refactored to be modular so it can be used with a module bundler
- Code updated to ES6/ES7 syntax and is transpiled with babel and webpack
- New plugin API
MultiCanvasrenderer is now the default- Added getters and setters for height and color options (#1145)
- Introduce an option to prevent removing media element on destroy (#1163)
- Added duration parameter for the load function (#1239)
- New soundtouch.js filter to preserve pitch when changing tempo (#149)
- Add
getPlaybackRatemethod (#1022) - Switched to BSD license (#1060)
- Added
setCurrentTimemethod - Added
util.debounce(#993)
- Fix a problem of Web Audio not playing in Safari on initial load (#749)
- Add a 'waveform-ready' event, triggered when waveform is drawn with MediaElement backend (#736)
- Add a 'preload' parameter to load function to choose the preload HTML5 audio attribute value if MediaElement backend is choosen (#854)
- Deterministic way to mute and unmute a track (#841)
- Replace jasmine with karma / jasmine test suite (#849)
- Regions plugin: fix a bug when clicking on scroll-bar in Firefox (#851)
- Added changelog (#824)
- Correct AMD module name for plugins (#831)
- Fix to remove small gaps between regions (#834)