ObjectSupport

From HTML WG Wiki
Revision as of 18:36, 9 February 2010 by Kkrueger (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Testing Support in Browsers for the Object element

Introduction

This page is designed to develop tests for existing and historical browsers support for the OBJECT element. Secondly, the page acts as a repository to collect the results of those tests.

Test pages

Results

Simplest form

With this simplest form, the only attribute provided by the author is the @data attribute with an URL pointing to the source of the embedded content. With this simplest form, this test determines whether browsers extract the pixel dimension metadata to determine the intrinsic pixel dimensions of the file and display it accordingly. For audio, obviously there are non, though even then we test to see if the browser provides some visual indication of the audio file. In the case of both audio and video we're interested in whether the browser provides standard controls (e.g., play/pause, volume, etc.).

Note: Though typically still images are handled internally by browsers, video, flash and audio may be handled externally in cooperation with specialty plugins. In this way the success or failure of these test will depend on environmental settings beyond simply the browser.

<object data='filename' >fallback content </object>
Images (intrinsic dimensions) Time-based (intrinsic dimensions) Time-based (controls)
Browser PNG JPEG GIF Video Audio Flash Video Audio Flash
WinIE7 n n n n n n n n n
MSIE6  ?  ?  ?  ?  ?  ?  ?  ?  ?
Firefox 2 Y Y Y n n n n n n
Safari 3.0 Y Y Y n n Y n n n
Opera 9 Y Y Y Y Y Y Y Y Y
iCab 3 Y Y Y Y Y Y Y Y n

Note: Lack of any default controls on flash is likely the result of the flash plugin.

Author-provided dimensions

With this second form, authors not only attribute provide the @data attribute with an URL reference pointing to the source of the embedded content, they also provide explicit pixel dimenssions for the height and width of the embedded content (presumably looked up by the author from the files metadata). With this form, this test determines whether browsers handle the author specified pixel dimension correctly: e.g., without adding AN unnecessary scrolling mechanism. Again, for audio, obviously there are non, though even then we test to see if the browser provides some visual indication of the audio file. In the case of both audio and video we're interested in whether the browser provides standard controls (e.g., play/pause, volume, etc.). Most of the browsers handle this technique well. Safari 3.0 beta, is the one exception.

Note: Though typically still images are handled internally by browsers, video, flash and audio may be handled externally in cooperation with specialty plugins. In this way the success or failure of these test will depend on environmental settings beyond simply the browser.

  <object width='x' height='y' data='filename' >fallback content </object>
  where the author looks up and provides the metadata for the width ('x') and height ('y').
Images (dimensions) Time-based (dimensions) Time-based (controls)
Browser PNG JPEG GIF Video Audio Flash Video Audio Flash
WinIE7 Y Y Y Y Y Y Y Y n
MSIE6  ?  ?  ?  ?  ?  ?  ?  ?  ?
Firefox 2 Y Y Y Y Y Y Y Y n
Safari 3.0 Y Y Y n n Y n n n
Opera 9 Y Y Y Y Y Y Y Y n
iCab 3 Y Y Y Y Y Y Y Y n

Note: Lack of any default controls on flash is likely the result of the flash plugin.

Use of param

For these most routine uses of the OBJECT element, all of the major browsers finally support markup requiring a minimal authoring effort. Except for IE, authors need only provide an OBJECT element with a data attribute. Without explicit height and width attributes IE assumes a height and width of 0. Other browsers and plugins may work better than IE by simply defaulting to reasonable OBJECT box dimensions even without taking the extra step to determine the media files metadata intrinsic dimensions. The browser or the plug-in handler takes care of the rest. For IE and some handlers authors may need to add height and width attributes since IE and some plugins may not provide the intrinsic height and width of the media file to the browser. Due to a bug in its QuickTime plugin, Safari currently requires the additional markup of including an explicit PARAM element repeating the URL for the source data using a name of 'src'. For example:

<object data='TestVideo.3gp'>
   <param name='src' value='TestVideo.3gp'>
         Short except from Bill Mahr's show Politically Incorrect
</object>

A third test/example of this markup is available.

Related Email

  • Karl Dubost (August 2007). Mentions the ways the treatment of embedded SVG and its DOM is different from SVG as part of a compuond document sharing a single DOM: linking to two references Simon Willison and Apple.
  • Doug Schepers (August 2007). Suggests including additional types for testing OBJECT: SVG and 'text/html'[might also consider'text/plain'].
  • Michael A. Puls II (21 August 2007). Discussed possible solutions for Mozilla and other browsers.