@checksub_team/peaks_timeline 1.4.24 → 1.4.25

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.4.24",
3
+ "version": "1.4.25",
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
@@ -18077,8 +18077,11 @@ module.exports = function (Utils) {
18077
18077
  } else if (options.wrapping === 'complete') {
18078
18078
  options.wrapped = false;
18079
18079
  }
18080
+ if (!Utils.isNullOrUndefined(options.tts) && !Utils.isBoolean(options.tts)) {
18081
+ throw new TypeError('peaks.sources.' + context + ': tts must be a boolean or undefined');
18082
+ }
18080
18083
  }
18081
- function Source(peaks, id, originId, elementId, title, url, previewUrl, binaryUrl, kind, duration, startTime, endTime, mediaStartTime, mediaEndTime, color, borderColor, selectedColor, textColor, borderWidth, wrapped, position, draggable, resizable, wrapping, previewHeight, binaryHeight) {
18084
+ function Source(peaks, id, originId, elementId, title, url, previewUrl, binaryUrl, kind, duration, startTime, endTime, mediaStartTime, mediaEndTime, color, borderColor, selectedColor, textColor, borderWidth, wrapped, position, draggable, resizable, wrapping, previewHeight, binaryHeight, tts) {
18082
18085
  var opts = {
18083
18086
  title: title,
18084
18087
  url: url,
@@ -18101,7 +18104,8 @@ module.exports = function (Utils) {
18101
18104
  resizable: resizable,
18102
18105
  wrapping: wrapping,
18103
18106
  previewHeight: previewHeight,
18104
- binaryHeight: binaryHeight
18107
+ binaryHeight: binaryHeight,
18108
+ tts: tts
18105
18109
  };
18106
18110
  validateSource(peaks, opts, 'add()');
18107
18111
  this._peaks = peaks;
@@ -18131,6 +18135,7 @@ module.exports = function (Utils) {
18131
18135
  this._previewHeight = opts.previewHeight;
18132
18136
  this._binaryHeight = opts.binaryHeight;
18133
18137
  this._minSize = peaks.options.minSourceSize;
18138
+ this._tts = opts.tts;
18134
18139
  }
18135
18140
  Object.defineProperties(Source.prototype, {
18136
18141
  id: {
@@ -18336,6 +18341,14 @@ module.exports = function (Utils) {
18336
18341
  get: function () {
18337
18342
  return this._minSize;
18338
18343
  }
18344
+ },
18345
+ tts: {
18346
+ get: function () {
18347
+ return this._tts;
18348
+ },
18349
+ set: function (tts) {
18350
+ this._tts = tts;
18351
+ }
18339
18352
  }
18340
18353
  });
18341
18354
  Source.prototype.updateTimes = function (newStartTime, newEndTime) {
@@ -18445,7 +18458,8 @@ module.exports = function (Utils) {
18445
18458
  resizable: this.resizable,
18446
18459
  wrapping: this.wrapping,
18447
18460
  previewHeight: this.previewHeight,
18448
- binaryHeight: this.binaryHeight
18461
+ binaryHeight: this.binaryHeight,
18462
+ tts: this._tts
18449
18463
  };
18450
18464
  Utils.extend(opts, options);
18451
18465
  validateSource(this._peaks, opts, 'update()');
@@ -18471,6 +18485,7 @@ module.exports = function (Utils) {
18471
18485
  this._wrapping = opts.wrapping;
18472
18486
  this._previewHeight = opts.previewHeight;
18473
18487
  this._binaryHeight = opts.binaryHeight;
18488
+ this._tts = opts.tts;
18474
18489
  this._peaks.emit('source.update', this);
18475
18490
  };
18476
18491
  Source.prototype.isVisible = function (startTime, endTime) {
@@ -19135,7 +19150,8 @@ module.exports = function (Source, Utils) {
19135
19150
  resizable: sourceToCut.resizable,
19136
19151
  wrapping: sourceToCut.wrapping,
19137
19152
  previewHeight: sourceToCut.previewHeight,
19138
- binaryHeight: sourceToCut.binaryHeight
19153
+ binaryHeight: sourceToCut.binaryHeight,
19154
+ tts: sourceToCut.tts
19139
19155
  }]);
19140
19156
  this._peaks.emit('sources.updated');
19141
19157
  };
@@ -19150,7 +19166,7 @@ module.exports = function (Source, Utils) {
19150
19166
  if (!Utils.isObject(options)) {
19151
19167
  throw new TypeError('peaks.sources.add(): expected a Source object parameter');
19152
19168
  }
19153
- var source = new Source(this._peaks, options.id || this._getNextSourceId(), options.originId, options.elementId, options.title, options.url, options.previewUrl, options.binaryUrl, options.kind, options.duration, options.startTime, options.endTime, options.mediaStartTime, options.mediaEndTime, options.color, options.borderColor, options.selectedColor, options.textColor, options.borderWidth, options.wrapped, options.position, options.draggable, options.resizable, options.wrapping, options.previewHeight, options.binaryHeight);
19169
+ var source = new Source(this._peaks, options.id || this._getNextSourceId(), options.originId, options.elementId, options.title, options.url, options.previewUrl, options.binaryUrl, options.kind, options.duration, options.startTime, options.endTime, options.mediaStartTime, options.mediaEndTime, options.color, options.borderColor, options.selectedColor, options.textColor, options.borderWidth, options.wrapped, options.position, options.draggable, options.resizable, options.wrapping, options.previewHeight, options.binaryHeight, options.tts);
19154
19170
  return source;
19155
19171
  };
19156
19172
  TimelineSources.prototype.getSources = function () {
package/src/source.js CHANGED
@@ -197,6 +197,10 @@ define([
197
197
  else if (options.wrapping === 'complete') {
198
198
  options.wrapped = false;
199
199
  }
200
+
201
+ if (!Utils.isNullOrUndefined(options.tts) && !Utils.isBoolean(options.tts)) {
202
+ throw new TypeError('peaks.sources.' + context + ': tts must be a boolean or undefined');
203
+ }
200
204
  }
201
205
 
202
206
  /**
@@ -222,7 +226,7 @@ define([
222
226
  function Source(peaks, id, originId, elementId, title, url, previewUrl, binaryUrl, kind,
223
227
  duration, startTime, endTime, mediaStartTime, mediaEndTime, color, borderColor,
224
228
  selectedColor, textColor, borderWidth, wrapped, position, draggable, resizable, wrapping,
225
- previewHeight, binaryHeight) {
229
+ previewHeight, binaryHeight, tts) {
226
230
  var opts = {
227
231
  title: title,
228
232
  url: url,
@@ -245,7 +249,8 @@ define([
245
249
  resizable: resizable,
246
250
  wrapping: wrapping,
247
251
  previewHeight: previewHeight,
248
- binaryHeight: binaryHeight
252
+ binaryHeight: binaryHeight,
253
+ tts: tts
249
254
  };
250
255
 
251
256
  validateSource(peaks, opts, 'add()');
@@ -277,6 +282,7 @@ define([
277
282
  this._previewHeight = opts.previewHeight;
278
283
  this._binaryHeight = opts.binaryHeight;
279
284
  this._minSize = peaks.options.minSourceSize;
285
+ this._tts = opts.tts;
280
286
  }
281
287
 
282
288
  Object.defineProperties(Source.prototype, {
@@ -497,6 +503,15 @@ define([
497
503
  get: function() {
498
504
  return this._minSize;
499
505
  }
506
+ },
507
+ tts: {
508
+ get: function() {
509
+ return this._tts;
510
+ },
511
+
512
+ set: function(tts) {
513
+ this._tts = tts;
514
+ }
500
515
  }
501
516
  });
502
517
 
@@ -638,7 +653,8 @@ define([
638
653
  resizable: this.resizable,
639
654
  wrapping: this.wrapping,
640
655
  previewHeight: this.previewHeight,
641
- binaryHeight: this.binaryHeight
656
+ binaryHeight: this.binaryHeight,
657
+ tts: this._tts
642
658
  };
643
659
 
644
660
  Utils.extend(opts, options);
@@ -667,6 +683,7 @@ define([
667
683
  this._wrapping = opts.wrapping;
668
684
  this._previewHeight = opts.previewHeight;
669
685
  this._binaryHeight = opts.binaryHeight;
686
+ this._tts = opts.tts;
670
687
 
671
688
  this._peaks.emit('source.update', this);
672
689
  };
@@ -87,7 +87,8 @@ define([
87
87
  resizable: sourceToCut.resizable,
88
88
  wrapping: sourceToCut.wrapping,
89
89
  previewHeight: sourceToCut.previewHeight,
90
- binaryHeight: sourceToCut.binaryHeight
90
+ binaryHeight: sourceToCut.binaryHeight,
91
+ tts: sourceToCut.tts
91
92
  }]);
92
93
 
93
94
  this._peaks.emit('sources.updated');
@@ -159,7 +160,8 @@ define([
159
160
  options.resizable,
160
161
  options.wrapping,
161
162
  options.previewHeight,
162
- options.binaryHeight
163
+ options.binaryHeight,
164
+ options.tts
163
165
  );
164
166
 
165
167
  return source;