OLD | NEW |
(Empty) | |
| 1 <!-- |
| 2 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 3 // Use of this source code is governed by a BSD-style license that can be |
| 4 // found in the LICENSE file. |
| 5 --> |
| 6 <html> |
| 7 <head> |
| 8 <script type="text/javascript"> |
| 9 function CaptureVideo() { |
| 10 video = document.createElement('video'); |
| 11 video.style.width="640px"; |
| 12 video.autoplay = true; |
| 13 document.body.appendChild(video); |
| 14 navigator.webkitGetUserMedia( |
| 15 { video: true, audio: true }, |
| 16 function(stream) { |
| 17 video.src = window.URL.createObjectURL(stream); |
| 18 }, function(err) { window.console.log(err); } |
| 19 ); |
| 20 } |
| 21 |
| 22 window.onload = function() { |
| 23 CaptureVideo(); |
| 24 } |
| 25 </script> |
| 26 </head> |
| 27 <body> |
| 28 </body> |
| 29 <html> |
OLD | NEW |