|
YOUR FEEDBACK
Did you read today's front page stories & breaking news?
SYS-CON.TV |
TODAY'S TOP SOA & WEBSERVICES LINKS Feature Slide Show on the Web Using SMIL
Slide Show on the Web Using SMIL
By: Siet-Lang Lai
Feb. 4, 2001 12:00 AM
The explosive growth of multimedia on the Web has produced interactive applications with dynamic and rich content. The exponential evolution of the Web and the integration of various media, such as text, graphics, streaming video, audio, and animation, has created the need for interoperable or standard ways to describe the synchronization between the different media with temporal behavior. In June 1998 the World Wide Web Consortium (W3C) released the Synchronized Multimedia Integration Language (SMIL: pronounced "smile") specification that represented a cross-industry effort to put multimedia presentation on the Web. The last call of the public working draft of SMIL 2.0 is available from the W3C site (www.w3.org). SMIL, just as its pronunciation suggests, has given a big welcome "SMILE" to all Web-based multimedia designers and developers. SMIL is an XML-based, vendor-neutral markup language that enables you to build interactive multimedia presentations by describing the layout, temporal behavior, and associated links with media presentation objects. The presentation, which is dynamic across timelines, can consist of text, image, audio, streaming video, or any other media data type. In this article I explain in detail how to combine the power of SMIL, Active Server Pages (ASP), Open Database Connectivity (ODBC), and the back-end database to create a multimedia slide show on the Web. This allows end users to view the presentation (a virtual-tour slide show) in a dynamic manner with the necessary narration, background music, descriptions, and other relevant information. This prototype will be especially useful for travel portals or independent Web sites that provide travel-related services to Web users.
XML and SMIL In this section I briefly discuss some of the basic SMIL tags that will be used. You may refer to the W3C Web site for a list of comprehensive online tutorials.The following provides the outline of a SMIL document: <smil> SMIL documents are easy to read and although they appear similar to HTML, they are quite different. Since SMIL is XML-based, it's case sensitive and all tags in the SMIL documents must end properly. For instance, an empty tag such as <img src = ... /> must be terminated properly. The <head> element can contain meta and layout information. The <layout> element describes how elements in the document body are positioned. Under the layout you can specify several screen regions using a <region> tag that will be associated with the respective media objects in the <body> section as shown below : ... In the <body> section, you can specify the media objects, the sequence, and the timing of the media elements. <seq> and <par> are the two basic tags used to control the timing, as you'll see in the slide show example. Media objects referenced within <par> tags will play simultaneously, whereas <seq> tags enable media objects within the tags to be played in sequence. <body> You may synchronize the media element (e.g., audio, streaming video, image graphics, and text) by using <seq> or <par>, or by adding a time parameter to media elements as shown in the following simple example: ...The image "myphoto.gif" appears three seconds after the interpretation of the document begins and remains visible for another five seconds. In this section I've discussed only some of the essential SMIL elements so we may proceed to discuss the multimedia slide show example. However, you may want to refer to www.w3.org/AudioVideo and www.w3.org/TR/2000/WD-smil20-20000921/ for detailed discussions or tutorials on SMIL.
Multimedia Slide Show on the Web In this article I present a multimedia slide show example for the travel industry. Today, with the pervasive use of the Web and the growth of the travel industry, there are numerous travel portal Web sites, such as Microsoft Expedia, Yahoo! Travel, and Discovery Communications' travel channel as well as many individual or independent ones. These sites provide useful guides and interactive services for people planning holidays or business trips. Usually they provide information on flights, car rentals, hotel accommodations, land tour packages, travel guides, tools, and online reservations. Some of them even take that extra step and provide a virtual tour or gallery by using visual or textual information. It can be as simple as providing a description, static photographs, and a video for the countries or cities, or as sophisticated as providing panoramic images of a tour scene or real-time video streaming of a real-time captured tour scene. In fact, a multimedia slide show is a simple and effective alternative for providing a virtual tour. You can view the scenery and tour photos in an animated manner - this includes the necessary narration that provides value-added services to the Web sites. A collection of logically grouped photographs in digital image formats (for instance, they can be grouped by destination cities and tour itineraries) are first captured by professional photographers. The images are then uploaded to the server. For this article the images and relevant information, such as background music, narration, and scenic descriptions, are stored in the back-end database using Microsoft Access. The details of the creation process of the travel data are beyond the scope of this article. For this purpose SMIL provides an easy and standardized way to describe the layout and temporal behavior between slides (e.g., how long the current slide will stay before proceeding to the next one) and build multimedia presentations on the Web.
A SMIL-Based Multimedia Slide Show Application Figure 2 shows the anatomy of the virtual tour slide show SMIL application. slideshow.asp is the ASP script to be invoked at the server side. Upon execution it retrieves collection titles from the collection table, which is a Microsoft Access table. This allows you to choose your intended tour collection title. The ASP script makes use of the following two objects:
Figure 3 shows a detailed four-stage explanation of the SMIL application, and Listing 1 shows the SMIL documents generated on the fly.
Stage 1
Stage 2
Stage 3
Stage 4 ... Then the SMIL document (see Listing 1) is sent to the Web client. Upon receiving the SMIL document, the SMIL player (Oratrix's GriNs SMIL player is used here) is invoked. The MIME type must be set up properly in the client in order to invoke the respective SMIL player. Figure 5 shows the outcome of the slide show. With reference to the SMIL document generated dynamically in Listing 1, two main regions are specified for the layout - "photo" and "caption." The "photo" region contains the image file, and the "caption" region contains the collection name, text description detail, and more. ...The above SMIL statements (from Listing 1) specify the cover image of the slide show. They include the cover image and an HTML text object that's created in Stage 4 (refer to the subprocedure outputcover in Listing 2). The cover slide that comprises the cover image and description as shown in Figure 5 will stay for four seconds before proceeding to the actual slide show. <par endsync="first">The preceding code segments from Listing 1 show the <par> construct to group elements that are played in parallel (e.g., the background music and the photo images). The end of the slide show depends on the ending time of the first ending child element. Since the background music is running indefinitely, the first ending child element will be the nested child element in the <seq> construct that encloses the slide show of the individual image object. Each slide consists of an image object and a corresponding audio object that's the accompanying narration. These two objects are enclosed in a <par> element and are running in parallel as shown in Figure 5. The duration of each slide depends on the accompanying narration time. For instance, the first slide will be displayed until the end of the narration before it transits to the next slide. The slide show will end when all the slides have been shown.
Conclusion
References
XML JOURNAL LATEST STORIES . . .
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
|
SYS-CON FEATURED WHITEPAPERS MOST READ THIS WEEK BREAKING XML NEWS |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||