asd
This commit is contained in:
parent
7629d6c5ce
commit
2dfa0e9662
2
index.js
2
index.js
@ -11,6 +11,7 @@ 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)=>{
|
||||||
|
player.stop(()=>{
|
||||||
console.log("Play", data);
|
console.log("Play", data);
|
||||||
activeFile = data.file;
|
activeFile = data.file;
|
||||||
player.loadFile(__dirname + "/files/" + data.file, ()=>{
|
player.loadFile(__dirname + "/files/" + data.file, ()=>{
|
||||||
@ -21,6 +22,7 @@ io.on("connection", (socket)=>{
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
socket.on("stop", (data)=>{
|
socket.on("stop", (data)=>{
|
||||||
player.stop(()=>{
|
player.stop(()=>{
|
||||||
|
Loading…
Reference in New Issue
Block a user