Skip to content
This repository has been archived by the owner on May 26, 2018. It is now read-only.

Commit

Permalink
change volume with keystrokes (#796)
Browse files Browse the repository at this point in the history
- fixes #397
  • Loading branch information
Dave Justice committed May 3, 2017
1 parent 59b9a2a commit a00902d
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions components/sound-control.js
Expand Up @@ -19,6 +19,24 @@ module.exports = class SoundControl extends React.Component {
if (window.AppData.muted) this.unmute();
else this.mute();
});

keyboardJS.bind('up', ev => {
if (window.AppData.muted) this.unmute();
this.setVolume({
target: {
value: window.AppData.volume + .05
}
});
});

keyboardJS.bind('down', ev => {
if (window.AppData.muted) return;
else this.setVolume({
target: {
value: window.AppData.volume - .05
}
});
});
}

enterSound() {
Expand Down

0 comments on commit a00902d

Please sign in to comment.