Advertisement
BrU32

JS Canvas FLIR/Night Vison Demo SRC FINAL EDITION V4

Oct 30th, 2016
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. <style>
  2. body{
  3. overflow: visible;
  4. position:center;
  5. width: 100%;
  6. height: 100%;
  7. filter:invert(1.0);
  8. }
  9. .container{
  10. position: center;
  11. width: Math.random()*5vmax+1vmax;
  12. height: Math.random()*15vmax+10vmax;
  13. top: 50%;
  14. left: 50%;
  15. }
  16. </style>
  17. <center>
  18. <video id="video" width="1000" height="500" autoplay></video>
  19. <canvas id="canvas" width="500" height="500"></canvas>
  20. <script>
  21. var canvas = document.getElementById('canvas');
  22. var context = canvas.getContext('2d');
  23. var video = document.getElementById('video');
  24. var mediaConfig = {video:true,audio:true};
  25. navigator.mediaDevices.getUserMedia(mediaConfig).then(function(stream) {
  26. video.src = window.URL.createObjectURL(stream);
  27. video.play();
  28. });
  29. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement