Multimedia

Multimedia refers to data and applications in any format or media

------------ Application Files Data Files Mime Helper Applications Plug-ins ------------
Links to external multimedia files

The simplest way to add multimedia files to a webpage is to insert links using the <a>..</a> element. The href attribute is set to the URL of the multimedia file you want to attach.

When connecting to multimedia the following things happen.

* The browser handle the file itself and renders to display on the browser (HTML, GIF, JPG and PNG files) * The browser can handle using the plug-ins (Text file, PDF files, some images , sounds and movie) * The browser cannot handle the file but has access to a helper application that can handle it. (Word, Excel, and Power Point documents etc.,) * The browser cannot identify a helper application and asks the user to download the file to the local file system.
snippet
<html> 
<head></head> 
<body> 
Click on the below link  to follow the link 
<a href="file.html" target="w1">Link to a .html file</a><br /> 
<a href="file.txt" target="w1">Link to a .txt file</a><br /> 
<a href="file.gug" target="w1">Link to a .gug file</a><br /> 
<a href="file.rtf" target="w1">Link to a .rtf file</a><br /> 
<a href="file.pdf" target="w1">Link to a .pdf file</a><br /> 
<a href="file.swf" target="w1">Link to a .swf file</a><br /> 
<a href="file.doc" target="w1">Link to a .doc file</a><br /> 
<a href="file.xls" target="w1">Link to a .xls file</a><br /> 
<a href="file.au" target="w1">Link to a .au file</a><br /> 
<a href="file.wav" target="w1">Link to a .wav file</a><br /> 
<a href="file.mp3" target="w1">Link to a .mp3 file</a><br /> 
<a href="file.avi" target="w1">Link to a .avi file</a><br /> 
<a href="file.mov" target="w1">Link to a .mov file</a><br /> 
<a href="file.ra" target="w1">Link to a .ra"file</a><br /> 
</body> 
</html>
Embed multimedia files with <embed> element

Multimedia content can be directly inserted into the browser window using the <embed>..</embed> element.

Attributes of the <embed> element.

AttributesDescription
srcA valid URL of the multimedia file
typeThe MIME type associated with the multimedia file. This attribute is not necessary as the browser itself determine based on the extension.
widthThe width of the space the browser will allocate to the multimedia file.
heightThe height of the space the browser will allocate to the multimedia file.
alignThe alignment used to render the content of the multimedia file relative to the other elements
hiddenDefines whether or not controls will be shown on the web page. Values are "true" or "false"
snippet
<html> 
<head></head> 
<body> 
<table> 
<tr> 
    <td><embed src="logo.jpg" width="100" height="200"></embed></td> 
    <td><embed src="sound.mp3" width="100" height="200"></embed></td></tr> 
</table> 
</body> 
</html>
Output
Embed multimedia files with <object> element
Multimedia content can be directly inserted into the browser window using the <object>..</object> element. Attributes of the <embed> element.
AttributesDescription
dataA valid URL of the multimedia file
typeThe MIME type associated with the multimedia file. This attribute is not necessary as the browser itself determine based on the extension.
classidused by internet explorer to identify the ActiveX control that will be used to render the object.
widthThe width of the space the browser will allocate to the multimedia file.
heightThe height of the space the browser will allocate to the multimedia file.
alignThe alignment used to render the content of the multimedia file relative to the other elements
hspace & vspaceThe white space around the object
borderThe thickness of the border around the object.
snippet
<html> 
<head></head> 
<body> 
<table> 
<tr> 
    <td><object src="logo.jpg" width="100" height="200"></object></td> 
    <td><object src="sound.mp3" width="100" height="200"></object></td></tr> 
 
</table> 
</body> 
</html>
Embedding Applets
HTML allows to embed applets directly into a web page using the <applet> element and its attributes.
AttributesDescription
width
height
code
archive
object
alt
align
hspace
vspace
Only width and height attributes are required.
Embedding Applets with parameter

If the applet can accept parameters, we can transmit parameters to an applet using the empty <param> element as a child of the <applet>..</applet> element. The <param> element has two useful attributes.

AttributesDescription
namerepresents the name of the parameter. The possible values are valid identifiers.
valuerepresents the values of the parameter. The possible values are strings of characters.
Embedding Applets with <object> element

The <applet> element is depreciated as per the HTML 4.01 specifications and it favours the use of <object> element.

ActiveX controls

ActiveX controls are a microsoft technology that allows you to include COM objects in other applications(for example in a web page) Before using an ActiveX control, you must know its classid (from the registry editor) and how to set its parameters. The following table presents some ActiveX controls together with classids as you can find them on the most Windows platforms.

button label textfield graphic calendar avi excel
Related Tutorial
Follow Us
https://www.facebook.com/Rookie-Nerd-638990322793530 https://twitter.com/RookieNerdTutor https://plus.google.com/b/117136517396468545840 #
Contents +