LexiConn Knowledgebase

Knowledgebase Home | Favorites Knowledgebase Home | Favorites
Search the Knowledgebase Browse by Category
How do I Embed a Quicktime Video on One of My Pages?
Article Details

Last Updated
12th of September, 2008

User Opinions (11 votes)
90% thumbs up 9% thumbs down

How would you rate this answer?
Helpful
Not helpful

The old method for embedding Quicktime video on your web page was as follows:

<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" 
  codebase="http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0"
  width="320" height="256" align="middle">
  <param name="src" value="[your_video_filename.mov]" />
  <param name="autoplay" value="true" />
 <embed src="[your_video_filename.mov]" autoplay="true" width="320"
  height="256" align="middle" bgcolor="black"
  pluginspage="http://www.apple.com/quicktime/download/">
 </embed>
</object>

In order for your embedded Quicktime videos to display properly in the newest version of Internet Explorer, you will need to use a different method of embedding them in your page. You will need to include an external javascript file and call a javascript function to embed it into your page. You can download the javascript include from Apple's website at:


After uploading this javascript file to your site, you will inlcude it in the <head> region of the page where your video will appear:
<script src="[path]/AC_QuickTime.js" language="JavaScript" type="text/javascript"></script>).

Where you would like your video to appear on the page, you will all the following javascript function, passing any attributes you would like to set (replace any value in braces with your own values). There are two versions provided--the first provides HTML 4.0-compliant code while the second provides XHTML-compliant code:

HTML 4.0-Compliant Function Code

<script type="text/javascript">
QT_WriteOBJECT(
  "[url]", "[width]", "[height]", "",
  "align","[alignment]",
  "src", "[your_video_filename]",
  "emb#bgcolor","[background-color]",
  "autoplay","[true|false]",
  "[other_attributes]", "other_attribute_values"
);
</script>

Here is a sample function call with values:

<script type="text/javascript">
QT_WriteOBJECT(
  "http://www.mysite.com/media/", "400", "300", "",
  "align","center",
  "src", "mymovie.mov",
  "emb#bgcolor","#000000",
  "autoplay","false"
);
</script>

XHTML-Compliant Function Code

<script type="text/javascript">
QT_WriteOBJECT_XHTML (
  "[url]", "[width]", "[height]", "",
  "align","[alignment]",
  "src", "[your_video_filename]",
  "emb#bgcolor","[background-color]",
  "autoplay","[true|false]",
  "[other_attributes]", "other_attribute_values"
);
</script>

Here is a sample XHTML function call with values:

<script type="text/javascript">
QT_WriteOBJECT_XHTML (
  "http://www.mysite.com/media/", "400", "300", "",
  "align","center",
  "src", "mymovie.mov",
  "emb#bgcolor","#000000",
  "autoplay","false"
);
</script>


Documentation on the full range of attributes you can apply to a Quicktime video can be found at http://www.apple.com/quicktime/tutorials/embed2.html#src


Related Articles
Attachments
No attachments were found.

Powered by Interspire Knowledge Manager Knowledgebase Software