Object Embed
Object Embed is the traditional method of embedding rich media on a webpage, in a Website or within a Web Application.
Contents
Embedding Media Objects
Flash
.flv and .swf files are played by the Adobe Flash (previous versions by the Macromedia Shockwave) browser plugin, which may alternatively provide a link to the Adobe site where Flash can be installed if it is not already installed on the user's system (or not up to date for supporting the media format of the file trying to be played).
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,30,0" width="300" height="120"> <param name="movie" value="/ec0605lc/eventcenter/html/site/flash.swf" /> <param name="quality" value="high" /> <param name="salign" value="TL" /> <embed src="/ec0605lc/eventcenter/html/site/flash.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="300" height="120" salign="TL"></embed> </object>
Divx
DIVX videos are played by the DIVX web player, or, if that's not installed but another media player plugin such as VLC, RealMedia, WindowsMedia or QuickTime is present, then it may try to play the video directly as a fallback, but most divx encoded videos will not work on these players (with the possible exception of VLC) unless additional codecs are present on the user's system (i.e. divx and xvid).
<object classid="clsid:67DABFBF-D0AB-41fa-9C46-CC0F21721616" width="320" height="260" codebase="http://go.divx.com/plugin/DivXBrowserPlugin.cab"> <param name="src" value="movie.divx"/> <embed type="video/divx" src="movie.divx" width="320" height="260" pluginspage="http://go.divx.com/plugin/download/"> </embed> </object>
Windows Media
.avi, .wmv, .asx, .asf files are played by the Windows Media Player browser plugin when it is available, and on Windows may prompt to download the software from the Microsoft website if it is not installed (or up to date for supporting the media format).
An embed looks something like the following:
<object id="mediaPlayer" width="315" height="283" classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715" standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject"> <param name="filename" value="http://dzone.webex.com/ec0605lc/eventcenter/html/site/videocheck.wmv"> <embed type="application/x-mplayer2"pluginspage="http://www.microsoft.com/windows/windowsmedia/" filename="http://dzone.webex.com/ec0605lc/eventcenter/html/site/videocheck.wmv" name="mediaPlayer2" id="mediaPlayer2" width="315" height="283"></embed> </object>
Quicktime
.mov, .m4v, .mp4, .mkv files are played by the Quicktime Media Player browser plugin when it is available, and on Mac may prompt to download the software from the Apple website if it is not installed (or up to date for supporting the media format).
An embed looks something like the following:
<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="https://www.apple.com/qtactivex/qtplugin.cab" width="315" height="283"> <param name="cache" value="true"> <param name="src" value="https://dzone.webex.com/ec0605lc/eventcenter/html/site/videocheck-qt.mov"> <param name="autoplay" value="true"> <param name="controller" value="true"> <embed width="315" height="283" pluginspage="https://www.apple.com/quicktime/download/" src="/ec0605lc/eventcenter/html/site/videocheck-qt.mov" type="video/quicktime" controller="true" autoplay="true" cache="true" /> </object>
Real Media
.rm, .ra, .ram and .rmvb files are handled and played by the Real Media desktop-based media player, and may be activated via a browser plugin. Before Quicktime, before Windows Media player, before even Flash dominated the media embedding market, Real Media provided the first audio and video formats designed for mass-distribution via the World Wide Web
An embeded Real Media object would look roughly as follows:
<OBJECT id='rvocx' classid='clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA' width="320" height="240"> <param name='src' value="http://servername/path/to/media.rm" /> <param name='autostart' value="true" /> <param name='controls' value='imagewindow' /> <param name='console' value='video' /> <param name='loop' value="true" /> <EMBED src="http://servername/path/to/media.rm" width="320" height="240" loop="true" type='audio/x-pn-realaudio-plugin' controls='imagewindow' console='video' autostart="true"> </EMBED> </OBJECT>
Tools
- Validifier - Turn Flash embed code into valid XHTML: http://validifier.com/
- Embedded Media HTML Generator: http://cit.ucsf.edu/embedmedia/step1.php
Resources
- OBJECT - Embedded Object reference: http://htmlhelp.com/reference/html40/special/object.html
- EMBED Element | embed Object: http://msdn.microsoft.com/en-us/library/ms535245(VS.85).aspx
- Adobe Flash - OBJECT and EMBED tag attributes: http://kb2.adobe.com/cps/127/tn_12701.html
- The EMBED Tag: http://www.webreference.com/js/column20/embed.html
Tutorials
- Using applet, object and embed Tags: http://download.oracle.com/javase/1.5.0/docs/guide/plugin/developer_guide/using_tags.html
External Links
- DreamHost - Object Embedding: http://wiki.dreamhost.com/index.php/Object_Embedding
- wikipedia: Object Linking and Embedding
- Flash Satay: Embedding Flash While Supporting Standards: http://www.alistapart.com/articles/flashsatay
- Bye Bye Embed: http://www.alistapart.com/articles/byebyeembed
- A List Apart's Flash Satay method improved: http://www.stilldreamer.com/programming/a_list_aparts_flash_satay_method_improved/
- Embedding YouTube Videos May Soon Be a Felony: http://www.infowars.com/embedding-youtube-videos-may-soon-be-a-felony/
See Also
IFrame | Applet | Quicktime | Windows Media Player | Flash | Silverlight | HTML5 | oembed- ↑ RESULT: https://dzone.webex.com/ec0605lc/eventcenter/support/flashAction.do?siteurl=dzone
- ↑ Simple DIVX Embed example: http://labs.divx.com/node/16578
- ↑ RESULT: https://dzone.webex.com/ec0605lc/eventcenter/support/mediaAction.do?siteurl=dzone
- ↑ RESULT: https://dzone.webex.com/ec0605lc/eventcenter/support/quicktimeAction.do?siteurl=dzone