<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://codereview.stackexchange.com/questions/116816/pass-canvas-content-from-client-to-admin-using-web-socket

本文链接地址:https://const.net.cn/793.html

标签: none

添加新评论