[an error occurred while processing this directive]
  Ambulant Page Header Logo

Ambulant Technology Demonstrators Page
Javascript smilText Enging
The purpose of the Javascript smilText engine is to provide an implementation of SMIL 3.0 smilText functionality within an HTML browser. This release has been tested with Firefox 3, IE-7, Opera and Safari. The samples pages have examples of general and special-purpose tests for each browser.
The smilText engine has reasonably complete coverage of the features defined in the SMIL 3.0 SmilText External Profile. The smilText Javascript engine allows source content to reside within the HTML markup (NB: not supported by all browsers), in a local file or on a server. Access may be via file I/O, via http streaming or via an RTSP server.
The HTML integrating the Javascript engine must define the engine as follows:
<html ...>
  <head>
   ...
    <script language="JavaScript" type="text/javascript" src="scripts/smilText.js">
    </script>
   ...
  </head>
  <body>
   ...
  <body>
</html>
SmilText that is embedded within an HTML file should be placed within <smilText> tags, such as:
<div id="region01" style="background-color:red;width:500">
   <smilText textColor="green">
	This is an example of content in merry holiday colors.
     <tev begin="2s"/>
	This second sentence comes shortly after the first, 
        based on an absolute offset.
     <tev next="3s"/>
	This second sentence get rendered three seconds after the previous, 
        based on a relative offset.
     <clear begin="7s"/>
	Here we clear the rendering area, seven seconds into the presentation.
     <tev next="3s"/>
	Doei!
   </smilText>
</div>
(Note that this functionality is not supported by Internet Explorer, but it is possible in Firefox and Safari.)
A smilText oject placed in an external file should have its named placed in the HTML source text as follows:
  <div id="region02">
    <script>
       cwi.smiltext.parseFile('examples/example18.xml', 'region02');
    </script>
  </div>
Structuring smilText in an External File
The format of an external is shown in the following fragment, which will begin the processing of the file when the page is loaded:
   <smilText xmlns="http://www.w3.org/ns/SMIL" version="3.0" baseProfile="smilText">
      The is a bit of text.
    <tev begin="3s"/>
      Here, the line is continued after 3 seconds.
    <clear begin="2s"/>
      At 5 seconds into the text, the area is cleared and a new fragment starts.
    <clear begin="3s"/>
  </smilText> 
For more information on composing a timed text file using smilText, see the chapter on smilText, taken from the book SMIL 3.0: Interactive Multimedia for the Web, Mobile Devices and Daisy Talking Books.
smilText Sample Page
Seven very techie pages illustrate a host of browser-embedded smilText examples. Note that each page has many simultaneous smilText fragments active at once. Consider them eye tests for your mind.
The samples are:
  1. A set of simple external smilText file examples, including links to the sources.
  2. A set of structured external smilText file examples, including links to the sources.
  3. A set of motion-based embedded smilText file examples, including links to the sources.
  4. A set of browser-specific tests for Firefox, IE-7, Opera and Safari, all including links to the sources.
 

PreBuilt Installers Ambulant Source