Search This Blog

Tuesday, October 12, 2010

Chapter 7 - Using Multimedia on the Web

Working with Multimedia

  • Bandwidth is a measure of the amount of data that can be sent through a communication pipeline each second.
    -Consider bandwidth when working with multimedia on a Web site

  • Multimedia can be added to a Web page two different ways:
    -External media is a sound of video file that’s accessed through a link.

    ~Useful for a low bandwidth
    -Inline media is placed within a Web page as an embedded object

  • Working with Audio

  • Every sound wave is composed of two components:
    -Amplitude- the height of the wave. Amplitude relates to the sound’s volume (the higher the amplitude, the louder the sound).
    -Frequency- the speed at which the sound wave moves. Frequency relates to sound pitch (high frequencies have high pitches).

  • Sampling Rate, Sample Resolution, and Channels

  • Sound waves are analog functions (represent a continuously varying signal).
    -To store the information, however, it must be converted to pieces of information

  • Digital recording measures the sound’s amplitude at discrete moments in time.
    -Each measurement is called a sample.

    ~Samples per second taken is called the sampling rate

  • Sampling Rate

  • Sampling resolution indicates the precision in measuring the sound within each sample.

  • Sample Resolution

    Sound File Formats

  • There are different sound file formats used for different operating systems

  • Different file formats provide varying levels of sound quality and sound compression

  • WAV

  • Nonstreaming media

  • Streaming media

  • MIDI

  • Linking to an Audio Clip

    Inserting links to the sound clips

    Embedding an Audio Clip

  • An embedded object is any media clip, file, program, or other object that can be run or viewed from within a Web page.
    -Browsers need the appropriate plug-ins to run embedded objects

  • Playing Background Sounds

  • Internet Explorer (with Version 3.0) introduced an element to play background sounds:
    <bgsound src=“url” balance=“value”
    loop=“value” volume=“value” />

  • Where url is the URL of the sound file, the balance attribute defines how the sound should be balanced between left and right speakers, loop defines how many times the sound clip is played, and the volume attribute indicates the background sound volume

  • Working with Video

  • Video files add a visual element to a Web page as well as provide information

  • Video files are composed of a series of single images called frames

  • The number of frames shown in a period of time is the frame rate

  • Frame Rates and Codecs

  • Reducing the frame rate reduces the size of your file.
    -This is one way to control file size of video files

  • Using a Codec (compression/decompression) is another way to control the file size

  • Video File Formats

    Linking to a Video Clip

  • Follow the same procedure to link a video clip as you would to link a sound clip

  • Embedding a Video Clip

  • Use the same embed element to embed a video file as you did to embed a sound clip

  • Using a Dynamic Source

  • To turn inline images into dynamic video clips, use the following syntax:
    <img src=“url” dynsrc=“url” start=“type”
    loop=“value” control=“control” />

    Where the dynsrc attribute specifies the URL of a dynamic (video) version of the inline image. The start attribute tells the browser when to start the clip, the loop attribute specifies the number of times the video will play, and the control attribute specifies whether IE should display player controls below the inline image to start and stop the video clip

  • Supporting Non-Embedded Elements/p>

  • To provide alternate content for browsers that don’t support embedded objects, use the code
    <embed attributes />
    alternate content

    where alternate content is the content displayed by browsers that don’t support embedded objects

  • Creating a Marquee with Internet Explorer

  • An alternative to using an applet to create a box with scrolling text is to create a marquee element.
    <marquee attributes>

    Where attributes is one or more of the marquee elements, and content is the page content that appears in the marquee box.

  • Working with the Object Element

  • The object element is the generic element for any object whose content is stored in a file separate from the current Web page
    -Inline images
    -Sound clips
    -Video clips
    -Program applets
    -Other HTML documents

  • Specific and generic elements

  • MIME (Multipurpose Internet Mail Extension) names are used to indicate the type of data using the type attribute in an object element.

  • back to top