
In early 2006, Microsoft made available an updated version of Internet Explorer browser for Windows. The changed Internet Explorer for Windows handles QuickTime and other ActiveX controls in a new way. Rather than automatically rendering and displaying QuickTime content, the updated browser prompts the user to confirm each QuickTime item on a page. Not all websites will be affected by the upcoming changes to Internet Explorer for Windows. Your website may be affected if it features QuickTime content that is contained in an HTML web page using <object>, <embed>, or <applet> tags. This document describes changes that can be made to the way web pages are coded, so that webmasters, website owners, businesses, and individuals can ensure their websites will continue to provide a similar experience for all visitors no matter what browser they are using.
Read the Microsoft documentation for a complete description of the changes to Internet Explorer for Windows.
Getting Started Now
Website owners, administrators and webmasters are urged to begin profiling and updating their website now in order to provide the best user experience. The HTML changes proposed here are backwards compatible with current browsers, but necessary for users of the changed Internet Explorer for Windows.
Here are some examples of "before and after" code that you can use to manually update your website:
Code to Replace
Here's an example of code (a simple <object> tag) that will not function as it did previously when loaded in the changed version of Internet Explorer for Windows:
<object classid="clsid:02BF25D5..." ...>
<param name="src" value="sample.mov">
</object>
If you replace this tag with a script that calls code outside of your HTML page, as described in the two following methods, it should work as expected in the changed version of IE for Windows.
The following JavaScript fixes have been extensively tested and found to work in the broadest set of cases.
External JavaScript Solution One: For Single or Few Occurrences of Quicktime Content
If your site has only a small number of pieces of QuickTime content, you may want to use the following simple solution. To implement this, you need to create unique external JavaScript (JS) files for each page on your site that contains QuickTime content. Note: If you have more than one piece of QuickTime content on a page, create unique functions (see Step 1) within the external JS file to document.write tags for each separate content piece.
The steps to do this are:
- Create and place the external JS file on your site. In this example, call it InsertMovie.js. This script needs to document.write the full object/embed tag that was previously in your HTML file:
function InsertSampleMovie()
{
document.write('<object classid="clsid: 02BF25D5..." ...>\n');
document.write('<param name="src" value="sample.mov" />\n');
document.write('</object>\n');
}
- Add a JavaScript include statement that points to the JavaScript file from Step 1 to the <HEAD> section of the web page that embeds the content.
<script src="[path]/InsertMovie.js" language="JavaScript" type="text/javascript"></script>
- Replace each <object>, <embed>, or <applet> tag with a call to the appropriate external files as follows:
<script language="JavaScript"type="text/javascript" >InsertSampleMovie();</script>
External JavaScript Solution Two: For Multiple Occurrences of QuickTime Content
If your site has a lot of QuickTime content, or if you include it in multiple ways, this solution gives you some advantages over Solution One. You can use a single external JS file for all of your QuickTime content, instead of creating one for each affected file (as in Solution One). The JS file contains functions that include your QuickTime content based on parameters passed from the main page.
There are three steps you need to follow to implement this solution:
- Copy the external JS file that contains the new functions to a shared location on your website. Call it AC_QuickTime.js for this example, or any other name that you choose.
Download the JavaScript files.
The code in these files uses arguments that you pass to it (see Step 3) to construct a complete tag string that it writes to your document.
- Add a JavaScript include statement that points to the shared JavaScript files from Step 1 to the <HEAD> section of each web page on your site that includes an object/embed tag.
<script src="[path]/AC_QuickTime.js" language="JavaScript" type="text/javascript"></script>
- Replace each instance of <object> and <embed> tags in your pages with the appropriate function calls. There are two function calls for you to choose from: one for QuickTime content in HTML files and one for content in XHTML files.
QT_WriteOBJECT(
"contentURL", "embedWidth", "embedHeight", "activeXVersion",
"attributeName1","attributeValue1",
"attributeName2","attributeValue2",
...
"attributeNameN","attributeValueN"
);
QT_WriteOBJECT_XHTML (
"contentURL", "embedWidth", "embedHeight", "activeXVersion",
"attributeName1","attributeValue1",
"attributeName2","attributeValue2",
...
"attributeNameN","attributeValueN"
);
To replace the <object> and <embed> tags with calls to these functions, pass the src, width, and height attributes from the original tags as parameters 1 through 3, pass the version of the ActiveX control required by your page (if any) as parameter 4, and pass the rest of the attributes as pairs of arguments.
These functions automatically insert the correct, classid, codebase (with ActiveX control version), and pluginspage tags with standard values if they are not specified in the parameter list. You need not supply these tags unless you require non-standard values.
Although <object> and <embed> tags typically use the same values for all attributes and parameters, it is sometimes useful to have different values so a page is displayed differently in different browsers. To accommodate this, any attribute name parameter prefixed with emb# will be added to the embed tag only, and attribute name prefixed with obj# will be added to the object tag only.
For example, to replace the following object and embed tags:
<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="sample.mov" />
<param name="autoplay" value="true" />
<embed src="sample.mov" autoplay="true" width="320"
height="256" align="middle" bgcolor="black"
pluginspage="http://www.apple.com/quicktime/download/">
</embed>
</object>
You would insert the following function call in its place:
<script language="JavaScript" type="text/javascript">
QT_WriteOBJECT_XHTML('sample.mov', '320', '256', '',
'autoplay', 'true',
'emb#bgcolor', 'black',
'align', 'middle');
</script>
The classid, codebase (with ActiveX control version), and pluginspage tags have been omitted from the function call because they all have standard values. Also notice that the bgcolor parameter has a emb# prefix so it will be added to the embed tag only.
At runtime, the function call will generate the following tags:
<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
width="320" height="256"
codebase="http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0"
align="middle" >
<param name="src" value="sample.mov" />
<param name="autoplay" value="true" />
<embed src="sample.mov" width="320" height="256"
pluginspage=http://www.apple.com/quicktime/download/
align="middle" autoplay="true" bgcolor="black" > </embed>
</object>
What About Users Who Have JavaScript Turned Off?
Both of the above methods rely on JavaScript. A small percentage of visitors to your site may have disabled JavaScript in their browsers. The techniques suggested above will not work for these few usersthey won't see your content at all.
One thing to keep in mind is that many or most Internet Explorer users who have disabled JavaScript have also disabled support for ActiveX controls. Therefore, users who have disabled ActiveX have not been seeing QuickTime content displayed in Internet Explorer for Windows and the migration to JavaScript techniques for embedded content doesn't alter or affect their experience. You only need to be concerned about users who have disabled JavaScript, but have ActiveX enabled.
|