Advertisement
BrU32

JS Webcam Cam Super Dope SRC

Nov 18th, 2016
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.68 KB | None | 0 0
  1.  
  2. <canvas id="canvas" width='1000' height='1000'></canvas>
  3. <body bgcolor="black" onmousemove="drawe();" onmousedown="drawe" onchange="drawe" ondoubleclick="drawe;">
  4.  
  5. <br>
  6. <video id="video" autoplay hidden>
  7. </video>
  8. <canvas id="canvas" width="1000" height="1000"style="opacity:0.0;fillColor:none;">
  9. <script>
  10. var ii=444;
  11. var video = document.getElementById("video");
  12. var c = document.getElementById("canvas");
  13. var ctx = c.getContext("2d");
  14. var canvas = document.getElementById('canvas');
  15. var context = canvas.getContext('2d');
  16. var video = document.getElementById('video');
  17. var mediaConfig = { video: true,audio:false};
  18. function zoomin(){
  19. ii+=5;
  20. }
  21. function zoomout(){
  22. ii-=5;
  23. }
  24. navigator.mediaDevices.getUserMedia(mediaConfig).then(function(stream) {
  25. video.src = this.window.URL.createObjectURL(stream);
  26. video.play();
  27. video.addEventListener("play", function() {i = window.setInterval(function() {
  28. canvas.style.opacity+=1233.9;
  29. ctx.drawImage(video,ii--,Math.random()*500,ii-1,Math.random()*ii)},1);
  30. ctx.draw();
  31. drawe();
  32. }, false);
  33. });
  34. </script>
  35. </center>
  36. function PauseIt(mp3){
  37. var aud=document.getElementById("aud");
  38. aud.playbackRate=1.0;
  39. aud.volume=1.0;
  40. aud.pause();
  41. }
  42. function MuteIt(){
  43. var aud=document.getElementById("aud");
  44. aud.volume=.0;
  45. }
  46. function UnMuteIt(){
  47. var aud=document.getElementById("aud");
  48. aud.volume=1.0;
  49. }
  50. function PlayIt(mp3){
  51. mp3=prompt("Enter URL:");
  52. var aud=document.getElementById("aud");
  53. aud.src=mp3;
  54. aud.playbackRate=1.0;
  55. aud.volume=1.0;
  56. aud.play();
  57. }
  58.  
  59. function StopIt(){
  60. var aud=document.getElementById("aud");
  61. aud.src='';
  62. aud.playbackRate=1.0;
  63. aud.volume=1.0;
  64. aud.play();
  65. }
  66. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement