Libraries - Javascript

Socket.io


  • var =require("socket.io")
  • var.on("connection", socket => {statement}
  • socket.on("function", variable => {statement}
  • [socket.id]
  • socket.broadcast.emit()
  • var1 = var("http://localhost:8000")
  • var = new Audio("filename.mp3")

Canvas


  • Take a Picture of a Frame
        const canvas = document.createElement("canvas");
        canvas.width = var.width;
        canvas.height = var.height;
        canvas.getContext("2d").drawImage(var, 0, 0, var.width, var.height)
    
Share: