wavesurfer.js 6.0.0 → 6.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGES.md +4 -0
- package/dist/plugin/wavesurfer.cursor.js +1 -1
- package/dist/plugin/wavesurfer.cursor.min.js +1 -1
- package/dist/plugin/wavesurfer.elan.js +1 -1
- package/dist/plugin/wavesurfer.elan.min.js +1 -1
- package/dist/plugin/wavesurfer.markers.js +1 -1
- package/dist/plugin/wavesurfer.markers.min.js +1 -1
- package/dist/plugin/wavesurfer.mediasession.js +1 -1
- package/dist/plugin/wavesurfer.mediasession.min.js +1 -1
- package/dist/plugin/wavesurfer.microphone.js +1 -1
- package/dist/plugin/wavesurfer.microphone.min.js +1 -1
- package/dist/plugin/wavesurfer.minimap.js +1 -1
- package/dist/plugin/wavesurfer.minimap.min.js +1 -1
- package/dist/plugin/wavesurfer.playhead.js +1 -1
- package/dist/plugin/wavesurfer.playhead.min.js +1 -1
- package/dist/plugin/wavesurfer.regions.js +1 -1
- package/dist/plugin/wavesurfer.regions.min.js +1 -1
- package/dist/plugin/wavesurfer.spectrogram.js +1 -1
- package/dist/plugin/wavesurfer.spectrogram.min.js +1 -1
- package/dist/plugin/wavesurfer.timeline.js +1 -1
- package/dist/plugin/wavesurfer.timeline.min.js +1 -1
- package/dist/wavesurfer-html-init.js +1 -1
- package/dist/wavesurfer-html-init.min.js +1 -1
- package/dist/wavesurfer.js +4 -4
- package/dist/wavesurfer.js.map +1 -1
- package/dist/wavesurfer.min.js +2 -2
- package/dist/wavesurfer.min.js.map +1 -1
- package/package.json +5 -5
- package/src/drawer.canvasentry.js +1 -1
- package/src/drawer.multicanvas.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wavesurfer.js",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.1",
|
|
4
4
|
"description": "Interactive navigable audio visualization using Web Audio and Canvas",
|
|
5
5
|
"main": "dist/wavesurfer.js",
|
|
6
6
|
"directories": {
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"visualization"
|
|
56
56
|
],
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@babel/core": "^7.17.
|
|
58
|
+
"@babel/core": "^7.17.2",
|
|
59
59
|
"@babel/eslint-parser": "^7.17.0",
|
|
60
60
|
"@babel/plugin-proposal-class-properties": "^7.16.7",
|
|
61
61
|
"@babel/preset-env": "^7.16.11",
|
|
@@ -74,13 +74,13 @@
|
|
|
74
74
|
"esdoc-ecmascript-proposal-plugin": "^1.0.0",
|
|
75
75
|
"esdoc-integrate-test-plugin": "^1.0.0",
|
|
76
76
|
"esdoc-standard-plugin": "^1.0.0",
|
|
77
|
-
"eslint": "^8.
|
|
77
|
+
"eslint": "^8.9.0",
|
|
78
78
|
"htmlhint": "^1.1.2",
|
|
79
79
|
"in-publish": "^2.0.1",
|
|
80
80
|
"jasmine-core": "^4.0.0",
|
|
81
|
-
"karma": "^6.3.
|
|
81
|
+
"karma": "^6.3.16",
|
|
82
82
|
"karma-chrome-launcher": "3.1.0",
|
|
83
|
-
"karma-coverage": "^2.
|
|
83
|
+
"karma-coverage": "^2.2.0",
|
|
84
84
|
"karma-firefox-launcher": "^2.1.2",
|
|
85
85
|
"karma-jasmine": "4.0.1",
|
|
86
86
|
"karma-jasmine-matchers": "5.0.0",
|
|
@@ -165,7 +165,7 @@ export default class CanvasEntry {
|
|
|
165
165
|
* Otherwise, it will be treated as an array, and a canvas gradient will
|
|
166
166
|
* be returned
|
|
167
167
|
*
|
|
168
|
-
* @since
|
|
168
|
+
* @since 6.0.0
|
|
169
169
|
* @param {CanvasRenderingContext2D} ctx Rendering context of target canvas
|
|
170
170
|
* @param {string|string[]} color Fill color for the wave canvas, or an array of colors to apply as a gradient
|
|
171
171
|
* @returns {string|CanvasGradient} Returns a string fillstyle value, or a canvas gradient
|
|
@@ -313,7 +313,7 @@ export default class MultiCanvas extends Drawer {
|
|
|
313
313
|
let peakIndexRange = Math.floor(peakIndex * scale) * peakIndexScale; // start index
|
|
314
314
|
const peakIndexEnd = Math.floor((peakIndex + step) * scale) * peakIndexScale;
|
|
315
315
|
do { // do..while makes sure at least one peak is always evaluated
|
|
316
|
-
const newPeak = peaks[peakIndexRange];
|
|
316
|
+
const newPeak = Math.abs(peaks[peakIndexRange]); // for arrays starting with negative values
|
|
317
317
|
if (newPeak > peak) {
|
|
318
318
|
peak = newPeak; // higher
|
|
319
319
|
}
|