A QuickTime Streaming Movie Example
This is an example of embedding a streamed QuickTime video within a Web page. The video was created by WUFT-TV News using Final Cut Pro. It is streamed using QuickTime Streaming Server. Of course, if you don't already have it, you need to download and install QuickTime for this to work.
The new way
We can't do this the old object/embed way (see below) because Internet Explorer would require a click to render the page past the player. This example uses Apple's QuickTime-loading JavaScript to accomplish this. What this script does is use JavaScript to write the code from the old way into the document.
<script language="JavaScript" src="/includes/AC_QuickTime.js" type="text/JavaScript"></script>
<script language="JavaScript" type="text/javascript"> QT_WriteOBJECT_XHTML('/news/webcast/Michelles-Mom.mov', '320', '256', '', 'autoplay', 'true', 'controller', 'true', 'loop', 'false'); </script> <noscript>You must have Javascript enabled to view the multimedia content on this page.</noscript>
The old way
The code for the above looks like this:
<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="320" height="256" codebase="http://www.apple.com/qtactivex/qtplugin.cab"> <param name='src' value="/news/webcast/Michelles-Mom.mov"> <param name='autoplay' value="true"> <param name='controller' value="true"> <param name='loop' value="false"> <embed src="/news/webcast/Michelles-Mom.mov" width="320" height="256" autoplay="true" controller="true" loop="false" pluginspage='http://www.apple.com/quicktime/download/'> </embed> </object>
You need to redundant embed and object code in order for things to work in both IE and Firefox. It causes a code validation error, but that's generally considered acceptable.
The .mov linked above is not the actual movie file, but an XML file that contains a pointer to the stream. This is called a "QuickTime Link" file. They sometimes have the extension .qtl, but I was having problems getting that to work on certain browsers and .mov is acceptable as an alternative. Here is an example of the code within that file (correct except that "servername" and "moviename" have been changed to protect the innocent:
<?xml version="1.0"?> <?quicktime type="application/x-quicktime-media-link"?> <embed src="rtsp://servername/moviename.mov" autoplay="true" />
Or, the file may just look like this:
RTSPtextRTSP://servername:554/moviename.mov
Happy streaming.
The Campaign for the University of Florida