BrU32

JS Custom Keys/Font Webcam FX W\ FLIR SRC

Dec 3rd, 2016
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.53 KB | None | 0 0
  1. <style>
  2. body{
  3. overflow: visible;
  4. position:center;
  5.  
  6. filter:invert(0.9);
  7. }
  8. .container{
  9. position: center;
  10. width: Math.random()*5vmax+1vmax;
  11. height: Math.random()*15vmax+10vmax;
  12.  
  13. }
  14. </style>
  15. <center>
  16. <body bgcolor="black">
  17. <video id="video" autoplay hidden>
  18. </video>
  19. <canvas id="canvas" width="500" height="500"style="opacity:1.0;fillColor:white;fillColor:red;">
  20. <script>
  21. var ii=1;
  22. var inn=prompt('Enter Your Name:');
  23. var iii=prompt('Enter Color:')
  24. var video = document.getElementById("video");
  25. var c = document.getElementById("canvas");
  26. var ctx = c.getContext("2d");
  27. var i=0;
  28. var canvas = document.getElementById('canvas');
  29. var context = canvas.getContext('2d');
  30. var video = document.getElementById('video');
  31. var mediaConfig = { video: true,audio:false};
  32. navigator.mediaDevices.getUserMedia(mediaConfig).then(function(stream) {
  33. ctx.strokeStyle=iii;
  34. ctx.fillStyle=iii
  35. ctx.font="20px creepy"
  36. canvas.style.color=iii;
  37. ctx.strokeText(''+inn,219, 51, 295, 195);
  38. video.src = this.window.URL.createObjectURL(stream);
  39. var stream=video.src;
  40. video.play();
  41. video.addEventListener("play", function() {i = window.setInterval(function() {
  42.  
  43. ctx.fillText(''+inn,Math.random()*500+1, Math.random()*500, 295+12, Math.random()*195);
  44.  
  45. ctx.drawImage(video,ii,ii,500,777)},205);})
  46. this.window.onkeydown=function(){
  47. var inmn=inn.replace("undefined","");
  48. inmn+=event.key;
  49. video.src='';
  50. video.pause;
  51. }
  52. this.window.onkeyup=function(){
  53. video.src=stream;
  54. video.play();
  55. }
  56. });
  57. </script>
Advertisement
Add Comment
Please, Sign In to add comment