small improvements
This commit is contained in:
		
							
								
								
									
										1
									
								
								index.js
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								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});
 | 
			
		||||
         });
 | 
			
		||||
      });
 | 
			
		||||
 | 
			
		||||
@ -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);
 | 
			
		||||
		});
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user