« get me outta code hell

mtui - Music Text User Interface - user-friendly command line music player
about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--players.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/players.js b/players.js
index 5fe4714..6624f0f 100644
--- a/players.js
+++ b/players.js
@@ -40,6 +40,7 @@ class Player extends EventEmitter {
   playFile(file) {}
   seekAhead(secs) {}
   seekBack(secs) {}
+  seekTo(timeInSecs) {}
   volUp(amount) {}
   volDown(amount) {}
   setVolume(value) {}
@@ -189,6 +190,10 @@ module.exports.ControllableMPVPlayer = class extends module.exports.MPVPlayer {
     this.sendCommand('seek', -secs)
   }
 
+  seekTo(timeInSecs) {
+    this.sendCommand('seek', timeInSecs, 'absolute')
+  }
+
   volUp(amount) {
     this.setVolume(this.volume + amount)
   }