-
Notifications
You must be signed in to change notification settings - Fork 39
/
index.html
77 lines (74 loc) · 3.73 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
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/html">
<head>
<meta charset="utf-8" />
<title>WebRTC Camera Resolution Finder</title>
<meta name="viewport" content="width=device-width, user-scalable=yes, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="shortcut icon" href="https://webrtchacks.com/wp-content/themes/parament/favicon.ico">
<style>
.row {
margin-left: 10px;
padding: 5px;
}
.scanarea {
max-width: 350px;
height: 100px;
}
video {
transform: scale(-1, 1); /*For Firefox (& IE) */
-webkit-transform: scale(-1, 1); /*for Chrome & Opera (& Safari) */
}
table th.hidden {
display: none;
border: none;
visibility: hidden;
}
</style>
</head>
<body>
<div id="container">
<div class="row">
<h2>WebRTC getUserMedia camera resolution finder</h2>
<div id="selectArea" hidden>
<h4>Select camera(s) below:</h4>
<select id="devices" name="Video devices" multiple title="devices"></select>
</div>
</div>
<div class="row" id="controlArea">
<h4>Click one of the buttons below to find camera resolutions:</h4>
<div class="col-sm-6 scanarea well well-sm" id="quickArea">
<button class="btn btn-primary btn-block" id="quickButton">Quick Scan</button>
<p id="quickLabel"></p>
</div>
<div class="col-sm-6 scanarea well well-sm" id="fullArea">
<button class="btn btn-primary btn-block" id="fullButton">Full Scan</button>
<p>vertical resolution range: <br>
<span> max:
<input type="text" id="hiRes" value="1080" size="4" maxlength="4" min="1" max="2160" pattern="[0-9]{1,4}" title="hiRes" />
to min:
<input type="text" id="loRes" value="1" size="4" maxlength="4" min="1" max="2160" pattern="[0-9]{1,4}" title="lowRes"/>
</span></p>
</div>
</div>
<div class="row" id="videoarea">
<video id="video" autoplay muted playsinline></video>
</div>
<div class="row">
<p id="jump" hidden>Jump to <a href="#bottom">bottom</a> of table</p>
<table class="table-condensed table-bordered table-striped" id="results" hidden >
<tr><th>Browser</th><th>Device</th><th>Res Name</th><th>Ratio</th><th>Ask</th><th>Actual</th><th>Status</th><th class="hidden">deviceIndex</th><th class="hidden">resIndex</th></tr>
</table>
<h5 class="pfin" hidden><a href=".">Refresh</a> to run test again with same or different parameters (you'll lose the table above). </h5>
<h5 class="pfin" hidden>Export results to a CSV file here: <a id="csvOut" href="#" class="btn btn-link btn-md">gumResTestExport.csv</a></h5>
</div>
<div id="bottom"></div>
<div class="row">
<h4>Visit <a href="http://webrtchacks.com">webrtcHacks.com</a> for more details.</h4>
</div>
</div>
<script src="https://code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="https://webrtchacks.github.io/adapter/adapter-latest.js"></script>
<script src="js/resolutionScan.js"></script>
</body>
</html>