Advertisement
BrU32

JS Webcam Basic Inversion SRC

Dec 16th, 2016
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. <style>
  2. body{
  3.  
  4. filter:invert(180%);
  5. filter:(brightness:5595%);
  6.  
  7. }
  8.  
  9. </style>
  10.  
  11. <center>
  12. <body onload="setInterval(drawe,33)" bgcolor="black">
  13. <video id="video" autoplay hidden>
  14. </video>
  15. <canvas id="canvas" width="500" height="500" style="drawColor:#FFFFFF">
  16. <script>
  17. var inn=prompt("Enter Text:")
  18. var video = document.getElementById("video");
  19. var c = document.getElementById("canvas");
  20. var ctx = c.getContext("2d");
  21. var i=0;
  22. var mediaConfig = { video:true,audio:true};
  23. navigator.mediaDevices.getUserMedia(mediaConfig).then(function(stream) {
  24. video.src = this.window.URL.createObjectURL(stream);
  25. video.play();
  26. video.addEventListener("play", function() {i = window.setInterval(function() {
  27. ctx.drawImage(video,0,0)},40);
  28. ctx.topmost=false;
  29. ctx.draw();
  30. }, false);
  31. });
  32.  
  33.  
  34. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement