title: How can I handle an ASX stream which uses features that Silverlight doesn't support (e.g. REPEAT)
body: <p>I'm trying to display a video feed which is provided as a server side playlist (ASX) by another party. The playlist contains some unsupported features, such as repeat:</p>
  
  <pre><code>&lt;ASX VERSION="3.0"&gt;
    &lt;REPEAT COUNT="4"&gt;
      &lt;EntryRef href="http://some-ad-network.com/ad.asx" /&gt;
      &lt;Entry&gt;
        &lt;Ref href="http://video-host/content-primary-source"&gt;&lt;/Ref&gt;
      &lt;/Entry&gt;
      &lt;Entry&gt;
        &lt;Ref href="http://video-host/content-secondary-source"&gt;&lt;/Ref&gt;
      &lt;/Entry&gt;
    &lt;/REPEAT&gt;
  &lt;/ASX&gt;
  </code></pre>
  
  <p><a href="http://msdn.microsoft.com/en-us/library/cc189080(VS.95).aspx#anchor_mediaformats_formats" rel="nofollow noreferrer">Silverlight 2.0 doesn't support the REPEAT element</a> and throws an exception:</p>
  
  <blockquote>
    <p>REPEAT Element: This is not supported
    and will raise a MediaError with
    AG _ E _ ASX _ UNSUPPORTED _ ELEMENT.</p>
  </blockquote>
  
  <p>Is there a workaround? Can I pull the ASX file down via HttpWebRequest, parse it, and request the streams individually? Do you know of a library or some sample code somewhere which handles ASX file parsing?</p>