diff options
author | Florrie <towerofnix@gmail.com> | 2020-07-09 17:07:41 -0300 |
---|---|---|
committer | Florrie <towerofnix@gmail.com> | 2020-07-09 17:10:47 -0300 |
commit | 06128c9d42060b7513fb5490982e7f42b0ee596b (patch) | |
tree | 3a74e52eae2db9000bc606cc3ed1aaa0e8d08651 | |
parent | befceed00ce677befe0ae9fa5122390e391207d4 (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) } |