diff options
author | Florrie <towerofnix@gmail.com> | 2020-07-09 17:07:41 -0300 |
---|---|---|
committer | Florrie <towerofnix@gmail.com> | 2020-07-09 17:07:53 -0300 |
commit | 71dd9675e8ceef415eb629895e1abe90eca2e2f0 (patch) | |
tree | 7dd78fb52228c67f8c75679abc87eff944a1aa7d | |
parent | 580f427cbf549bbb3943d85465901a995acebb0f (diff) |
add seekTo player function
-rw-r--r-- | players.js | 5 |
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) } |