Приглашаем посетить
Гумилев (gumilev.lit-info.ru)

4.1 Using multimedia on the Web

Table of Contents

Previous Next

4.1 Using multimedia on the Web

4.1.1 An introduction to multimedia

Together with the font, color, images, and graphics, another most exciting element on the Web is the capability to deliver multimedia functionalities for users and page designers. Live chat, video on demand, or even live video conference already exists over Web connections. On the whole, multimedia is one of the factors that makes Web browsing so impressive and popular on the Internet. Someone may even claim that the force of multimedia pushes the limits of XHTML to bring life to Web pages. We would like to stress that the force of multimedia also pushes the limits of the bandwidth (speed of the Internet) to deliver sound, video, and movie entertainment in real time.

In fact, multimedia is an ambiguous term describing many different things. Someone may define multimedia as everything but text. We would argue that the graphical display or some art writing styles of text may be considered as graphics and hence inside the definition of multimedia. We are not here to argue about the definition of multimedia in general. This chapter will focus on multimedia as the digital images, sound, video, and movie that you see, hear, and enjoy in your daily life.

You will learn about multimedia and their applications with XHTML in early sections of this chapter. Multimedia on the whole is a big and diverse subject. Improvements follow one after another even Microsoft has to introduce many different kinds of media formats for IE and its associated media player. Together with QuickTime movies and MPEG, we have many different kinds of audio, video, and movie formats. Even a modest discussion of these formats one by one would be beyond the scope of this chapter.

To play back sound, video, and movies on a Web browser would normally require add-on software such as a "Media Player" to achieve the multimedia playback action. Some popular media players available on the Internet are:

  • Windows Media Player from Microsoft

  • QuickTime Player from Apple

  • RealPlayer from RealNetworks

  • Java Player from Sun Microsystems

This chapter begins with the Windows Media Player (WMP) from Microsoft associated with Windows systems. This means that if you are using Microsoft Windows, the default media player for IE is WMP. For example, the following XHTML code fragment would activate WMP to play back a sound and a video file:



<a href="glass.wav">Click Me To Play Some Sound </a>
 <a href="dropxx01.avi">Click Me To Play Video</a>

Since both the wav (sound) and the avi (video) files are supported by Microsoft's systems and IE, the anchor element can be used to activate WMP to play back the sound and video. We will also show you how to embed WMP into a Web page. More importantly, we will show you how to create and use the control buttons of WMP on the Web. In order to play back QuickTime movies (mov), the QuickTime Player, browser compatibility issues, and plugins are also discussed. The information can be used as a foundation for further studies. In the final section of this chapter, multimedia with Java is introduced. Images, animations, and multimedia applications with Java and the Java Multimedia Framework (JMF) are also presented with examples.

4.1.2 Multimedia file formats on the Web

Multimedia supports in terms of file formats were available even in the early days of the Web. In normal circumstances, if your system has the capability to play the sound or video clips via a media player, you can play back using a Web page. Browsers such as IE, NS, or Opera can activate the player to perform multimedia actions depending on the information given by file extensions or in the system registry.

A media player is a piece of software with the capability to interpret the media files to play sound and/or video on your system. Some of the most popular media players on the Web are the Windows Media Player (WMP), RealPlayer (RP), QuickTime, and Java Player. In fact, one of the most important subjects on multimedia applications over the Internet is to control the media player to play back sound and movies within Web pages.

In order to have a simple and clear discussion, we roughly characterize some common files supported and used on the Internet into four categories. They are document, image, sound, and movie. We generally consider all of them as multimedia types.

In normal circumstances, each category of file can be identified by the file extension. For Pour practical purposes, some frequently used and supported file formats are listed in Table 4.1.

Table 4.1. Common file types supported by browser

Document

Image

Sound

Movie

.txt, htm, .xml, .xsl

.gif

.wav

.mov

.css, .java, .js

.tiff

.au

.avi, .wmv

.asp, aspx

.jpg or .jpeg

.midi or .mid

.mpg or .mpeg

.sql, .pl, .php, .wml

.bmp

.mp3

 


Each file extension defines a specific file format and indeed can be considered as an application or a technology on the Web.

Document

.txt

Document contains text only

.htm

Generally considered as HTML/XHTML document

.xml

Extensible Markup Language

.xsl

XML Stylesheet Language Transformation (XSLT) file

.css

Cascading Style Sheet (CSS) file

.js

ECMAScript (or JavaScript) file

.java

Java program file

.asp

Active Server Page (ASP) from Microsoft

.aspx

ASP Dot NET (ASP.NET) page from Microsoft

.sql

Structured Query Language (SQL) file

.pl

Practical Extraction and Report Language (Perl) or Perl Script

.php

PHP: Hypertext Preprocessor (PHP) server page

.wml

Wireless Markup Language (WML) from Wireless Application Protocol (WAP) Forum


Image

.gif

Graphics Interchange Format (GIF) image file

.tiff

Tagged Image File Format (TIFF) image file

.jpg or .jpeg

Joint Photographic Expert Group (JPEG) image file


Sound

.wav

Waveform sound file from Microsoft

.au

Audio sound file from Sun Microsystems

.mid

Musical Instrument Digital Interface (MIDI) sound file

.mp3

MPEG Layer 3 sound file


Movie

.avi

Audio Video Interlace (AVI) movie file

.wmv

Windows Media Video (WMV) movie file

.mov

QuickTime Movie file from Apple

.mpg or .mpeg

Moving Picture Expert Group (MPEG) movie file


The document types will be discussed one by one in detail throughout this book. In fact, some of them, such as images and their applications on the Web, are covered in earlier chapters. Indeed, it is believed that by putting images on a Web page, we have established a far more interesting and colorful Web community. Image animation is the first step toward video. By integrating images together with a fixed or variable time interval, digital movies are developed. Video and movies are time-based image animations. In fact, sound and music can also be considered as a time-based animation against each sound note. By interlacing audio and video, sound video and movies are created. They are all time-based media applications.

With cameras, capture cards, and Webcams everywhere, making digital home video and movies with sound today is as easy as operating a domestic consumer product such as a hi-fi system. By finishing this chapter, you will know how to use different multimedia types (movie types), how to perform playback on your favorite browsers, and more importantly deliver them on the Web with browser and media player compatibility.

Again, multimedia is an exciting and diverse subject, but browser incompatibility appears quite often. For example, your IE and system may not support QuickTime movie (i.e., .mov) format without plugin software. Sometimes, plugin software can completely change the behavior of the browser and it may be difficult to change it back. Together with various formats and media player differences, confusion may arise easily even for experienced Web users. We begin with simple examples and will cover all these compatibility issues in this chapter. Let's consider some easy examples to play sound and video on Web pages.

    Table of Contents

    Previous Next