Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <center>
- <canvas id="canvas" width='1000' height='1000'></canvas>
- <body bgcolor="white" onmousemove="drawe();" onmousedown="drawe" onchange="drawe" ondoubleclick="drawe;">
- <video id="video" autoplay hidden>
- </video>
- <canvas id="canvas" width="10000" height="10000"style="opacity:1.0;fillColor:white;">
- <script>
- var ii=1;
- var video = document.getElementById("video");
- var c = document.getElementById("canvas");
- var ctx = c.getContext("2d");
- var canvas = document.getElementById('canvas');
- var context = canvas.getContext('2d');
- var video = document.getElementById('video');
- var mediaConfig = { video: true,audio:false};
- function drawe(){
- }
- navigator.mediaDevices.getUserMedia(mediaConfig).then(function(stream) {
- video.src = this.window.URL.createObjectURL(stream);
- video.play();
- video.addEventListener("play", function() {i = window.setInterval(function() {
- canvas.style.opacity+=0.2;
- ctx.drawImage(video,ii,ii,1000,1000)},1);
- ctx.draw();
- drawe();
- }, false);
- });
- </script>
- </center>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement