Embedded or use web page for Axis camera crashes client.

Asked by Jeremy Hauger

I am trying to use Xibo to make a matrix of all of the security cameras in our building. I would like to use the embedded element or if it doesn't work, then the webpage element. When I try to do this the client crashes.

I am using Server 2012r2 for my server and a Win 7 desktop as the client. I have tried this with both 1.4.2 and 1.6.0 with the same result. The client is running IE8 and I have made sure that the Axis client is installed and it can view a html file that has the script embedded in it with no passwords or prompts. IE11 has some addidtional complication of the camera needing to be run in compatibility mode.

Here is the script that I am trying to use:

<SCRIPT LANGUAGE="JavaScript">
// Set the BaseURL to the URL of your camera
var BaseURL = "http://x.x.x.x/";

// DisplayWidth & DisplayHeight specifies the displayed width & height of the image.
// You may change these numbers, the effect will be a stretched or a shrunk image
var DisplayWidth = "480";
var DisplayHeight = "360";
var textstring = escape("Test")

// This is the path to the image generating file inside the camera itself
var File = "axis-cgi/mjpg/video.cgi?resolution=480x360&clock=0&date=0&text=1&textstring=" + textstring + "";
// No changes required below this point
var output = "";
if ((navigator.appName == "Microsoft Internet Explorer") &&
   (navigator.platform != "MacPPC") && (navigator.platform != "Mac68k"))
{
  // If Internet Explorer under Windows then use ActiveX
  output = '<OBJECT ID="Player" width='
  output += DisplayWidth;
  output += ' height=';
  output += DisplayHeight;
  output += ' CLASSID="CLSID:DE625294-70E6-45ED-B895-CFFA13AEB044" ';
  output += 'CODEBASE="';
  output += BaseURL;
  output += 'activex/AMC.cab#version=5,4,17,21">';
  output += '<PARAM NAME="MediaURL" VALUE="';
  output += BaseURL;
  output += File + '">';
  output += '<param name="MediaType" value="mjpeg-unicast">';
  output += '<param name="ShowStatusBar" value="0">';
  output += '<param name="ShowToolbar" value="0">';
  output += '<param name="AutoStart" value="1">';
  output += '<param name="StretchToFit" value="1">';
  // Remove the // for the ptz settings below to use the code for click-in-image.
     // output += '<param name="PTZControlURL" value="';
     // output += BaseURL;
     // output += '/axis-cgi/com/ptz.cgi?camera=1">';
     // output += '<param name="UIMode" value="ptz-relative">'; // or "ptz-absolute"
  output += '<BR><B>Axis Media Control</B><BR>';
  output += 'The AXIS Media Control, which enables you ';
  output += 'to view live image streams in Microsoft Internet';
  output += ' Explorer, could not be registered on your computer.';
  output += '<BR></OBJECT>';
} else {
  // If not IE for Windows use the browser itself to display
  theDate = new Date();
  output = '<IMG SRC="';
  output += BaseURL;
  output += File;
  output += '&dummy=' + theDate.getTime().toString(10);
  output += '" HEIGHT="';
  output += DisplayHeight;
  output += '" WIDTH="';
  output += DisplayWidth;
  output += '" ALT="Camera Image">';
}
document.write(output);
document.Player.ToolbarConfiguration = "play,+snapshot,+fullscreen"

// Remove the // below to use the code for Motion Detection.
  // document.Player.UIMode = "MDConfig";
  // document.Player.MotionConfigURL = "/axis-cgi/operator/param.cgi?ImageSource=0"
  // document.Player.MotionDataURL = "/axis-cgi/motion/motiondata.cgi";
</SCRIPT>

Question information

Language:
English Edit question
Status:
Expired
For:
Xibo Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Mike H (s-mike-s) said :
#1

I'm not really sure what your trying do I don't think you well get the real time feed to show. I don't think the axis encoder is supported. You should be able to make a webpage link tho the server that is storing the axis image. You might want to start there first.

Revision history for this message
Jeremy Hauger (jhauger) said :
#2

I was hoping to get the Axis feed that is shown with that embed code to show up in an element. I was going to build a 3x2 matrix in Xibo and then rotate those 6 cameras to the next 6 every 15 seconds. I did try to build a .htm file on the apache server and put this code into. If I browse that file with from the client using IE or Chrome I can see the feed. I was hoping for some way to put that embed code or the .htm file with the code into the xibo client.

The other method that I have seen is to have the camera upload the image via FTP to the webserver and they display that image through http to the xibo client. I was really hoping for something with better refresh than that would offer.

Revision history for this message
Mike H (s-mike-s) said :
#3

I thinking the video stream setup is crashing it. I have some axis cameras here i'll try and setup the script.

Revision history for this message
Mike H (s-mike-s) said :
#4

I thinking the video stream setup is crashing it. I have some axis cameras here i'll try and setup the script.

Revision history for this message
Jeremy Hauger (jhauger) said :
#5

So, I was trying to embed some other things in my clients and I have discovered that I may have deeper problems than just the Axis client. I tried to embed the forecast.io weather into my layout using this code:

<iframe id="forecast_embed" type="text/html" frameborder="0" height="245" width="100%" src="http://forecast.io/embed/#lat=42.3583&lon=-71.0603&name=Downtown Boston"> </iframe>

I also put that into a weather.htm on my apache server, I can browse it on the server from client computer, but when I put it into a layout all I get is the name at the top and no weather. I was trying to find out what I need to set IE for to get it to display content and found that "Allow active content to run files on My Computer" needs to be turned on, so I set that and still neither the Axis or the forecast will embed. Is there any information on how to set up the client computer so that content like this works?

Revision history for this message
Alex Harrington (alexharrington) said :
#6

Alex Harrington suggests this article as an answer to your question:
FAQ #2246: “HTML5 in the Windows .net Client”.

Revision history for this message
Jeremy Hauger (jhauger) said :
#7

Alex. Even after setting that registry value I still don't get the html or embedded to work even for the weather. I set up a client specifically with IE9 to test the example that the FAQ gave.

Revision history for this message
Jeremy Hauger (jhauger) said :
#8

Specifiaclly with that example in both the web page element and the embedded html I get the title bar at the top that says "Weather for Downtown Boston" and "More at Forecast.io" and a line under that, but no weather below it.

Revision history for this message
Alex Harrington (alexharrington) said :
#9

You don't want to setup for IE9 (unless that's the newest on the machine?).
For Win7 you'd set it as say 11000 which gives IE11 by default, assuming
IE11 is installed.

Alex

Revision history for this message
Jeremy Hauger (jhauger) said :
#10

Thank you Alex. Using IE11 with the 11000 got my weather, time and a few others to work using that but the Axis video still crashes the Xibo client.

Revision history for this message
Launchpad Janitor (janitor) said :
#11

This question was expired because it remained in the 'Open' state without activity for the last 15 days.