websocket send canvas to server
<canvas id="clientCanvas" style="position: absolute; top: 0px; left: 0px;" width="1563" height="528">
function onMouseMove (e) {
var canvas = document.getElementById('clientCanvas');
var ctx = canvas.getContext("2d");
var imageData = canvas.toDataURL("image/png");
socket.emit('SS_onMouseMove', {imageData: imageData});
};
本文链接地址:https://const.net.cn/793.html