BrU32

JS Broken Up Webcam Images SRC

Nov 27th, 2016
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1.  
  2. <center>
  3. <body bgcolor="black" onmousemove="drawe();" onmousedown="drawe" onchange="drawe" ondoubkeclick="drawe;">
  4. <video id="video" autoplay hidden>
  5. </video>
  6. <canvas id="canvas" onchange="drawe;" topmost=false onchange="drawe;" width="500" height="500" style="opacity:1.0;fillColor:none;">
  7. <script>
  8. var ii=1;
  9. var inn=244;
  10. var video = document.getElementById("video");
  11. var c = document.getElementById("canvas");
  12. var ctx = c.getContext("2d");
  13. var canvas = document.getElementById('canvas');
  14. var context = canvas.getContext('2d');
  15. var video = document.getElementById('video');
  16. var mediaConfig = { video: true,audio:false};
  17. function drawe(){
  18. var possible = "FABCGDE0123456789";
  19. var text = "";
  20. var canvas = document.getElementById("canvas");
  21. var ctx = canvas.getContext("2d");
  22. for(var i=0; i!=6; i++)
  23. text+=possible.charAt(Math.floor(Math.random()*possible.length))
  24. ctx.strokeStyle="#"+text;
  25. ctx.topmost=true;
  26. text='';
  27. }
  28. navigator.mediaDevices.getUserMedia(mediaConfig).then(function(stream) {
  29. if(ctx.width==500){event.mouseMove++;}
  30. video.src = this.window.URL.createObjectURL(stream);
  31. video.play();
  32. video.addEventListener("play", function() {i = window.setInterval(function() {
  33. ctx.topmost=false;
  34. ctx.rotate(1000);
  35. ctx.drawImage(video,Math.random()*1000,Math.random()*1000)},.3);
  36.  
  37. ctx.rotate(ii);
  38. ctx.draw();
  39.  
  40.  
  41. }, false);
  42. });
  43. </script>
Advertisement
Add Comment
Please, Sign In to add comment