
Using live images on web pages
Still images
If you use ISpy to only occasionally upload images (`single shot' mode), it is easy to display the image on your web pages. Use a tag like this to display the image:
If you want people viewing your images to occasionally refresh the picture they are viewing, you should add a tag like this to the
This will cause the viewing browsers to ask for a refresh every 900 seconds. (This should be set to the same as your upload period, so that viewers will see as many updates as you upload).
The ISpy simple sample page contains these HTML codes, so you can use it as a starting point for your own web page.
Image loops
You can use image loops (`series' mode) to emulate a continuous live video stream, or just to show a movie to your viewers.
The best way to show these images to Netscape users (currently the only web browser that supports `server-push') is to write a cgi script for your web server that serves these images in a sequence or loop. Good scripts also use the timing list file to ensure playback at the correct speed, skipping frames if the client connection is too slow or waiting if the connection is too fast.
As an alternative, you can use the `client pull' mechanism to refresh images. Make a series of web pages numbered 00 to 99 (depending on series size), and have each show one image, with a refresh tag pointing to the next file. So, for instance file 01.html would look like this:
Doing this gives less performance than a good server-push program, but works for more browsers.
Live video
Use live video mode if you have exciting live events with lots of action. Most people are not excited by live video images from a coffee pot.
For Netscape users, write a server-push cgi script that keeps reading and serving the same image. (A smart script only refreshes if a new image was uploaded).
For browsers that do not support server-push, add a similar
Browser capabilities
Netscape Navigator
Netscape Navigator supports `server push', also referred to as `multipart-mime', starting from version 2.0. When an application sends back a content type `multipart/x-mixed-replace', the connection can be kept open, and the server can send a series of images, which the browser will show in sequence.
This is an excellent way to display live video to users. You can send a stream of jpeg images to the user, which will look like moving video, without installing any client-side additional viewers.
Also supported is `client pull', also referred to as `meta refresh'. When using the appropriate
Netscape Navigator version 4.0 performs some peculiar caching which may cause the ISpy image to not appear to be updated. There is a workaround for this by adding some javascript code to your page:
|