We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 830869d commit 1bd3401Copy full SHA for 1bd3401
README.md
@@ -147,18 +147,21 @@ var id2 = sound.play();
147
sound.fade(1, 0, 1000, id1);
148
sound.rate(1.5, id2);
149
```
150
+
151
##### ES6:
-```js
152
-//import
153
-import { Howl } from 'howler';
+```javascript
+import {Howl, Howler} from 'howler';
154
155
-//assuming you have the file in the relative path
156
-const warnSound = new Howl({
157
- src: ['assets/tink.wav']
+// Setup the new Howl.
+const sound = new Howl({
+ src: ['sound.webm', 'sound.mp3']
158
});
159
160
-//play
161
-warnSound.play();
+// Play the sound.
+sound.play();
162
163
+// Change global volume.
164
+Howler.volume(0.5);
165
166
167
0 commit comments