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); });