mirror of
https://github.com/xtr-dev/rondevu-client.git
synced 2025-12-10 19:03:24 +00:00
- Add RondevuService: High-level API for username claiming and service publishing with Ed25519 signatures - Add ServiceHost: Manages offer pool for hosting services with auto-replacement - Add ServiceClient: Connects to hosted services with automatic reconnection - Add NoOpSignaler: Placeholder signaler for connection setup - Integrate Ed25519 signature functionality from @noble/ed25519 - Add ESLint and Prettier configuration with 4-space indentation - Add demo with local signaling test - Version bump to 0.10.0 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
281 lines
8.3 KiB
HTML
281 lines
8.3 KiB
HTML
<!doctype html>
|
||
<html lang="en">
|
||
<head>
|
||
<meta charset="UTF-8" />
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||
<title>Rondevu WebRTC Local Test</title>
|
||
<style>
|
||
* {
|
||
box-sizing: border-box;
|
||
margin: 0;
|
||
padding: 0;
|
||
}
|
||
|
||
body {
|
||
font-family:
|
||
-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu,
|
||
Cantarell, sans-serif;
|
||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||
min-height: 100vh;
|
||
padding: 20px;
|
||
}
|
||
|
||
.container {
|
||
max-width: 1400px;
|
||
margin: 0 auto;
|
||
}
|
||
|
||
h1 {
|
||
color: white;
|
||
text-align: center;
|
||
margin-bottom: 30px;
|
||
font-size: 2.5rem;
|
||
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
|
||
}
|
||
|
||
.peers {
|
||
display: grid;
|
||
grid-template-columns: 1fr 1fr;
|
||
gap: 20px;
|
||
}
|
||
|
||
.peer {
|
||
background: white;
|
||
border-radius: 12px;
|
||
padding: 24px;
|
||
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
|
||
}
|
||
|
||
.peer h2 {
|
||
color: #667eea;
|
||
margin-bottom: 20px;
|
||
font-size: 1.5rem;
|
||
border-bottom: 2px solid #667eea;
|
||
padding-bottom: 10px;
|
||
}
|
||
|
||
.status {
|
||
padding: 12px;
|
||
border-radius: 8px;
|
||
margin-bottom: 20px;
|
||
font-weight: 600;
|
||
text-align: center;
|
||
}
|
||
|
||
.status.disconnected {
|
||
background: #fee;
|
||
color: #c33;
|
||
}
|
||
|
||
.status.connecting {
|
||
background: #ffeaa7;
|
||
color: #d63031;
|
||
}
|
||
|
||
.status.connected {
|
||
background: #d4edda;
|
||
color: #155724;
|
||
}
|
||
|
||
.section {
|
||
margin-bottom: 20px;
|
||
}
|
||
|
||
.section h3 {
|
||
color: #555;
|
||
font-size: 0.9rem;
|
||
text-transform: uppercase;
|
||
margin-bottom: 8px;
|
||
letter-spacing: 0.5px;
|
||
}
|
||
|
||
textarea {
|
||
width: 100%;
|
||
padding: 12px;
|
||
border: 2px solid #e0e0e0;
|
||
border-radius: 8px;
|
||
font-family: 'Courier New', monospace;
|
||
font-size: 0.85rem;
|
||
resize: vertical;
|
||
min-height: 100px;
|
||
transition: border-color 0.3s;
|
||
}
|
||
|
||
textarea:focus {
|
||
outline: none;
|
||
border-color: #667eea;
|
||
}
|
||
|
||
input[type='text'] {
|
||
width: 100%;
|
||
padding: 12px;
|
||
border: 2px solid #e0e0e0;
|
||
border-radius: 8px;
|
||
font-size: 0.95rem;
|
||
transition: border-color 0.3s;
|
||
}
|
||
|
||
input[type='text']:focus {
|
||
outline: none;
|
||
border-color: #667eea;
|
||
}
|
||
|
||
button {
|
||
background: #667eea;
|
||
color: white;
|
||
border: none;
|
||
padding: 12px 24px;
|
||
border-radius: 8px;
|
||
font-size: 0.95rem;
|
||
font-weight: 600;
|
||
cursor: pointer;
|
||
transition: all 0.3s;
|
||
width: 100%;
|
||
margin-top: 8px;
|
||
}
|
||
|
||
button:hover {
|
||
background: #5568d3;
|
||
transform: translateY(-2px);
|
||
box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
|
||
}
|
||
|
||
button:active {
|
||
transform: translateY(0);
|
||
}
|
||
|
||
button:disabled {
|
||
background: #ccc;
|
||
cursor: not-allowed;
|
||
transform: none;
|
||
}
|
||
|
||
.log {
|
||
max-height: 300px;
|
||
overflow-y: auto;
|
||
background: #f8f9fa;
|
||
border-radius: 8px;
|
||
padding: 12px;
|
||
font-family: 'Courier New', monospace;
|
||
font-size: 0.8rem;
|
||
line-height: 1.6;
|
||
}
|
||
|
||
.log-entry {
|
||
margin-bottom: 4px;
|
||
padding: 4px;
|
||
background: white;
|
||
border-radius: 4px;
|
||
}
|
||
|
||
.message-box {
|
||
display: flex;
|
||
gap: 8px;
|
||
margin-top: 8px;
|
||
}
|
||
|
||
.message-box input {
|
||
flex: 1;
|
||
margin: 0;
|
||
}
|
||
|
||
.message-box button {
|
||
width: auto;
|
||
margin: 0;
|
||
padding: 12px 20px;
|
||
}
|
||
|
||
@media (max-width: 768px) {
|
||
.peers {
|
||
grid-template-columns: 1fr;
|
||
}
|
||
}
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<div class="container">
|
||
<h1>🔗 Rondevu WebRTC Local Test</h1>
|
||
|
||
<div class="peers">
|
||
<!-- Peer A (Host) -->
|
||
<div class="peer">
|
||
<h2>Peer A (Host/Offerer)</h2>
|
||
|
||
<div class="status disconnected" id="status-a">Disconnected</div>
|
||
|
||
<div class="section">
|
||
<button onclick="createHost()">1️⃣ Create Host Connection</button>
|
||
</div>
|
||
|
||
<div class="section">
|
||
<h3>Local Offer (SDP)</h3>
|
||
<textarea
|
||
id="offer-a"
|
||
readonly
|
||
placeholder="Offer will appear here..."
|
||
></textarea>
|
||
</div>
|
||
|
||
<div class="section">
|
||
<h3>Send Message</h3>
|
||
<div class="message-box">
|
||
<input
|
||
type="text"
|
||
id="message-a"
|
||
placeholder="Type a message..."
|
||
onkeypress="if (event.key === 'Enter') sendFromHost()"
|
||
/>
|
||
<button onclick="sendFromHost()">📤 Send</button>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="section">
|
||
<h3>Activity Log</h3>
|
||
<div class="log" id="log-a"></div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Peer B (Client) -->
|
||
<div class="peer">
|
||
<h2>Peer B (Client/Answerer)</h2>
|
||
|
||
<div class="status disconnected" id="status-b">Disconnected</div>
|
||
|
||
<div class="section">
|
||
<button onclick="createClient()">2️⃣ Create Client Connection</button>
|
||
</div>
|
||
|
||
<div class="section">
|
||
<h3>Local Answer (SDP)</h3>
|
||
<textarea
|
||
id="answer-b"
|
||
readonly
|
||
placeholder="Answer will appear here..."
|
||
></textarea>
|
||
</div>
|
||
|
||
<div class="section">
|
||
<h3>Send Message</h3>
|
||
<div class="message-box">
|
||
<input
|
||
type="text"
|
||
id="message-b"
|
||
placeholder="Type a message..."
|
||
onkeypress="if (event.key === 'Enter') sendFromClient()"
|
||
/>
|
||
<button onclick="sendFromClient()">📤 Send</button>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="section">
|
||
<h3>Activity Log</h3>
|
||
<div class="log" id="log-b"></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<script type="module" src="/demo.js"></script>
|
||
</body>
|
||
</html>
|