@lls/lls-audio 0.0.8 → 0.0.10
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 +1 -1
- package/player/Audio.js +4 -0
- package/player/index.js +9 -1
package/package.json
CHANGED
package/player/Audio.js
CHANGED
|
@@ -45,6 +45,10 @@ var Player = function (_Component) {
|
|
|
45
45
|
return _this.setStateWithCallback({ currentRange: currentRange }, _this.onAudioUpdate);
|
|
46
46
|
};
|
|
47
47
|
|
|
48
|
+
_this.getCurrentRange = function () {
|
|
49
|
+
return _this.state.currentRange;
|
|
50
|
+
};
|
|
51
|
+
|
|
48
52
|
_this.setSpeed = function () {
|
|
49
53
|
var speed = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
50
54
|
|
package/player/index.js
CHANGED
|
@@ -76,6 +76,14 @@ var Player = function (_Component) {
|
|
|
76
76
|
|
|
77
77
|
var _this = _possibleConstructorReturn(this, (Player.__proto__ || Object.getPrototypeOf(Player)).call(this));
|
|
78
78
|
|
|
79
|
+
_this.getCurrentRange = function () {
|
|
80
|
+
return _this.refs.audio.getCurrentRange();
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
_this.setRange = function (range) {
|
|
84
|
+
return _this.refs.audio.setRange(range);
|
|
85
|
+
};
|
|
86
|
+
|
|
79
87
|
_this.state = { waveform: false, loading: true, containerWidth: 0 };
|
|
80
88
|
_this.setContainerWidth = (0, _utils.debounce)(_this.setContainerWidth.bind(_this), 500);
|
|
81
89
|
_this.onKeyPress = _this.onKeyPress.bind(_this);
|
|
@@ -159,7 +167,7 @@ var Player = function (_Component) {
|
|
|
159
167
|
|
|
160
168
|
return _react2.default.createElement(
|
|
161
169
|
'div',
|
|
162
|
-
{ className: (0, _noImportant.css)(styles.player) },
|
|
170
|
+
{ className: 'Audio_player ' + (0, _noImportant.css)(styles.player) },
|
|
163
171
|
_react2.default.createElement(
|
|
164
172
|
'div',
|
|
165
173
|
{ className: (0, _noImportant.css)(styles.play_and_stop), onClick: function onClick() {
|