Spaces:
Build error
Build error
File size: 1,085 Bytes
35caa0d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Android Emulator</title>
<style>
body {
font-family: sans-serif;
text-align: center;
background-color: #f4f4f4;
margin: 0;
padding: 20px;
}
#emulator-container {
width: 360px;
height: 640px;
margin: 20px auto;
border: 1px solid #ccc;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
iframe {
width: 100%;
height: 100%;
border: none;
}
</style>
</head>
<body>
<h1>Android Emulator in Browser</h1>
<div id="emulator-container">
<iframe src="vnc.html"></iframe>
</div>
<script>
const ws = new WebSocket(`wss://${window.location.host}/ws`);
ws.onmessage = (event) => {
console.log("WebSocket message:", event.data);
};
ws.onerror = (e) => {
console.error("WebSocket error:", e);
};
ws.onclose = () => {
console.warn("WebSocket connection closed.");
};
</script>
</body>
</html>
|