@lls/lls-audio 0.0.45 → 0.0.47
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 -4
- package/stories/player.js +1 -1
package/package.json
CHANGED
package/player/Audio.js
CHANGED
|
@@ -79,6 +79,7 @@ var Player = function (_Component) {
|
|
|
79
79
|
};
|
|
80
80
|
|
|
81
81
|
_this.onPlay = function () {
|
|
82
|
+
cancelAnimationFrame(_this.requestAnimationId);
|
|
82
83
|
var _this$state$currentRa = _this.state.currentRange,
|
|
83
84
|
startTime = _this$state$currentRa.startTime,
|
|
84
85
|
endTime = _this$state$currentRa.endTime;
|
|
@@ -91,9 +92,7 @@ var Player = function (_Component) {
|
|
|
91
92
|
};
|
|
92
93
|
|
|
93
94
|
_this.onPause = function () {
|
|
94
|
-
_this.setStateWithCallback({ play: false }
|
|
95
|
-
return cancelAnimationFrame(_this.requestAnimationId);
|
|
96
|
-
});
|
|
95
|
+
_this.setStateWithCallback({ play: false });
|
|
97
96
|
};
|
|
98
97
|
|
|
99
98
|
_this.onEnded = function () {
|
|
@@ -207,10 +206,11 @@ var Player = function (_Component) {
|
|
|
207
206
|
}, {
|
|
208
207
|
key: 'onDurationChange',
|
|
209
208
|
value: function onDurationChange() {
|
|
209
|
+
var autoPlay = this.props.autoPlay;
|
|
210
210
|
var duration = this.refs.player.duration;
|
|
211
211
|
|
|
212
212
|
this.setStateWithCallback({
|
|
213
|
-
play:
|
|
213
|
+
play: autoPlay,
|
|
214
214
|
currentTime: 0,
|
|
215
215
|
duration: duration,
|
|
216
216
|
currentRange: { startTime: 0, endTime: duration }
|
package/stories/player.js
CHANGED
|
@@ -96,7 +96,7 @@ var PlayerExample = function (_Component) {
|
|
|
96
96
|
'http://lls-media-public.s3.amazonaws.com/upload/LeLivreScolaire/p15vcjbl4lvpl9l7g8ov8ammh1.mp3'
|
|
97
97
|
)
|
|
98
98
|
),
|
|
99
|
-
_react2.default.createElement(_player2.default, { id:
|
|
99
|
+
_react2.default.createElement(_player2.default, { id: this.state.url, title: 'Audio: un audio de la BBC', on: cb, autoPlay: autoPlay, src: this.state.url, ranges: ranges, visible: true, caption: caption })
|
|
100
100
|
);
|
|
101
101
|
}
|
|
102
102
|
}]);
|