-
Notifications
You must be signed in to change notification settings - Fork 49
Expand file tree
/
Copy pathindex.html
More file actions
260 lines (238 loc) · 11.6 KB
/
Copy pathindex.html
File metadata and controls
260 lines (238 loc) · 11.6 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
<!-- Copyright © 2015 Infrared5, Inc. All rights reserved.
The accompanying code comprising examples for use solely in conjunction with Red5 Pro (the "Example Code")
is licensed to you by Infrared5 Inc. in consideration of your agreement to the following
license terms and conditions. Access, use, modification, or redistribution of the accompanying
code constitutes your acceptance of the following license terms and conditions.
Permission is hereby granted, free of charge, to you to use the Example Code and associated documentation
files (collectively, the "Software") without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
persons to whom the Software is furnished to do so, subject to the following conditions:
The Software shall be used solely in conjunction with Red5 Pro. Red5 Pro is licensed under a separate end
user license agreement (the "EULA"), which must be executed with Infrared5, Inc.
An example of the EULA can be found on our website at: https://account.red5.net/assets/LICENSE.txt.
The above copyright notice and this license shall be included in all copies or portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL INFRARED5, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -->
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Message Channel — WebRTC Testbed</title>
<link rel="stylesheet" href="/style/main.css" />
<link rel="stylesheet" href="/style/pages/example.css" />
<link rel="stylesheet" href="/style/pages/whip-data-channel.css" />
<link rel="stylesheet" href="/style/pages/whep-data-channel.css" />
<link rel="stylesheet" href="/style/pages/message-channel.css" />
<script src="/libs/red5pro/red5pro-sdk.min.js"></script>
</head>
<body>
<r5-header></r5-header>
<main class="page">
<nav class="breadcrumb"><a href="/">WebRTC Testbed</a> › Message Channel</nav>
<h1 class="page__heading">Message Channel</h1>
<p class="page__description">
MessageChannel client with configurable RTCDataChannel settings and messaging. No media
streaming — only data channel communication. Configure host in Settings; stream name is
derived from the DataChannel name plus a random suffix on open.
</p>
<div class="page__layout">
<div class="whip-data-channel-layout message-channel-layout">
<section class="media-panel">
<div class="media-panel__header">
<h2 class="section-title">Message Channel</h2>
<span class="status status--idle" id="channel-status">Channel Idle</span>
</div>
<p class="connection-info" id="connection-info">Endpoint not configured</p>
<p class="stream-name-info is-hidden" id="stream-name-info"></p>
<div class="publish-config-section" id="channel-config-section">
<section class="data-channel-section">
<h3 class="data-channel-section__title">DataChannel Settings</h3>
<div class="data-channel-section__grid">
<div class="data-channel-section__field">
<label class="data-channel-section__label" for="dc-name-input">Name</label>
<input
id="dc-name-input"
class="data-channel-section__input"
type="text"
value="red5pro"
autocomplete="off"
spellcheck="false"
/>
</div>
<div class="data-channel-section__field">
<label class="data-channel-section__label" for="dc-mode-select">Mode</label>
<select id="dc-mode-select" class="data-channel-section__select">
<option value="reliable-ordered" selected>reliable-ordered</option>
<option value="reliable-unordered">reliable-unordered</option>
<option value="max-retransmits">max-retransmits</option>
<option value="max-lifetime">max-lifetime</option>
</select>
</div>
<div
class="data-channel-section__mode-options is-hidden"
id="dc-mode-advanced-options"
>
<label class="data-channel-section__checkbox-field">
<input
id="dc-ordered-input"
class="data-channel-section__checkbox"
type="checkbox"
checked
/>
<span class="data-channel-section__checkbox-label">Ordered</span>
</label>
<div
class="data-channel-section__field is-hidden"
id="dc-max-retransmits-field"
>
<label class="data-channel-section__label" for="dc-max-retransmits-input">
Max Retransmits
</label>
<input
id="dc-max-retransmits-input"
class="data-channel-section__input"
type="number"
min="0"
step="1"
value="3"
autocomplete="off"
spellcheck="false"
/>
</div>
<div
class="data-channel-section__field is-hidden"
id="dc-max-packet-lifetime-field"
>
<label class="data-channel-section__label" for="dc-max-packet-lifetime-input">
Max Packet Lifetime (ms)
</label>
<input
id="dc-max-packet-lifetime-input"
class="data-channel-section__input"
type="number"
min="0"
step="1"
value="1000"
autocomplete="off"
spellcheck="false"
/>
</div>
</div>
</div>
</section>
</div>
<div class="publish-messaging-section is-hidden" id="channel-messaging-section">
<section class="chat-section">
<div class="chat-section__header">
<h3 class="chat-section__title">Chat Messages</h3>
<button
type="button"
class="btn btn--ghost chat-section__clear"
id="chat-messages-clear-btn"
>
Clear
</button>
</div>
<p class="chat-section__description">
Sent messages appear on the right; received messages on the left.
</p>
<div
class="chat-messages chat-messages--empty"
id="chat-messages"
aria-live="polite"
>
<p class="chat-messages__placeholder">No messages yet...</p>
</div>
</section>
<section class="messaging-section">
<h3 class="messaging-section__title">Message</h3>
<p class="messaging-section__description">
Sent to all members on the DataChannel.
</p>
<form id="json-message-form" class="messaging-form">
<label class="messaging-form__field">
<span class="messaging-form__label">Message</span>
<input
id="json-message-input"
class="messaging-form__input"
type="text"
placeholder="Enter message to send..."
autocomplete="off"
spellcheck="false"
/>
</label>
<div class="messaging-form__actions">
<button class="btn btn--primary" type="submit" id="json-message-send-btn">
Send
</button>
</div>
</form>
</section>
<section class="messaging-section">
<h3 class="messaging-section__title">Binary Message</h3>
<p class="messaging-section__description">
Record 5 seconds from the local microphone and send as an ArrayBuffer on the
DataChannel.
</p>
<div class="binary-message-panel">
<button type="button" class="btn btn--primary" id="binary-record-btn" disabled>
Record 5s and Send
</button>
<p class="binary-message-panel__status is-hidden" id="binary-recording-status">
Recording...
</p>
<div class="binary-message-panel__playback is-hidden" id="binary-playback-panel">
<audio id="binary-playback-audio" controls></audio>
<button type="button" class="btn btn--ghost" id="binary-record-again-btn">
Record Again
</button>
</div>
</div>
</section>
<section class="receive-section">
<h3 class="receive-section__title">Audio Snippet</h3>
<p class="receive-section__description">
Binary audio received on the DataChannel for playback.
</p>
<p class="receive-section__placeholder" id="binary-receipt-placeholder">
Waiting for binary audio message...
</p>
<audio
id="binary-receipt-audio"
class="receive-section__audio is-hidden"
controls
></audio>
</section>
</div>
<div class="controls-tray">
<div class="controls-tray__actions">
<button class="btn btn--primary" id="open-btn">Open Channel</button>
<button class="btn btn--danger" id="close-btn" disabled>Close Channel</button>
</div>
<r5-subscriber-link
id="open-subscriber-link"
href="../message-channel/index.html"
label="Open Chat Peer"
disabled
></r5-subscriber-link>
</div>
</section>
</div>
<div class="log-panel">
<div class="log-panel__header">
<h2 class="log-panel__title">Log</h2>
<button type="button" class="btn btn--ghost log-panel__clear" id="log-clear-btn">
Clear
</button>
</div>
<div class="log" id="log"></div>
</div>
</div>
</main>
<script type="module" src="./index.ts"></script>
</body>
</html>