web applications programming - is221
TRANSCRIPT
Working with Multimedia
Multimedia can be added to a Web page two different ways:
•External media: media file accessed through a link.
Useful for a low bandwidth.
•Embedded media: placed within a Web page as an embedded object.
11/19/2013 Maha Alkuaib 2
Working with Multimedia
• 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.
11/19/2013 Maha Alkuaib 4
Working with Embedded Objects
<object attributes>
parameters
</object>
Where attributes: are the attributes that define the object.
and parameters: are values that determine how the embedded object is rendered and played within the browser.
•To specify the source of the content, add the data attribute:
<object data=“url”>….. </object>
•To indicate the type of the object, add the type attribute:
<object type=“MIME type”>….. </object>
11/19/2013 Maha Alkuaib 5
Working with Embedded Objects
• Use the width and height attributes to determine the object’s width and height
• You should set the height at least 25 pixels to display the control buttons.
11/19/2013 Maha Alkuaib 7
Working with Embedded Objects
• Parameters define the appearance and behavior of embedded objects.
• The src parameter is common to most plug-ins for embedded sounds.
11/19/2013 Maha Alkuaib 9
Example:
• Maxine suggests that you add a few parameter elements to the code for the overture.mp3 sound clip. She wants to :
•ensure that the browser always displays the sound clip controls
• she doesn’t want the clip to start automatically.
Because you don’t know which plug-in the browser will run, you’ll add the following parameter elements to the file:
11/19/2013 Maha Alkuaib 11
Creating Background Sound
The parameters for Windows Media Player to create a hidden clip that starts automatically are:
11/19/2013 Maha Alkuaib 13
Exploring Digital Video
A Shockwave Flash or swf file contains the video, audio, animations, interactive scripts, program controls, and other features that provide real-time interactive animation.
11/19/2013 Maha Alkuaib 15
Exploring Digital Video
• To embed a Shockwave Flash file as an ActiveX control, enter:
• where file.swf is the Shockwave Flash file and parameters are parameters associated with the Flash Player.
11/19/2013 Maha Alkuaib 17
Exploring Digital Video
• To embed a Shockwave Flash file for non-IE browsers, use the following:
11/19/2013 Maha Alkuaib 18
Creating a Scrolling Marquee with Internet Explorer
To create a box with scrolling text:
<marquee attributes>content</marquee>
•Examples:
11/19/2013 Maha Alkuaib 20