Bookmark and Share

<embed>, <object> :: Attributes for Video/Audio

 
Where to include the attributes  
 

• <object>

For the <object> tag, few attributes are included within the <object> tag itself.

The rest of the attributes are to be included using a special tag <param> as the content of the <object> element i.e. between the opening <object> tag and the closing </object> tag.

<param> is an empty element of the form <param name="__" value="__"> </param> and is used to set attributes to the <object> element.

• <embed>

For the <embed> element all the attributes are defined within the opening tag itself.

Move To  

Required Attributes for Video  
 
The following attributes are be used within the object and/or embed tags when adding a Flash movie to an HTML page:

• WIDTH and HEIGHT for the flash movie

  • <object ... width="__px" height="__%" ... >
  • <embed ... width="__px" height="__%" ... >
Can be specified either in pixels or as a percentage of the parent element holding this element.

• ACTIVEX CONTROL to be used by the browser

  • <object ... classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ... >
This attribute enables the browser to identify the ActiveX control required to play the movie. In the absence of this the browser uses the data in the movie file header or the file name extension to decide on the ACTIVEX control to be used.

• CODEBASE/PLUGINSPACE : location of the flash player SOFTWARE for download if needed

  • <object ...
    codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"
    ... >

This attribute specifies the location of the Flash Player ActiveX control so that the browser can automatically download it if it is not already installed.

Internet Explorer on Windows will prompt the user with a dialog asking if they would like to auto-install the software for the Control. On choosing yes, the software would be automatically downloaded and installed.

Once installation is complete, the browser can make use of the Activex Control without having to restart the browser.

  • <embed ... pluginspage="http://www.macromedia.com/go/getflashplayer" ... >
This attribute specifies the location of the Flash Player plug-in so that the user can download it if it is not already installed.

The user would then need to download and install the program. To make the browser use the plugin program, it needs to be restarted.

• MOVIE URL

  • <object ... > ... <param name="movie" value="http://www.youtube.com/v/5P6UU6m3cqk" > ... </object>
  • <embed ... src="http://www.youtube.com/v/5P6UU6m3cqk" ... >
This attribute specifies the URI of the movie to be loaded.

Optional Attributes for Video  
 

• IDENTITY for the element for being used in scripts

  • <object ... id="movie12" >
  • <embed ... name="movie12" ... >
This attribute creates an identity to the Flash movie so that it can be referenced using a scripting language.

• Enabling/Disabling AUTOSTART on Loading

  • <object ... > ... <param name="play" value="true" > ... </object>
  • <embed ... play="true" ... >
This attribute instructs the browser whether or not to play the file immediately on loading in the browser.

TRUE - play, FALSE - do not play.The default value is true if this attribute is omitted.

• LOOP : Playing the movie indefinitely

  • <object ... > ... <param name="loop" value="true" > ... </object>
  • <embed ... loop="true" ... >
This attribute Specifies whether the movie repeats indefinitely or stops when it reaches the last frame.

TRUE - play indefinitely, FALSE - stop after reaching the last frame. The default value is false if this attribute is omitted.

• ALIGNMENT

By default the movie is centered in the window and the edges are cropped if the window is smaller than the movie.
  • <object ... align="t" ... >
  • <embed ... align="t" ... >
This attribute aligns the movie along the corresponding edge of the window and crops the remaining three sides as needed.

Possible values for the attribute - l, r, t, b representing left, right, top and bottom respectively.

  • <embed ... salign="t" ... >

Possible values for the attribute - l, t, r, b, tl, tr, bl, br representing left, top right, bottom, top left, top right, bottom left, bottom right of the window respectively.

l, t, r, b aligns the movie along the corresponding edge of the window and crops the remaining three sides as needed.

tl, tr aligns the movie along the corresponding corner of the window and crops the bottom and remaining right or left side as needed.

bl, br aligns the movie along the corresponding corner of the window and crops the crop the top and remaining right or left side as needed.

• SCALING

  • <object ... > ... <param name="scale" value="default" > ... </object>
  • <embed ... scale="default" ... >
Possible values
  • default » (Show all) makes the entire movie visible in the specified area without distortion, while maintaining the original aspect ratio of the movie. Borders may appear on two sides of the movie.
  • noorder » scales the movie to fill the specified area, without distortion but possibly with some cropping, while maintaining the original aspect ratio of the movie.
  • exactfit » makes the entire movie visible in the specified area without trying to preserve the original aspect ratio. Distortion may occur.

