125 lines
3.1 KiB
HTML
125 lines
3.1 KiB
HTML
<!doctype html>
|
|
<html lang="fr">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<link rel="stylesheet" href="styles.css" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<meta http-equiv="Content-Security-Policy"
|
|
content="default-src 'self';
|
|
script-src 'self';
|
|
style-src 'self' 'unsafe-inline';
|
|
img-src 'self' data: blob:;
|
|
connect-src * ipc: http://ipc.localhost ipc://localhost;" />
|
|
<title>Tauri GST Signalling + Chat</title>
|
|
</head>
|
|
|
|
<body>
|
|
<main class="container">
|
|
<h1>POC 3 - Rust signalling + Rust WebRTC</h1>
|
|
|
|
<section class="card">
|
|
<h2>Audio</h2>
|
|
|
|
<div class="actions">
|
|
<button id="start-audio-btn" type="button">Start audio</button>
|
|
<button id="stop-audio-btn" type="button" disabled>Stop
|
|
audio</button>
|
|
</div>
|
|
|
|
<pre id="audio-status">Ready.</pre>
|
|
</section>
|
|
|
|
<section class="card">
|
|
<h2>Video</h2>
|
|
|
|
<div class="actions">
|
|
<button id="start-video-btn" type="button">Start video</button>
|
|
<button id="stop-video-btn" type="button" disabled>Stop
|
|
video</button>
|
|
</div>
|
|
|
|
<pre id="video-status">Ready.</pre>
|
|
</section>
|
|
|
|
<section class="card">
|
|
<h2>Audio + Video</h2>
|
|
|
|
<div class="actions">
|
|
<button id="start-av-btn" type="button">Start AV</button>
|
|
<button id="stop-av-btn" type="button" disabled>Stop AV</button>
|
|
</div>
|
|
|
|
<pre id="av-status">Ready.</pre>
|
|
</section>
|
|
|
|
<section class="card">
|
|
<h2>Video Preview</h2>
|
|
|
|
<div class="preview-wrap">
|
|
<img id="video-preview" alt="Video preview" />
|
|
</div>
|
|
</section>
|
|
|
|
<section class="card">
|
|
<h2>Signalling + Chat</h2>
|
|
|
|
<div class="actions">
|
|
<input id="rtc-server-url" type="text" value="ws://127.0.0.1:3012"
|
|
placeholder="Signalling URL" /> <input
|
|
id="rtc-display-name" type="text" value="sinus"
|
|
placeholder="Display name" />
|
|
<button id="rtc-connect-btn" type="button">Connect
|
|
signalling</button>
|
|
<button id="rtc-disconnect-btn" type="button" disabled>Disconnect</button>
|
|
</div>
|
|
|
|
<div class="chat-grid">
|
|
<div>
|
|
<h3>Peers</h3>
|
|
<pre id="rtc-peers">[]</pre>
|
|
</div>
|
|
|
|
<div>
|
|
<h3>Logs</h3>
|
|
<pre id="rtc-logs">Ready.</pre>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="actions">
|
|
<input id="rtc-chat-input" type="text"
|
|
placeholder="Signalling chat message" />
|
|
<button id="rtc-chat-send-btn" type="button" disabled>Send
|
|
chat</button>
|
|
</div>
|
|
|
|
<pre id="rtc-chat-messages">No messages yet.</pre>
|
|
</section>
|
|
|
|
<section class="card">
|
|
<h2>Rust WebRTC DataChannel</h2>
|
|
|
|
<div class="actions">
|
|
<input id="rtc-target-peer-id" type="text"
|
|
placeholder="Target peer id" />
|
|
<button id="rtc-start-offer-btn" type="button" disabled>Start
|
|
RTC</button>
|
|
<button id="rtc-close-peer-btn" type="button" disabled>Close
|
|
RTC</button>
|
|
</div>
|
|
|
|
<pre id="rtc-status">Idle.</pre>
|
|
|
|
<div class="actions">
|
|
<input id="rtc-direct-message-input" type="text"
|
|
placeholder="RTC direct message" />
|
|
<button id="rtc-direct-send-btn" type="button" disabled>Send
|
|
RTC</button>
|
|
</div>
|
|
|
|
<pre id="rtc-direct-messages">No RTC messages yet.</pre>
|
|
</section>
|
|
</main>
|
|
<script type="module" src="main.ts" defer></script>
|
|
</body>
|
|
</html>
|