@checksub_team/peaks_timeline 1.12.0 → 1.12.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checksub_team/peaks_timeline",
3
- "version": "1.12.0",
3
+ "version": "1.12.1",
4
4
  "description": "JavaScript UI component for displaying audio waveforms",
5
5
  "main": "./peaks.js",
6
6
  "types": "./peaks.js.d.ts",
package/peaks.js CHANGED
@@ -18691,10 +18691,12 @@ module.exports = function (Utils) {
18691
18691
  throw new RangeError('peaks.sources.' + context + ': volumeRange[0] should be less than volumeRange[1]');
18692
18692
  }
18693
18693
  }
18694
- if (!Utils.isNullOrUndefined(options.volume) && !Utils.isNumber(options.volume)) {
18695
- throw new TypeError('peaks.sources.' + context + ': volume must be a number');
18696
- } else if (!Utils.isNullOrUndefined(options.volumeRange)) {
18697
- options.volume = Utils.clamp(options.volume, options.volumeRange[0], options.volumeRange[1]);
18694
+ if (!Utils.isNullOrUndefined(options.volume)) {
18695
+ if (!Utils.isNumber(options.volume)) {
18696
+ throw new TypeError('peaks.sources.' + context + ': volume must be a number');
18697
+ } else {
18698
+ options.volume = Utils.clamp(options.volume, options.volumeRange[0], options.volumeRange[1]);
18699
+ }
18698
18700
  }
18699
18701
  }
18700
18702
  function Source(peaks, id, originId, elementId, title, url, previewUrl, binaryUrl, kind, subkind, duration, startTime, endTime, mediaStartTime, mediaEndTime, color, backgroundColor, borderColor, selectedColor, volumeSliderColor, volumeSliderWidth, volumeSliderDraggingWidth, textFont, textFontSize, textColor, textBackgroundColor, textPosition, textAutoScroll, borderWidth, borderRadius, wrapped, position, draggable, orderable, resizable, cuttable, deletable, wrapping, previewHeight, binaryHeight, indicators, markers, markerColor, markerWidth, volume, volumeRange) {
package/src/source.js CHANGED
@@ -304,11 +304,13 @@ define([
304
304
  }
305
305
  }
306
306
 
307
- if (!Utils.isNullOrUndefined(options.volume) && !Utils.isNumber(options.volume)) {
308
- throw new TypeError('peaks.sources.' + context + ': volume must be a number');
309
- }
310
- else if (!Utils.isNullOrUndefined(options.volumeRange)) {
311
- options.volume = Utils.clamp(options.volume, options.volumeRange[0], options.volumeRange[1]);
307
+ if (!Utils.isNullOrUndefined(options.volume)) {
308
+ if (!Utils.isNumber(options.volume)) {
309
+ throw new TypeError('peaks.sources.' + context + ': volume must be a number');
310
+ }
311
+ else {
312
+ options.volume = Utils.clamp(options.volume, options.volumeRange[0], options.volumeRange[1]);
313
+ }
312
314
  }
313
315
  }
314
316