From d00b26b23d9b3fc1e54a4d117366f0f22e664135 Mon Sep 17 00:00:00 2001 From: Florrie Date: Fri, 10 Jul 2020 20:52:13 -0300 Subject: basic command relay across socket clients --- players.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'players.js') diff --git a/players.js b/players.js index 6624f0f..2056ed7 100644 --- a/players.js +++ b/players.js @@ -224,13 +224,15 @@ module.exports.ControllableMPVPlayer = class extends module.exports.MPVPlayer { } setPause(val) { - this.isPaused = !!val - this.sendCommand('set', 'pause', this.isPaused) + if (!!val !== this.isPaused) { + this.togglePause() + } } setLoop(val) { - this.isLooping = !!val - this.sendCommand('set', 'loop', this.isLooping) + if (!!val !== this.isLooping) { + this.toggleLoop() + } } async kill() { -- cgit 1.3.0-6-gf8a5