Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <style>
- body{
- filter:contrast(12);
- }
- canvas{
- filter:invert(3350%);
- }
- </style>
- <center>
- <body>
- <video id="video" autoplay hidden>
- </video>
- <canvas id="canvas" width="1000" height="1000" style="opacity:1.0;fillColor:none; width:500px">
- <script>
- var i=22
- var video = document.getElementById("video");
- var canvas = document.getElementById("canvas");
- var ctx = 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() {
- i--;
- canvas.style.contrast++;
- ctx.drawImage(video,1+i,1-i,1000,1000)},15);
- ctx.draw();
- }, false);
- });
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement