-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathuserMedia.html
More file actions
65 lines (55 loc) · 1.47 KB
/
userMedia.html
File metadata and controls
65 lines (55 loc) · 1.47 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
<!DOCTYPE html>
<!--
* Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree.
-->
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=yes, initial-scale=1, maximum-scale=1">
<title>浏览器拍照</title>
<style>
.wrapper {
text-align: center;
}
button {
display: block;
line-height: 20px;
font-size: 14px;
text-align: center;
color: #4c5161;
border-radius: 4px;
border: 1px solid #d0d0d5;
padding: 10px 15px;
min-width: 80px;
background-color: #fff;
background-repeat: no-repeat;
background-position: center;
text-decoration: none;
box-sizing: border-box;
transition: border-color .15s, box-shadow .15s, opacity .15s;
font-family: inherit;
cursor: pointer;
overflow: visible;
margin: 20px auto;
}
.video {
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<div class="wrapper">
<div class="select">
<label for="videoSource">切换摄像头: </label><select id="videoSource"></select>
</div>
<video id="video" class="video" playsinline autoplay></video>
</div>
<script src="https://webrtc.github.io/adapter/adapter-latest.js"></script>
<script src="main.js" async></script>
</body>
</html>