@lls/lls-audio 0.0.86 → 0.0.88

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.86",
3
+ "version": "0.0.88",
4
4
  "main": "index.js",
5
5
  "devDependencies": {
6
6
  "@kadira/storybook": "2.21.0",
@@ -16,8 +16,8 @@
16
16
  "conventional-changelog-cli": "1.2.0",
17
17
  "css-loader": "0.26.1",
18
18
  "file-saver": "1.3.3",
19
- "react": "15.3.1",
20
- "react-dom": "15.3.1",
19
+ "react": "15.6.2",
20
+ "react-dom": "15.6.2",
21
21
  "release-it": "2.4.0",
22
22
  "style-loader": "0.13.1",
23
23
  "superheroes": "1.0.0"
package/player/Audio.js CHANGED
@@ -31,11 +31,19 @@ var Player = function (_Component) {
31
31
  _this.requestAnimationId = null;
32
32
 
33
33
  _this.play = function () {
34
- return _this.refs.player.play();
34
+ try {
35
+ _this.refs.player.play();
36
+ } catch (e) {
37
+ // On tablet play needs to be triggered with a hand gesture
38
+ }
35
39
  };
36
40
 
37
41
  _this.pause = function () {
38
- return _this.refs.player.pause();
42
+ try {
43
+ _this.refs.player.pause();
44
+ } catch (e) {
45
+ // On tablet play needs to be triggered with a hand gesture
46
+ }
39
47
  };
40
48
 
41
49
  _this.setLoop = function () {
@@ -63,6 +71,14 @@ var Player = function (_Component) {
63
71
  return _this.refs.player.currentTime = time;
64
72
  };
65
73
 
74
+ _this.setVolume = function () {
75
+ var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 100;
76
+
77
+ var volume = Math.min(value, 100);
78
+ _this.refs.player.volume = volume / 100;
79
+ _this.setStateWithCallback({ volume: volume });
80
+ };
81
+
66
82
  _this.onAudioUpdate = function () {
67
83
  return _this.setStateWithCallback({ currentTime: _this.getCurrentTime() });
68
84
  };
@@ -147,15 +163,6 @@ var Player = function (_Component) {
147
163
 
148
164
  // Controls
149
165
 
150
- }, {
151
- key: 'setVolume',
152
- value: function setVolume() {
153
- var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 100;
154
-
155
- var volume = Math.min(value, 100);
156
- this.refs.player.volume = volume / 100;
157
- this.setStateWithCallback({ volume: volume });
158
- }
159
166
  }, {
160
167
  key: 'componentWillReceiveProps',
161
168
  value: function componentWillReceiveProps(newProps) {
package/player/index.js CHANGED
@@ -228,7 +228,6 @@ var Player = function (_Component) {
228
228
  this.refs.audio.play();
229
229
  } catch (e) {
230
230
  // On tablet play needs to be triggered with a hand gesture
231
- console.log("e", e);
232
231
  }
233
232
  }
234
233
  }, {
@@ -238,7 +237,6 @@ var Player = function (_Component) {
238
237
  this.refs.audio.pause();
239
238
  } catch (e) {
240
239
  // On tablet play needs to be triggered with a hand gesture
241
- console.log("e", e);
242
240
  }
243
241
  }
244
242
  }, {