« get me outta code hell

mtui - Music Text User Interface - user-friendly command line music player
about summary refs log tree commit diff
path: root/players.js
diff options
context:
space:
mode:
Diffstat (limited to 'players.js')
-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 {