SMIL

From MobileRead
Jump to: navigation, search

The Synchronized Multimedia Integration Language (SMIL, pronounced "smile") enables simple authoring of interactive audiovisual presentations.

Contents

[edit] Overview

SMIL is typically used for "rich media"/multimedia presentations which integrate streaming audio and video with images, text or any other media type. SMIL is an easy-to-learn HTML-like language, and many SMIL presentations are written using a simple text-editor. It permits and defines read aloud capability.

[edit] XHTML+SMIL

The XHTML+SMIL profile defines a set of XHTML abstract modules that support a subset of the SMIL 2.0 specification. It includes functionality from SMIL 2.0 modules providing support for animation, content control, media objects, timing and synchronization, and transition effects. The profile also integrates SMIL 2.0 features directly with XHTML and CSS, describing how SMIL can be used to manipulate XHTML and CSS features. Additional semantics are defined for some XHTML elements and CSS properties.

The profile is designed for Web clients that support XHTML+SMIL markup validating to this profile's implementation DTD. The document type definition (DTD) and XML Schema are implemented using SMIL modules as defined in "The SMIL 20 Modules".

[edit] Sample

<?wpl version="1.0"?>
<smil>
  <head>
    <meta name="Generator" content="Microsoft Windows Media Player -- 10.0.0.4036"/>
    <title>PicturesExhibition</title>
  </head>
  <body>
    <seq>
      <media src="D:\music\Pictures_at_an_Exhibit1.WMA" tid="{B482A139-F4F2-4580-932A-491E785C28F7}"/>
      <media src="D:\music\Pictures_at_an_Exhibit2.WMA" tid="{4E9C3D07-0D02-4761-BCD1-96E7F2D0120D}"/>
      <media src="D:\music\Pictures_at_an_Exhibit3.WMA" tid="{AD1DB940-8781-4403-9877-07C0E3C9098D}"/>
      <media src="D:\music\Pictures_at_an_Exhibit4.WMA" tid="{993FCCB7-B674-434B-B88F-FA80B78D7E86}"/>
      <media src="D:\music\Pictures_at_an_Exhibit5.WMA" tid="{D406A49B-BE6E-4BC2-9179-375A6A00FB30}"/>
      <media src="D:\music\Pictures_at_an_Exhibit6.WMA" tid="{534608E1-0F0B-4289-BFC9-E4B223F7B099}"/>
    </seq>
  </body>
</smil>

[edit] SMIL in ePub 3

The media overlay in ePub 3 differs from the generic SMIL format in that it is intended to synchronize audio content with document text.

The smil element must be the root element of all Media Overlay Documents in ePub 3. It may include an optional head element. It must include a body element. There are several supported attributes, version (required, must be set to 3.0), id, profile, and prefix.

The meta element must include a 'property' element and may need an 'about' element. These are unique to the ePub version of SMIL. It must also have a 'xml:lang' entry to specify the language and may have content, id, dir.

The seq element lists the sound content. For the ePub version is must have an attribute: epub:textref showing the text and location of the text that is being synced. It may optionally have an 'id' and an 'ePub:type' to show the structural semantics.

The par element lists items which are to be rendered in parallel. It may have an 'id' and an 'ePub:type'. There must be a text element and may be an audio element.

The text element has no content but includes an attribute 'src' to locate the content document and includes a fragment identifier that references the specific element. An 'id' attribute is optional.

The audio element is a required child of the par element unless its sibling text element refers to audio or video media. It must include a 'src' attribute to point to the audio file. It may also have a 'clipstart' and 'clipend' attribute to playback only a portion of the file. The values are in clock format. An 'id' is optional. There is no content for this element.

An example:

<smil xmlns="http://www.w3.org/ns/SMIL" 
     version="3.0"
     profile="http://www.idpf.org/epub/30/profile/content/">
   <body>
       <par id="par1">
           <text src="chapter1.xhtml#sentence1"/>
           <audio src="chapter1_audio.mp3" clipBegin="0s" clipEnd="10s"/>
       </par>
       <par id="par2">
           <text src="chapter1.xhtml#sentence2"/>
           <audio src="chapter1_audio.mp3" clipBegin="10s" clipEnd="20s"/>
       </par>
       <par id="par3">
           <text src="chapter1.xhtml#sentence3"/>
           <audio src="chapter1_audio.mp3" clipBegin="20s" clipEnd="30s"/>
       </par>
   </body>
</smil>

[edit] Tools

[edit] For more information

Personal tools
Namespaces

Variants
Actions
Navigation
MobileRead Networks
Toolbox