Archived Article
developer.com
Search EarthWeb
CodeGuru | Gamelan | Jars | Wireless | Discussions
Navigate developer.com
Architecture & Design  
Database  
Java
Languages & Tools
Microsoft & .NET
Open Source  
Project Management  
Security  
Techniques  
Voice  
Web Services  
Wireless/Mobile
XML  

Developer Jobs

Be a Commerce Partner
Audio Conferencing
Web Hosting
Submit Your Site
Tech Magazines - FREE
Business Search
Web Based Software
Compare Prices & Shop
Remote PC Access
Domain Registration
Register Domains

 

 

Developer News -
Borland Makes Strong Push for .NET, Java    November 3, 2003
Will Eolas' Browser Technology Patent Be Revoked?    October 31, 2003
Microsoft Revises 'Critical' Patches (Again)    October 30, 2003
Microsoft's Whidbey: Something For Everyone    October 30, 2003
Free Tech Newsletter -

Working with SMIL
By John Maxwell Hobbs

Go to page: Prev  1  2  

Part 2 of 2

The next example demonstrates more complex, relational behavior by incorporating music and timed text.

By placing the following reference inside the first <par> node along with the instructions for the background image

we create "audio wallpaper" for the presentation. Note that although it is not a visual element, the audio file still requires a region to be declared in the layout node.

This presentation also incorporates text items related to specific images. This is achieved by creating a sequence of <par> nodes, each containing an image element and a text element. For example:

<par id="fortress text">
<font face="Verdana, Arial, Helvetica" size="-1">
<img id="fortress" region="image1" src="10929_604851_2_files/fortress.html" begin="5s" dur="5s">
<text type="text/plain" 
 id="Info" region="endtext" 
 src="/common/content/article/19980924/dc_smil1/data:,A%0Aprehistoric%20hill%20fortress" 
 begin="5s" dur="5s">
</text>
</font></par>
 

Note that the source of the text element is contained within the document itself. This could just as easily be done by referencing a text document via a URI instead. For example:

<text type="text/plain" 
 id="Info" 
 region="endtext" 
 src="/common/content/article/19980924/dc_smil1/somedocument.txt" begin="5s" dur="5s">
</text>
Or a remote document:

<text type="text/plain" id="Info" region="endtext" src="http://www.foobar.com/somedocument.text" begin="5s" dur="5s"> </text>

The next presentation incorporates an audio narration keyed to specific slides. It demonstrates the use of "clip-begin."

<audio id="audio2" 
     region="narrative" 
     src="/common/content/article/19980924/dc_smil1/audio.au" 
     clip-begin="npt=10s" 
     clip-end="npt=17s"> 
</audio>
 

This can also be stated in SMPTE format, which in this case would look like this:

<audio 
     id="audio2" 
     region="narrative" 
     src="/common/content/article/19980924/dc_smil1/audio.au" 
     clip-begin="smpte=00:00:10.00" 
     clip-end="smpte=00:00:17.00">
</audio>
 

The use of SMPTE allows for the easy porting to SMIL of an Edit Decision List (EDL), created in a video-editing environment such as Avid or Premiere.

The narration consists of a single audio file containing five separate segments. In order to synchronize the appropriate narration with a specific image, the SMIL application is instructed to begin playing the audio file a specified interval from its beginning. In this case, the value is "npt=10s", which means ten seconds from the beginning in normal playing time.

This is one of the most powerful features of SMIL, because it allows the reuse of a single sequential media file in a number of distributed presentations. A news site presenting a press conference could offer the entire conference or just edited highlights using the same media source.

The final example takes the previous self-running presentation and turns it into a user-guided slide show that could be used in a presentation. Keep in mind that all of these presentations have made use of the same media files. Unlike formats such as Shockwave and ASF that "containerize" their media, SMIL allows presentations to be modified "on the fly."

This presentation makes use of SMIL's hyperlinking feature.


<text>
    type="text/plain" 
	 id="next" region="next" 
	 src="/common/content/article/19980924/dc_smil1/data:,NEXT">
</text>


As you can see, the syntax is almost identical to HTML. In this document, all links reference nodes within the same document, but they can also link to distributed .smil documents. A SMIL browser could display an HTML page with the proper plug-in, or an HTML browser could use a plug-in to display an embedded SMIL document.

This just scratches the surface of what SMIL can do. SMIL also offers support for bandwidth management, alternate layout and content, and extensibility. These will be covered in future articles. A good source of further information about SMIL is the justsmil.com Web site, as well as the W3C itself.

John Maxwell Hobbs is a musician and has been working with computer multimedia for over fifteen years. He is currently in charge of multimedia development at Ericsson CyberLab New York. His interactive composition "Web Phases" was recently one of the winners of ASCI's Digital '98 competition and is currently on exhibit at the New York Hall of Science. He is also on the board of directors of Vanguard Visions, an organization dedicated to fostering the work of artists experimenting with technology. He is the former producing director for The Kitchen in New York City.

Go to page: Prev  1  2  



XML Archives

Jupitermedia is publisher of the internet.com and EarthWeb.com networks.
Copyright 2003 Jupitermedia Corporation All Rights Reserved.

Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.
Advertise on EarthWeb
http://www.earthweb.com/
http://www.internet.com/