mirror of
https://github.com/0015/ThatProject.git
synced 2026-01-12 17:27:43 +03:00
Make ESP32CAM Projects Folder
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Client</title>
|
||||
</head>
|
||||
<body>
|
||||
<img src="">
|
||||
<script>
|
||||
const img = document.querySelector('img');
|
||||
const WS_URL = 'ws:///34.94.20.38:65080';
|
||||
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>
|
||||
Reference in New Issue
Block a user