Windows apps
Collapse the table of content
Expand the table of content

higher

banner art
PreviousNext

higher

The higher attribute controls how media elements from a higher priorityClass element interrupt the media elements in the active priorityClass element.

Syntax

higher= "stop" | "pause"

Remarks

The WMS SMIL Playlist Parser plug-in enforces case sensitivity on the higher attribute.

This attribute must have one of the following values.

Value Description
stop If a child element begins when another child element is active, the active element is stopped and does not resume.
pause If a child element begins when another child element is active, the active element is paused and resumes when the interrupting element completes its active duration. This is the default value.

The priorityClass hierarchy is determined by the order in which the priorityClass elements appear in the playlist. The first element has higher priority than the second, and so on. The priorityClass element can be associated with three attributes simultaneously (peers, higher, and lower).

Example Code

In the following example, the media element p2-m1 in the second priority class plays for 30 seconds before it is interrupted by the media element p1-m1 in the first priority class. Because the higher attribute has been set to "stop", p2-m1 does not resume playing when p1-m1 has finished.

<?wsx version="1.0"?>
<smil>
  <excl>
    <priorityClass id="p1" >
        <media id="p1-m1" src="c:\wmpub\wmroot\Audio_1.wma"
             begin="p2-m1.begin + 30" dur="30" />
    </priorityClass>

    <priorityClass id="p2" higher="stop">
        <media id="p2-m1" src="c:\wmpub\wmroot\Audio_2.wma"
             begin="0" dur="60" />
    </priorityClass>
  </excl>
</smil>

The next example provides a more complete illustration of how media elements can be interrupted. The values assigned to the attributes in the first priorityClass, peers and lower, indicate that each media element is stopped when another media element in the same block starts, but that no media element is stopped for a lower priority class. In the second priorityClass, the value assigned to the peers attribute indicates that media elements in this class that interrupt the active element are deferred until the active element has finished. In the third priorityClass, the value assigned to the higher attribute indicates that media elements in this class are paused for elements in higher priority classes, but that they will resume playing, where they were paused, when the higher priority elements are finished. The elements in the playlist are played in the following order. Assume that the actual length of the files audio1.wmv through audio5.wmv is 30 seconds each and that the actual length of audio6.wmv is 60 seconds.

  1. e1-p3-m1 starts and runs for 30 seconds of its 60-second length.
  2. e1-p2-m1 interrupts and runs for 30 seconds. e1-p3-m1 pauses and resumes later.
  3. e1-p2-m2 starts when e1-p2-m1 ends and runs for 30 seconds. Because the peers attribute in the priority class indicates that the interrupting element is deferred until the active element finishes, e1-p2-m2 cannot interrupt e1-p2-m1 even though it is set to begin when e1-p2-m1 begins.
  4. e1-p1-m1 starts when e1-p2-m2 ends and runs for 20 seconds. It is stopped by its peer, e1-p1-m2, because the value "stop" is assigned to the peers attribute.
  5. e1-p1-m2 interrupts e1-p1-m1 and runs for 30 seconds.
  6. e1-p3-m1 resumes play and runs to the end of its duration.
  7. e1-p2-m3 never plays because it tries to interrupt e1-p1-m2, and the lower attribute on the first priority class indicates that e1-p1-m2 cannot be interrupted by a media element in a lower priority class.
<?wsx version="1.0"?>
<smil>
  <excl>
    <priorityClass id="e1-p1" peers="stop" lower="never">
        <media id="e1-p1-m1" src="c:\wmpub\wmroot\audio1.wma" 
             begin="e1-p2-m2.end" />
        <media id="e1-p1-m2" src="c:\wmpub\wmroot\audio2.wma" 
             begin="e1-p1-m1.begin + 20" />
    </priorityClass>

    <priorityClass id="e1-p2" peers="defer">
        <media id="e1-p2-m1" src="c:\wmpub\wmroot\audio3.wma"
             begin="e1-p3-m1.begin + 30" dur="30" />
        <media id="e1-p2-m2" src="c:\wmpub\wmroot\audio4.wma"
             begin="e1-p2-m1.begin" dur ="30" />
        <media id="e1-p2-m3" src="c:\wmpub\wmroot\audio5.wma"
             begin="e1-p1-m2.begin + 15"/>
    </priorityClass>

    <priorityClass id="e1-p3" higher="pause">
        <media id="e1-p3-m1" src="c:\wmpub\wmroot\audio6.wma"
             begin="0" dur="60" />
    </priorityClass>

  </excl>
</smil>

See Also

PreviousNext
Show:
© 2017 Microsoft