@lls/lls-audio 0.0.54 → 0.0.56

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": "@lls/lls-audio",
3
- "version": "0.0.54",
3
+ "version": "0.0.56",
4
4
  "main": "index.js",
5
5
  "devDependencies": {
6
6
  "@kadira/storybook": "^2.21.0",
@@ -96,11 +96,11 @@ var _initialiseProps = function _initialiseProps() {
96
96
 
97
97
  var maxWidth = _this2.refs.canvas.clientWidth;
98
98
  var maxHeight = _this2.refs.canvas.clientHeight;
99
-
100
99
  // Duration and step calculation
101
100
  var maxDuration = totalTime || waveform.duration;
102
101
 
103
- var levelStep = Math.ceil(waveform.max.length / maxWidth) * RESOLUTION;
102
+ // x3 for optimise wave resolution
103
+ var levelStep = Math.ceil(waveform.max.length / maxWidth * 3);
104
104
 
105
105
  // Range positions
106
106
  //@todo: this range stuff should not be here. Waveform should just be passed an array of colors and ranges
package/player/index.js CHANGED
@@ -267,7 +267,6 @@ var Player = function (_Component) {
267
267
  _currentRange$endTime = currentRange.endTime,
268
268
  endTime = _currentRange$endTime === undefined ? 0 : _currentRange$endTime;
269
269
 
270
-
271
270
  return _react2.default.createElement(
272
271
  'div',
273
272
  { className: 'Audio_player ' + (0, _noImportant.css)(styles.player) + ' ' + className },
@@ -442,7 +441,7 @@ var WaveTimeline = function WaveTimeline(_ref6) {
442
441
  _react2.default.createElement(_reactInputRange2.default, {
443
442
  classNames: fallbackTimelineClassNames,
444
443
  formatLabel: timeConvert,
445
- maxValue: Math.round(duration) || 1,
444
+ maxValue: duration || 1,
446
445
  minValue: 0,
447
446
  onChange: function onChange(c, _ref7) {
448
447
  var min = _ref7.min,
@@ -479,7 +478,7 @@ var Timeline = function Timeline(_ref8) {
479
478
  _react2.default.createElement(_reactInputRange2.default, {
480
479
  classNames: fallbackRangelineClassNames,
481
480
  formatLabel: timeConvert,
482
- maxValue: Math.round(duration) || 1,
481
+ maxValue: duration || 1,
483
482
  minValue: 0,
484
483
  onChange: function onChange(c, _ref9) {
485
484
  var min = _ref9.min,
package/stories/player.js CHANGED
@@ -31,7 +31,7 @@ var PlayerExample = function (_Component) {
31
31
  var _this = _possibleConstructorReturn(this, (PlayerExample.__proto__ || Object.getPrototypeOf(PlayerExample)).call(this, props));
32
32
 
33
33
  _this.state = {
34
- url: 'http://lls-media-public.s3.amazonaws.com/upload/LeLivreScolaire/p15vcjbl4lvpl9l7g8ov8ammh1.mp3'
34
+ url: 'https://lls-media-public-dev.s3-eu-west-1.amazonaws.com/audios_texttospeech/Emma_1182114.mp3'
35
35
  };
36
36
  return _this;
37
37
  }