Showing posts with label HTML Object Element. Show all posts
Showing posts with label HTML Object Element. Show all posts

Tuesday, August 14, 2012

HTML Object Element

The purpose of the <object> element is to support HTML helpers (Plug-Ins)

HTML Helpers (Plug-Ins)

Beatles    A helper application is a program that can be launched by the browser to "help". Helper applications are also called Plug-Ins.

Helper applications can be used to play audio and video (and much more). Helper applications are launched using the <object> tag.

One advantage of using a helper application to play video and audio, is that you can let some (or all) of the player settings be controlled by the user.

Most helper applications allow manual (or programmed) control over the volume settings and play functions like rewind, pause, stop and play.


The Best Way to Play Videos in HTML?

For the best general way to include videos in HTML, refer to the next chapter.

Playing Wave Audio Using QuickTime

Example

<object width="420" height="360"
classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
codebase="http://www.apple.com/qtactivex/qtplugin.cab">
<param name="src" value="liar.wav" />
<param name="controller" value="true" />
</object>

Try it yourself »


Playing MP4 Video Using QuickTime

Example

<object width="420" height="360"
classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
codebase="http://www.apple.com/qtactivex/qtplugin.cab">
<param name="src" value="movie.mp4" />
<param name="controller" value="true" />
</object>

Try it yourself »


Playing SWF Videos Using Flash

Example

<object width="400" height="40"
classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="http://fpdownload.macromedia.com/
pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0">
<param name="SRC" value="bookmark.swf">
<embed src="bookmark.swf" width="400" height="40"></embed>
</object>

Try it yourself »

Playing WMV Movies Using Windows Media Player

The example below shows the suggested code used to display a Windows Media file.

Example

<object width="100%" height="100%"
type="video/x-ms-asf" url="3d.wmv" data="3d.wmv"
classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">
<param name="url" value="3d.wmv">
<param name="filename" value="3d.wmv">
<param name="autostart" value="1">
<param name="uiMode" value="full" />
<param name="autosize" value="1">
<param name="playcount" value="1">
<embed type="application/x-mplayer2" src="3d.wmv" width="100%" height="100%" autostart="true" showcontrols="true" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"></embed>
</object>

Try it yourself »


Plug-Ins

Plug-Ins can be used in HTML for many purposes. They can be used to display maps, verify your bank id, control your input, and much more. The restrictions are few.