Previous | Next |
The following section describes how you can control the presentation of your media by using ASX scripting.
<Author>Ad Department</Author>
<ASX version ="3.0">
<Title>Windows Media v4 ASX Demo Two</Title>
<Abstract>Windows Media Technologies</Abstract>
<MoreInfo href = "http://sample.microsoft.com"/>
<!—This is the first Entry -->
<Entry>
<Title>This is the ad</Title>
<Author>Ad Department</Author>
<Copyright>1999</Copyright>
<Abstract>This is a description of the ad</Abstract>
<MoreInfo href = "http://sample.microsoft.com/"/>
<Ref href="ad.asf"/>
<Banner href ="purchase.gif">
<Abstract>Click here to go to our Web site</Abstract>
<MoreInfo href = "http://sample.microsoft.com/" />
</Banner>
</Entry>
<!-- This is the second Entry -->
<!—The ASF plays from Segment2 to Segment3 -->
<Entry>
<Title>Playlist clip number two</Title>
<Author>Windows Media</Author>
<Copyright>1999</Copyright>
<Ref href="show.asf"/>
<StartMarker Name = "Segment2" />
<EndMarker Name = "Segment3" />
</Entry>
</ASX>
<EVENT NAME="Adlink" WHENDONE="RESUME">
<ENTRYREF HREF=mms://example.microsoft.com/adlink.asf />
</EVENT>
Windows Media Player then switches from the live stream to play media contained in the Event, in this case Adlink.asf. The script WHENDONE=”RESUME”
instructs Windows Media Player to resume playing the previous media as soon as Adlink.asf is finished.
Event scripting was created to enable personalization in live presentations. The possibilities inherent in Event switching are best appreciated by contrasting how ads reach viewers through standard, over-the-air broadcasting with how ads can reach viewers using Windows Media Technologies. Ads broadcast can only be roughly targeted at viewers, using ratings data as the primary criterion. Ads sent using Windows Media Technologies can be aimed directly at the target user because Events and playlists can be built on the fly based on user input. For more information, see Personalized Media Delivery.
You can create seamless stream switches by using the OpenEvent tag in conjunction with the Event tag. By sending an OpenEvent script command ten seconds prior to the Event command, Windows Media Player is able to preload a portion of the upcoming ASF stream. When Windows Media Player receives a corresponding Event command, the switch to the new ASF stream contains no gaps; presentation is seamless.
For more information, see Using ASX Metafiles in the Windows Media Player Control SDK.
See Also
About the ASX Metafile Sample, Using the ASX Metafile Sample, Windows Media Technologies Solutions Samples
Previous | Next |