Beruflich Dokumente
Kultur Dokumente
Chapter 3. Layout
[jump to cover] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 The <layout> section Window settings Your first window appears! Absolute Positioning The Region The <region> tag The <img> tag Relative Positioning When two regions overlay z-index Images but also video, audio,... How to fit a media in its area? Make your medium fill its area Make your medium meet its area Make your medium slice its area Make your medium scroll within its area
17
Coming next
Chapter 4. Synchronization
[jump to cover] 1 2 3 4 5 6 7 8 9 The fourth dimension: time! The vim icon during 6 seconds... Delaying a media The "begin" parameter Sequence: a media... and then an other The <seq> tag Parallel: several media in the same time The <par> tag Coming next
Chapter 6. Tools
[jump to cover] 1 2 3 4 5 Real Player TM (Real) Real Player window SOJA (Helio) GRINS (CWI) Coming next
Chapter 7. Reference
[jump to cover] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 <smil> <head> <meta> <layout> <root-layout> <region> <body> <seq> <par> <switch> <a> <anchor> Media tags with no clip attributes: <img> and <text> Media tags with clip attributes: <video>, <audio>,... The End
Chapter 8. Examples
[jump to cover] 1 2 3 4 5 6 7 8 9 Region example Relative positioning example z-index example Time example: duration Time example: begin Time example: sequence Time example: parallel Advanced: events Advanced: switch
SMIL Tutorial
If you aren't viewing this on www.helio.org, you might be looking at an obsolete copy. You are NOT allowed to mirror this tutorial.
August, 23th 1999 version (history) CLICK HERE TO BEGIN Table of Content NEW:Index Download the tutorial Download the latest version of the SMIL vim-syntax-file Translations (old version): Portuguese
This tutorial uses cascading style sheets and is therfore best viewed with Netscape Navigator 4+ or Internet Explorer 4+. Parts of this work were created with the help of
Introduction - Cover
Quick Access 1 2 3
Copyright Navigation Coming next...
Chapter 1. Introduction
Welcome to this on-line tutorial for SMIL, the new language from the World Wide Web Consortium (web site) This tutorial will help you learning the language and creating your first SMIL presentations, through a step-by-step training. To demonstrate SMIL capabilities, we will use the Java-based SMIL Player nammed SOJA. You can download it from HELIO's web site (here), but it is not a requirement at the moment.
History
Date
q q
Events Syntax errors corrected. An error has been reported in SOJA concerning "fit" attribute lessons. So we decided to remove examples on this particular lesson.... Sorry ! New layout ! We created a PERL script called "Buildorial", that generates the HTML code for us ! Index file, allows a keyword search. z-index, and fit attribute lessons added. SOJA "Cherbourg 2" update. SOJA "Cherbourg" release has been added to the tutorial and has therefore replaced SOJA "Barbizon". Chapter 5: switching is added Some bugs in source files are fixed. Chapter 6 begun. Chapter 7 ended. SOJA Barbizon is included to show the examples. Anyone can download the tutorial.
q q
q q q
q q
First release.
-Ccase-sensitive Chapter 2. What is SMIL? - How to write a SMIL document copyright Chapter 1. Introduction - Copyright
-Ffill Chapter 3. Layout - Make your medium fill its area fit Chapter 3. Layout - How to fit a media in its area?
-Gg2 Chapter 6. Tools - Real Player TM (Real) grins Chapter 6. Tools - GRINS (CWI)
-Hhelio Chapter 1. Introduction - Copyright history Chapter 2. What is SMIL? - What does SMIL mean?
-Pparallel Chapter 4. Synchronization - Parallel: several media in the same time Chapter 8. Examples - Time example: parallel
-Rreal player Chapter 6. Tools - Real Player TM (Real) region Chapter 7. Reference - <region> relative positioning Chapter 3. Layout - Relative Positioning
-Sscroll Chapter 3. Layout - Make your medium scroll within its area sequence Chapter 4. Synchronization - Sequence: a media... and then an other skeleton Chapter 2. What is SMIL? - Your first SMIL document slice Chapter 3. Layout - Make your medium slice its area smil Chapter 2. What is SMIL? - What does SMIL mean? soja Chapter 6. Tools - SOJA (Helio) streaming Chapter 6. Tools - Real Player TM (Real)
-Wworld wide web consortium Chapter 2. What is SMIL? - What does SMIL mean?
-Xxml Chapter 2. What is SMIL? - How to write a SMIL document The SMIL Tutorial is HELIO 1998-1999 all rights reserved
DO NOT MIRROR THIS TUTORIAL If you find any mirror on the web, please tell us. Expected file size: approx. 170Ko I AGREE - I do not agree Copyright 1998-1999 HELIO All Rights Reserved
Copyright
The SMIL Tutorial is owned by HELIO It is protected by French and International laws. q You are not allowed to copy or reproduce it, even partially, on any support q You are not allowed to sale it q You are not allowed to include it on any distribution q You are not allowed to mirror it on the Web, even with a new layout The SMIL Tutorial is HELIO 1998-1999 all rights reserved Comments about this page
Navigation
You will find several icons during this tutorial: q the "back" icon leads you r to the previous step r or to the previous chapter if you are looking at a chapter cover page. q the "next" icon leads you to the next step. q the "home" icon (grey) leads you to the tutorial home page. q the "t.o.c." icon (grey) leads you to the Table Of Contents. q the "index" icon (grey) leads you to the index page. The progess bar displays your progression in the current chapter. At any time you can click on the chapter title to jump to its cover. The SMIL Tutorial is HELIO 1998-1999 all rights reserved Comments about this page
Coming next...
Let's begin by having a look at "What is SMIL"... The SMIL Tutorial is HELIO 1998-1999 all rights reserved Comments about this page
Quick Access 1 2 3 4 5 6 7
What does SMIL mean? What can you do with SMIL? How to write a SMIL document Your first SMIL document The code in detail Tags can end with a slash Coming next...
The SMIL Tutorial is HELIO 1998-1999 all rights reserved Comments about this page
The SMIL Tutorial - What is SMIL? - What can you do with SMIL?
The SMIL Tutorial - What is SMIL? - Tags can end with a slash
Coming next...
You have just learnt: q what SMIL is, q who developed it, q what it is made of, q what the skeleton of a SMIL document is. Let's see if you are good at manipulating SMIL... Jump to Chapter 3 ! The SMIL Tutorial is HELIO 1998-1999 all rights reserved Comments about this page
Layout - Cover
Quick Access 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
The <layout> section Window settings Your first window appears! Absolute Positioning The Region The <region> tag The <img> tag Relative Positioning When two regions overlay z-index Images but also video, audio,... How to fit a media in its area? Make your medium fill its area Make your medium meet its area Make your medium slice its area Make your medium scroll within its area Coming next
Chapter 3. Layout
The first thing you will learn in this tutorial is to position your media wherever you want. We will make the difference beetween: q absolute positionning, and
q
relative positionning.
However, the scene is rendered within a window, so we have to give it width and height. The next step will teach you this.
http://www.helio.org/products/smil/tutorial/chapter2/sources/firstdocument.smil
<smil> <head> <meta name="copyright" content="Your Name" /> <layout> <!-- layout tags --> </layout> </head> <body> <!-- media and synchronization tags --> </body> </smil>
firstdocument.smil.html
<smil> <head> <meta name="copyright" content="Your Name" /> <layout> <!-- layout tags --> </layout> </head> <body> <!-- media and synchronization tags --> </body> </smil>
Window settings
You can set width and height for the window in which your presentation will be rendered. The following source will create a window with a 300x200 pixels dimension. <smil> <head> <layout> <root-layout width="300" height="200" background-color="white" /> </layout> </head> <body> </body> </smil> Source (vim HTML version) The SMIL Tutorial is HELIO 1998-1999 all rights reserved Comments about this page
NB: this doesn't work with RealPlayer G2. The SMIL Tutorial is HELIO 1998-1999 all rights reserved Comments about this page
Absolute Positioning
It is really easy to position media with SMIL. They are located from the upper left corner of the window.
The SMIL Tutorial is HELIO 1998-1999 all rights reserved Comments about this page
The Region
To insert a media within our presentation we must specify the region (the place) where it will be displayed. Let's say we want to insert the vim icon (32x32 pixels) at 75 pixels from the left border and at 50 pixels from the top border.
The SMIL Tutorial is HELIO 1998-1999 all rights reserved Comments about this page
Relative Positioning
You can also specify media positions relatively to the window's dimensions. For example, if you wish to display the vim icon at 50% from the left border and at 40% from the top border, modify the previous source and replace the left and top attributes. <smil> <head> <layout> <root-layout width="300" height="200" background-color="white" /> <region id="vim_icon" left="50%" top="40%" width="32" height="32" /> </layout> </head> <body> <img src="vim32x32.gif" alt="The vim icon" region="vim_icon" /> </body> </smil> Source - See it running in SOJA The SMIL Tutorial is HELIO 1998-1999 all rights reserved Comments about this page
this...
... or that ?
The SMIL Tutorial is HELIO 1998-1999 all rights reserved Comments about this page
z-index
To be sure that one region is over the other, add z-index attribute to <region>. When two region overlay, the one with the greater z-index is on top. If both regions have the same z-index, the first rendered one is below the other. In the following code, we add z-index to region_1 and region_2... <smil> <head> <layout> <root-layout width="300" height="200" background-color="white" /> <region id="region_1" left="50" top="50" width="150" height="125" z-index="2"/> <region id="region_2" left="25" top="25" width="100" height="100" z-index="1"/> </layout> </head> <body> <par> <text src="text1.txt" region="region_1" /> <text src="text2.txt" region="region_2" /> </par> </body> </smil> Source - See it running in SOJA What SMIL do :
Region 1 is over Region 2 The SMIL Tutorial is HELIO 1998-1999 all rights reserved Comments about this page
Report any error in this table by clicking on the "Comments" link below. The SMIL Tutorial is HELIO 1998-1999 all rights reserved Comments about this page
The SMIL Tutorial - Layout - Make your medium fill its area
<smil> <head> <layout> <root-layout width="147" height="116" background-color="yellow" /> <region id="region_1" left="8" top="10" width="116" height="81" background-color="white" fit="fill" /> </layout> </head> <body> <!-- this image is smaller than its region --> <img src="madewithcss.gif" region="region_1" /> </body> </smil>
Source The SMIL Tutorial is HELIO 1998-1999 all rights reserved Comments about this page
The SMIL Tutorial - Layout - Make your medium meet its area
Set the fit attribute to "meet" in your <region> tag. <smil> <head> <layout> <root-layout width="147" height="116" background-color="yellow" /> <region id="region_1" left="8" top="10" width="116" height="81" background-color="white" fit="meet" /> </layout> </head> <body> <!-- this image is smaller than its region --> <img src="madewithcss.gif" region="region_1" /> </body> </smil> Source The SMIL Tutorial is HELIO 1998-1999 all rights reserved Comments about this page
The SMIL Tutorial - Layout - Make your medium slice its area
Set the fit attribute to "slice" in your <region> tag. <smil> <head> <layout> <root-layout width="147" height="116" background-color="yellow" /> <region id="region_1" left="8" top="10" width="116" height="81" background-color="white" fit="slice" /> </layout> </head> <body> <!-- this image is smaler than its region --> <img src="madewithcss.gif" region="region_1" /> </body> </smil> Source The SMIL Tutorial is HELIO 1998-1999 all rights reserved Comments about this page
The SMIL Tutorial - Layout - Make your medium scroll within its area
Set the fit attribute to "scroll" in your <region> tag. <smil> <head> <layout> <root-layout width="147" height="116" background-color="yellow" /> <region id="region_1" left="8" top="10" width="116" height="81" background-color="white" fit="scroll"/> </layout> </head> <body> <!-- this image is BIGGER than its region --> <img src="eurotango.gif" region="region_1" /> </body> </smil> Source (vim HTML version) The SMIL Tutorial is HELIO 1998-1999 all rights reserved Comments about this page
Coming next
You have learnt to position media on the screen, absolutely or relatively to the window's width and height. This is not the only thing you can do with SMIL! The next chapter, called "Synchronization", will demonstrate SMIL ability to play media with time constraints. The SMIL Tutorial is HELIO 1998-1999 all rights reserved Comments about this page
http://www.helio.org/products/smil/tutorial/chapter3/sources/rootlayout.smil
<smil> <head> <layout> <root-layout width="300" height="200" background-color="white" /> </layout> </head> <body> </body> </smil>
rootlayout.smil.html
<smil> <head> <layout> <root-layout width="300" height="200" background-color="white" /> </layout> </head> <body> </body> </smil>
Region example
This example shows how to position a media within a presentation. Click HERE to see the source in a new window. Please wait while loading SOJA (50Ko)...
The SMIL Tutorial is HELIO 1998-1999 all rights reserved Comments about this page
The SMIL Tutorial - Reference - Media tags with no clip attributes: <img> and <text>
The SMIL Tutorial is HELIO 1998-1999 all rights reserved Comments about this page
z-index example
This example shows how to position a media "verticaly" (along z). Click HERE to see the source in a new window. Please wait while loading SOJA (50Ko)...
The SMIL Tutorial is HELIO 1998-1999 all rights reserved Comments about this page
http://www.helio.org/products/smil/tutorial/chapter3/sources/fit_scroll.smil
<smil> <head> <layout> <root-layout width="147" height="116" background-color="yellow" /> <region id="region_1" left="8" top="10" width="116" height="81" background-color="white" /> </layout> </head> <body> <!-- this image is BIGGER than its region --> <img src="eurotango.gif" region="region_1" fit="scroll" /> </body> </smil>
fit_scroll.smil.html
<smil> <head> <layout> <root-layout width="147" height="116" background-color="yellow" /> <region id="region_1" left="8" top="10" width="116" height="81" background-color="white" /> </layout> </head> <body> <!-- this image is BIGGER than its region --> <img src="eurotango.gif" region="region_1" fit="scroll" /> </body> </smil>
Synchronization - Cover
Quick Access 1 2 3 4 5 6 7 8 9
The fourth dimension: time! The vim icon during 6 seconds... Delaying a media The "begin" parameter Sequence: a media... and then an other The <seq> tag Parallel: several media in the same time The <par> tag Coming next
Chapter 4. Synchronization
SMIL can synchronize media elements. This chapter will teach you: q how to add time parameter to media elements, q how to play several media one after the other, q how to play several media in parallel.
The SMIL Tutorial is HELIO 1998-1999 all rights reserved Comments about this page
Delaying a media
Now we would like to wait 2 seconds before rendering the vim icon. The timeline below shows what we want to do:
The SMIL Tutorial is HELIO 1998-1999 all rights reserved Comments about this page
The SMIL Tutorial is HELIO 1998-1999 all rights reserved Comments about this page
The SMIL Tutorial - Synchronization - Parallel: several media in the same time
Using <par> tag makes it easy. The SMIL Tutorial is HELIO 1998-1999 all rights reserved Comments about this page
Coming next
You have just seen basic synchronization. Of course, it is possible to mix <par> and <seq> tags, for example for launch two sequences in parallel... The next chapter will teach you advanced concepts to control your presentation: events, parameters (<switch> tag), etc... The SMIL Tutorial is HELIO 1998-1999 all rights reserved Comments about this page
The SMIL Tutorial is HELIO 1998-1999 all rights reserved Comments about this page
The SMIL Tutorial is HELIO 1998-1999 all rights reserved Comments about this page
The SMIL Tutorial is HELIO 1998-1999 all rights reserved Comments about this page
The SMIL Tutorial is HELIO 1998-1999 all rights reserved Comments about this page
Quick Access 1 2 3 4 5 6 7 8 9 10 11
From basic synchronization... ... to event-based synchronization The "begin" event The "begin" event (source) Switching An example to understand The <switch> tag <switch> by the source Several tests in one tag What can be tested? Coming next
<par>
The tags under <par> are played at the same time. <par id="identifier" title="string" abstract="string" author="string" copyright="string" begin="clock-value" end="clock-value" dur="clock-value" end-sync="identifier|last|first" repeat="integer" system-bitrate="integer" system-captions="on|off" system-language="coma-separated-list" system-overdub-or-captions="captions|overdub" system-required="string" system-screen-depth="integer" system-screen-size="integerXinteger" /> Possible children q switch
q q q q q
any media tag with no clip attribute any media tag with clip arguments a (hyperlink) par seq
The SMIL Tutorial is HELIO 1998-1999 all rights reserved Comments about this page
<seq>
The tags under <seq> are played one after the other. <seq id="identifier" title="string" abstract="string" author="string" copyright="string" begin="clock-value" end="clock-value" dur="clock-value" repeat="integer" system-bitrate="integer" system-captions="on|off" system-language="coma-separated-list" system-overdub-or-captions="captions|overdub" system-required="string" system-screen-depth="integer" system-screen-size="integerXinteger" /> Possible children q switch
q q q q q
any media tag with no clip attribute any media tag with clip arguments a (hyperlink) par seq
The SMIL Tutorial is HELIO 1998-1999 all rights reserved Comments about this page
The SMIL Tutorial is HELIO 1998-1999 all rights reserved Comments about this page
Switching
One of the greatest ideas proposed with SMIL is to adapt your presentation to the end-user system capabilities. For example, if the user's modem has a 14000 bps modem, it would be better to make it download light pictures. You could also want to translate parts of the presentation depending on the user language. A special tag, called <switch> makes it possible. Click NEXT to continue... The SMIL Tutorial is HELIO 1998-1999 all rights reserved Comments about this page
An example to understand
Our sample does not discuss with medias and synchronization... You are supposed to have fully understood previous chapters. The aim is to display to the user its system properties in a language he could understand. For example: q You are English q Your screen has a 800x600 resolution q Your bitrate is 14000 bps or:
q q q
Vous tes franais Votre cran est en 800x600 Le dbit est de 14000 bps
The SMIL Tutorial is HELIO 1998-1999 all rights reserved Comments about this page
<text src="28000bps.fr.txt" region="bitrate" system-bitrate="28000" /> <text src="another_bitrate.fr.txt" region="bitrate" /> </switch> </par> <!-- The following text is displayed for other languages --> <text src="unknown_language.txt" region="main_message" /> </switch> </body> Source - See it running in SOJA The SMIL Tutorial is HELIO 1998-1999 all rights reserved Comments about this page
<body> <switch> <!-- French *AND* if a bitrate greater than 28000 --> <text src="french_14000.txt" system-language="fr" system-bitrate="28000" /> <!-- French *AND* if a bitrate greater than 28000 --> <text src="french_28000.txt" system-language="fr" system-bitrate="14000" /> <!-- English *AND* if a bitrate greater than 28000 --> <text src="english_14000.txt" system-language="en" system-bitrate="28000" /> <!-- English *AND* if a bitrate greater than 14000 --> <text src="english_28000.txt" system-language="en" system-bitrate="14000" /> </switch> </body> The SMIL Tutorial is HELIO 1998-1999 all rights reserved Comments about this page
--> <XXX system-captions="overdub"> <!-THE TYPE SUPPORTED BY THE VIEWER USED TO RENDER THE PRESENTATION (A mime-type) --> <XXX type="audio/x-auz"> Tests supported and an example for each of them The SMIL Tutorial is HELIO 1998-1999 all rights reserved Comments about this page
Coming next
You have seen how to synchronize tags on events and also how SMIL is really good at switching beetween several possibilities depending on the end-user system. Next chapter will show you a few tools to render SMIL presentations. The SMIL Tutorial is HELIO 1998-1999 all rights reserved Comments about this page
<switch>
<switch> sons are analyzed one after the other, looking at their system attributes. The first son that returns true to all the system tests is chosen. <switch id="identifier" title="string"> <!-<!-<!-<!-1st 2nd 3rd etc son --> son --> son --> -->
</switch>
any media tag with no clip attribute any media tag with clip arguments a (hyperlink) par seq
The SMIL Tutorial is HELIO 1998-1999 all rights reserved Comments about this page
Tools - Cover
Quick Access 1 2 3 4 5
Real Player TM (Real) Real Player window SOJA (Helio) GRINS (CWI) Coming next
Chapter 6. Tools
This small chapter is not a comparaison between tools but just a few guidelines to help you creating and rendering SMIL into presentations. We will show you the following tools: q Real Player G2 from Real
q q
http://www.helio.org/products/smil/tutorial/chapter5/sources/basicSynchro.smil
<smil> <head> <layout> <root-layout width="300" height="200" background-color="white" /> <region id="vim_icon" left="75" top="50" width="32" height="32" /> <region id="soja_icon" left="150" top="50" width="100" height="30" /> </layout> </head> <body> <par> <img src="vim32x32.gif" region="vim_icon" begin="4s" /> <img src="madewithsoja.gif" region="soja_icon" begin="6s" /> </par> </body> </smil>
basicSynchro.smil.html
<smil> <head> <layout> <root-layout width="300" height="200" background-color="white" /> <region id="vim_icon" left="75" top="50" width="32" height="32" /> <region id="soja_icon" left="150" top="50" width="100" height="30" /> </layout> </head> <body> <par> <img src="vim32x32.gif" region="vim_icon" begin="4s" /> <img src="madewithsoja.gif" region="soja_icon" begin="6s" /> </par> </body> </smil>
Advanced: events
When a media begins, it sends a begin event. Other media can listen to its event and start or stop as soon as they receive the signal. Here, SOJA icon will render 2 seconds after the begining (begin event) of the VIM icon. Click HERE to see the source in a new window. Please wait while loading SOJA (50Ko)...
The SMIL Tutorial is HELIO 1998-1999 all rights reserved Comments about this page
Advanced: switch
SMIL allows to switch, depending your language, bitrate, etc... Let's see what I can know about you ;-) Click HERE to see the source in a new window. Please wait while loading SOJA (50Ko)...
The SMIL Tutorial is HELIO 1998-1999 all rights reserved Comments about this page
1. 2. 3. 4. 5.
Play, Pause and Stop buttons Channels The screen where your presentations are rendered The progress bar shows you the current time The status bar gives you information about the network bandwidth.
The SMIL Tutorial is HELIO 1998-1999 all rights reserved Comments about this page
SOJA (Helio)
SOJA stands for SMIL Output in Java Applet. It was written by HELIO in 1998. HELIO is a French association based in Melun, France. The player is free and can be downloaded from here. SOJA is an applet that render SMIL in a web page or in a separate window. It supports the following formats: q Images: GIF, JPEG q Audio: AU and AUZ (AU zipped) q Text: plain text SOJA does not use streaming. HELIO chose to store media before rendering them. You have to wait until each of them has properly been loaded but the presentation will never be stopped. The SMIL Tutorial is HELIO 1998-1999 all rights reserved Comments about this page
GRINS (CWI)
GRINS stands for Graphical Interface for SMIL. It can be found at CWI. Coming up: more details. The SMIL Tutorial is HELIO 1998-1999 all rights reserved Comments about this page
Coming next
The next chapter is a SMIL reference. You will find all the attributes that can be given to each of the SMIL tags. This can be really usefull for you if you begin programming in SMIL. The SMIL Tutorial is HELIO 1998-1999 all rights reserved Comments about this page
Reference - Cover
Quick Access 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
<smil> <head> <meta> <layout> <root-layout> <region> <body> <seq> <par> <switch> <a> <anchor> Media tags with no clip attributes: <img> and <text> Media tags with clip attributes: <video>, <audio>,... The End
Chapter 7. Reference
In the following pages, you will find all the tags used with SMIL 1.0. Click next to continue or jump directly to a tag by clicking in the left hand side column Please report any mistake you may notice to smil-tutorial@helio.org
<smil>
The smil tag should be found at the top of all SMIL documents. <smil id="identifier"> </smil> Possible children: q head
q
body
The SMIL Tutorial is HELIO 1998-1999 all rights reserved Comments about this page
<head>
In this section, all layout and meta elements are defined. <head id="identifier"> </head> Possible children: q meta
q q
layout switch
The SMIL Tutorial is HELIO 1998-1999 all rights reserved Comments about this page
<meta>
<meta> gives additional informations about the current presentation. It can only be found under <head>. <meta name="string" content="string" skip-content="true|false" /> The SMIL Tutorial is HELIO 1998-1999 all rights reserved Comments about this page
<layout>
<layout> is used to define the layout on the screen. It can only be found under <head>. <layout type="string"> </layout> <!-- default is: --> <layout type="text/smil-basic-layout" /> </layout> Possible children: q root-layout
q
region
The SMIL Tutorial is HELIO 1998-1999 all rights reserved Comments about this page
<root-layout>
<root-layout> is often used to define window's width, height and title. It can only be found under <layout>. <root-layout id="identifier" width="integer" height="integer" title="string" skip-content="true|false" /> The SMIL Tutorial is HELIO 1998-1999 all rights reserved Comments about this page
<region>
<region> defines a rectangle within the main window. It can only be found under <layout>. <region id="identifier" left="integer" top="integer" z-index="integer" width="integer" height="integer" title="string" fit="hidden|fill|meet|scroll|slice" skip-content="true|false" /> The z-index parameter is used to position the rectangle along the z axis. A region with a z-index equal to 1 will be under a region with a z-index equal to 2. The SMIL Tutorial is HELIO 1998-1999 all rights reserved Comments about this page
<body>
The tags under <body> are played one after the other. <body> can be considered as a "special" <seq> tag, with no time attributes. <body id="identifier"> [...] </body> Possible children q switch
q q q q q
any media tag with no clip attribute any media tag with clip arguments a (hyperlink) par seq
The SMIL Tutorial is HELIO 1998-1999 all rights reserved Comments about this page
<a>
<a> is almost the same in SMIL as in HTML. You specify an URL to go if the user clicks on one of the tag's sons. NB: to use an equivalent of the "target" argument in HTML, you can use show="the_target_frame" with the SOJA Player. <a id="identifier" show="replace|new|pause" href="URL"> <!-- sons: clicking on them will lead the user to the specified URL --> </a> Possible children q switch
q q q q
any media tag with no clip attribute any media tag with clip arguments par seq
The SMIL Tutorial is HELIO 1998-1999 all rights reserved Comments about this page
<anchor>
<anchor> acts as <a> does but it is associated with only one medium and it has time properties. <anchor> is a son of a media element.. Its "begin" and "end" attributes are relative to the begining of its father. <anchor id="identifier" show="replace|new|pause" href="URL" skip-content="true|false" coords="x1,y1,x2,y2" begin="clock-value" end="clock-value" /> The SMIL Tutorial is HELIO 1998-1999 all rights reserved Comments about this page
The SMIL Tutorial - Reference - Media tags with clip attributes: <video>, <audio>,...
The End
You have ended the SMIL Tutorial at helio.org: Congratulations! We hope that you have enjoyed it and also that you will soon produce good SMIL! Chapter 8 contains only SMIL presentations corresponding to what you learned during The SMIL tutorial. The author,
If you have comments about this tutorial, please send them to smil-tutorial@helio.org. The SMIL Tutorial is HELIO 1998-1999 all rights reserved Comments about this page
Examples - Cover
Quick Access 1 2 3 4 5 6 7 8 9
Region example Relative positioning example z-index example Time example: duration Time example: begin Time example: sequence Time example: parallel Advanced: events Advanced: switch
Chapter 8. Examples
This chapter contains all the examples seen in this tutorial. Press "Next" to go through SMIL screens.
region.smil.html
<smil> <head> <layout> <root-layout width="300" height="200" background-color="white" /> <region id="vim_icon" left="75" top="50" width="32" height="32" /> </layout> </head> <body> <img src="vim32x32.gif" alt="The vim icon" region="vim_icon" /> </body> </smil>
region-relative.smil.html
<smil> <head> <layout> <root-layout width="300" height="200" background-color="white" /> <region id="vim_icon" left="50%" top="40%" width="32" height="32" /> </layout> </head> <body> <img src="vim32x32.gif" alt="The vim icon" region="vim_icon" /> </body> </smil>
overlay_zindex.smil.html
<smil> <head> <layout> <root-layout width="300" height="200" background-color="white" /> <region id="region_1" left="50" top="50" width="150" height="125" z-index="2" background-color="#EEFFEE" /> <region id="region_2" left="25" top="25" width="100" height="100" z-index="1" background-color="#DDDDDD" /> </layout> </head> <body> <par> <text src="text1.txt" region="region_1" /> <text src="text2.txt" region="region_2" /> </par> </body> </smil>
6seconds.smil.html
<smil> <head> <layout> <root-layout width="300" height="200" background-color="white" /> <region id="vim_icon" left="75" top="50" width="32" height="32" /> </layout> </head> <body> <img src="vim32x32.gif" alt="The vim icon" region="vim_icon" dur="6s" /> </body> </smil>
2then6seconds.smil.html
<smil> <head> <layout> <root-layout width="300" height="200" background-color="white" /> <region id="vim_icon" left="75" top="50" width="32" height="32" /> </layout> </head> <body> <img src="vim32x32.gif" alt="The vim icon" region="vim_icon" dur="6s" begin="2s" /> </body> </smil>
6then1then4seconds.smil.html
<smil> <head> <layout> <root-layout width="300" height="200" background-color="white" /> <region id="vim_icon" left="75" top="50" width="32" height="32" /> <region id="soja_icon" left="150" top="50" width="100" height="30" /> </layout> </head> <body> <seq> <img src="vim32x32.gif" alt="The vim icon" region="vim_icon" dur="6s" /> <img src="madewithsoja.gif" alt="Made with SOJA" region="soja_icon" dur="4s" begin="1s" /> </seq> </body> </smil>
2iconsDuring6seconds.smil.html
<smil> <head> <layout> <root-layout width="300" height="200" background-color="white" /> <region id="vim_icon" left="75" top="50" width="32" height="32" /> <region id="soja_icon" left="150" top="50" width="100" height="30" /> </layout> </head> <body> <par> <img src="vim32x32.gif" alt="The vim icon" region="vim_icon" dur="6s" /> <img src="madewithsoja.gif" alt="Made with SOJA" region="soja_icon" dur="6s" /> </par> </body> </smil>
beginEvent.smil.html
<smil> <head> <layout> <root-layout width="300" height="200" background-color="white" /> <region id="vim_icon" left="75" top="50" width="32" height="32" /> <region id="soja_icon" left="150" top="50" width="100" height="30" /> </layout> </head> <body> <par> <img src="vim32x32.gif" region="vim_icon" id="vim" begin="4s" /> <img src="madewithsoja.gif" region="soja_icon" begin="id(vim)(2s)" /> </par> </body> </smil>
switch.smil.html
<smil> <head> <layout> <root-layout width="300" height="200" background-color="#000066" /> <region id="main_message" width="50%" height="100%" left="0" top="0" background-color="#DDDDDD" /> <region id="size" width="200" height="50%" left="50%" top="0" background-color="#EEEEEE" /> <region id="bitrate" width="50%" height="50%" left="50%" top="50%" background-color="#EAEAEA" /> </layout> </head> <body> <switch> <par system-language="en"> <text src="you_are_english.txt" region="main_message" /> <switch> <text src="1024_768.en.txt" region="size" system-screen-size="1024X768" /> <text src="800_600.en.txt" region="size" system-screen-size="800X600" /> <text src="another_size.en.txt" region="size" /> </switch> <switch> <text src="28000bps.en.txt" region="bitrate" system-bitrate="28000" /> <text src="14000bps.en.txt" region="bitrate" system-bitrate="14000" /> <text src="another_bitrate.en.txt" region="bitrate" /> </switch> </par> <par system-language="fr"> <text src="vous_etes_francais.txt" region="main_message" /> <switch> <text src="1024_768.fr.txt" region="size" system-screen-size="1024X768" /> <text src="800_600.fr.txt" region="size" system-screen-size="800X600" /> <text src="another_size.fr.txt" region="size" /> </switch> <switch> <text src="28000bps.fr.txt" region="bitrate" system-bitrate="28000" /> <text src="14000bps.fr.txt" region="bitrate" system-bitrate="14000" /> <text src="another_bitrate.fr.txt" region="bitrate" /> </switch> </par> <text src="unknown_language.txt" region="main_message" /> </switch> </body> </smil>