Skip to content

Commit

Permalink
add video stream
Browse files Browse the repository at this point in the history
  • Loading branch information
tuxedomurat authored and murat-aka committed Dec 15, 2019
1 parent e5c21cf commit 2842de7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/color_camera.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@

<script>
window.onload = function() {
var video = document.getElementById('video');
navigator.mediaDevices.getUserMedia({video: {facingMode: 'user'}}).then(function (stream) {
document.getElementById('video').srcObject = stream;
});
var canvas = document.getElementById('canvas');
var context = canvas.getContext('2d');

Expand Down

0 comments on commit 2842de7

Please sign in to comment.