Cambozola Stream Viewer

Example using signed applet

An example of Cambozola [displaying live pictures from Warwick University - from http://www.axis.com/solutions/video/gallery.htm]. Move the mouse to the left-hand side of the applet to see the accessories (zoom/pan).

Configuration

Cambozola may be used in quite a few different ways. Each has its own issues and setup requirements. In all cases, the Cambozola applet may be replaced with the Cambozola application (started from the command line).

Web server and Cam server on same machine

This is the simplest configuration; both the web server and the cam server on the same machine. This is an example of the file that could be served up via the web server on 'server1'.

<applet code="com.charliemouse.cambozola.Viewer"
 archive="cambozola.jar">
  <param name="url" value="/cgi-bin/camstream">
</applet>

The URL is relative to the web page. As no host is specified, it will connect to 'server1' - unsigned applets are forbidden from connecting to hosts other than the web server.

Web server and Cam server behind firewall

This looks complicated, but is almost the same as the previous example. To the Cambozola applet, the web server and cam stream are both on the same host (the firewall). Behind the scenes, the firewall forwards the connection to different machines which do the real work of serving up the web page and camera stream.

An example web page that will support this is shown below:

<applet code="com.charliemouse.cambozola.Viewer"
 archive="cambozola.jar">
  <param name="url" value="/cgi-bin/camstream">
</applet>

To handle the proxying, my presonal preference is rinetd. the configuration file (rinetd.conf) for forwarding of port 8080 to port 80 on a single server machine is as simple as:

0.0.0.0 8080 server 80

The only 'gotcha' with this configuration is that if the web server and cam server are on different machines, and you are accessing the web server from within the firewall, the stream URL will reference the wrong server (server1 instead of server 2).

Web server and Cam server on different hosts

This configuration is not a problem for the Cambozola application, because applications may connect to any hosts. For the applet, the client user must trust the applet and allow it to connect to another server for the cam stream.

To do this, the web page served up must reference the full path to the cam server URL; that is all that is different:

<applet code="com.charliemouse.cambozola.Viewer"
 archive="cambozola.jar">
  <param name="url" value="http://server2/cgi-bin/camstream">
</applet>

Basic instructions for creating a test certificate and signing the jar file are:

$ keytool -genkey -alias cambozola
$ keytool -selfcert -alias cambozola
$ jarsigner cambozola.jar cambozola

If this signed jar file is referenced from the web page, the user will be asked if they wish to trust the applet.