Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <center>
- <video id="video" autoplay hidden>
- </video> <canvas id="canvas" width="500" height="500" style="border:0px solid">
- <script>
- var video = document.getElementById("video");
- var c = document.getElementById("canvas");
- var ctx = c.getContext("2d");
- var i=0; var canvas = document.getElementById('canvas');
- var context = canvas.getContext('2d');
- var video = document.getElementById('video');
- var mediaConfig = { video: true,audio:true};
- navigator.mediaDevices.getUserMedia(mediaConfig).then(function(stream) {
- video.src = this.window.URL.createObjectURL(stream);
- video.play(); video.addEventListener("play", function() {
- i = window.setInterval(function() {
- for(var u=0;u<=400;u++)
- ctx.drawImage(video,u,u,u,u)},25);
- ctx.scale(1,1)
- }, false); });
- </script>
- </center>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement