Advertisement
BrU32

JS Norway Sat Weather Monitor & Webcam FLIR Canvas SRC V1

Oct 30th, 2016
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. <script>
  2. var w=500;
  3. var h=500;
  4. document.write('<center><img style="-webkit-user-select: none; cursor: zoom-in;" src="http://api.met.no/weatherapi/radar/1.5/?radarsite=central_norway;type=reflectivity;content=animation;size=large" width="'+w+'" height="'+h+'"></body></html>');
  5. </script>
  6. <style>
  7. body{
  8. overflow: visible;
  9. position:center;
  10. width: 100%;
  11. height: 100%;
  12. filter:invert(1.0);
  13. }
  14. .container{
  15. position: center;
  16. width: Math.random()*5vmax+1vmax;
  17. height: Math.random()*15vmax+10vmax;
  18. top: 50%;
  19. left: 50%;
  20. }
  21. </style>
  22. <center>
  23. <video id="video" width="1000" height="500" autoplay></video>
  24. <canvas id="canvas" width="500" height="500"></canvas>
  25. <script>
  26. var canvas = document.getElementById('canvas');
  27. var context = canvas.getContext('2d');
  28. var video = document.getElementById('video');
  29. var mediaConfig = {video:true,audio:true};
  30. navigator.mediaDevices.getUserMedia(mediaConfig).then(function(stream) {
  31. video.src = window.URL.createObjectURL(stream);
  32. video.play();
  33. });
  34. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement