forked from maarouf-yassine/webRTC
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
60 lines (43 loc) · 1.88 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="description" content="WebRTC code samples">
<meta name="viewport" content="width=device-width, user-scalable=yes, initial-scale=1, maximum-scale=1">
<meta itemprop="description" content="Client-side WebRTC code samples">
<meta itemprop="name" content="WebRTC code samples">
<meta name="mobile-web-app-capable" content="yes">
<meta id="theme-color" name="theme-color" content="#ffffff">
<base target="_blank">
<title>Select video sources</title>
<link href="//fonts.googleapis.com/css?family=Roboto:300,400,500,700" rel="stylesheet" type="text/css">
<link href="css/main.css" rel="stylesheet" type="text/css">
<style>
div.select {
display: inline-block;
margin: 0 0 1em 0;
}
p.small {
font-size: 0.7em;
}
label {
width: 12em;
display: inline-block;
}
</style>
</head>
<body>
<div id="container">
<p>Get available video sources from <code>mediaDevices.enumerateDevices()</code>
then set the source for <code>getUserMedia()</code> using a <code>deviceId</code> constraint.</p>
<p><b>Note:</b> without permission, the browser will restrict the available devices to at most one per type.</p>
<div class="select">
<label for="videoSource">Video source: </label><select id="videoSource"></select>
</div>
<div class="camera-container">
<video id="video" playsinline autoplay></video>
</div>
<script src="https://webrtc.github.io/adapter/adapter-latest.js"></script>
<script src="js/main.js" async></script>
</body>
</html>