getUserMedia API
by rakesh makluri
HTML
<!DOCTYPE html>
<html>
<head>
<title>getUserMedia</title>
</head>
<body>
<header>
<h1>getUserMedia</h1>
</header>
<article>
<video id="video" width="320" height="200" autoplay></video>
<section>
<button id="btnStart">Start video</button>
<button id="btnStop">Stop video</button>
<button id="btnPhoto">Take a photo</button>
</section>
<canvas id="canvas" width="320" height="240"></canvas>
</article>
</body>
</html>
CSS
body {
font-family: "Verdana";
font-size: 9pt;
}
header {
padding: 15px;
box-shadow: 0px 1px 2px rgba(0,0,0,0.4);
background-color: rgb(27, 161, 226);
color: #fff;
}
header h1 {
font-size: 14pt;
}
article {
width: 80%;
margin: auto;
margin-top: 20px;
}
JavaScript
class Edit {
static change(event) {
console.log(this)
}
}
Edit.change();