Make ESP32CAM Projects Folder

This commit is contained in:
Eric
2021-04-21 14:41:19 -07:00
parent 2e2ad3e223
commit b4fc0b2710
328 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
<html>
<head>
<title>Client</title>
</head>
<body>
<img src="">
<script>
const img = document.querySelector('img');
const WS_URL = 'ws:///192.168.1.220:8888';
const ws = new WebSocket(WS_URL);
let urlObject;
ws.onopen = () => console.log(`Connected to ${WS_URL}`);
ws.onmessage = message => {
const arrayBuffer = message.data;
if(urlObject){
URL.revokeObjectURL(urlObject);
}
urlObject = URL.createObjectURL(new Blob([arrayBuffer]));
img.src = urlObject;
}
</script>
</body>
</html>