Skip to content

Commit dd0d96f

Browse files
committed
better audio playback, animation tweak
1 parent 294c4c9 commit dd0d96f

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

public/sup.css

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ html, body{
1010
height: 100%;
1111
display: table;
1212
background-color: black;
13-
-webkit-transition: .2s linear background-color;
13+
-webkit-transition: .1s linear background-color;
1414
}
1515

1616
h1{
@@ -20,7 +20,7 @@ h1{
2020
font-weight: normal;
2121
font-family: 'Yanone Kaffeesatz', 'Helvetica', sans-serif;
2222
color: rgba(255, 255, 255, .1);
23-
-webkit-transition: .2s linear color;
23+
-webkit-transition: .1s linear color;
2424
text-align: center;
2525
}
2626

public/sup.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,13 @@ var highlight = function(){
2424
};
2525

2626
var playSound = function(){
27-
$audio.play();
27+
if($audio.paused)
28+
$audio.play();
29+
else{
30+
$audio.pause();
31+
$audio.currentTime = 0;
32+
$audio.play();
33+
}
2834
};
2935

3036
socket.on('sup', function(){

0 commit comments

Comments
 (0)