Difference between revisions of "SMIL Scheduling"

From A-SMIL.org
Jump to: navigation, search
(Play at a specific time)
(Play at a given day of week)
 
Line 25: Line 25:
 
<source lang="smil">
 
<source lang="smil">
 
<par dur="indefinite">
 
<par dur="indefinite">
   <seq begin="wallclock(R/2000-01-01T09:00+w3/P1W)" end="wallclock(R/2000-01-01T12:00+w3/P1W)">
+
   <seq begin="wallclock(R/2000-01-01+w3T09:00/P1W)" end="wallclock(R/2000-01-01+w3T12:00/P1W)">
 
     ...
 
     ...
 
   </seq>
 
   </seq>

Latest revision as of 07:18, 13 July 2011

SMIL playlists may be scheduled to play at specific times and repeat intervals. This is the single greatest difference between SMIL and other XML-based multimedia markup languages.

For details please see technical specification on Wallclock.

Play at specific time each day

The following code starts a playlist between 9 AM and 12 noon each day.

<par dur="indefinite">
  <seq begin="wallclock(R/2000-01-01T09:00/P1D)" end="wallclock(R/2000-01-01T12:00/P1D)">
    ...
  </seq>
</par>

A scheduled playlist MUST BE enclosed within a <par> section. If the schedule is valid forever, set the duration of the <par> to "indefinite."

The date 2000-01-01 gives a reference to a starting point in time, and can be any date in the past. "P1D" is the ISO-8601 designation for a repeat period of 1 day.

Play at a given day of week

Play between 9 AM and 12 noon on each Wednesday morning:

<par dur="indefinite">
  <seq begin="wallclock(R/2000-01-01+w3T09:00/P1W)" end="wallclock(R/2000-01-01+w3T12:00/P1W)">
    ...
  </seq>
</par>

+w3 designates the 3rd weekday, or Wednesday. "P1W" repeats the schedule each week.

Play at a specific time

Play once on January 1, 2010, between 9 AM and 12 noon.

<par dur="indefinite">
  <seq begin="wallclock(2010-01-01T09:00)" end="wallclock(2010-01-01T12:00)">
    ...
  </seq>
</par>

Note that "R" repeat designator is removed.

Related