diff options
author | Florrie <towerofnix@gmail.com> | 2017-09-02 13:04:17 -0300 |
---|---|---|
committer | Florrie <towerofnix@gmail.com> | 2017-09-02 13:04:17 -0300 |
commit | 8d9cd7b216dafa8a18e481c31b6f2ec9af6faaab (patch) | |
tree | 354e29d8b51d26cbe1fe2eccea428957ee981a90 /src/play.js | |
parent | 3c3084aab308685f03a0546f9e46d143106283a6 (diff) |
Skip back/forwards
Diffstat (limited to 'src/play.js')
-rwxr-xr-x | src/play.js | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/play.js b/src/play.js index c955ce8..db83f13 100755 --- a/src/play.js +++ b/src/play.js @@ -397,15 +397,14 @@ async function main(args) { player.seekBack(30) } - if (esc(0x41).equals(data)) { - player.volUp(10) - } + if (esc(0x41).equals(data) || equalsChar('p')) { // Previous + clearConsoleLine() + console.log("Skipping backwards. (Press I for track info!") - if (esc(0x42).equals(data)) { - player.volDown(10) + playController.skipBack() } - if (equalsChar('s')) { + if (esc(0x42).equals(data) || equalsChar('s')) { // Skip clearConsoleLine() console.log( "Skipping the track that's currently playing. " + @@ -415,6 +414,14 @@ async function main(args) { playController.skip() } + if (shiftEsc(0x41).equals(data)) { + player.volUp(10) + } + + if (shiftEsc(0x42).equals(data)) { + player.volDown(10) + } + if (Buffer.from([0x7f]).equals(data)) { clearConsoleLine() console.log("Skipping the track that's up next.") |