You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

20 lines
528 B

<!DOCTYPE html>
<html lang="en">
<head>
<title>narenltk</title>
</head>
<body>
<img id="image">
aloha
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/3.1.0/socket.io.js"></script>
<script>
const socket = io.connect('http://localhost:3030');
socket.on('image', (image) => {
// console.log('data', data);
const img = document.getElementById('image');
img.src = `data:image/jpeg;base64,${image}`;
});
</script>
</body>
</html>