« get me outta code hell

Stop music - mtui - Music Text User Interface - user-friendly command line music player
about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlorrie <towerofnix@gmail.com>2018-12-22 14:07:15 -0400
committerFlorrie <towerofnix@gmail.com>2018-12-22 14:07:15 -0400
commit62fe616bc831f2be61743f054e38d5e8ae62c202 (patch)
tree00b836579ea744b87df6bc58c781b8402af10523
parent8d8747e57a3c4c235160002b1e32c71023823786 (diff)
Stop music
-rw-r--r--players.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/players.js b/players.js
index 7810cde..ba2cd29 100644
--- a/players.js
+++ b/players.js
@@ -106,6 +106,11 @@ module.exports.WebPlayer = class extends Player {
       this.audioEl.pause()
     }
   }
+
+  kill() {
+    this.audioEl.currentTime = 0
+    this.audioEl.pause()
+  }
 }
 
 module.exports.MPVPlayer = class extends Player {