From e3201694650efb1be32b7e5cd39e567631cf3279 Mon Sep 17 00:00:00 2001 From: Fabian Stamm Date: Tue, 20 Jun 2017 14:34:21 +0200 Subject: [PATCH] small improvements --- index.js | 1 + vlc_rc.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 62f2a5d..74da555 100755 --- a/index.js +++ b/index.js @@ -16,6 +16,7 @@ io.on("connection", (socket)=>{ player.loadFile(__dirname + "/files/" + data.file, ()=>{ player.play(()=>{ Update.start(); + console.log("playing"); socket.emit("playing", {file: data.file}); }); }); diff --git a/vlc_rc.js b/vlc_rc.js index 537cc77..15e851a 100644 --- a/vlc_rc.js +++ b/vlc_rc.js @@ -117,6 +117,7 @@ class VLC_RC { } else { this.startTime = new Date().getTime(); } + callback(); }); } @@ -127,7 +128,7 @@ class VLC_RC { var difr = Math.floor(dif/1000); if(difr != data){ this.startTime = new Date().getTime() - data*1000; - return callback(data); + return callback(data * 1000); } return callback(dif); });