Inclusion of Multimedia Content in Web Pages

Dec 6, 2007 23:50 GMT  ·  By

Multimedia content can be rendered directly from HTML pages in modern web browsers. The multimedia content inclusion in web pages can be made through different coding methods. The simplest way to add images, music, videos or any other media files is by using the object HTML element.

It permits the insertion of applets, plug-ins, as well as HTML documents in a given HTML file. The objects can be easily manipulated by specifying certain parameters that allow the control of their instances. In other words you are able to modify the global behavior of a given object.

The next HTML code embeds the Windows Media Player in an HTML document:

code
Multimedia Content in HTML





In this code, the classid is an identifier for the Windows Media Player ActiveX control. The value marked between quotes coresponds to Windows Media Player version 7.0 or a later one. If the ActiveX control is not installed on the visitor's computer, the web browser will install it automatically.

The default width and height of the player can be altered by specifying the desired values. The first parameter is referring to the media source which in this case is a movie of mpeg type. But one can change the media type by replacing the movie with an mp3 or wav file for example. The new file must be in the same directory with the HTML file.

If the autostart parameters have the value set to true the media will automatically play when the web page is loaded. The Media Player graphical user interface elements can be enabled or disabled from the third parameter value (true or false). Other parameters can be added to change volume balance, full screen display, playback rate and more.

You are also able to add other ActiveX control types in HTML documents, such as Flash Players:

code


There are also other methods for manipulation of multimedia content inside web pages, but this short introduction should provide you with a useful insight over the general mechanism of media player integration in HTML pages. Based on the code presented in this article, you should try to include other ActiveX controls in your web pages and to customize the corresponding objects' behaviour.