banner art

role attribute

The role attribute specifies the purpose or type of a media element. This attribute enables you to create custom categories for digital media sources, such as music, bumper, promo, or public service announcement. The WMS Client Logging plug-in uses the value specified in the role attribute to populate the cs-media-role field.

You can use any naming scheme to set values for the role attribute. However, the value Advertisement has a special meaning. Whenever the server starts to stream a media element with the role attribute value of Advertisement, the Advertisement counter is incremented on the Monitor tab. Advertisements streamed by wrapper playlists increment the counters in the same manner.

In the following example, the first entry is logged with a role attribute value of music segment, and the second with the role attribute value of Advertisement. The second entry also includes a noSkip attribute set to true in order to prevent the user from skipping the advertisement.

<?wsx version='1.0'?>
<smil>
	<media src="MusicVideo.wmv" role="music segment"/>
	<media src="Comml1.wmv" role="Advertisement" noSkip="true"/>
</smil>

The primary purpose of the role attribute is to help you analyze and understand logging data. If you use a database to track logging data, you can create reports that separate content usage by type; for example, you can create a report showing the different types of music files played, a chart showing the types of content that users preferred, or the number of public service announcements that you played. For example, you can set the value of the role attribute to movie and then interpret the log file to determine how many times movies have been streamed. Keep in mind that if the media element references another playlist, rather than a specific item, the advertisement counters are not updated.

The role attribute can be specified for the following playlist element:

Note Image Notes

Related topics


© 2005 Microsoft Corporation. All rights reserved.