• BACKGROUND COLOR of the movie

  • <object ... > ... <param name="bgcolor" value="#349178" > ... </object>
  • <embed ... bgcolor="#349178" ... >
This attribute is used to override the background color setting specified in the Flash file. It does not affect the background color of the HTML page.

Possible values hexadecimal RGB value in the format #RRGGBB

• BASE DIRECTORY for the URL's

  • <object ... > ... <param name="base" value=="http://theedifier.com/flash/" > ... </object>
  • <embed ... base="http://theedifier.com/flash/" ... >
This attribute is used to specify the base directory to be used for all relative path statements in the Flash Player movie.

In relation to the URL's in the flash movie file, this works exactly the same way as the <Base href="__"> tag in the html document head.

The current location for the purpose of interpreting the URL'S using relative addressing would be the url specified and not the actual path where the file in display is located.

• player WINDOW MODE

  • <object ... > ... <param name="wmode" value="opaque" > ... </object>
  • <embed ... wmode="opaque" ... >
This attribute is used to set the Window Mode property of the Flash movie for transparency, layering, and positioning in the browser. Possible values -
  • window » the movie plays in its own rectangular window on a web page.
  • opaque » the movie hides everything on the page behind it.
  • transparent » the background of the HTML page shows through all transparent portions of the movie.

Using transparency may slow animation performance.

• START JAVA While Loading

This attribute specifies whether the browser should start Java when loading the Flash Player for the first time.
  • <object ... > ... <param name="swliveconnect" value="true" > ... </object>
  • <embed ... swliveconnect="true" ... >

If you use JavaScript and Flash on the same page, Java must be running for the FSCommand to work.

Possible values: true, false. The default value is false if this attribute is omitted.

• video PLAY QUALITY

  • <object ... > ... <param name="quality" value=="hight" > ... </object>
  • <embed ... quality ="high" ... >
This attribute is used to specify the quality and speed of the movie being played. The Possible values are
  • low » favors playback speed over appearance and never uses anti-aliasing.
  • autolow » emphasizes speed at first but improves appearance whenever possible. Playback begins with anti-aliasing turned off. If the Flash Player detects that the processor can handle it, anti-aliasing is turned on.
  • autohigh » emphasizes playback speed and appearance equally at first but sacrifices appearance for playback speed if necessary. Playback begins with anti-aliasing turned on. If the actual frame rate drops below the specified frame rate, anti-aliasing is turned off to improve playback speed.
  • medium » applies some anti-aliasing and does not smooth bitmaps. It produces a better quality than the Low setting, but lower quality than the High setting.
  • high » favors appearance over playback speed and always applies anti-aliasing. Bitmaps are smoothed only if the movie does not contain animation.
  • best » provides the best display quality and does not consider playback speed. All output is anti-aliased and all bitmaps are smoothed.

• Aliasing

On devices where display is interpreted in terms of pixels (like on computer screens), aliasing is the effect of diagonal and curved lines being displayed as a series of little zigzag horizontal and vertical lines.

• Anti Aliasing

When the pixels are large there is a possibility for these zigzags to be visible whereby the lines would not look smooth.

To reduce this effect, a technique by name Anti-aliasing is used. In this process, the pixels along the borders of graphical elements are shaded. The computer works out how much of each pixel in-between would be covered by the diagonal line and draws that pixel as an intermediate shade between background and foreground.

The process of anti aliasing requires the computers processing power and as such this may effect the speed of performance of other activities.

• OPTIONS to be displayed in the CONTEXT MENU

  • <object ... > ... <param name="menu" value="true" > ... </object>
  • <embed ... menu="true" ... >
This attribute instructs the browser whether or not to display all the options within the context menu related to the element. The context menu is displayed by pointing at the movie and right clicking with the mouse.

TRUE - display all options, FALSE - display minimum options. The default value is true if this attribute is omitted.

• Click to Activate and use this control

Eolas Technology holds exclusive rights to the University of California patent over a mechanism that is used by developers to embed and invoke interactive programs such as an ActiveX control into Web browsers.

After having lost a legal battle with Eolas involving this Patent, microsoft has modified its IE software. On account of this modification, a user is required to click on the object before it is activated for use.

This effects anything included in the webpage using the object, embed or applet tags. The ruling is appealed and if Eolas wins, then all the browsers would have to incorporate such a feature or pay royalties to Eolas for use of their technology.

Move To  

Attibutes for AUDIO EMBED  
 

• WIDTH - HEIGHT

  • <embed ... width="__px" ... >
