-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathclient-tutorial.js
50 lines (43 loc) · 953 Bytes
/
client-tutorial.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
var sounds = {
earcon: {
identifyblock: new Howl({
src: ['assets/IdentifyBlock.m4a']
}),
selectblock: new Howl({
src: ['assets/SelectBlock.m4a']
}),
identifycategory: new Howl({
src: ['assets/IdentifyCategory.m4a']
}),
selectcategory: new Howl({
src: ['assets/SelectCategory_twonotehigh.m4a']
}),
nestingopening: new Howl({
src: ['assets/nesting-opening-PAN.wav']
}),
nestingclosing: new Howl({
src: ['assets/nesting-closing-PAN.wav']
})
}
};
function play( sound ) {
sounds['earcon'][sound].play();
}
$('#a').click(function() {
play('identifycategory');
});
$('#b').click(function() {
play('identifyblock');
});
$('#c').click(function() {
play('selectcategory');
});
$('#d').click(function() {
play('selectblock');
});
$('#nestopen').click(function() {
play('nestingopening');
})
$('#nestclose').click(function() {
play('nestingclosing');
});