Latest Job News

Multimedia in Web Technology:

We can put multimedia files like audio, video and flash files in HTML documents. We can add multimedia files in two ways. Linking and Embedding.

Linking: 

When you link to multi media file then the browser has to decide how to handle that file. If the browser cannot handle that type of file then the user has to install a plug-in compatible with the browser. If the browser is not handle the file then it offers to download that file otherwise the browser will not an external application like windows media player (or) real player.

Example:
 

<html>
<head>
<title>linking multi media file</title>
</head>
<body>
<a href=”http://www.apple.com/quicktime”>apple</a>is required to view the movie
<a href=”http://www.apple.com/quicktime”>
<image src=”setquicktime.gif” broder=”0” width=”88”>a/a></p>
<a href=”video.gif”> Sample video</a>
</body>
</html>

 

Embedding: 

To embed the media files within the page, we have to include tags in your page that indicate how the media should be presented within the page. We can include any type of media files in your page very easily. The main drawback for this one is if the user does not have the right software, the media files cannot be run and they will see a broken file and prompted for downloading of additional software.

<embed> Tag: The embed tag was introduced by Netscape to enable files that require plug-in to view within a web page. The embed tag indicates the Netscape plug-in should be used to view embedded media. The  syntax of embed tag is as follows:

<embed src=”file_name” Type=”mime type” Width=”nn” Height=”nn”
Align=”top/bottom/middle/left/right”
Plugins page=”url of plugin”>

The attributes are as follows:

Src: It is used to specify the location of the external file. Its value must be the URI of the resource being embedded.

Type: It is used to specify the type of the embedded content. If specified, the value must be a MIME type.

Width:  It is used to specify the width, in pixels, to display the external content.

Height: It is used to specify the height, in pixels, to display the external content.

Align: It is used to specify the alignment. The possible values are top/bottom/middle/left/right”

Plugins page: It is used to specify the url of plug-in which is used to play the file.
 

<html>
<head>
<title> Embed tag </title>
<body>
<embed src="/example.wav" autostart="false" loop="3" hidden="false" volume="50" width="180" height="40">
</body>
</html>

<object> Tag:

The HTML <object> tag is used for embedding an object within an HTML document. Use this tag to embed multimedia in your web pages. You can use the <param> tag to pass parameters to plugins that have been embedded using the <object> tag. You can also use the <object> tag to embed another web page into your HTML document.

The following are the different attributes of <object> tag.

Data: It is used to specify the location of data to be used by the object. The value must be a valid URL.

Type: it is used to specify the object type as specified in the data attribute. Must be a valid MIME type.

Name: It is used to assign a name to the object.

Usemap: It is used to specify the name of an image map to use on this object.
Possible values:

Width: It is used to specify the width, in pixels, to display the external content.

Height: It is used to specify the height, in pixels, to display the external content.

Example:


<html>
<head>
<title> Object tag </title>
<body>
<object data="/img/button.swf" type="application/x-shockwave-flash" width="88" height="31">
<param movie="/img/button.swf" />
</object>
</body>
</html>

Back to HTML Questions