Microsoft KB Archive/318338

= HOW TO: Insert Ads into Live Streams by Using an .asx File =

PSS ID Number: 318338

Article Last Modified on 6/5/2003

-

The information in this article applies to:


 * Microsoft Windows Media Services 4.0
 * Microsoft Windows Media Services 4.1
 * Microsoft Windows Media Services 9 Series
 * Microsoft Windows Media Encoder 7.1
 * Microsoft Windows Media Encoder 9 Series

-



This article was previously published under Q318338



SUMMARY
To insert an ad into a live stream, you can use an .asx file with the   and   elements to make the player play the live stream for a specific amount of time, insert an ad, and resume playback of the live stream.



MORE INFORMATION
Use the following sample code to make the following sequence occur:
 * 1) Play the live stream for 30 minutes.
 * 2) Play the ad.
 * 3) Repeat the sequence.

  Alternatively, you can use the following sample code to make the following sequence occur:
 * 1) Make the ad appear only one time, 30 minutes into the broadcast.
 * 2) Remove the   tag.
 * 3) Add a second reference to the live stream:

 

