-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
416 lines (369 loc) · 20 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
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="icon" href="favicon.ico">
<title>Cisco Client Checker</title>
<script src="js/DetectRTC.js"></script>
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/ping.js"></script>
<script src="js/platform.js"></script>
<script src="js/speedtest.js"></script>
<script src="js/speedtest_worker.js"></script>
<link href="css/bootstrap.css" rel="stylesheet">
<link href="css/check.css" rel="stylesheet">
</head>
<body>
<div class="cover-container d-flex h-100 p-3 mx-auto flex-column text-justify">
<!--Navigation bar-->
<header class="masthead mb-auto">
<div class="inner">
<nav class="nav nav-masthead justify-content-center">
<a class="nav-link active" href="#">Home</a>
</nav>
</div>
</header>
<!--Intro paragraph-->
<div class="pt-4">
<h1 class="text-center pb-3">Cisco Client Checker</h1>
<p class="lead">
Several tests will be performed to verify whether the client you are using to access this
website meets the minimum requirements to use the <i>Cisco video conferencing solution</i>.
These tests are broken down into three categories: browser tests, network tests, and peripheral tests.
</p>
<p class="lead">
Please note that some of these tests (namely the peripheral tests) will prompt you for
permission to access the relevant peripherals (i.e. microphone and camera).
</p>
</div>
<!--Browser Tests-->
<h4 class="pt-3">Browser Tests</h4>
<div class="row">
<div class="card-deck">
<div class="card bg-light mb-3 limit-size">
<div class="card-header text-dark">Test: B1</div>
<div class="card-body">
<h5 class="card-title text-dark text-left">Compatible Browser?</h5>
<p class="card-text text-dark">
Only the following browsers are officially supported: Chrome, Chromium Edge,
Firefox, Safari, Yandex.
</p>
</div>
<div id="b1-status" class="card-footer bg-secondary">
<small class="text-white">Test Status: Not started.</small>
</div>
</div>
</div>
</div>
<!--Network Tests-->
<h4 class="pt-3">Network Tests</h4>
<div class="row">
<div class="card-deck">
<div class="card bg-light mb-3 limit-size">
<div class="card-header text-dark">Test: N1
</div>
<div class="card-body">
<h5 class="card-title text-dark text-left">Download Speed > 2.5 Mbps?</h5>
<p class="card-text text-dark">
To be able to stream 720p, you need at least 2.5 Mbps of download speed.
Otherwise the absolute minimum supported is 0.5 Mbps.
</p>
</div>
<button type="button" class="btn btn-outline-danger" onclick="handleNetworkTest()">Click to Run Network Tests</button>
<div id="n1-status" class="card-footer bg-info">
<small class="text-white">Test Status: Pending...</small>
</div>
</div>
<div class="card bg-light mb-3 limit-size">
<div class="card-header text-dark">Test: N2</div>
<div class="card-body">
<h5 class="card-title text-dark text-left">Upload Speed > 3 Mbps?</h5>
<p class="card-text text-dark">
To be able to stream 720p, you need at least 3 Mbps of download speed.
Otherwise the absolute minimum supported is 0.5 Mbps.
</p>
</div>
<button type="button" class="btn btn-outline-danger" onclick="handleNetworkTest()">Click to Run Network Test</button>
<div id="n2-status" class="card-footer bg-info">
<small class="text-white">Test Status: Pending...</small>
</div>
</div>
<div class="card bg-light mb-3 limit-size">
<div class="card-header text-dark">Test: N3</div>
<div class="card-body">
<h5 class="card-title text-dark text-left">Latency < 500ms?</h5>
<p class="card-text text-dark">
The maximum network round-trip-time (RTT) between the user client and the Cisco meeting servers
is 500ms. Any higher would suffer from quality degradation.
</p>
</div>
<button type="button" class="btn btn-outline-danger" onclick="handleNetworkTest()">Click to Run Network Test</button>
<div id="n3-status" class="card-footer bg-info">
<small class="text-white">Test Status: Pending...</small>
</div>
</div>
<div class="card bg-light mb-3 limit-size">
<div class="card-header text-dark">Test: N4</div>
<div class="card-body">
<h5 class="card-title text-dark text-left">Jitter < 30ms?</h5>
<p class="card-text text-dark">
The maximum jitter for the incoming packets received by user client is 30ms.
Any higher would suffer from quality degradation.
</p>
</div>
<button id="jitter" type="button" class="btn btn-outline-danger" onclick="handleNetworkTest()">Click to Run Network Test</button>
<div id="n4-status" class="card-footer bg-info">
<small class="text-white">Test Status: Pending...</small>
</div>
</div>
</div>
</div>
<!--Peripheral Tests-->
<h4 class="pt-3">Peripheral Tests</h4>
<div class="row">
<div class="card-deck">
<div class="card bg-light mb-3 limit-size">
<div class="card-header text-dark">Test: P1</div>
<div class="card-body">
<h5 class="card-title text-dark text-left">Camera Permission Granted?</h5>
<p class="card-text text-dark">
Modern browsers only grant access permissions to a camera on trusted websites. Normally
you are prompted with a pop-up to trust a website near your URL bar.
</p>
</div>
<button type="button" class="btn btn-outline-danger" onclick="handlePermissions()">Click to Run Permission Test</button>
<div id="p1-status" class="card-footer bg-info">
<small class="text-white">Test Status: Pending...</small>
</div>
</div>
<div class="card bg-light mb-3 limit-size">
<div class="card-header text-dark">Test: P2</div>
<div class="card-body">
<h5 class="card-title text-dark text-left">Microphone Permission Granted?</h5>
<p class="card-text text-dark">
Modern browsers only grant access permissions to a microphone on trusted websites. Normally
you are prompted with a pop-up to trust a website near your URL bar.
</p>
</div>
<button type="button" class="btn btn-outline-danger" onclick="handlePermissions()">Click to Run Permission Test</button>
<div id="p2-status" class="card-footer bg-info">
<small class="text-white">Test Status: Pending...</small>
</div>
</div>
<div class="card bg-light mb-3 limit-size">
<div class="card-header text-dark">Test: P3</div>
<div class="card-body">
<h5 class="card-title text-dark text-left">Speaker Detected?</h5>
<p class="card-text text-dark">
Sometimes a speaker can be plugged in but not detected by the operating system. This could
be due to a loose connection, missing drivers, or a host of other reasons.
</p>
</div>
<button type="button" class="btn btn-outline-danger" onclick="handlePermissions()">Click to Run Permission Test</button>
<div id="p3-status" class="card-footer bg-info">
<small class="text-white">Test Status: Pending...</small>
</div>
</div>
<div class="card bg-light mb-3 limit-size">
<div class="card-header text-dark">Test: P4</div>
<div class="card-body">
<h5 class="card-title text-dark text-left">Microphone Detected?</h5>
<p class="card-text text-dark">
Sometimes a microphone can be plugged in but not detected by the operating system. This could
be due to a loose connection, missing drivers, or a host of other reasons.
</p>
</div>
<button type="button" class="btn btn-outline-danger" onclick="handlePermissions()">Click to Run Permission Test</button>
<div id="p4-status" class="card-footer bg-info">
<small class="text-white">Test Status: Pending...</small>
</div>
</div>
<div class="card bg-light mb-3 limit-size">
<div class="card-header text-dark">Test: P5</div>
<div class="card-body">
<h5 class="card-title text-dark text-left">Camera Detected?</h5>
<p class="card-text text-dark">
Sometimes a camera can be plugged in but not detected by the operating system. This could
be due to a loose connection, missing drivers, or a host of other reasons.
</p>
</div>
<button type="button" class="btn btn-outline-danger" onclick="handlePermissions()">Click to Run Permission Test</button>
<div id="p5-status" class="card-footer bg-info">
<small class="text-white">Test Status: Pending...</small>
</div>
</div>
</div>
</div>
<footer class="mastfoot mt-auto">
<div class="inner">
<p>Developed by Othman Alikhan.</p>
</div>
</footer>
</div>
<script type="text/javascript">
let STATUS_SUCCESS = 'Test Status: Success.'
let STATUS_FAILED = 'Test Status: Failed.'
let NOT_FOUND = -1;
let THRESHOLD_DL = 2.5;
let THRESHOLD_UL = 3.0;
let THRESHOLD_PING = 500.0;
let THRESHOLD_JITTER = 30.0;
/*************************************** BROWSER TESTS */
if (platform.name.indexOf("Chrome") !== NOT_FOUND
|| platform.name.indexOf("Firefox") !== NOT_FOUND
|| platform.name.indexOf("Microsoft Edge") !== NOT_FOUND
|| platform.name.indexOf("Safari") !== NOT_FOUND) {
let RESULTS = 'Results: ' + platform.name + ' (' + platform.version + ')' + ', ' + platform.os;
// Show if mobile device used (e.g. iPad).
if (platform.product) {
RESULTS += ', ' + platform.product;
} else {
RESULTS += '.';
}
let SUCCESS = '<small class="text-white">' + STATUS_SUCCESS + '</br>' + RESULTS + '</small>'
$("#b1-status").removeClass("bg-info").addClass("bg-success").html(SUCCESS);
} else {
let RESULTS = 'Results: ' + platform.name + ' (' + platform.version + ')' + ' is not compatible!';
let FAILED = '<small class="text-white">' + STATUS_FAILED + '</br>' + RESULTS + '</small>'
$("#b1-status").removeClass("bg-info").addClass("bg-danger").html(FAILED);
}
/*************************************** NETWORK TESTS */
var SERVER = {
name: "Digital Ocean",
server: "https://cisco.applicationchecker.com",
dlURL: "backend/garbage.php",
ulURL: "backend/empty.php",
pingURL: "backend/empty.php",
getIpURL: "backend/getIP.php"
}
var s = new Speedtest();
s.addTestPoint(SERVER);
s.selectServer();
function handleNetworkTest() {
// Abort speedtest if running otherwise begin.
if (s.getState() == 3) {
s.abort();
data = null;
} else {
s.start();
s.onupdate = function (data) {
let RESULTS_DL = 'Results: ~' + data.dlStatus + ' Mbits/s';
let RESULTS_UL = 'Results: ~' + data.ulStatus + ' Mbits/s';
let RESULTS_PING = 'Results: ~' + data.pingStatus + ' ms';
let RESULTS_JITTER = 'Results: ~' + data.jitterStatus + ' ms';
// Download test
if (data.dlStatus === "") {
$("#n1-status").removeClass("bg-info").addClass("bg-warning");
} else if (parseFloat(data.dlStatus) > THRESHOLD_DL) {
let SUCCESS = '<small class="text-white">' + STATUS_SUCCESS + '</br>' + RESULTS_DL + '</small>';
$("#n1-status").removeClass("bg-warning").removeClass("bg-danger").addClass("bg-success").html(SUCCESS);
} else {
let FAILED = '<small class="text-white">' + STATUS_FAILED + '</br>' + RESULTS_DL + '</small>';
$("#n1-status").removeClass("bg-warning").removeClass("bg-success").addClass("bg-danger").html(FAILED);
}
// Upload test
if (data.ulStatus === "") {
$("#n2-status").removeClass("bg-info").addClass("bg-warning");
} else if (parseFloat(data.ulStatus) > THRESHOLD_UL) {
let SUCCESS = '<small class="text-white">' + STATUS_SUCCESS + '</br>' + RESULTS_UL + '</small>';
$("#n2-status").removeClass("bg-warning").removeClass("bg-danger").addClass("bg-success").html(SUCCESS);
} else {
let FAILED = '<small class="text-white">' + STATUS_FAILED + '</br>' + RESULTS_UL + '</small>';
$("#n2-status").removeClass("bg-warning").removeClass("bg-success").addClass("bg-danger").html(FAILED);
}
// Ping test
if (data.pingStatus === "") {
$("#n3-status").removeClass("bg-info").addClass("bg-warning");
} else if (parseFloat(data.pingStatus) < THRESHOLD_PING) {
let RESULTS = 'Results: ~'+data.pingStatus+'ms.';
let SUCCESS = '<small class="text-white">' + STATUS_SUCCESS + '</br>' + RESULTS_PING + '</small>';
$("#n3-status").removeClass("bg-warning").addClass("bg-success").html(SUCCESS);
} else {
let FAILED = '<small class="text-white">' + STATUS_FAILED + '</br>' + RESULTS_PING + '</small>';
$("#n3-status").removeClass("bg-warning").addClass("bg-danger").html(FAILED);
}
// Jitter test
if (data.jitterStatus === "") {
$("#n4-status").removeClass("bg-info").addClass("bg-warning");
} else if (parseFloat(data.jitterStatus) < THRESHOLD_JITTER) {
let SUCCESS = '<small class="text-white">' + STATUS_SUCCESS + '</br>' + RESULTS_JITTER + '</small>';
$("#n4-status").removeClass("bg-warning").removeClass("bg-danger").addClass("bg-success").html(SUCCESS);
} else {
let FAILED = '<small class="text-white">' + STATUS_FAILED + '</br>' + RESULTS_JITTER + '</small>';
$("#n4-status").removeClass("bg-warning").removeClass("bg-success").addClass("bg-danger").html(FAILED);
}
}
}
}
/*************************************** PERIPHERAL TESTS */
navigator.mediaDevices.getUserMedia (
{ video: true, audio: true }, // constraints
function(localMediaStream) {}, // successCallback
function(err) { if(err === PERMISSION_DENIED) {} } // errorCallback
);
function handlePermissions() {
DetectRTC.load(function() {
if (DetectRTC.isWebsiteHasWebcamPermissions) {
let RESULTS = 'Results: Permission granted.'
let SUCCESS = '<small class="text-white">' + STATUS_SUCCESS + '</br>' + RESULTS + '</small>'
$("#p1-status").removeClass("bg-info").addClass("bg-success").html(SUCCESS);
} else {
let RESULTS = 'Results: Permission denied.'
let FAILED = '<small class="text-white">' + STATUS_FAILED + '</br>' + RESULTS + '</small>'
$("#p1-status").removeClass("bg-info").addClass("bg-danger").html(FAILED);
}
if (DetectRTC.isWebsiteHasMicrophonePermissions) {
let RESULTS = 'Results: Permission granted.'
let SUCCESS = '<small class="text-white">' + STATUS_SUCCESS + '</br>' + RESULTS + '</small>'
$("#p2-status").removeClass("bg-info").addClass("bg-success").html(SUCCESS);
} else {
let RESULTS = 'Results: Permission denied.'
let FAILED = '<small class="text-white">' + STATUS_FAILED + '</br>' + RESULTS + '</small>'
$("#p2-status").removeClass("bg-info").addClass("bg-danger").html(FAILED);
}
if (DetectRTC.hasSpeakers) {
let labels = [];
DetectRTC.audioOutputDevices.forEach(function(device) {
labels.push("> " + device.label);
});
let RESULTS = 'Results: Found ' + labels.length + ' devices.</br>' + labels.join('</br>')
let SUCCESS = '<small class="text-white">' + STATUS_SUCCESS + '</br>' + RESULTS + '</small>'
$("#p3-status").removeClass("bg-info").addClass("bg-success").html(SUCCESS);
} else {
let RESULTS = 'Results: No device found.'
let FAILED = '<small class="text-white">' + STATUS_FAILED + '</br>' + RESULTS + '</small>'
$("#p3-status").removeClass("bg-info").addClass("bg-danger").html(FAILED);
}
if (DetectRTC.hasMicrophone) {
let labels = [];
DetectRTC.audioInputDevices.forEach(function(device) {
labels.push("> " + device.label);
});
let RESULTS = 'Results: Found ' + labels.length + ' devices.</br>' + labels.join('</br>')
let SUCCESS = '<small class="text-white">' + STATUS_SUCCESS + '</br>' + RESULTS + '</small>'
$("#p4-status").removeClass("bg-info").addClass("bg-success").html(SUCCESS);
} else {
let RESULTS = 'Results: No device found.'
let FAILED = '<small class="text-white">' + STATUS_FAILED + '</br>' + RESULTS + '</small>'
$("#p4-status").removeClass("bg-info").addClass("bg-danger").html(FAILED);
}
if (DetectRTC.hasWebcam) {
let labels = [];
DetectRTC.videoInputDevices.forEach(function(device) {
labels.push("> " + device.label);
});
let RESULTS = 'Results: Found ' + labels.length + ' devices.</br>' + labels.join('</br>')
let SUCCESS = '<small class="text-white">' + STATUS_SUCCESS + '</br>' + RESULTS + '</small>'
$("#p5-status").removeClass("bg-info").addClass("bg-success").html(SUCCESS);
} else {
let RESULTS = 'Results: No device found.'
let FAILED = '<small class="text-white">' + STATUS_FAILED + '</br>' + RESULTS + '</small>'
$("#p5-status").removeClass("bg-info").addClass("bg-danger").html(FAILED);
}
})
}
</script>
</body>
</html>