Embedding Spook video into a webpage

Once you have Spook running and serving video, you may want to embed your new stream into a webpage to make it easier to view. QuickTime makes this easy, fortunately. The below HTML recipe should work for both Mozilla-based browsers and Internet Explorer, and should even allow the user to download the QuickTime plugin if it is not already installed.

Because of some brokenness with the way Mozilla handles plugins, you'll need to make an empty dummy file to reference in the embed tag, even though this is not used by QuickTime. In the below example, you'll need a file named "dummy.mov" in the same directory as the HTML file. This file can be zero-length.

<object CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="320" height="240" codebase="http://www.apple.com/qtactivex/qtplugin.cab">
<param name="src" value="dummy.mov" />
<param name="controller" value="false" />
<param name="qtsrc" value="rtsp://foo:7070/webcam" />
<embed src="dummy.mov" qtsrc="rtsp://foo:7070/webcam" width="320" height="240" controller="false" PLUGINSPAGE="http://www.apple.com/quicktime/download/">
</embed>
</object>

Obviously, replace the rtsp URIs with an appropriate URI for your stream, and replace both sets of width and height tags if your Spook is running at a different resolution than 320x240.

If you'd like to do something fancier with your embedded video stream, take a look at Apple's QuickTime Embedding reference for more explanation and a list of tags that can be used to control QuickTime.


Last modified 2004-11-13 by lutchann.