Skip to content

Commit 95354dd

Browse files
author
Em01
committed
Howler
1 parent d93e999 commit 95354dd

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

howler/howler.js

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
//Howler loads the first sound file compatible with the browser. Stored in src array.
2+
<!DOCTYPE html>
3+
<html>
4+
<head>
5+
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/howler/2.0.0/howler.core.min.js">
6+
7+
var sound = new Howl({
8+
urls: ['sound.mp3']
9+
});
10+
11+
var soundTwo = new Howl({
12+
urls: ['soundTwo.mp3']
13+
});
14+
15+
function onKeyDown(event){
16+
sound.play();
17+
};
18+
19+
function onKeyUp(event){
20+
soundTwo.play();
21+
}
22+
</script>
23+
</head>
24+
</html>
25+

0 commit comments

Comments
 (0)