asd
This commit is contained in:
parent
7629d6c5ce
commit
2dfa0e9662
16
index.js
16
index.js
@ -11,13 +11,15 @@ var activeFile = undefined;
|
|||||||
io.on("connection", (socket)=>{
|
io.on("connection", (socket)=>{
|
||||||
console.log("client connected:", socket.client.id);
|
console.log("client connected:", socket.client.id);
|
||||||
socket.on("play", (data)=>{
|
socket.on("play", (data)=>{
|
||||||
console.log("Play", data);
|
player.stop(()=>{
|
||||||
activeFile = data.file;
|
console.log("Play", data);
|
||||||
player.loadFile(__dirname + "/files/" + data.file, ()=>{
|
activeFile = data.file;
|
||||||
player.play(()=>{
|
player.loadFile(__dirname + "/files/" + data.file, ()=>{
|
||||||
Update.start();
|
player.play(()=>{
|
||||||
console.log("playing");
|
Update.start();
|
||||||
socket.emit("playing", {file: data.file});
|
console.log("playing");
|
||||||
|
socket.emit("playing", {file: data.file});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user