timesheets.js

A declarative approach for HTML Timing using SMIL Timesheets

The timeContainer attribute defines the timing behaviour of a time container:

timeContainer="seq"

A seq container defines a sequence of elements in which elements play one after the other.

  1. first item
  2. second item
  3. third item
  4. fourth item
  5. last item
<ol smil:timeContainer="seq" smil:repeatCount="indefinite">
    <li smil:dur="1s" begin="0:01">  first item </li>
    <li smil:dur="1s">              second item </li>
    <li smil:dur="1s">               third item </li>
    <li smil:dur="1s">              fourth item </li>
    <li smil:dur="1s">                last item </li>
</ol>

The implicit syncbase of the child elements of a seq is the active end of the previous element. Previous means the element that occurs before this element in the sequence time container. For the first child of a sequence (i.e. where no previous sibling exists), the implicit syncbase is the begin of the sequence time container.

The implicit duration of a seq ends with the active end of the last child of the seq. If any child of a seq has an indefinite active duration, the implicit duration of the seq is also indefinite.

timeContainer="par"

A par container, short for "parallel", defines a simple time grouping in which multiple elements may play back at the same time.

  1. first item
  2. second item
  3. third item
  4. fourth item
  5. last item
<ol smil:timeContainer="par" smil:dur="6s" smil:repeatCount="indefinite">
    <li smil:begin="0:01">  first item </li>
    <li smil:begin="0:02"> second item </li>
    <li smil:begin="0:03">  third item </li>
    <li smil:begin="0:04"> fourth item </li>
    <li smil:begin="0:05">   last item </li>
</ol>

The implicit syncbase of the child elements of a par is the begin of the par. The default value of begin for children of a par is "0".

The implicit duration of a par is controlled by endsync. By default, the implicit duration of a par is defined by the endsync="last" semantics. The implicit duration ends with the last active end of the child elements.

timeContainer="excl"

This defines a time container with semantics based upon par, but with the additional constraint that only one child element may play at any given time: if any element begins playing while another is already playing, the element that was playing is stopped.

  1. first item
  2. second item
  3. third item
  4. fourth item
  5. last item
<ol smil:timeContainer="excl" smil:dur="6s" smil:repeatCount="indefinite">
    <li smil:begin="0:01">  first item </li>
    <li smil:begin="0:02"> second item </li>
    <li smil:begin="0:03">  third item </li>
    <li smil:begin="0:04"> fourth item </li>
    <li smil:begin="0:05">   last item </li>
</ol>

The implicit syncbase of the child elements of the excl is the begin of the excl. The default value of begin for children of excl is "indefinite". This means that the excl has 0 duration unless a child of the excl has been added to the timegraph.

The implicit duration of an excl container is defined the same as for a par container, using the endsync="last" semantics. However, since the default timing for children of excl is interactive, the implicit duration for excl time containers with only default timing on the children will be 0.

timeContainer="none" (default)

By default, an HTML element is not a time container.

This sounds fine, but maybe the <body> element should be considered as a <par> container by default.