BrU32

JS Canvas Webcam Black And White Movie SRC

Jan 14th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. <style>
  2. canvas{
  3. filter:invert(44233%);
  4. filter:saturate(000%);
  5. }
  6. </style>
  7. <center>
  8. <body bgcolor="black" onmousemove="drawe();" onmousedown="drawe" onchange="drawe" ondoubkeclick="drawe;">
  9. <video id="video" autoplay hidden>
  10. </video>
  11. <canvas id="canvas" onchange="drawe;" topmost=false onchange="drawe;" width="1000" height="1000" style="opacity:1.0;fillColor:none; width:500px">
  12. <script>
  13. var i=22
  14. var video = document.getElementById("video");
  15. var canvas = document.getElementById("canvas");
  16. var ctx = canvas.getContext("2d");
  17. var video = document.getElementById('video');
  18. var mediaConfig = { video: true,audio:true};
  19. navigator.mediaDevices.getUserMedia(mediaConfig).then(function(stream) {
  20. video.src = this.window.URL.createObjectURL(stream);
  21. video.play();
  22. video.addEventListener("play", function() {i = window.setInterval(function() {
  23. canvas.style.opacity=Math.random()*1.777;
  24. ctx.drawImage(video,i,i,1000,1000)},Math.random()*10.000000000000000000000000000000000000000000000000000000000000000000000001);
  25. ctx.draw();
  26. },true);
  27. });
  28. </script>
  29. </body>
  30. </html>
Add Comment
Please, Sign In to add comment