From 06128c9d42060b7513fb5490982e7f42b0ee596b Mon Sep 17 00:00:00 2001 From: Florrie Date: Thu, 9 Jul 2020 17:07:41 -0300 Subject: add seekTo player function --- players.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'players.js') 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) } -- cgit 1.3.0-6-gf8a5