small improvements

This commit is contained in:
Fabian Stamm 2017-06-20 14:34:21 +02:00
parent ab3878ce00
commit e320169465
2 changed files with 3 additions and 1 deletions

View File

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

View File

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