Advertisement
Guest User

Untitled

a guest
Jun 21st, 2012
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.57 KB | None | 0 0
  1.  
  2. <html>
  3.  
  4. <SCRIPT LANGUAGE="JavaScript">
  5. // Set the BaseURL to the url of your camera
  6. // Example: var BaseURL = "http://195.5.16.71/";
  7.  
  8. var BaseURL = "http://195.5.16.71/";
  9.  
  10. // The two following lines are for AXIS 2400/2400+:
  11.  
  12. var Camera = "n"; // If you use an AXIS 2400/2400+, comment away this line by inserting "//"
  13. //var Camera = "n"; // Change n to the Video source used in the AXIS 2400/2400+ and remove "//"
  14.  
  15. // Go to the camera used and remove the "//" in front of the ImageResolution to be used.
  16. // Note that only one can be enabled.
  17.  
  18. // AXIS 2100
  19. // var ImageResolution = "320x240";var DisplayWidth = "320";var DisplayHeight = "240";
  20. // var ImageResolution = "640x480";var DisplayWidth = "640";var DisplayHeight = "480";
  21.  
  22. // AXIS 2120/2400/2400+/2401/2401+/2420 PAL
  23. var ImageResolution = "352x288";var DisplayWidth = "352";var DisplayHeight = "288";
  24. // var ImageResolution = "704x576";var DisplayWidth = "704";var DisplayHeight = "576";
  25.  
  26. // AXIS 2120/2400/2400+/2401/2401+/2420 NTSC
  27. // var ImageResolution = "352x240";var DisplayWidth = "352";var DisplayHeight = "240";
  28. // var ImageResolution = "704x480";var DisplayWidth = "704";var DisplayHeight = "480";
  29.  
  30.  
  31. // No changes required below this point
  32. var File = "axis-cgi/mjpg/video.cgi?resolution=" + ImageResolution;
  33. if (Camera != "") {File += "&camera=" + Camera;}
  34. var output = "";
  35. if ((navigator.appName == "Microsoft Internet Explorer")&&
  36. (navigator.platform != "MacPPC")&&(navigator.platform != "Mac68k"))
  37. {
  38. // If Internet Explorer for Windows then use ActiveX
  39. output = "<OBJECT ID=\"CamImage\" WIDTH="
  40. output += DisplayWidth;
  41. output += " HEIGHT=";
  42. output += DisplayHeight;
  43. output += " CLASSID=CLSID:917623D1-D8E5-11D2-BE8B-00104B06BDE3 ";
  44. output += "CODEBASE=\"";
  45. output += BaseURL;
  46. output += "activex/AxisCamControl.cab#Version=1,0,2,15\">";
  47. output += "<PARAM NAME=\"URL\" VALUE=\"";
  48. output += BaseURL;
  49. output += File;
  50. output += "\"> <BR><B>Axis ActiveX Camera Control</B><BR>";
  51. output += "The AXIS ActiveX Camera Control, which enables you ";
  52. output += "to view live image streams in Microsoft Internet";
  53. output += " Explorer, could not be registered on your computer.";
  54. output += "<BR></OBJECT>";
  55. }
  56. else
  57. {
  58. // If not IE for Windows use the browser itself to display
  59. output = "<IMG SRC=\"";
  60. output += BaseURL;
  61. output += File;
  62. output += "&dummy=garb\" HEIGHT=\"";
  63. // The above dummy cgi-parameter helps some versions of NS
  64. output += DisplayHeight;
  65. output += "\" WIDTH=\"";
  66. output += DisplayWidth;
  67. output += "\" ALT=\"Moving Image Stream\">";
  68. }
  69.  
  70.  
  71. document.write(output);
  72.  
  73. </script>
  74.  
  75. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement