Spaces:
Build error
Build error
<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> | |