priorityClass
Previous | Next |
priorityClass
The priorityClass element defines the interrupt behavior of media elements within an excl time container.
Attributes
The following table identifies the attributes supported by Windows Media Services for the priorityClass element. All attributes are optional.
Attribute | Description |
syncEvent | Sends a playlist synchronization event from the shared playlist for a publishing point to all client wrapper playlists. |
higher | Controls how media elements from a higher priorityClass element interrupt the media elements in the active priorityClass. You cannot specify higher="pause" when a JPEG file is a media element in the priorityClass queue. |
id | Uniquely identifies an element. This value must begin with a letter. |
lower | Controls how media elements from a lower priorityClass element interrupt the media elements in the active priorityClass element. |
peers | Controls how media elements within a priorityClass element can interrupt one another. You cannot specify peers="pause" when a JPEG file is a media element in the priorityClass queue. |
Remarks
The WMS SMIL Playlist Parser plug-in enforces case sensitivity on the priorityClass element.
The behavior of the media elements when interrupted is described in terms of the peers, higher, and lower priority attributes. The priorityClass elements are assigned priority levels based upon the order in which they are declared within the excl element. The first declared priorityClass element has highest priority, and the last declared has lowest priority. Peers exist within the same priorityClass element.
Specifying peers="pause" or higher="pause" when a JPEG file is included in the priorityClass queue is not supported by Windows Media Services. To work around this, you can use Windows Media Encoder to convert the JPEG file to a Windows Media file of the appropriate length and substitute the Windows Media file for the JPEG file in the priorityClass queue.
If no priorityClass element is used in the excl time container, all media elements are considered to be peers. The default peers behavior is to stop the active element when it is interrupted and play the element that caused the interruption.
Example Code
In the following example, the values assigned to the attributes in the first priorityClass, peers and lower, indicate that each media element stops and does not resume 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-p3-m1 starts and runs for 30 seconds of its 60-second length.
- e1-p2-m1 interrupts and runs for 30 seconds. e1-p3-m1 pauses and resumes later.
- 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 playing 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.
<?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
Previous | Next |