Advertisement
Guest User

pantilt1

a guest
Nov 29th, 2014
2,333
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1.  
  2. <script>
  3. var panCenter = -50;
  4. var tiltCenter = 10;
  5.  
  6. function activate(action, movement) {
  7. // document.write("rambot.php?action=" + action + "&movement=" + movement);
  8. xmlhttp = new XMLHttpRequest();
  9. xmlhttp.open("GET","cgi-bin/pantilt.py?action=" + action + "&movement=" + movement,true);
  10. xmlhttp.send();
  11.  
  12. if(action=="startstream" || action=="stopstream") {
  13. setTimeout('location.reload()', 5000);
  14. }
  15. }
  16.  
  17. function centerView() {
  18. document.getElementById('panslider').value = panCenter;
  19. document.getElementById('tiltslider').value = tiltCenter;
  20. activate("pan", panCenter);
  21. activate("tilt", tiltCenter);
  22. }
  23.  
  24. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement