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