Hi

So as the title suggest i am having a a bit of an issue with I.P
cameras and GWT(More like an IE problem, with FireFox this issue is
not produced).
The issue is not the displaying of the video. The issue comes in when
i submit a form.
Let me just give you a bit of background:

I have 4 HTML objects in a Grid.
Each HTML object has a <OBJECT> tag.
Each <OBJECT> tag is essentially pointing to an I.P Camera.

I have a button which goes to the server and requests a snapshot from
the camera. That part works fine on both browsers.

The issue comes in, that in IE, as soon as that dialog pops up that
asks you what you want to do with the image, the classic, "Save"
"Open" and "Cancel" dialog, the video streams(So the <OBJECT> tags)
stop working, its as if the video freezes.

My server code is :

public void doGet(HttpServletRequest req, HttpServletResponse
response) throws IOException {

                response.setContentType("image/jpg");
                response.setHeader("Content-Disposition","attachment;
filename=Minez.jpg");

                URL url = new URL("http://89.97.5.28/axis-cgi/jpg/image.cgi?
resolution=352x288");
                URLConnection con = url.openConnection();
                con.setUseCaches(false);
                BufferedInputStream in = new 
BufferedInputStream(con.getInputStream
());
        ServletOutputStream out = response.getOutputStream();

        byte b[] = new byte[24];
        int count;
        while((count=in.read(b)) != -1) {
            out.write(b,0,count);
        }
        response.setContentLength(count);
        out.flush();
        out.close();
        in.close();
        }

The image returns fine but when the dialog pops up, it freezes the
video stream.

JSIO Class (for video):
public class CameraJSIO {
        public static native String camera()/*-{
        // Set the BaseURL to the URL of your camera
        var BaseURL = "http://89.97.5.28/";;

        // 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 = "352";
        var DisplayHeight = "288";
        var Bordersize = "0";
        var objectID="player1";

        // This is the path to the image generating file inside the camera
itself
        var File = "axis-cgi/mjpg/video.cgi?resolution=352x288" ;

        // 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  ='<div>'
                output += '<OBJECT ID="'+objectID+'" width='
                output += DisplayWidth;
                output += ' height=';
                output += DisplayHeight;
                output += 'border="0" ';
                output += 'CLASSID="CLSID:DE625294-70E6-45ED-B895-CFFA13AEB044" 
';
                output += 'CODEBASE="';
                output += BaseURL;
                output += 'activex/AMC.cab#version=3,32,14,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 += '<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></div>';
        } 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 += '"BORDER="';
        output += Bordersize;
        output += '"ALT="Camera Image Loading....">';
}
return output;
//document.write(output);
//document.Player.ToolbarConfiguration = "play,+snapshot,+fullscreen"
// document.Player.UIMode = "MDConfig";
// document.Player.MotionConfigURL = "/axis-cgi/operator/param.cgi?
ImageSource=0"
// document.Player.MotionDataURL = "/axis-cgi/motion/motiondata.cgi";
}-*/;
}

Normal client class that utilizes CameraJSIO.
Just have a form stick a button in it got to server to get
image..normal stuff.While the video is streaming obviously.
Any Ideas or comments are welcomed.
Thanks


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to