Preparing Your Web Page for EvoCam

EvoCam works by capturing video from any QuickTime-compatible video digitizer, and periodically compressing the image into JPEG format and placing it on your web server. EvoCam can upload images to remote FTP servers, and it can also save images locally for use with Web Sharing or similar web server software.

Using FTP
Using Personal Web Sharing
Displaying your webcam image using HTML
Displaying your webcam image using Java

Using FTP

To use EvoCam with a remote FTP server, you will need to know the uniform resource locator (URL) of the destination image, along with the username and password for your account. The URL tells EvoCam what protocol to use, what server to connect to, what directory to put the image into, and what filename to use for the image. A typical URL might look like this:

ftp://ftp.yoursite.com/directory1/directory2/webcam.jpg

This URL tells EvoCam to contact the FTP server called 'ftp.yoursite.com', set the destination directory to 'directory1/directory2/', upload the image file into this directory and name it 'webcam.jpg'.

Note: Some FTP servers automatically put you in a 'home directory' when you log in, so you might only need to specify any subsequent directories in the URL, leaving out the path to your home directory. For example, if your home directory was 'directory1', the above URL would become:
ftp://ftp.yoursite.com/directory2/webcam.jpg

You should also remember that your FTP server may require a significantly different URL from the one you use to access the same files through a web browser using HTTP. For example, some servers only allow public web access to those files that are in a directory called 'public_html'. In this case, visitors to your website may view your webcam at this address:

http://www.yoursite.com/directory1/webcam.jpg

but in order to publish the image on your website at this address you might need to use this URL in EvoCam:

ftp://ftp.yoursite.com/public_html/directory1/webcam.jpg

Unfortunately, figuring out the correct URL to use can be quite tricky, as it oftens depends on the way your Internet Service Provider (ISP) has configured their FTP servers. If you have trouble, experiment with different paths in your URL as shown above, as this is the most common reason for EvoCam not being able to upload successfully. You can examine the "EvoCam Transcript" file (which is automatically created in your Documents folder) for more details on why the upload is failing. It might also help to use an FTP application (such as Fetch or Transmit) to log in to your account, and then view the path to your webcam image's intended directory. You could also try asking your network administrator or ISP. If all else fails, send an email to support@evological.com and we'll try to help.

Using Personal Web Sharing

To use EvoCam with Personal Web Sharing or similar web server software, all you need to know is the location of the folder in which the image is to be saved, along with the filename of the image.

If you are using Web Sharing on Mac OS 9, you would save the image as "webcam.jpg" into the "Web Pages" folder on your hard disk. Use the Web Sharing control panel to choose your web folder, to start and stop sharing, and to control user access to your web pages.

If you are using Personal Web Sharing on Mac OS X, you would save the image as "webcam.jpg" into your "Sites" folder. Use the Sharing section of the System Preferences to start and stop sharing.


Displaying your webcam image using HTML


Once the image is on your server, you can include it in your web page by simply referencing it in an HTML image tag. For example, if you set up EvoCam to upload/save the image as "webcam.jpg" as in the above examples, your web page's HTML file can display the image using the following tag:

<IMG SRC="webcam.jpg">

In the 'HTML' folder included with EvoCam, there's an example HTML file called "webcam.html" which shows how to display your webcam image and make it periodically refresh. You should upload this file to your remote FTP server, or place it in your shared folder if using Web Sharing or similar web server software. Your webcam image should be called "webcam.jpg" and it must reside in the same directory.

Displaying your webcam image using Java

EvoCam includes a Java webcam applet, which can be used on your web page in conjunction with EvoCam to display your webcam image. Supporting a variety of refresh effects, the applet reloads only the webcam image rather than the whole page. For example, if you set up EvoCam to upload/save the image as "webcam.jpg" as in the above examples, your web page's HTML file can embed the applet using the following tags:

<APPLET ARCHIVE="evocam.jar" CODE="com.evological.evocam.class" WIDTH=320 HEIGHT=240>
<param name="image" value="webcam.jpg">
<param name="refresh" value="1">
<param name="type" value="simple">
</APPLET>

In the 'Java' folder included with EvoCam, there's an example HTML file called "webcam.html" which shows how to embed the Java applet on your web page, and a Java archive called "evocam.jar" which contains the applet itself. You should upload both these files to your remote FTP server, or place them in your shared folder if using Web Sharing or similar web server software. Your webcam image should be called "webcam.jpg" and it must reside in the same directory.

The Java applet requires three parameters, "image", "refresh" and "type". The "image" parameter should contain the name of your webcam image, for example "webcam.jpg". The "refresh" parameter specifies the number of seconds between each refresh, and should be the same value as you are using in EvoCam itself. The "type" parameter can be any one of the following refresh types:

"simple" - simple refresh
"dissolve" - performs cross-dissolve transition from one image to the next
"fadetoblack" - fades current image to black, then reverse fades from black to next image
"slideleft" - slides next image from right to left over the top of the current image
"barndoors" - opens current image from the center outward to reveal new image