
Updated a few demos to work on Firefox. R=dutton@google.com Review URL: https://webrtc-codereview.appspot.com/1581006 git-svn-id: http://webrtc.googlecode.com/svn/trunk@5464 4adac7df-926f-26a2-2b94-8c16560cd09d
36 lines
689 B
HTML
36 lines
689 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>getUserMedia Demo 1</title>
|
|
<!-- Load the polyfill to switch-hit between Chrome and Firefox -->
|
|
<script src="../../base/adapter.js"></script>
|
|
<style>
|
|
video {
|
|
border:5px solid black;
|
|
width:480px;
|
|
height:360px;
|
|
}
|
|
button {
|
|
font: 18px sans-serif;
|
|
padding: 8px;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<video id="vid" autoplay="true"></video>
|
|
<br>
|
|
<button id="btn" onclick="start()">Start</button>
|
|
<script>
|
|
video = document.getElementById("vid");
|
|
function start() {
|
|
navigator.getUserMedia({video:true}, gotStream, function() {});
|
|
btn.disabled = true;
|
|
}
|
|
function gotStream(stream) {
|
|
attachMediaStream(video, stream);
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|
|
|