This attribute specifies the width (in pixels) of the Audio Control Panel. The optimal width to use is 144 pixels. Internet Explorer yields a reasonable panel and Navigator a Standard panel with this value.

If a value less than optimal is used the control panel is chopped off in Navigator. Similar behaviour is noticed even if the attribute is not used at all.

If a value greater than optimal is used a blank area is inserted to the right.

  • <embed ... height="__px" ... >
This attribute specifies the height (in pixels) of the Audio Control Panel. The optimal width to use is 60 pixels. Internet Explorer yields a reasonable panel and Navigator a Standard panel with this value.

If a value less than optimal is used the control panel is chopped off in Navigator. Similar behaviour is noticed even if the attribute is not used at all.

If a value greater than optimal is used a blank area is inserted at the top.

• AUDIO URL

  • <embed ... src="http://www.geocities.com/kalyan_manda/Mounangane.mp3" ... >
This attribute specifies the URI of the audio file to be loaded.

• ALIGNMENT

  • <embed ... align="center" ... >
This attributes specifies how the control panel should be aligned. Aligning control panel is similar to aligning images.

Possible options are Left, Right, Top, Bottom, Center, Baseline, Texttop, Middle, Absmiddle, Absbottom.

• IDENTITY for the element for being used in scripts

  • <embed ... name="audio14" ... >
This attribute creates an identity to the element so that it can be referenced using a scripting language.

• Show/Hide Control Panel

  • <embed ... hidden="true" ... >
This attribute instructs the browser whether or not to display the audio control panel.

TRUE - hide, FALSE - display. The default value is false if this attribute is omitted.

• Enabling/Disabling AUTOSTART on Loading

  • <embed ... autostart="true" ... >
This attribute instructs the browser whether or not to start playing the sound track immediately on loading in the browser.

TRUE - play, FALSE - do not play.

The default value is true for internet explorer and false for navigator (if this attribute is omitted). On Macintosh machines the default value is false for both browsers.

• LOOP/PLAYCOUNT : Playing the audio track indefinitely

  • <embed ... loop="true" ... >
This attribute (works only in Navigator) specifies whether the audio track should be played repeatedly or should it be stopped after playing once or the specified number of times.

TRUE - play indefinitely, FALSE - stop after reaching the end of the track. A NUMER - play that many number of times.

The default value is false if this attribute is omitted.

  • <embed ... playcount="4" ... >
This attribute (works only in Internet Explorer) specifies the number of times the audio track should be played. The track would be played as many times as the number specifies.

The default value is infinite number of times if this attribute is omitted.

• Background Music

Including background music in your web pages can be achieved by using the following combination of attributes

autostart="true", hidden="true"

The loop="__" or playcount="__" attribute may be used according to the duration for which you want the background music to be played.

• VOLUME LEVEL

  • <embed ... volume="50" ... >
This attribute (works only in Navigator) specifies the volume level at which the audio track should be played.

The value for this attribute can range from 0 to 100. The default value is 50.

• STARTING POINT

  • <embed ... starttime="1:12" ... >
This attribute (works only in Navigator) indicates the spot on the track from where the file is to be played. The spot is to be specified in minutes (part of minutes in seconds) from the beginning of the track.

The audio track will start playing from that point immediately on download (when autostart is set to true) or when you hit the play button for the first time.

An error message is returned if a time longer than the soundtrack length is specified.

• ENDING POINT

  • <embed ... endtime="2:18" ... >
This attribute (supported only by Navigator) indicates the spot on the track at which the file should stop playing. The spot is to be specified in minutes (part of minutes in seconds) from the beginning of the track.

An error message is returned if a time longer than the soundtrack length is specified.

• PLUGINSPACE/PLUGINURL : location of the player SOFTWARE for download if needed

  • <embed ... pluginspace="__" ... >
This attribute (supported only by Navigator) specifies the location of the plug-in software needed to run the sound file.
  • <embed ... pluginurl="__" ... >
This attribute (supported only by Navigator) specifies the location of the software needed to install the specified plug-in.

• LINKING the Control to a URL

  • <embed ... href="http://theedifier.com/blogging-blogger/" ... >
This attribute (works only in Internet Explorer) indicates the destination of the url related to the audio control.

This is the destination to which the user is taken when the user clicks on the "Open this link" option on the menu related to audio control panel.

Author Credit : The Edifier  

Move To  
Bookmark and Share

♣ Copyright � Krishbhavara. All rights reserved
♣ Site optimized for Internet Explorer 5.5 and above