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.

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.

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.

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.

e1-p1-m2 interrupts e1-p1-m1 and runs for 30 seconds.

e1-p3-m1 resumes play and runs to the end of its duration.

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.