forked from meething/meething
-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
280 lines (237 loc) · 12.3 KB
/
index.html
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
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>DeStreams</title>
<meta content="width=device-width, initial-scale=1" name="viewport" />
<link rel="shortcut icon" href="https://cdn.glitch.com/f8a2490d-9ef5-4a19-92c4-1bcb76996f85%2Ffavicon%20(1).ico"
type="image/x-icon" />
<link rel="icon" href="https://cdn.glitch.com/f8a2490d-9ef5-4a19-92c4-1bcb76996f85%2Ffavicon%20(1).ico"
type="image/x-icon" />
<link rel="stylesheet" href="./assets/css/bootstrap.min.css" />
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.2/css/all.css"
integrity="sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr" crossorigin="anonymous" />
<link rel="stylesheet" href="./assets/css/app.css" type="text/css" />
<link rel="stylesheet" href="./assets/css/tingle.css" type="text/css" />
<link rel="stylesheet" href="./assets/css/snackbar.css" type="text/css" />
<link rel="stylesheet" href="./assets/css/dragable.css" type="text/css" />
<link rel="stylesheet" id="grid-stage-css" href="assets/css/grid-stage.css" type="text/css" disabled />
<script src="./assets/js/encoding-indexes.js" type="text/javascript"></script><!-- NEEDED FOR EDGE WITH GUN/SEA -->
<script src="./assets/js/encoding.js" type="text/javascript"></script>
<script
src="https://polyfill.io/v3/polyfill.min.js?features=blissfuljs%2Cdefault%2Ces2015%2Ces2016%2Ces2017%2Ces2018%2Ces2019%2Ces5%2Ces6%2Ces7"></script>
<script src="./assets/js/plugins/virtualbackground/background.js" type="text/javascript"></script>
<!-- Posenet should be dynamic due to plugin -->
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs"></script>
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-wasm/dist/tf-backend-wasm.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-converter"></script>
<script src="https://cdn.jsdelivr.net/npm/@tensorflow-models/facemesh"></script>
<script src="https://cdn.jsdelivr.net/npm/@tensorflow-models/posenet"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/paper-full.min.js"></script>
<script src="./assets/js/plugins/pose/posemedia.js"></script>
<!-- Posenet -->
<script src="./assets/js/util/anchorme.min.js" type="text/javascript"></script>
<script src="./assets/js/observer.js" type="text/javascript"></script>
<script src="./assets/js/tingle.js" type="text/javascript"></script>
<script src="./assets/js/soundmeter.js" type="text/javascript"></script>
<script type="module" src="./assets/js/emitter.js"></script>
<script type="module" src="./assets/js/main.js"></script>
<script src="https://cdn.jsdelivr.net/gh/meething/StreamSwitcher@latest/js/ReplaceableMediaStream.js"></script>
<script src="https://webrtc.github.io/adapter/adapter-latest.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.24.0/moment.min.js"></script>
<script src="https://chancejs.com/chance.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/gun.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/sea.js"></script>
<script src="https://cdn.jsdelivr.net/npm/gun/nts.js"></script>
<script src="https://cdn.jsdelivr.net/npm/gun/lib/promise.js"></script>
</head>
<body>
<div id="demo" class="demo" hidden>
<div class="grid-box" class="grid-box">
<div id="emptyroom" style="width: 50%; margin: 0 auto;" class="grid-bottom">
<center class="waiting">
<span class="fa fa-cat fa-3x"></span><br><span class="loading mt-4">Waiting for Participants</span>
</center>
</div>
<div class="grid-container" id="grid">
</div>
</div>
</div>
<nav class="navbar fixed-top bg-info rounded-0 d-print-none" id="login">
<div class="text-white" style="margin-left:-15px;">
<a href="http://github.com/meething" target="_blank">
<div class="text-white"> <span class="fa fa-bullhorn"></span> DeStream</div>
</a>
</div>
<div class="pull-right room-comm" hidden>
<button class="btn btn-md text-white pull-right btn-no-effect fas fa-comment-alt" title="Toggle Chat"
id="toggle-chat-pane">
<span class="badge badge-danger very-small font-weight-lighter" id="new-chat-notification" hidden>New</span>
</button>
<button id="toggle-main-menu" class="btn btn-md fas fa-ellipsis-v rounded-0 btn-no-effect text-white"></button>
</div>
</nav>
<!-- Exit Menu -->
<div id="exit-menu" class="menu" style="display: none;">
<div class="floating-2 selfview-containter">
<div id="title-exit" class="floating-3">
<div id="welcometext">
<span class="fa fa-cat fa-3x"></span><br>
<span style="font-size:larger;font-weight:bolder;">Thank You for using DeStream!</span><br>
<span style="font-size: 20px;"><a href="javascript:history.back()">Join Again?</a></span>
</div>
</div>
</div>
</div>
<!-- Login Menu -->
<div id="menu" class="menu">
<div class="floating-2 selfview-containter">
<div id="title" class="floating-3">
<div id="welcometext">
<span style="font-size:larger;font-weight:bolder;">Welcome to the DeStream</span><br>
<span style="font-size: 10px;">The P2P video streaming platform</span>
</div>
</div>
<button id="toggle-ok-option" class="btn float-right" style="display:none; background:#673ab7; color:white"> OK </button>
<div id="selfview" class="selfview">
<video id="local" autoplay="" muted="" playsinline="" style="pointer-events:none;"></video>
<div id="controlsAudio">
<button class="btn fa fa-arrow-circle-left ligthBg" id="prevAudio"></button>
<span id="currentAudioDevice" style="overflow-x: hidden;white-space: nowrap;"> No Audio Device selected
</span>
<button class="btn fa fa-arrow-circle-right ligthBg" id="nextAudio"></button>
</div>
<div id="controlsVideo">
<button class="btn fa fa-arrow-circle-left ligthBg" id="prevCam"></button>
<span id="currentVideoDevice" style="overflow-x: hidden;white-space: nowrap;"> No Camera selected </span>
<button class="btn fa fa-arrow-circle-right ligthBg" id="nextCam"></button>
</div>
</div>
<div id="inputs" class="floating-3 inputs">
<button id="randomGo" class="wide btn btn-lg margined" style="background:limegreen; color:white; box-shadow:1px 1px 3px black; font-weight:bold" title="Jump right in">GO</button>
<button id="clear" class="btn btn-lg fas margined" style="background:grey; color:white; box-shadow:1px 1px 3px black; font-weight:bold" title="Reset">Reset</button>
<div class="padded"> Name <span style="font-size:smaller;">(Optional)</span></div>
<input id="username" placeholder="To Be Or NOT To Be">
<div class="padded"> Room Name <span style="font-size:smaller;"></span> </div>
<input id="roomname" placeholder="Your Kingdom for a...">
<div class="padded">Password <span style="font-size:smaller;">(Optional)</span>
<label id="passwordSwitch" class="switch" title="Turn Password Protection for the room on/off">
<input id="password" type="checkbox">
<span class="slider round"></span>
</label>
</div>
<input id="pass" type="text" placeholder="the secret..." hidden="">
<div id="options-button" class="btn btn-lg btn-secondary fas fa-tools"></div>
</div>
</div>
<div id="options" class="floating-1">
<span style="position:relative;left:110px;font-size: 25px;align-self:center;">Options</span><br><br>
<label class="switch" title="Turn on / off Bacon Mode">
<input id="bacon" type="checkbox" checked>
<span class="slider round"></span>
</label> Horizontal Squash (Bacon Strip) <br><br>
<label class="switch" title="Turn on / off Active Speaker to the left move">
<input id="bacon" type="checkbox" checked>
<span class="slider round"></span>
</label> Active Speaker Movement <br><br>
<label class="switch" title="Only allow Meshing via webRTC aka. P2P connections">
<input id="mesh-toggle" type="checkbox">
<span class="slider round"></span>
</label> P2P Mesh Only <br><br>
</div>
</div>
<div class="container-fluid room-comm" hidden>
<div class="row">
<div id="localStream">
<canvas id="canvas"></canvas>
<video id="pip" class="local-video clipped" playsinline autoplay muted hidden="true">
<source src="./assets/video/muted.webm" type="video/webm">
<source src="./assets/video/muted.mp4" type="video/mp4">
<source src="./assets/video/muted.ogg" type="video/ogv">
</video>
<canvas id="output" class="camera-canvas" style="transform: scale(0.01);"></canvas>
<canvas id="illustration-canvas" style="transform: scale(0.01);"></cavnas>
</div>
<div id="localshadow"></div>
</div>
<div class="row">
<div class="col-md-10 mt-2 mb-2 main">
<div class="row" id="videos"></div>
</div>
<div class="col-md-4 chat-col d-print-none mb-2 bg-info" id="chat-pane">
<div class="row">
<div class="col-12 text-center h5 mb-3" id="chat-title">
ChatRoom
</div>
</div>
<div id="chat-messages"></div>
<div class="row">
<textarea id="chat-input" class="form-control rounded-0 chat-box border-info" rows="1"
placeholder="Type here..."></textarea><br>
<button id="chat-send" class="form-control btn btn-primary rounded-0 chat-button">
<i class="fas fa-paper-plane"></i>
</button>
</div>
</div>
</div>
</div>
<div id="top-menu" style="display:none">
<button class="btn btn-md rounded-0 btn-no-effect fa fa-desktop text-white" id="toggle-screen"
title="Toggle Screensharing">
<span>Share Screen</span>
</button>
<!--
<button class="btn btn-md rounded-0 btn-no-effect fa fa-th text-white" id="toggle-grid-stage"
title="Toggle Grid Stage">
<span>Grid Satage Mode</span>
</button>
<button class="btn btn-md rounded-0 btn-no-effect fa fa-recycle text-white" id="toggle-invite"
title="Re-Invite All Users">
<span>Re invite All Users</span>
</button> -->
<button class="btn btn-md rounded-0 btn-no-effect fa fa-users text-white" id="toggle-users"
title="Toggle User List">
<span>User List</span>
</button>
<!--
<button class="btn btn-md rounded-0 btn-no-effect fa fa-unlock text-white" id="private-toggle"
title="Toggle Off-Grid Mode">
<span>Off Grid Mode</span>
</button>
-->
<button class="btn btn-md rounded-0 btn-no-effect fa fa-save text-white" id="record-toggle"
title="Toggle Recording">
<span>Record</span>
</button>
<button class="btn btn-md rounded-0 btn-no-effect text-white fa fa-cog" id="toggle-modal" title="Room Settings">
<span>Room Settings</span>
</button>
</div>
<div id="bottom-menu" class="container-fluid mx-auto" hidden>
<div class="buttons-container d-flex justify-content-center mx-auto" style="pointer-events:none">
<button class="btn btn-lg btn-no-effect fa fa-video text-white blue" id="toggle-video" style="pointer-events:auto"
title="Mute/Unmute Video">
</button>
<button class="btn btn-lg btn-no-effect fa fa-volume-up text-white blue" id="toggle-mute"
style="pointer-events:auto" title="press SPACEBAR to Mute/Unmute">
</button>
<button class="btn btn-lg btn-no-effect fab fa-pied-piper-pp text-white blue" id="pip-toggle" title="PiP mode"
style="pointer-events:auto"></button>
<button class="btn btn-lg btn-no-effect text-white fas fa-phone red" title="Leave Room"
style="pointer-events:auto" onclick="window.location.href='/?exit=true'">
</a>
</button>
</div>
</div>
<div id="mydiv" style="display: none;">
<!-- Include a header DIV with the same name as the draggable DIV, followed by "header" -->
<div id="mydivheader"><i class="fas fa-users"></i> Users</div>
<ul id="dynamic-list" style="list-style-type:none ;margin-right: 3em;"></ul>
</div>
<a href="https://github.com/agnelvishal/DeStreams" target="_blank">
<div id="feedback">Source Code</div>
</a>
<div id="snackbar"></div>
<div id="warning-sign" hidden></div>
</body>
</html>