Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #on phone:
- while [ 1 ];do screencap -p 1.png;mv 1.png 2.png;done
- #while running that also startup httpd
- busybox httpd -v -p 9999
- #client code
- <!DOCTYPE html>
- <html>
- <head>
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script>
- <script>
- var url = "http://192.168.1.101:9999/2.png";
- $(document).ready(function(){
- //setInterval(loadimg,500);
- loadimg();
- });
- function loadimg(){
- var stamp = new Date().getTime();
- var image = new Image();
- image.onload = function () {
- //console.info("Image loaded:" + cam + "!");
- $("body").html(image);
- setTimeout(loadimg,1000);
- }
- image.onerror = function () {
- console.error("Cannot load image");
- setTimeout(loadimg,1000);
- }
- image.src = url + "?count=" + stamp;
- }
- </script>
- </head>
- <body>
- <img id="screen">
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement